Skip to content
Commit c4f28a41 authored by Shibin George's avatar Shibin George
Browse files

Fix deadlock in MediaSessionService during getCurrentUser()

SystemServiceMAnager.stopUser() acquires ActivityManagerService
lock first and then acquires MediaSessionService.mLock during
onStopUser(). MediaSessionService.onSwitchUser(), on the other
hand, acquires mLock first and ActivityManagerService lock next.
This is a potential deadlock situation which can be resolved by
moving getCurrentUser() out of synchronized block. This will
release mLock sooner and avoid the deadlock.

https://code.google.com/p/android/issues/detail?id=214469



Change-Id: Ieb4520d60af6ca38496ca933da0cd9ae096a9408
Signed-off-by: default avatarShibin George <shibing@codeaurora.org>
parent 326e55a3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment