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

Commit 2f52ac69 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi
Browse files

PlayerBase: hide deprecateStreamTypeForPlayback

This method was only in docs, not in implementation, and
  was never meant to be used by applications.
Bug: 126701135
Bug: 126702126
Bug: 126702177
Test: javap --class-path prebuilts/sdk/28/public/android.jar 'android.media.MediaPlayer' | grep deprecateStreamTypeForPlayback

Change-Id: I0417f4e2523889259536a9f66f20167886cac790
parent 63903392
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -23569,7 +23569,6 @@ 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 @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 +25325,6 @@ 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 @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 +26419,6 @@ package android.media {
    ctor @Deprecated public SoundPool(int, int, int);
    method public final void autoPause();
    method public final void autoResume();
    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);
+1 −2
Original line number Diff line number Diff line
@@ -571,13 +571,12 @@ public abstract class PlayerBase {
    // Utilities

    /**
     * @hide
     * Use to generate warning or exception in legacy code paths that allowed passing stream types
     * to qualify audio playback.
     * @param streamType the stream type to check
     * @throws IllegalArgumentException
     * @deprecated This method is not intended to be used by applications.
     */
    @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