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

Commit 973aa233 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Only cancel translation animations when setting stack position." into qt-r1-bubbles-dev

parents 0bf8028c f75ca279
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -407,8 +407,18 @@ public class PhysicsAnimationLayout extends FrameLayout {
            return;
        }

        cancelAllAnimationsOfProperties(
                mController.getAnimatedProperties().toArray(new DynamicAnimation.ViewProperty[]{}));
    }

    /** Cancels all animations that are running on all child views, for the given properties. */
    public void cancelAllAnimationsOfProperties(DynamicAnimation.ViewProperty... properties) {
        if (mController == null) {
            return;
        }

        for (int i = 0; i < getChildCount(); i++) {
            for (DynamicAnimation.ViewProperty property : mController.getAnimatedProperties()) {
            for (DynamicAnimation.ViewProperty property : properties) {
                final DynamicAnimation anim = getAnimationAtIndex(property, i);
                if (anim != null) {
                    anim.cancel();
+3 −1
Original line number Diff line number Diff line
@@ -731,7 +731,9 @@ public class StackAnimationController extends

        // If we're not the active controller, we don't want to physically move the bubble views.
        if (isActiveController()) {
            mLayout.cancelAllAnimations();
            // Cancel animations that could be moving the views.
            mLayout.cancelAllAnimationsOfProperties(
                    DynamicAnimation.TRANSLATION_X, DynamicAnimation.TRANSLATION_Y);
            cancelStackPositionAnimations();

            // Since we're not using the chained animations, apply the offsets manually.