Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6db65335 authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "unhide API for synchronous audio capture."

parents 7b5f22e1 ff2577da
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -10743,6 +10743,7 @@ package android.media {
    method public void setRecordPositionUpdateListener(android.media.AudioRecord.OnRecordPositionUpdateListener);
    method public void setRecordPositionUpdateListener(android.media.AudioRecord.OnRecordPositionUpdateListener);
    method public void setRecordPositionUpdateListener(android.media.AudioRecord.OnRecordPositionUpdateListener, android.os.Handler);
    method public void setRecordPositionUpdateListener(android.media.AudioRecord.OnRecordPositionUpdateListener, android.os.Handler);
    method public void startRecording() throws java.lang.IllegalStateException;
    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;
    method public void stop() throws java.lang.IllegalStateException;
    field public static final int ERROR = -1; // 0xffffffff
    field public static final int ERROR = -1; // 0xffffffff
    field public static final int ERROR_BAD_VALUE = -2; // 0xfffffffe
    field public static final int ERROR_BAD_VALUE = -2; // 0xfffffffe
@@ -11288,6 +11289,15 @@ package android.media {
    method public abstract void onScanCompleted(java.lang.String, android.net.Uri);
    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 {
  public class RemoteControlClient {
    ctor public RemoteControlClient(android.app.PendingIntent);
    ctor public RemoteControlClient(android.app.PendingIntent);
    ctor public RemoteControlClient(android.app.PendingIntent, android.os.Looper);
    ctor public RemoteControlClient(android.app.PendingIntent, android.os.Looper);
@@ -11405,6 +11415,7 @@ package android.media {
  public class ToneGenerator {
  public class ToneGenerator {
    ctor public ToneGenerator(int, int);
    ctor public ToneGenerator(int, int);
    method public final int getAudioSessionId();
    method public void release();
    method public void release();
    method public boolean startTone(int);
    method public boolean startTone(int);
    method public boolean startTone(int, int);
    method public boolean startTone(int, int);
+0 −1
Original line number Original line Diff line number Diff line
@@ -530,7 +530,6 @@ public class AudioRecord
     * @throws IllegalStateException
     * @throws IllegalStateException
     * @param syncEvent event that triggers the capture.
     * @param syncEvent event that triggers the capture.
     * @see MediaSyncEvent
     * @see MediaSyncEvent
     * @hide
     */
     */
    public void startRecording(MediaSyncEvent syncEvent)
    public void startRecording(MediaSyncEvent syncEvent)
    throws IllegalStateException {
    throws IllegalStateException {
+1 −2
Original line number Original line Diff line number Diff line
@@ -23,7 +23,6 @@ package android.media;
 * only when the playback on a particular audio session is complete.
 * 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
 * The audio session ID is retrieved from a player (e.g {@link MediaPlayer}, {@link AudioTrack} or
 * {@link ToneGenerator}) by use of the getAudioSessionId() method.
 * {@link ToneGenerator}) by use of the getAudioSessionId() method.
 * @hide
 */
 */
public class MediaSyncEvent {
public class MediaSyncEvent {


@@ -49,7 +48,7 @@ public class MediaSyncEvent {
     * <p>The type specifies which kind of event is monitored.
     * <p>The type specifies which kind of event is monitored.
     * For instance, event {@link #SYNC_EVENT_PRESENTATION_COMPLETE} corresponds to the audio being
     * For instance, event {@link #SYNC_EVENT_PRESENTATION_COMPLETE} corresponds to the audio being
     * presented to the user on a particular audio session.
     * 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.
     * @return the MediaSyncEvent created.
     * @throws java.lang.IllegalArgumentException
     * @throws java.lang.IllegalArgumentException
     */
     */
+0 −1
Original line number Original line Diff line number Diff line
@@ -880,7 +880,6 @@ public class ToneGenerator
    *
    *
    * @return the ID of the audio session this ToneGenerator belongs to or 0 if an error
    * @return the ID of the audio session this ToneGenerator belongs to or 0 if an error
    * occured.
    * occured.
    * @hide
    */
    */
    public native final int getAudioSessionId();
    public native final int getAudioSessionId();