Merge "Make MediaController#controlsSameSession"
This commit is contained in:
committed by
Android (Google) Code Review
commit
f21135e7e9
@@ -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();
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user