Avoid activity stopped when relaunching it to resumed

The activity could still in the stopping list while
relaunching it to resume state, which may cause the
activity to be stopped afterward.

Bug: 189413973
Test: wm presubmit
Change-Id: Ib77fe682f66504332fda82793b0d6e5a430f8c9d
This commit is contained in:
Louis Chang
2021-06-11 17:06:38 +08:00
parent aa12b6a492
commit 18ee2ee92a

View File

@@ -8086,6 +8086,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
setState(PAUSED, "relaunchActivityLocked");
}
// The activity may be waiting for stop, but that is no longer appropriate for it.
mTaskSupervisor.mStoppingActivities.remove(this);
configChangeFlags = 0;
deferRelaunchUntilPaused = false;
preserveWindowOnDeferredRelaunch = false;