Merge "Ensure the next activity of non-focusable task to be visible" into rvc-qpr-dev

This commit is contained in:
TreeHugger Robot
2021-03-30 23:31:09 +00:00
committed by Android (Google) Code Review

View File

@@ -2545,7 +2545,11 @@ class ActivityStarter {
private void resumeTargetStackIfNeeded() { private void resumeTargetStackIfNeeded() {
if (mDoResume) { if (mDoResume) {
mRootWindowContainer.resumeFocusedStacksTopActivities(mTargetStack, null, mOptions); if (mTargetStack.isFocusable()) {
mRootWindowContainer.resumeFocusedStacksTopActivities(mTargetStack, null, mOptions);
} else {
mRootWindowContainer.ensureActivitiesVisible(null, 0, !PRESERVE_WINDOWS);
}
} else { } else {
ActivityOptions.abort(mOptions); ActivityOptions.abort(mOptions);
} }