Merge "Allow pausing Watchdog on the current thread" into qt-dev

This commit is contained in:
Zimuzo Ezeozue
2019-05-14 14:55:06 +00:00
committed by Android (Google) Code Review
2 changed files with 77 additions and 5 deletions

View File

@@ -1167,9 +1167,12 @@ public final class SystemServer {
if (!mOnlyCore) {
traceBeginAndSlog("UpdatePackagesIfNeeded");
try {
Watchdog.getInstance().pauseWatchingCurrentThread("dexopt");
mPackageManagerService.updatePackagesIfNeeded();
} catch (Throwable e) {
reportWtf("update packages", e);
} finally {
Watchdog.getInstance().resumeWatchingCurrentThread("dexopt");
}
traceEnd();
}