summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Louis Chang <louischang@google.com> 2020-10-26 16:44:01 +0800
committer Louis Chang <louischang@google.com> 2020-10-27 09:40:52 +0800
commite0f99623e2b4a4d3aacc4391265d19b9bb0eabbb (patch)
treee92bd464053cdba5d1df0d97ca8d6bee82e713ce
parent4b94029fd036eb41af966377d28baf843f1a1850 (diff)
Remove resuming activity from stopping
A resumed activity was added to stopping activity lists while making it invisible without having state changes. So, the activity won't be resumed if it becomes visible again because the activity is already in the resumed state. Bug: 160435184 Test: atest ActivityRecordTests Change-Id: I974df663b7ac2dd8e430b2ac1e228f938ec55404
-rw-r--r--services/core/java/com/android/server/wm/Task.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index 557c92e9704e..db2f55109cc7 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -5902,6 +5902,8 @@ class Task extends WindowContainer<WindowContainer> {
if (mResumedActivity == next && next.isState(RESUMED)
&& taskDisplayArea.getWindowingMode() != WINDOWING_MODE_FREEFORM
&& taskDisplayArea.allResumedActivitiesComplete()) {
+ // The activity may be waiting for stop, but that is no longer appropriate for it.
+ mStackSupervisor.mStoppingActivities.remove(next);
// Make sure we have executed any pending transitions, since there
// should be nothing left to do at this point.
executeAppTransition(options);