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

Commit f21135e7 authored by Kyunglyul Hyun's avatar Kyunglyul Hyun Committed by Android (Google) Code Review
Browse files

Merge "Make MediaController#controlsSameSession"

parents 9b6afce1 c3bf1130
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -28810,6 +28810,7 @@ package android.media.session {
  public final class MediaController {
    ctor public MediaController(@NonNull android.content.Context, @NonNull android.media.session.MediaSession.Token);
    method public void adjustVolume(int, int);
    method @Deprecated public boolean controlsSameSession(@Nullable android.media.session.MediaController);
    method public boolean dispatchMediaButtonEvent(@NonNull android.view.KeyEvent);
    method @Nullable public android.os.Bundle getExtras();
    method public long getFlags();
+5 −13
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.app.PendingIntent;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.pm.ParceledListSlice;
import android.media.AudioAttributes;
@@ -462,21 +461,14 @@ public final class MediaController {
        return mTag;
    }

    /*
     * @hide
     */
    ISessionController getSessionBinder() {
        return mSessionBinder;
    }

    /**
     * @hide
     * Returns whether this and {@code other} media controller controls the same session.
     * @deprecated Check equality of {@link #getSessionToken() tokens} instead.
     */
    @UnsupportedAppUsage(publicAlternatives = "Check equality of {@link #getSessionToken() tokens}"
            + "instead.")
    public boolean controlsSameSession(MediaController other) {
    @Deprecated
    public boolean controlsSameSession(@Nullable MediaController other) {
        if (other == null) return false;
        return mSessionBinder.asBinder() == other.getSessionBinder().asBinder();
        return mToken.equals(other.mToken);
    }

    private void addCallbackLocked(Callback cb, Handler handler) {
+1 −0
Original line number Diff line number Diff line
@@ -28571,6 +28571,7 @@ package android.media.session {
  public final class MediaController {
    ctor public MediaController(@NonNull android.content.Context, @NonNull android.media.session.MediaSession.Token);
    method public void adjustVolume(int, int);
    method @Deprecated public boolean controlsSameSession(@Nullable android.media.session.MediaController);
    method public boolean dispatchMediaButtonEvent(@NonNull android.view.KeyEvent);
    method @Nullable public android.os.Bundle getExtras();
    method public long getFlags();