Execute pause timeout only when attached to a process
In order to prevent NPE since the #activityPaused assumed the app process existed. Bug: 230866778 Test: wm presubmit Change-Id: Id12b175e728f27150e1ae48e3e3af776eb08acf1
This commit is contained in:
@@ -933,9 +933,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
// so we need to be conservative and assume it isn't.
|
||||
Slog.w(TAG, "Activity pause timeout for " + ActivityRecord.this);
|
||||
synchronized (mAtmService.mGlobalLock) {
|
||||
if (hasProcess()) {
|
||||
mAtmService.logAppTooSlow(app, pauseTime, "pausing " + ActivityRecord.this);
|
||||
if (!hasProcess()) {
|
||||
return;
|
||||
}
|
||||
mAtmService.logAppTooSlow(app, pauseTime, "pausing " + ActivityRecord.this);
|
||||
activityPaused(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user