commit | c45b6a146c796ea3a006733d0055b48dc1961edd | [log] [tgz] |
---|---|---|
author | Mohammad Samiul Islam <samiul@google.com> | Mon Jun 29 12:31:51 2020 +0100 |
committer | Mohammad Samiul Islam <samiul@google.com> | Thu Jul 02 11:51:36 2020 +0100 |
tree | 6bef876216a36199ccbe6edf8ecad22fb2305e60 | |
parent | 7d8bf62409b6d36a741e67acfecaa0790a2e4e6f [diff] |
Fix deadlock in StagingManager.getSessions() method When we stage a session we acquire the PackageInstallerSession#mLock first and then StagingManager#mStagedSessions lock. But in getSessions() method, we acquire the locks in reverse order which can lead to deadlock. Bug: 160113544 Test: atest StagedInstallTest Change-Id: I7a1abf44db27d4673d43e9b0886610a5bd8b41f6