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

Commit a0778857 authored by Jon Miranda's avatar Jon Miranda Committed by android-build-merger
Browse files

Merge "Calls cancel on mDimAnimator to ensure that ref counts are accurate." into oc-dev

am: e6b55b99

Change-Id: Id152c631fe22e169f3a84fce6006fc7adcdb2a53
parents 98333b84 e6b55b99
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -362,11 +362,17 @@ public class TaskView extends FixedSizeFrameLayout implements Task.TaskCallbacks
     * Cancels any current transform animations.
     */
    public void cancelTransformAnimation() {
        cancelDimAnimationIfExists();
        Utilities.cancelAnimationWithoutCallbacks(mTransformAnimation);
        Utilities.cancelAnimationWithoutCallbacks(mDimAnimator);
        Utilities.cancelAnimationWithoutCallbacks(mOutlineAnimator);
    }

    private void cancelDimAnimationIfExists() {
        if (mDimAnimator != null) {
            mDimAnimator.cancel();
        }
    }

    /** Enables/disables handling touch on this task view. */
    public void setTouchEnabled(boolean enabled) {
        setOnClickListener(enabled ? this : null);
@@ -546,7 +552,7 @@ public class TaskView extends FixedSizeFrameLayout implements Task.TaskCallbacks
    @Override
    public void onStartLaunchTargetEnterAnimation(TaskViewTransform transform, int duration,
            boolean screenPinningEnabled, ReferenceCountedTrigger postAnimationTrigger) {
        Utilities.cancelAnimationWithoutCallbacks(mDimAnimator);
        cancelDimAnimationIfExists();

        // Dim the view after the app window transitions down into recents
        postAnimationTrigger.increment();