summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/media/MediaSessionRecord.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/media/MediaSessionRecord.java b/services/core/java/com/android/server/media/MediaSessionRecord.java
index 7f75c83f8d51..53a8092fa558 100644
--- a/services/core/java/com/android/server/media/MediaSessionRecord.java
+++ b/services/core/java/com/android/server/media/MediaSessionRecord.java
@@ -772,7 +772,12 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {
private final class SessionStub extends ISession.Stub {
@Override
public void destroy() {
- mService.destroySession(MediaSessionRecord.this);
+ final long token = Binder.clearCallingIdentity();
+ try {
+ mService.destroySession(MediaSessionRecord.this);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
}
@Override