Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f53188e authored by Louis Chang's avatar Louis Chang
Browse files

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
parent 239f082d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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);
            }
        }