diff --git a/api/current.txt b/api/current.txt index f23f41fe147da..8880f2764e71d 100644 --- a/api/current.txt +++ b/api/current.txt @@ -24371,8 +24371,6 @@ package android.media { field public static final int MEDIA_CALL_PAUSE = 4; // 0x4 field public static final int MEDIA_CALL_PLAY = 5; // 0x5 field public static final int MEDIA_CALL_PREPARE = 6; // 0x6 - field public static final int MEDIA_CALL_PREPARE_DRM = 7; // 0x7 - field public static final int MEDIA_CALL_PROVIDE_DRM_KEY_RESPONSE = 8; // 0x8 field public static final int MEDIA_CALL_RELEASE_DRM = 12; // 0xc field public static final int MEDIA_CALL_RESTORE_DRM_KEYS = 13; // 0xd field public static final int MEDIA_CALL_SEEK_TO = 14; // 0xe @@ -24381,8 +24379,6 @@ package android.media { field public static final int MEDIA_CALL_SET_AUDIO_SESSION_ID = 17; // 0x11 field public static final int MEDIA_CALL_SET_AUX_EFFECT_SEND_LEVEL = 18; // 0x12 field public static final int MEDIA_CALL_SET_DATA_SOURCE = 19; // 0x13 - field public static final int MEDIA_CALL_SET_DRM_CONFIG_HELPER = 20; // 0x14 - field public static final int MEDIA_CALL_SET_DRM_PROPERTY_STRING = 21; // 0x15 field public static final int MEDIA_CALL_SET_NEXT_DATA_SOURCE = 22; // 0x16 field public static final int MEDIA_CALL_SET_NEXT_DATA_SOURCES = 23; // 0x17 field public static final int MEDIA_CALL_SET_PLAYBACK_PARAMS = 24; // 0x18 diff --git a/media/java/android/media/MediaPlayer2.java b/media/java/android/media/MediaPlayer2.java index 0cc744186a75d..f73c38eb9fb08 100644 --- a/media/java/android/media/MediaPlayer2.java +++ b/media/java/android/media/MediaPlayer2.java @@ -130,22 +130,21 @@ import java.util.concurrent.Executor; * the internal player engine. *
IllegalArgumentException
* and IOException that may be thrown from
- * setDataSource and setPlaylist methods.setDataSource.
*
*
* null, the handler on the main looper will be used.
*/
+ // This is a synchronous call.
@Override
public abstract void addOnRoutingChangedListener(AudioRouting.OnRoutingChangedListener listener,
Handler handler);
@@ -915,6 +927,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* @param listener The previously added {@link AudioRouting.OnRoutingChangedListener} interface
* to remove.
*/
+ // This is a synchronous call.
@Override
public abstract void removeOnRoutingChangedListener(AudioRouting.OnRoutingChangedListener listener);
@@ -1070,6 +1083,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* @throws IllegalArgumentException if params is invalid or not supported.
* @hide
*/
+ // This is an asynchronous call.
public void setBufferingParams(@NonNull BufferingParams params) { }
/**
@@ -1152,6 +1166,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
*
* @param params the playback params.
*/
+ // This is an asynchronous call.
public abstract void setPlaybackParams(@NonNull PlaybackParams params);
/**
@@ -1167,6 +1182,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
*
* @param params the A/V sync params to apply
*/
+ // This is an asynchronous call.
public abstract void setSyncParams(@NonNull SyncParams params);
/**
@@ -1255,6 +1271,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* {@link #SEEK_CLOSEST} often has larger performance overhead compared
* to the other options if there is no sync frame located at msec.
*/
+ // This is an asynchronous call.
public abstract void seekTo(long msec, @SeekMode int mode);
/**
@@ -1327,6 +1344,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* this method, you will have to initialize it again by setting the
* data source and calling prepare().
*/
+ // This is a synchronous call.
@Override
public abstract void reset();
@@ -1365,6 +1383,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* by calling this method.
* This method must be called before one of the overloaded setDataSource methods.
*/
+ // This is an asynchronous call.
public abstract void setAudioSessionId(int sessionId);
/**
@@ -1389,6 +1408,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* methods.
* @param effectId system wide unique id of the effect to attach
*/
+ // This is an asynchronous call.
public abstract void attachAuxEffect(int effectId);
@@ -1404,6 +1424,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* 0 < x <= R -> level = 10^(72*(x-R)/20/R)
* @param level send level scalar
*/
+ // This is an asynchronous call.
public abstract void setAuxEffectSendLevel(float level);
/**
@@ -1618,6 +1639,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
*
* @see android.media.MediaPlayer2#getTrackInfo
*/
+ // This is an asynchronous call.
public abstract void selectTrack(int index);
/**
@@ -1634,6 +1656,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
*
* @see android.media.MediaPlayer2#getTrackInfo
*/
+ // This is an asynchronous call.
public abstract void deselectTrack(int index);
/** @hide */
@@ -1754,8 +1777,6 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* - * If {@code OnDrmConfigHelper} is registered, it will be called during + * If {@link OnDrmConfigHelper} is registered, it will be called during * preparation to allow configuration of the DRM properties before opening the * DRM session. Note that the callback is called synchronously in the thread that called - * {@code prepareDrm}. It should be used only for a series of {@code getDrmPropertyString} + * {@link #prepareDrm}. It should be used only for a series of {@code getDrmPropertyString} * and {@code setDrmPropertyString} calls and refrain from any lengthy operation. *
* If the device has not been provisioned before, this call also provisions the device @@ -2281,6 +2298,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase * @throws ProvisioningServerErrorException if provisioning is required but failed due to * the request denied by the provisioning server */ + // This is a synchronous call. public abstract void prepareDrm(@NonNull UUID uuid) throws UnsupportedSchemeException, ResourceBusyException, ProvisioningNetworkErrorException, ProvisioningServerErrorException; @@ -2294,6 +2312,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase * * @throws NoDrmSchemeException if there is no active DRM session to release */ + // This is an asynchronous call. public abstract void releaseDrm() throws NoDrmSchemeException; /** @@ -2359,6 +2378,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase * @throws DeniedByServerException if the response indicates that the * server rejected the request */ + // This is a synchronous call. public abstract byte[] provideDrmKeyResponse( @Nullable byte[] keySetId, @NonNull byte[] response) throws NoDrmSchemeException, DeniedByServerException; @@ -2369,6 +2389,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase * * @param keySetId identifies the saved key set to restore */ + // This is an asynchronous call. public abstract void restoreDrmKeys(@NonNull byte[] keySetId) throws NoDrmSchemeException; @@ -2396,6 +2417,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase * {@link MediaDrm#PROPERTY_VENDOR}, {@link MediaDrm#PROPERTY_VERSION}, * {@link MediaDrm#PROPERTY_DESCRIPTION}, {@link MediaDrm#PROPERTY_ALGORITHMS} */ + // This is a synchronous call. public abstract void setDrmPropertyString( @NonNull @MediaDrm.StringProperty String propertyName, @NonNull String value) throws NoDrmSchemeException;