frameworks/base: Fix for UI freeze issue with headset insert/removal
- UI freeze is observed while quick insertion and removal of headset for multiple times. - notifyJackSwitchChanged() acquires mHeadsetLock and waits on phoneWindowManager lock to call update() as it is a synchronized function. sendIntents() is also "synchronized". This function also tries to acquire mHeadsetLock. So there is a dead lock, when the notifyJackSwitchChanged() acquires the mHeadsetLock before this function does. - update() is called only from notifyJackSwitched() and need not be a synchronized function. Removed synchronization on the update() to fix the issue. CRs-Fixed: 390784 (cherry picked from commit 04e683e79c3633e061c71b2ecff4f4c83624d1e0) Change-Id: I6d274391b68c0a306128d7009bbb651a9b0554f4
Loading
Please register or sign in to comment