Merge "Actually trigger back action on Back Arrow fling" into tm-qpr-dev am: 6c11adfa42
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19484845 Change-Id: I45229c89d7397f3eda033d296b040bc434b0bfd8 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -510,7 +510,6 @@ class BackPanelController private constructor(
|
|||||||
private fun playCommitBackAnimation() {
|
private fun playCommitBackAnimation() {
|
||||||
// Check if we should vibrate again
|
// Check if we should vibrate again
|
||||||
if (previousState != GestureState.FLUNG) {
|
if (previousState != GestureState.FLUNG) {
|
||||||
backCallback.triggerBack()
|
|
||||||
velocityTracker!!.computeCurrentVelocity(1000)
|
velocityTracker!!.computeCurrentVelocity(1000)
|
||||||
val isSlow = abs(velocityTracker!!.xVelocity) < 500
|
val isSlow = abs(velocityTracker!!.xVelocity) < 500
|
||||||
val hasNotVibratedRecently =
|
val hasNotVibratedRecently =
|
||||||
@@ -519,6 +518,10 @@ class BackPanelController private constructor(
|
|||||||
vibratorHelper.vibrate(VibrationEffect.EFFECT_CLICK)
|
vibratorHelper.vibrate(VibrationEffect.EFFECT_CLICK)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Dispatch the actual back trigger
|
||||||
|
if (DEBUG) Log.d(TAG, "playCommitBackAnimation() invoked triggerBack() on backCallback")
|
||||||
|
backCallback.triggerBack()
|
||||||
|
|
||||||
playAnimation(setGoneEndListener)
|
playAnimation(setGoneEndListener)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user