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

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

Merge "Allow back predict when no more activity below adjacnet task fragment." into main

parents 7651200d 0643ad0a
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -429,9 +429,12 @@ class BackNavigationController {
            final TaskFragment prevTFAdjacent = prevTF.getAdjacentTaskFragment();
            if (prevTFAdjacent != null) {
                if (prevTFAdjacent == currTF) {
                    // Cannot predict what will happen when app receive back key, skip animation.
                    outPrevActivities.clear();
                    return false;
                    // 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
                    // back key, skip animation.
                    return prevTF.getActivity((below) -> !below.finishing, prevActivity,
                            false /*includeBoundary*/, true /*traverseTopToBottom*/) == null;
                } else {
                    final ActivityRecord prevActivityAdjacent =
                            prevTFAdjacent.getTopNonFinishingActivity();