Merge "MediaSessionService: Clear calling identity for incoming calls from apps" into oc-dev am: 2891f34ea9
am: 84589843d1
Change-Id: I19179969664e6e9f9c147a5886b512617f0f5afa
This commit is contained in:
@@ -751,7 +751,12 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {
|
||||
@Override
|
||||
public void setActive(boolean active) {
|
||||
mIsActive = active;
|
||||
mService.updateSession(MediaSessionRecord.this);
|
||||
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) {
|
||||
mService.onSessionPlaybackTypeChanged(MediaSessionRecord.this);
|
||||
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) {
|
||||
mService.onSessionPlaybackTypeChanged(MediaSessionRecord.this);
|
||||
final long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mService.onSessionPlaybackTypeChanged(MediaSessionRecord.this);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
mHandler.post(MessageHandler.MSG_UPDATE_VOLUME);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user