Skip to content
Commit 5b3dd0e0 authored by Kevin Han's avatar Kevin Han
Browse files

Do not hold PM or AM locks when calling hibernation API

App hibernation calls into activity manager and package manager API. If
package manager calls into AppHibernationService while holding either
the activity manager lock or package manager locks, it can cause a
deadlock. To fix this, we ensure that app hibernation API is never
called with either lock, either by separating out the logic or putting
the app hibernation state mutation on a background thread.

Bug: 184661338
Bug: 182811830
Test: manual, hibernation app, open, see hibernation state is left
Test: atest PackageManagerServiceHibernationTests
Change-Id: I1d7dfb2232a49a63958628dd94f6b6445ece4d55
parent c9f96b6e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment