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

Commit 16f0a6ac authored by Jean-Michel Trivi's avatar Jean-Michel Trivi
Browse files

Audio APIs: deprecate deprecateStreamTypeForPlayback method

The method deprecateStreamTypeForPlayback() is inherited from
  android.media.PlayerBase, which is hidden. This method was never
  intended to be in the SDK, but somehow ended up in the public SDK.

Bug: 126701135
Bug: 126702126
Bug: 126702177
Test: make -j api-stubs-docs-update-current-api
Change-Id: Ibdd7898f18432c2179f81cd53b132164bcd4c670
parent b1011334
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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);
+4 −5
Original line number Diff line number Diff line
@@ -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