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

Commit 82638f6e authored by Winson Chung's avatar Winson Chung
Browse files

Fix missing call to super cancel method

- Without the call, it's interpreted as a successful animation to the
  listener even though it was canceled

Bug: 245829938
Test: Swipe to previous task, immediately after settling touch the
      swipe area again
Change-Id: I531cbda0c2bc8168a312a14854a7a73fafd8f678
parent 5aa6deff
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@ package com.android.launcher3.anim;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;

import androidx.annotation.CallSuper;

/**
 * Extension of {@link AnimatorListenerAdapter} for listening for non-cancelled animations
 */
@@ -27,6 +29,7 @@ public abstract class AnimationSuccessListener extends AnimatorListenerAdapter {
    protected boolean mCancelled = false;

    @Override
    @CallSuper
    public void onAnimationCancel(Animator animation) {
        mCancelled = true;
    }
+1 −0
Original line number Diff line number Diff line
@@ -345,6 +345,7 @@ public class StateManager<STATE_TYPE extends BaseState<STATE_TYPE>> {

            @Override
            public void onAnimationCancel(Animator animation) {
                super.onAnimationCancel(animation);
                onStateTransitionFailed(state);
            }
        };