Merge "Ensure the next activity of non-focusable task to be visible"

This commit is contained in:
Louis Chang
2020-12-11 13:48:14 +00:00
committed by Android (Google) Code Review

View File

@@ -2647,7 +2647,11 @@ class ActivityStarter {
if (next != null) {
next.setCurrentLaunchCanTurnScreenOn(true);
}
mRootWindowContainer.resumeFocusedTasksTopActivities(mTargetStack, null, mOptions);
if (mTargetStack.isFocusable()) {
mRootWindowContainer.resumeFocusedTasksTopActivities(mTargetStack, null, mOptions);
} else {
mRootWindowContainer.ensureActivitiesVisible(null, 0, !PRESERVE_WINDOWS);
}
} else {
ActivityOptions.abort(mOptions);
}