Skip to content

Commit 6db6533

Browse files
Eric LaurentAndroid (Google) Code Review
authored andcommitted
Merge "unhide API for synchronous audio capture."
2 parents 7b5f22e + ff2577d commit 6db6533

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

api/current.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10743,6 +10743,7 @@ package android.media {
1074310743
method public void setRecordPositionUpdateListener(android.media.AudioRecord.OnRecordPositionUpdateListener);
1074410744
method public void setRecordPositionUpdateListener(android.media.AudioRecord.OnRecordPositionUpdateListener, android.os.Handler);
1074510745
method public void startRecording() throws java.lang.IllegalStateException;
10746+
method public void startRecording(android.media.MediaSyncEvent) throws java.lang.IllegalStateException;
1074610747
method public void stop() throws java.lang.IllegalStateException;
1074710748
field public static final int ERROR = -1; // 0xffffffff
1074810749
field public static final int ERROR_BAD_VALUE = -2; // 0xfffffffe
@@ -11288,6 +11289,15 @@ package android.media {
1128811289
method public abstract void onScanCompleted(java.lang.String, android.net.Uri);
1128911290
}
1129011291

11292+
public class MediaSyncEvent {
11293+
method public static android.media.MediaSyncEvent createEvent(int) throws java.lang.IllegalArgumentException;
11294+
method public int getAudioSessionId();
11295+
method public int getType();
11296+
method public android.media.MediaSyncEvent setAudioSessionId(int) throws java.lang.IllegalArgumentException;
11297+
field public static final int SYNC_EVENT_NONE = 0; // 0x0
11298+
field public static final int SYNC_EVENT_PRESENTATION_COMPLETE = 1; // 0x1
11299+
}
11300+
1129111301
public class RemoteControlClient {
1129211302
ctor public RemoteControlClient(android.app.PendingIntent);
1129311303
ctor public RemoteControlClient(android.app.PendingIntent, android.os.Looper);
@@ -11405,6 +11415,7 @@ package android.media {
1140511415

1140611416
public class ToneGenerator {
1140711417
ctor public ToneGenerator(int, int);
11418+
method public final int getAudioSessionId();
1140811419
method public void release();
1140911420
method public boolean startTone(int);
1141011421
method public boolean startTone(int, int);

media/java/android/media/AudioRecord.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,6 @@ public void startRecording()
530530
* @throws IllegalStateException
531531
* @param syncEvent event that triggers the capture.
532532
* @see MediaSyncEvent
533-
* @hide
534533
*/
535534
public void startRecording(MediaSyncEvent syncEvent)
536535
throws IllegalStateException {

media/java/android/media/MediaSyncEvent.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
* only when the playback on a particular audio session is complete.
2424
* The audio session ID is retrieved from a player (e.g {@link MediaPlayer}, {@link AudioTrack} or
2525
* {@link ToneGenerator}) by use of the getAudioSessionId() method.
26-
* @hide
2726
*/
2827
public class MediaSyncEvent {
2928

@@ -49,7 +48,7 @@ public class MediaSyncEvent {
4948
* <p>The type specifies which kind of event is monitored.
5049
* For instance, event {@link #SYNC_EVENT_PRESENTATION_COMPLETE} corresponds to the audio being
5150
* presented to the user on a particular audio session.
52-
* @param type the synchronization event type.
51+
* @param eventType the synchronization event type.
5352
* @return the MediaSyncEvent created.
5453
* @throws java.lang.IllegalArgumentException
5554
*/

media/java/android/media/ToneGenerator.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,6 @@ public boolean startTone(int toneType) {
880880
*
881881
* @return the ID of the audio session this ToneGenerator belongs to or 0 if an error
882882
* occured.
883-
* @hide
884883
*/
885884
public native final int getAudioSessionId();
886885

0 commit comments

Comments
 (0)