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

Commit 2891f34e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents 949b5127 83c4635e
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);
            }
        }