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

Commit fdc0ea2d authored by wilsonshih's avatar wilsonshih
Browse files

Fix a regression in BNC search previous activity inside task.

Regression from 0643ad0a, where there should search previous activity
from task, instead of only search from a task fragment.

Bug: 311336844
Test: launch a single activity A, then launch two adjacet activities
B & C in two task fragment. Verify there is no default back predict
animation when back gesture start on neither B or C.

Change-Id: Id7823194a1f06b02b54184bf632bb51c374e179f
parent 7d7d81a1
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -430,10 +430,10 @@ class BackNavigationController {
            if (prevTFAdjacent != null) {
                if (prevTFAdjacent == currTF) {
                    outPrevActivities.clear();
                    // No more activity in previous task fragment, so it can predict if previous
                    // task exists. Otherwise, unable to predict what will happen when app receive
                    // No more activity in task, so it can predict if previous task exists.
                    // Otherwise, unable to predict what will happen when app receive
                    // back key, skip animation.
                    return prevTF.getActivity((below) -> !below.finishing, prevActivity,
                    return currentTask.getActivity((below) -> !below.finishing, prevActivity,
                            false /*includeBoundary*/, true /*traverseTopToBottom*/) == null;
                } else {
                    final ActivityRecord prevActivityAdjacent =