Disable multi-resumed activities for pre-Q app
Only resume the top-most visible activities for pre-Q
app since these applications may have the assumption
that there is only one activity being resumed.
Bug: 122429803
Test: atest android.server.am.lifecycle
Test: atest ActivityManagerMultiDisplayTests
Test: atest ActivityLifecycleFreeformTests
Test: atest ActivityManagerSplitScreenTests
Change-Id: I696a4bf41684d5837a6b23818bd9f71df8947e22
diff --git a/services/core/java/com/android/server/wm/ActivityDisplay.java b/services/core/java/com/android/server/wm/ActivityDisplay.java
index e817dd4..5b3a2fe 100644
--- a/services/core/java/com/android/server/wm/ActivityDisplay.java
+++ b/services/core/java/com/android/server/wm/ActivityDisplay.java
@@ -1267,6 +1267,15 @@
positionChildAt(stack, Math.max(0, insertIndex));
}
+ void ensureActivitiesVisible(ActivityRecord starting, int configChanges,
+ boolean preserveWindows, boolean notifyClients) {
+ for (int stackNdx = getChildCount() - 1; stackNdx >= 0; --stackNdx) {
+ final ActivityStack stack = getChildAt(stackNdx);
+ stack.ensureActivitiesVisibleLocked(starting, configChanges, preserveWindows,
+ notifyClients);
+ }
+ }
+
void moveHomeStackToFront(String reason) {
if (mHomeStack != null) {
mHomeStack.moveToFront(reason);