Loading services/core/java/com/android/server/wm/BackNavigationController.java +13 −2 Original line number Original line Diff line number Diff line Loading @@ -761,7 +761,7 @@ class BackNavigationController { if (isMonitorForRemote()) { if (isMonitorForRemote()) { mObserver.sendResult(null /* result */); mObserver.sendResult(null /* result */); } } if (isMonitorAnimationOrTransition()) { if (isMonitorAnimationOrTransition() && canCancelAnimations()) { clearBackAnimations(true /* cancel */); clearBackAnimations(true /* cancel */); } } cancelPendingAnimation(); cancelPendingAnimation(); Loading Loading @@ -2046,11 +2046,22 @@ class BackNavigationController { } } } } /** If the open transition is playing, wait for transition to clear the animation */ private boolean canCancelAnimations() { if (!Flags.migratePredictiveBackTransition()) { return true; } return mAnimationHandler.mOpenAnimAdaptor == null || mAnimationHandler.mOpenAnimAdaptor.mPreparedOpenTransition == null; } void startAnimation() { void startAnimation() { if (!mBackAnimationInProgress) { if (!mBackAnimationInProgress) { // gesture is already finished, do not start animation // gesture is already finished, do not start animation if (mPendingAnimation != null) { if (mPendingAnimation != null) { if (canCancelAnimations()) { clearBackAnimations(true /* cancel */); clearBackAnimations(true /* cancel */); } mPendingAnimation = null; mPendingAnimation = null; } } return; return; Loading Loading
services/core/java/com/android/server/wm/BackNavigationController.java +13 −2 Original line number Original line Diff line number Diff line Loading @@ -761,7 +761,7 @@ class BackNavigationController { if (isMonitorForRemote()) { if (isMonitorForRemote()) { mObserver.sendResult(null /* result */); mObserver.sendResult(null /* result */); } } if (isMonitorAnimationOrTransition()) { if (isMonitorAnimationOrTransition() && canCancelAnimations()) { clearBackAnimations(true /* cancel */); clearBackAnimations(true /* cancel */); } } cancelPendingAnimation(); cancelPendingAnimation(); Loading Loading @@ -2046,11 +2046,22 @@ class BackNavigationController { } } } } /** If the open transition is playing, wait for transition to clear the animation */ private boolean canCancelAnimations() { if (!Flags.migratePredictiveBackTransition()) { return true; } return mAnimationHandler.mOpenAnimAdaptor == null || mAnimationHandler.mOpenAnimAdaptor.mPreparedOpenTransition == null; } void startAnimation() { void startAnimation() { if (!mBackAnimationInProgress) { if (!mBackAnimationInProgress) { // gesture is already finished, do not start animation // gesture is already finished, do not start animation if (mPendingAnimation != null) { if (mPendingAnimation != null) { if (canCancelAnimations()) { clearBackAnimations(true /* cancel */); clearBackAnimations(true /* cancel */); } mPendingAnimation = null; mPendingAnimation = null; } } return; return; Loading