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

Commit f3bbe2b4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Compare Session tokens for MediaControllers"

parents 68fff3b4 c6d11695
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());
    }

    /**