Remove unnecessary locking that causes deadlock.
This was moved from PackageManagerService but we forgot to remove the unnecessary synchronization on mLock, which will result in calling into package manager with the permission lock held. Fixes: 177178190 Test: presubmit Change-Id: I5b4a6a337e94e8483067cac5143e45d08b2eb983
This commit is contained in:
@@ -4463,12 +4463,10 @@ public class PermissionManagerService extends IPermissionManager.Stub {
|
||||
|
||||
final PermissionPolicyInternal permissionPolicyInternal = LocalServices.getService(
|
||||
PermissionPolicyInternal.class);
|
||||
permissionPolicyInternal.setOnInitializedCallback(userId -> {
|
||||
// The SDK updated case is already handled when we run during the ctor.
|
||||
synchronized (mLock) {
|
||||
updateAllPermissions(StorageManager.UUID_PRIVATE_INTERNAL, false);
|
||||
}
|
||||
});
|
||||
permissionPolicyInternal.setOnInitializedCallback(userId ->
|
||||
// The SDK updated case is already handled when we run during the ctor.
|
||||
updateAllPermissions(StorageManager.UUID_PRIVATE_INTERNAL, false)
|
||||
);
|
||||
|
||||
mSystemReady = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user