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

Commit 60df2464 authored by Winson's avatar Winson Committed by Winson Chung
Browse files

Fixing animation regression due to ag/957220.

- Ensure we clear deferred relayouts after finishing all animations in
  case they trigger a deferred layout in the animation-end callback.

Bug: 28287904
Change-Id: I6d71328fb3dc4595ea67ee18cfa57d85d741e6c6
parent b02d51b3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -416,7 +416,7 @@ public class TaskStackLayoutAlgorithm {
        int prevFocusState = mFocusState;
        int prevFocusState = mFocusState;
        mFocusState = focusState;
        mFocusState = focusState;
        updateFrontBackTransforms();
        updateFrontBackTransforms();
        if (mCb != null && (prevFocusState != focusState)) {
        if (mCb != null) {
            mCb.onFocusStateChanged(prevFocusState, focusState);
            mCb.onFocusStateChanged(prevFocusState, focusState);
        }
        }
    }
    }
+2 −2
Original line number Original line Diff line number Diff line
@@ -1664,10 +1664,10 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal


    public final void onBusEvent(DismissRecentsToHomeAnimationStarted event) {
    public final void onBusEvent(DismissRecentsToHomeAnimationStarted event) {
        // Stop any scrolling
        // Stop any scrolling
        cancelDeferredTaskViewLayoutAnimation();
        mTouchHandler.finishAnimations();
        mStackScroller.stopScroller();
        mStackScroller.stopScroller();
        mStackScroller.stopBoundScrollAnimation();
        mStackScroller.stopBoundScrollAnimation();
        mTouchHandler.finishAnimations();
        cancelDeferredTaskViewLayoutAnimation();


        // Start the task animations
        // Start the task animations
        mAnimationHelper.startExitToHomeAnimation(event.animated, event.getAnimationTrigger());
        mAnimationHelper.startExitToHomeAnimation(event.animated, event.getAnimationTrigger());