Merge "Execute pause timeout only when attached to a process" into tm-dev

This commit is contained in:
Louis Chang
2022-05-04 01:03:38 +00:00
committed by Android (Google) Code Review

View File

@@ -933,9 +933,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
// so we need to be conservative and assume it isn't. // so we need to be conservative and assume it isn't.
Slog.w(TAG, "Activity pause timeout for " + ActivityRecord.this); Slog.w(TAG, "Activity pause timeout for " + ActivityRecord.this);
synchronized (mAtmService.mGlobalLock) { synchronized (mAtmService.mGlobalLock) {
if (hasProcess()) { if (!hasProcess()) {
mAtmService.logAppTooSlow(app, pauseTime, "pausing " + ActivityRecord.this); return;
} }
mAtmService.logAppTooSlow(app, pauseTime, "pausing " + ActivityRecord.this);
activityPaused(true); activityPaused(true);
} }
} }