Use the correct lock to protect members in PolicyControl
Members in PolicyControl can be accessed by multiple threads via the public functions called by PhoneWindowManager. Most of the functions are called with the window-manager-lock held, but reloadFromSetting() is an exception. In this patch, we acquire the window-manager-lock before calling reloadFromSetting() to ensure accessing the members with the same lock held. Change-Id: I54ac5cab2a2d74c568fa96145f7a6741c6d99e36
This commit is contained in:
committed by
Wale Ogunwale
parent
f1900b500f
commit
cc6366dde1
@@ -1689,6 +1689,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
if (mImmersiveModeConfirmation != null) {
|
||||
mImmersiveModeConfirmation.loadSetting(mCurrentUserId);
|
||||
}
|
||||
}
|
||||
synchronized (mWindowManagerFuncs.getWindowManagerLock()) {
|
||||
PolicyControl.reloadFromSetting(mContext);
|
||||
}
|
||||
if (updateRotation) {
|
||||
|
||||
Reference in New Issue
Block a user