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

Commit 2b5d59b3 authored by wilsonshih's avatar wilsonshih
Browse files

Skip cross-task or back-to-home if current task is locked.

Bug: 320755379
Test: enable pinning, pin task.
Verify no predictive back animation occur on pinned task.

Change-Id: I212baa86fe42a1564464b87483b1df94435e56be
parent 456d99d8
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -290,9 +290,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();