diff options
| -rw-r--r-- | api/current.txt | 6 | ||||
| -rw-r--r-- | media/java/android/media/PlayerBase.java | 9 |
2 files changed, 7 insertions, 8 deletions
diff --git a/api/current.txt b/api/current.txt index 968811d85d31..24893744505c 100644 --- a/api/current.txt +++ b/api/current.txt @@ -23565,7 +23565,7 @@ package android.media { method @Deprecated public void addOnRoutingChangedListener(android.media.AudioTrack.OnRoutingChangedListener, android.os.Handler); method public int attachAuxEffect(int); method @NonNull public android.media.VolumeShaper createVolumeShaper(@NonNull android.media.VolumeShaper.Configuration); - method public static void deprecateStreamTypeForPlayback(int, String, String) throws java.lang.IllegalArgumentException; + method @Deprecated public static void deprecateStreamTypeForPlayback(int, @NonNull String, @NonNull String) throws java.lang.IllegalArgumentException; method protected void finalize(); method public void flush(); method @NonNull public android.media.AudioAttributes getAudioAttributes(); @@ -25319,7 +25319,7 @@ package android.media { method public static android.media.MediaPlayer create(android.content.Context, int); method public static android.media.MediaPlayer create(android.content.Context, int, android.media.AudioAttributes, int); method @NonNull public android.media.VolumeShaper createVolumeShaper(@NonNull android.media.VolumeShaper.Configuration); - method public static void deprecateStreamTypeForPlayback(int, String, String) throws java.lang.IllegalArgumentException; + method @Deprecated public static void deprecateStreamTypeForPlayback(int, @NonNull String, @NonNull String) throws java.lang.IllegalArgumentException; method public void deselectTrack(int) throws java.lang.IllegalStateException; method protected void finalize(); method public int getAudioSessionId(); @@ -26414,7 +26414,7 @@ package android.media { ctor @Deprecated public SoundPool(int, int, int); method public final void autoPause(); method public final void autoResume(); - method public static void deprecateStreamTypeForPlayback(int, String, String) throws java.lang.IllegalArgumentException; + method @Deprecated public static void deprecateStreamTypeForPlayback(int, @NonNull String, @NonNull String) throws java.lang.IllegalArgumentException; method protected void finalize(); method public int load(String, int); method public int load(android.content.Context, int, int); diff --git a/media/java/android/media/PlayerBase.java b/media/java/android/media/PlayerBase.java index 7c6367e8123a..2b768dd0f46b 100644 --- a/media/java/android/media/PlayerBase.java +++ b/media/java/android/media/PlayerBase.java @@ -21,8 +21,6 @@ import android.annotation.Nullable; import android.app.ActivityThread; import android.app.AppOpsManager; import android.content.Context; -import android.media.VolumeShaper; -import android.os.Binder; import android.os.IBinder; import android.os.Parcel; import android.os.Parcelable; @@ -35,7 +33,6 @@ import com.android.internal.annotations.GuardedBy; import com.android.internal.app.IAppOpsCallback; import com.android.internal.app.IAppOpsService; -import java.lang.IllegalArgumentException; import java.lang.ref.WeakReference; import java.util.Objects; @@ -578,9 +575,11 @@ public abstract class PlayerBase { * to qualify audio playback. * @param streamType the stream type to check * @throws IllegalArgumentException + * @deprecated This method is not intended to be used by applications. */ - public static void deprecateStreamTypeForPlayback(int streamType, String className, - String opName) throws IllegalArgumentException { + @java.lang.Deprecated + public static void deprecateStreamTypeForPlayback(int streamType, @NonNull String className, + @NonNull String opName) throws IllegalArgumentException { // STREAM_ACCESSIBILITY was introduced at the same time the use of stream types // for audio playback was deprecated, so it is not allowed at all to qualify a playback // use case |