Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 072bc7d6 authored by panhaihui's avatar panhaihui Committed by Sudheer Shanka
Browse files

[Bugfix] avoid deadlock caused by AppBatteryTracker.dump



AppBatteryTracker.dump -> BaseAppStatePolicy.shouldExemptUid -> getBackgroundRestrictionExemptionReason -> getPotentialSystemExemptionReason -> isProfileOwner
Getting mlock first in AppBatteryTracker.dump() and then getting AMS lock in isProfileOwner() is an inappropriate lock order in the above call chain. This is inconsistent with the method of getting AMS lock first and then mlock lock in most method calls, so it will cause deadlock and cause watchdog.

Similar bug cases include 366150181, 358274041

Bug:366150181
Test: Manual test

Change-Id: I8a1b509a1e95ad8570f3d4c248f9e0ed346962ad
Signed-off-by: default avatarpanhaihui <panhaihui@xiaomi.com>
parent 71a4fd54
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment