OSDN Git Service

Use timeout for *dexopt* wake lock
authorFyodor Kupolov <fkupolov@google.com>
Tue, 2 May 2017 19:11:02 +0000 (12:11 -0700)
committerFyodor Kupolov <fkupolov@google.com>
Tue, 2 May 2017 22:08:32 +0000 (15:08 -0700)
commit28f2855c3dbf0c7658d7f458fabb7c01d68e6f37
treeb6394f1ebc2b4a3eb199d5bf4251baf689aa21f2
parent25cedc232d7180fb4bbedd168ac33e057dab2e24
Use timeout for *dexopt* wake lock

There are reports of *dexopt* lock being held for 10+ minutes, which shouldn't
normally happen on threads that are monitored by the Watchdog. Added
logging to help detecting that.

The lock is now held with a timeout of WAKELOCK_TIMEOUT_MS. It is set to a
higher value than PM's watchdog timeout for easier reading from a timing
histogram.

Test: Manual, device boots without errors
Bug: 37756892
Change-Id: Iac569474d1c95447e08fe5e9870e4518b8d22c65
services/core/java/com/android/server/pm/PackageDexOptimizer.java
services/core/java/com/android/server/pm/PackageManagerService.java