Run isKeyguardSecure under system privileges
In certain cases, isKeyguardSecure calls UserManager.getProfileParent, which requires MANAGE_USERS permission. Now the check is done under system privileges. Bug:18765066 Change-Id: I6b23aedee06403d36523af5fee9c7db9659284b3
This commit is contained in:
@@ -5379,7 +5379,12 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
|
||||
@Override
|
||||
public boolean isKeyguardSecure() {
|
||||
return mPolicy.isKeyguardSecure();
|
||||
long origId = Binder.clearCallingIdentity();
|
||||
try {
|
||||
return mPolicy.isKeyguardSecure();
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(origId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user