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

Commit ba9120a1 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5860054 from 40005b6a to qt-qpr1-release

Change-Id: I519ce52f92bbaadd1979ae2318510bcc110878ac
parents 4bed7603 40005b6a
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -626,6 +626,12 @@ public class MediaPlayerList {
                    android.media.session.MediaController controller =
                            new android.media.session.MediaController(mContext, token);

                    if (mMediaSessionManager == null) {
                        Log.w(TAG, "onAddressedPlayerChanged(Token): Unexpected callback "
                                + "from the MediaSessionManager");
                        return;
                    }

                    if (!mMediaPlayerIds.containsKey(controller.getPackageName())) {
                        // Since we have a controller, we can try to to recover by adding the
                        // player and then setting it as active.
@@ -640,6 +646,12 @@ public class MediaPlayerList {

                @Override
                public void onAddressedPlayerChanged(ComponentName receiver) {
                    if (mMediaSessionManager == null) {
                        Log.w(TAG, "onAddressedPlayerChanged(Component): Unexpected callback "
                                + "from the MediaSessionManager");
                        return;
                    }

                    if (receiver == null) {
                        return;
                    }