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

Commit 87f0ac83 authored by Rahul Sabnis's avatar Rahul Sabnis Committed by android-build-merger
Browse files

Merge "Compare Session tokens for MediaControllers"

am: f3bbe2b4

Change-Id: Iec1b2d8b3f37f4249844c4a50abcd998abbfbc40
parents a9e351c7 f3bbe2b4
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -694,13 +694,13 @@ public class MediaPlayerList {
            boolean isActive = false;
            Log.v(TAG, "onPlaybackConfigChanged(): Configs list size=" + configs.size());
            for (AudioPlaybackConfiguration config : configs) {
                if (config.isActive() && (config.getAudioAttributes().getUsage()
                if (config.getPlayerState() == AudioPlaybackConfiguration.PLAYER_STATE_STARTED
                        && (config.getAudioAttributes().getUsage()
                            == AudioAttributes.USAGE_ASSISTANCE_NAVIGATION_GUIDANCE)
                        && (config.getAudioAttributes().getContentType()
                            == AudioAttributes.CONTENT_TYPE_SPEECH)) {
                    if (DEBUG) {
                        Log.d(TAG, "onPlaybackConfigChanged(): config="
                                 + AudioPlaybackConfiguration.toLogFriendlyString(config));
                        Log.d(TAG, "onPlaybackConfigChanged(): config=" + config);
                    }
                    isActive = true;
                }
+2 −2
Original line number Diff line number Diff line
@@ -215,14 +215,14 @@ public class MediaController {
     * Wrapper for MediaController.controlsSameSession(MediaController other)
     */
    public boolean controlsSameSession(MediaController other) {
        return mDelegate.controlsSameSession(other.getWrappedInstance());
        return mDelegate.getSessionToken().equals(other.getWrappedInstance().getSessionToken());
    }

    /**
     * Wrapper for MediaController.controlsSameSession(MediaController other)
     */
    public boolean controlsSameSession(android.media.session.MediaController other) {
        return mDelegate.controlsSameSession(other);
        return mDelegate.getSessionToken().equals(other.getSessionToken());
    }

    /**