Clean-up starting window if resuming activity in another stack
We currently remove starting windows for initializing activities if we are
resuming another activity in the same stack. However, the starting window
can be orphaned if we are resuming an activity in a different stack and
start another activity in the stack with the starting window in the paused
state at the same time.
We now remove starting windowing for initializing activities that aren't
the top activity in the stack regardless of the stack we are resuming an
activity in.
Bug: 26659857
Change-Id: I6081d52d0c4c0d3556201346cfda7a38e4d02c8e
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index 6716a47..574b9db 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -1902,7 +1902,7 @@
return false;
}
- cancelInitializingActivities();
+ mStackSupervisor.cancelInitializingActivities();
// Find the first activity that is not finishing.
final ActivityRecord next = topRunningActivityLocked();