Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 657d7ce5 authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "Skip cross-task or back-to-home if current task is locked." into main

parents 76bec8ed 2b5d59b3
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -306,9 +306,11 @@ class BackNavigationController {
                    // keyguard locked and activities are unable to show when locked.
                    backType = BackNavigationInfo.TYPE_CALLBACK;
                }
            } else if (currentTask.mAtmService.getLockTaskController().isTaskLocked(currentTask)) {
                // Do not predict if current task is in task locked.
                backType = BackNavigationInfo.TYPE_CALLBACK;
            } else {
                // TODO(208789724): Create single source of truth for this, maybe in
                //  RootWindowContainer
                // Check back-to-home or cross-task
                prevTask = currentTask.mRootWindowContainer.getTask(t -> {
                    if (t.showToCurrentUser() && !t.mChildren.isEmpty()) {
                        final ActivityRecord ar = t.getTopNonFinishingActivity();