Fix potential deadlock in restorePermissionState().
The call to retrieve all shared user packages was on the PackageSetting object and was lockless, however it was replaced with a PackageManagerInternal call in ag/16740473 and the method may take a lock. This creates a potential deadlock because we are already holding our own lock in some cases, and we shouldn't allow calling another system service while holding it. This change makes revokeUnusedSharedUserPermissionsLocked() re-use the uidRequestedPermissions that we calculated earlier, and the behavior of the method remains unchanged. Bug: 216207402 Test: presubmit Change-Id: I4b031cb670a6921bfa1425fff65f58cd28af576e
Loading
Please register or sign in to comment