Actually trigger back action on Back Arrow fling
Currently, when the New Back Arrow is flung and the finger lifted, we do not actually send the trigger event -- but we do if the finger is lifted after coming to a "stop", i.e., a commit without a "fling". To test, swipe from the right edge inwards, and release while your finger is in motion (as opposed to "stop moving, and then lift"). Bug: 240272871 Test: Manual Change-Id: I81d6e6b1bb42c2cd12d14ae861ba8eb9f3081d11
This commit is contained in:
@@ -510,7 +510,6 @@ class BackPanelController private constructor(
|
||||
private fun playCommitBackAnimation() {
|
||||
// Check if we should vibrate again
|
||||
if (previousState != GestureState.FLUNG) {
|
||||
backCallback.triggerBack()
|
||||
velocityTracker!!.computeCurrentVelocity(1000)
|
||||
val isSlow = abs(velocityTracker!!.xVelocity) < 500
|
||||
val hasNotVibratedRecently =
|
||||
@@ -519,6 +518,10 @@ class BackPanelController private constructor(
|
||||
vibratorHelper.vibrate(VibrationEffect.EFFECT_CLICK)
|
||||
}
|
||||
}
|
||||
// Dispatch the actual back trigger
|
||||
if (DEBUG) Log.d(TAG, "playCommitBackAnimation() invoked triggerBack() on backCallback")
|
||||
backCallback.triggerBack()
|
||||
|
||||
playAnimation(setGoneEndListener)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user