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

Commit 01485a1d authored by Jaewan Kim's avatar Jaewan Kim Committed by android-build-merger
Browse files

Merge "MediaSessionService: Clear calling identity for incoming calls from...

Merge "MediaSessionService: Clear calling identity for incoming calls from apps" into oc-dev am: 2891f34e
am: 84589843

Change-Id: I19179969664e6e9f9c147a5886b512617f0f5afa
parents 9a394344 84589843
Loading
Loading
Loading
Loading
+18 −3
Original line number Diff line number Diff line
@@ -751,7 +751,12 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {
        @Override
        public void setActive(boolean active) {
            mIsActive = active;
            final long token = Binder.clearCallingIdentity();
            try {
                mService.updateSession(MediaSessionRecord.this);
            } finally {
                Binder.restoreCallingIdentity(token);
            }
            mHandler.post(MessageHandler.MSG_UPDATE_SESSION_STATE);
        }

@@ -862,7 +867,12 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {
                }
            }
            if (typeChanged) {
                final long token = Binder.clearCallingIdentity();
                try {
                    mService.onSessionPlaybackTypeChanged(MediaSessionRecord.this);
                } finally {
                    Binder.restoreCallingIdentity(token);
                }
                mHandler.post(MessageHandler.MSG_UPDATE_VOLUME);
            }
        }
@@ -877,7 +887,12 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {
                mMaxVolume = max;
            }
            if (typeChanged) {
                final long token = Binder.clearCallingIdentity();
                try {
                    mService.onSessionPlaybackTypeChanged(MediaSessionRecord.this);
                } finally {
                    Binder.restoreCallingIdentity(token);
                }
                mHandler.post(MessageHandler.MSG_UPDATE_VOLUME);
            }
        }