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

Commit e1eb9af2 authored by wilsonshih's avatar wilsonshih
Browse files

Do not start pending animation if another transition is collecting.

If another transition is collecting, something else is happening and
the BackTransitionHandler cannot handle the transition, so cancel the
predictive back animation to allow the collecting transition to proceed.

Flag: EXEMPT bugfix
Bug: 376582378
Test: presubmit
Change-Id: Ie8a3bb25003d04a1758431707b291552c33925a4
parent 13c28f4b
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1025,6 +1025,12 @@ class BackNavigationController {
            return;
        }

        if (mWindowManagerService.mRoot.mTransitionController.isCollecting()) {
            Slog.v(TAG, "Skip predictive back transition, another transition is collecting");
            cancelPendingAnimation();
            return;
        }

        // Ensure the final animation targets which hidden by transition could be visible.
        for (int i = 0; i < targets.size(); i++) {
            final WindowContainer wc = targets.get(i).mContainer;
@@ -1053,6 +1059,7 @@ class BackNavigationController {
            Slog.e(TAG, "Remote animation gone", e);
        }
        mPendingAnimationBuilder = null;
        mNavigationMonitor.stopMonitorTransition();
    }

    /**