From bf81060ff5126d18206ea958d9e9637ba9d6094a Mon Sep 17 00:00:00 2001 From: Louis Chang Date: Fri, 8 Apr 2022 10:13:33 +0800 Subject: [PATCH] Start a visible requested activity if still in initializing state A non-top activity was set to visible before real starting it and therefore prevented the activity from being started next time while computing visibility. This happens in split-screen mode where the two split activities were both paused while several translucent activities were started consecutively to a fullscreen task on top. The visibility of the translucent activities in the top fullscreen task was set to true while one of the activities paused, but was unable to start since not all pausing activity completed. After all activities completed pausing, only the top-most activity was started. Bug: 227658778 Test: start bookmark pages on Chrome while in split Change-Id: I18a3a017d03225d421ffe955504e7336322d4a16 --- .../com/android/server/wm/EnsureActivitiesVisibleHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/EnsureActivitiesVisibleHelper.java b/services/core/java/com/android/server/wm/EnsureActivitiesVisibleHelper.java index 7844bffb62477..7bb036d0b1e02 100644 --- a/services/core/java/com/android/server/wm/EnsureActivitiesVisibleHelper.java +++ b/services/core/java/com/android/server/wm/EnsureActivitiesVisibleHelper.java @@ -244,7 +244,7 @@ class EnsureActivitiesVisibleHelper { // invisible. If the app is already visible, it must have died while it was visible. In this // case, we'll show the dead window but will not restart the app. Otherwise we could end up // thrashing. - if (!isTop && r.mVisibleRequested) { + if (!isTop && r.mVisibleRequested && !r.isState(INITIALIZING)) { return; }