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

Commit 6858b72c authored by Riley Jones's avatar Riley Jones
Browse files

Fix to prevent animated tuck repeating.

Test: Drag FAB to edge of screen. Observe the tuck animation not repeating.
Bug: 297556899
Flag: ACONFIG com.android.systemui.floating_menu_animated_tuck ENABLED
Change-Id: I921af4bc03db45b15d28ee88bc47ec7fa69aefa5
parent 6436d1c1
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -226,15 +226,15 @@ class MenuView extends FrameLayout implements
            // onArrivalAtPosition() is called at the end of the animation.
        } else {
            mMenuAnimationController.moveToPosition(position);
            onArrivalAtPosition(); // no animation, so we call this immediately.
            onArrivalAtPosition(true); // no animation, so we call this immediately.
        }
    }

    void onArrivalAtPosition() {
    void onArrivalAtPosition(boolean moveToEdgeIfTucked) {
        final PointF position = getMenuPosition();
        onBoundsInParentChanged((int) position.x, (int) position.y);

        if (isMoveToTucked()) {
        if (isMoveToTucked() && moveToEdgeIfTucked) {
            mMenuAnimationController.moveToEdgeAndHide();
        }
    }
+1 −1
Original line number Diff line number Diff line
@@ -446,7 +446,7 @@ class MenuViewLayer extends FrameLayout implements
            }
        }
        if (Flags.floatingMenuImeDisplacementAnimation()) {
            mMenuView.onArrivalAtPosition();
            mMenuView.onArrivalAtPosition(false);
        }
    }