diff options
| -rw-r--r-- | services/core/java/com/android/server/wm/ActivityStack.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityStack.java b/services/core/java/com/android/server/wm/ActivityStack.java index 5ba47d8433cc..9e8876a9c32d 100644 --- a/services/core/java/com/android/server/wm/ActivityStack.java +++ b/services/core/java/com/android/server/wm/ActivityStack.java @@ -4995,6 +4995,17 @@ class ActivityStack extends ConfigurationContainer { return true; } + ActivityRecord topActivity = getDisplay().topRunningActivity(); + ActivityStack topStack = topActivity.getActivityStack(); + if (topStack != null && topStack != this && topActivity.isState(RESUMED)) { + // The new top activity is already resumed, so there's a good chance that nothing will + // get resumed below. So, update visibility now in case the transition is closed + // prematurely. + mRootActivityContainer.ensureVisibilityAndConfig(null /* starting */, + getDisplay().mDisplayId, false /* markFrozenIfConfigChanged */, + false /* deferResume */); + } + mRootActivityContainer.resumeFocusedStacksTopActivities(); return true; } |