Pause watchdog triggering on the main thread during OtaDexoptService

Similar to I3876c41e6d0e41d044a5b1d5e57f894c7fb4fb0e where we pause
the watchdog because dexopting can take a while, here moving A/B
artificats can take a long time.

Bug: 134062700
Test: Manually tested by adding an artificial sleep in
OtaDexoptService#main and verified that watchdog was not triggered

Change-Id: I69067fbbb8be4e421918c18b67269044fab51b3e
This commit is contained in:
Zimuzo
2019-05-31 12:46:12 +01:00
parent 23d7a55d18
commit f3c4614d1f

View File

@@ -749,10 +749,12 @@ public final class SystemServer {
if (!disableOtaDexopt) {
traceBeginAndSlog("StartOtaDexOptService");
try {
Watchdog.getInstance().pauseWatchingCurrentThread("moveab");
OtaDexoptService.main(mSystemContext, mPackageManagerService);
} catch (Throwable e) {
reportWtf("starting OtaDexOptService", e);
} finally {
Watchdog.getInstance().resumeWatchingCurrentThread("moveab");
traceEnd();
}
}