@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);
}
}
}
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);
}
}
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);
}
}