Merge "Update visibility in moveTaskToBack if nothing is resumed" into qt-dev

am: e004297aa1

Change-Id: I93cc0580220534d7512ea61dbaaba8d4f4c259a9
This commit is contained in:
Evan Rosky
2019-06-07 18:26:34 -07:00
committed by android-build-merger

View File

@@ -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;
}