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

Commit 0c1d448d authored by Dongwon Kang's avatar Dongwon Kang
Browse files

MediaSession: clear identity before accessing service methods

Test: build and manually verified the issue is fixed.
Bug: 36669550
Change-Id: I44eda4e2fb08dd9aa6972b12ed4c4e82797ff587
parent d70f423d
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -772,7 +772,12 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {
    private final class SessionStub extends ISession.Stub {
        @Override
        public void destroy() {
            final long token = Binder.clearCallingIdentity();
            try {
                mService.destroySession(MediaSessionRecord.this);
            } finally {
                Binder.restoreCallingIdentity(token);
            }
        }

        @Override