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

Commit d077dbf4 authored by Sahana Rao's avatar Sahana Rao
Browse files

Revert "Change PlaybackState#isActiveState to isActive"

Revert "Change PlaybackState#isActiveState to isActive"

Revert submission 14124578-playbackstate_isactive

Reason for revert: b/185343312
Reverted Changes:
I4757038d6:Change PlaybackState#isActiveState to isActive
If7753e8e9:Change PlaybackState#isActiveState to isActive

Change-Id: I7c890c65ecb955860d31db6c926ad2d6ded514dc
parent 4879480b
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -25214,7 +25214,6 @@ package android.media.session {
    method public float getPlaybackSpeed();
    method public long getPosition();
    method public int getState();
    method public boolean isActive();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final long ACTION_FAST_FORWARD = 64L; // 0x40L
    field public static final long ACTION_PAUSE = 2L; // 0x2L
+4 −0
Original line number Diff line number Diff line
@@ -161,6 +161,10 @@ package android.media.session {
    method public void onVolumeChanged(@NonNull android.media.session.MediaSession.Token, int);
  }

  public final class PlaybackState implements android.os.Parcelable {
    method public boolean isActiveState();
  }

}

package android.net {
+1 −1
Original line number Diff line number Diff line
@@ -216,7 +216,7 @@ public class PipMediaController {
        }

        ArrayList<RemoteAction> mediaActions = new ArrayList<>();
        boolean isPlaying = mMediaController.getPlaybackState().isActive();
        boolean isPlaying = mMediaController.getPlaybackState().isActiveState();
        long actions = mMediaController.getPlaybackState().getActions();

        // Prev action
+4 −14
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ import android.annotation.DrawableRes;
import android.annotation.IntDef;
import android.annotation.LongDef;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
@@ -492,26 +493,15 @@ public final class PlaybackState implements Parcelable {

    /**
     * Returns whether this is considered as an active playback state.
     * <p>
     * The playback state is considered as an active if the state is one of the following:
     * <ul>
     * <li>{@link #STATE_BUFFERING}</li>
     * <li>{@link #STATE_CONNECTING}</li>
     * <li>{@link #STATE_FAST_FORWARDING}</li>
     * <li>{@link #STATE_PLAYING}</li>
     * <li>{@link #STATE_REWINDING}</li>
     * <li>{@link #STATE_SKIPPING_TO_NEXT}</li>
     * <li>{@link #STATE_SKIPPING_TO_PREVIOUS}</li>
     * <li>{@link #STATE_SKIPPING_TO_QUEUE_ITEM}</li>
     * </ul>
     * @hide
     */
    public boolean isActive() {
    @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
    public boolean isActiveState() {
        switch (mState) {
            case PlaybackState.STATE_FAST_FORWARDING:
            case PlaybackState.STATE_REWINDING:
            case PlaybackState.STATE_SKIPPING_TO_PREVIOUS:
            case PlaybackState.STATE_SKIPPING_TO_NEXT:
            case PlaybackState.STATE_SKIPPING_TO_QUEUE_ITEM:
            case PlaybackState.STATE_BUFFERING:
            case PlaybackState.STATE_CONNECTING:
            case PlaybackState.STATE_PLAYING:
+1 −1
Original line number Diff line number Diff line
@@ -384,7 +384,7 @@ public class MediaSessionRecord implements IBinder.DeathRecipient, MediaSessionR
        if (mPlaybackState == null) {
            return false;
        }
        return mPlaybackState.isActive() == expected;
        return mPlaybackState.isActiveState() == expected;
    }

    /**