Fix "appearance glitch" in Back Arrow
This avoids playing the Cancellation animation when we receive an ACTION_CANCEL (and just goes straight to GONE), which fixes the glitch. Bug: 237442123 Test: manual Change-Id: Iab0fb98f5a71e1fe80d3949b4fbb35055c731b3f
This commit is contained in:
@@ -321,7 +321,10 @@ class BackPanelController private constructor(
|
||||
velocityTracker = null
|
||||
}
|
||||
MotionEvent.ACTION_CANCEL -> {
|
||||
updateArrowState(GestureState.CANCELLED)
|
||||
// Receiving a CANCEL implies that something else intercepted
|
||||
// the gesture, i.e., the user did not cancel their gesture.
|
||||
// Therefore, disappear immediately, with minimum fanfare.
|
||||
updateArrowState(GestureState.GONE)
|
||||
velocityTracker = null
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user