diff options
| author | Hai Zhang <zhanghai@google.com> | 2022-03-02 02:10:15 +0000 |
|---|---|---|
| committer | Hai Zhang <zhanghai@google.com> | 2022-03-02 10:57:09 +0000 |
| commit | 01221cb71625d2dc095e02a97554ca13b64c76ec (patch) | |
| tree | 08a25e11919ed3de57680d7bd4427835cac18ffd /core/java/android/inputmethodservice/InputMethodService.java | |
| parent | dde7ea23aa62c4fa4add29bdd85d20ecf4b7cd18 (diff) | |
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
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
0 files changed, 0 insertions, 0 deletions
