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

Commit 1682e627 authored by Marvin Bernal's avatar Marvin Bernal
Browse files

Call BackCallback.setTriggerBack immediately on ACTION_UP

Bug: 281275417
Test: Manual
Change-Id: I2809a65190c0b6c790c949e3d903b16993493188
parent c6b780a5
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -323,7 +323,6 @@ class BackPanelController internal constructor(
                        if (isFlungAwayFromEdge(endX = event.x) ||
                            previousXTranslation > params.staticTriggerThreshold
                        ) {
                            updateArrowState(GestureState.ACTIVE)
                            updateArrowState(GestureState.FLUNG)
                        } else {
                            updateArrowState(GestureState.CANCELLED)
@@ -331,8 +330,11 @@ class BackPanelController internal constructor(
                    }
                    GestureState.INACTIVE -> {
                        if (isFlungAwayFromEdge(endX = event.x)) {
                            // This is called outside of updateArrowState so that
                            // BackAnimationController can immediately evaluate state
                            // instead of after the flung delay
                            backCallback.setTriggerBack(true)
                            mainHandler.postDelayed(MIN_DURATION_INACTIVE_BEFORE_FLUNG_ANIMATION) {
                                updateArrowState(GestureState.ACTIVE)
                                updateArrowState(GestureState.FLUNG)
                            }
                        } else {
+1 −1
Original line number Diff line number Diff line
@@ -132,7 +132,7 @@ data class EdgePanelParams(private var resources: Resources) {

        entryWidthInterpolator = PathInterpolator(.19f, 1.27f, .71f, .86f)
        entryWidthTowardsEdgeInterpolator = PathInterpolator(1f, -3f, 1f, 1.2f)
        activeWidthInterpolator = PathInterpolator(.56f, -0.39f, .18f, 1.46f)
        activeWidthInterpolator = PathInterpolator(.7f, -0.24f, .48f, 1.21f)
        arrowAngleInterpolator = entryWidthInterpolator
        horizontalTranslationInterpolator = PathInterpolator(0.2f, 1.0f, 1.0f, 1.0f)
        verticalTranslationInterpolator = PathInterpolator(.5f, 1.15f, .41f, .94f)