Merge "Call BackCallback.setTriggerBack immediately on ACTION_UP" into udc-dev am: af89904fe1 am: 92cf5e82ee

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23232636

Change-Id: I5b1348ff6d7d90754d4b36c4c5bebfb4cfb6841e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Marvin Bernal
2023-05-15 23:12:28 +00:00
committed by Automerger Merge Worker
2 changed files with 5 additions and 3 deletions

View File

@@ -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 {

View File

@@ -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)