Merge "Audio APIs: deprecate deprecateStreamTypeForPlayback method"
This commit is contained in:
committed by
Android (Google) Code Review
commit
fa0a6004ca
@@ -23569,7 +23569,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();
|
||||
@@ -25326,7 +25326,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();
|
||||
@@ -26421,7 +26421,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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user