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

Commit af692457 authored by wilsonshih's avatar wilsonshih
Browse files

[Back Navi] Fix a recursive call from clearBackAnimations to isTarget.

Modify the set mComposed order to preventing from recursive call.

Bug: 343030535
Test: atest BackNavigationControllerTests
Change-Id: Iaab6685a42c3416aa2f7a6d7d2db2669ba776cef
parent ec19f1f4
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -1099,10 +1099,6 @@ class BackNavigationController {
        }

        void finishPresentAnimations() {
            if (!mComposed) {
                return;
            }

            if (mCloseAdaptor != null) {
                mCloseAdaptor.mTarget.cancelAnimation();
                mCloseAdaptor = null;
@@ -1131,8 +1127,10 @@ class BackNavigationController {
        }

        void clearBackAnimateTarget() {
            finishPresentAnimations();
            if (mComposed) {
                mComposed = false;
                finishPresentAnimations();
            }
            mWaitTransition = false;
            mStartingSurfaceTargetMatch = false;
            mSwitchType = UNKNOWN;