Merge "unhide API for synchronous audio capture."
diff --git a/api/current.txt b/api/current.txt
index d95868f..f61eb30 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -10743,6 +10743,7 @@
method public void setRecordPositionUpdateListener(android.media.AudioRecord.OnRecordPositionUpdateListener);
method public void setRecordPositionUpdateListener(android.media.AudioRecord.OnRecordPositionUpdateListener, android.os.Handler);
method public void startRecording() throws java.lang.IllegalStateException;
+ method public void startRecording(android.media.MediaSyncEvent) throws java.lang.IllegalStateException;
method public void stop() throws java.lang.IllegalStateException;
field public static final int ERROR = -1; // 0xffffffff
field public static final int ERROR_BAD_VALUE = -2; // 0xfffffffe
@@ -11288,6 +11289,15 @@
method public abstract void onScanCompleted(java.lang.String, android.net.Uri);
}
+ public class MediaSyncEvent {
+ method public static android.media.MediaSyncEvent createEvent(int) throws java.lang.IllegalArgumentException;
+ method public int getAudioSessionId();
+ method public int getType();
+ method public android.media.MediaSyncEvent setAudioSessionId(int) throws java.lang.IllegalArgumentException;
+ field public static final int SYNC_EVENT_NONE = 0; // 0x0
+ field public static final int SYNC_EVENT_PRESENTATION_COMPLETE = 1; // 0x1
+ }
+
public class RemoteControlClient {
ctor public RemoteControlClient(android.app.PendingIntent);
ctor public RemoteControlClient(android.app.PendingIntent, android.os.Looper);
@@ -11405,6 +11415,7 @@
public class ToneGenerator {
ctor public ToneGenerator(int, int);
+ method public final int getAudioSessionId();
method public void release();
method public boolean startTone(int);
method public boolean startTone(int, int);
diff --git a/media/java/android/media/AudioRecord.java b/media/java/android/media/AudioRecord.java
index 34bf368..81e8028 100644
--- a/media/java/android/media/AudioRecord.java
+++ b/media/java/android/media/AudioRecord.java
@@ -530,7 +530,6 @@
* @throws IllegalStateException
* @param syncEvent event that triggers the capture.
* @see MediaSyncEvent
- * @hide
*/
public void startRecording(MediaSyncEvent syncEvent)
throws IllegalStateException {
diff --git a/media/java/android/media/MediaSyncEvent.java b/media/java/android/media/MediaSyncEvent.java
index d2a0735..31af6b5 100644
--- a/media/java/android/media/MediaSyncEvent.java
+++ b/media/java/android/media/MediaSyncEvent.java
@@ -23,7 +23,6 @@
* only when the playback on a particular audio session is complete.
* The audio session ID is retrieved from a player (e.g {@link MediaPlayer}, {@link AudioTrack} or
* {@link ToneGenerator}) by use of the getAudioSessionId() method.
- * @hide
*/
public class MediaSyncEvent {
@@ -49,7 +48,7 @@
* <p>The type specifies which kind of event is monitored.
* For instance, event {@link #SYNC_EVENT_PRESENTATION_COMPLETE} corresponds to the audio being
* presented to the user on a particular audio session.
- * @param type the synchronization event type.
+ * @param eventType the synchronization event type.
* @return the MediaSyncEvent created.
* @throws java.lang.IllegalArgumentException
*/
diff --git a/media/java/android/media/ToneGenerator.java b/media/java/android/media/ToneGenerator.java
index 4907a13..5592105 100644
--- a/media/java/android/media/ToneGenerator.java
+++ b/media/java/android/media/ToneGenerator.java
@@ -880,7 +880,6 @@
*
* @return the ID of the audio session this ToneGenerator belongs to or 0 if an error
* occured.
- * @hide
*/
public native final int getAudioSessionId();