Prevent flings after motion gestures on fully expanded keyguard take 2

Narrower version of original reverted change.

Any up-down gesture on keyguard would trigger a fling that visibly
jumped the keyguard up due to the different height calculation for
shade vs keyguard. If the gesture was quick enough, we were stuck
with this incorrect expansion fraction until the next touch.
This change simply blocks flings on keyguard off
guestures that end at full expansion, since touch has already
been intercepted by NotificationShadeWindowViewController when
we're about to fling from that state.

Test: manual
Bug: 259023628
Change-Id: I0c8d585c964ec8046395b260b5a7a60849beab2b
This commit is contained in:
Shawn Lee
2023-03-16 13:57:53 -07:00
parent 5ac43d6f1c
commit 10ee9baae5

View File

@@ -3555,7 +3555,13 @@ public final class NotificationPanelViewController implements Dumpable {
: (mKeyguardStateController.canDismissLockScreen()
? UNLOCK : BOUNCER_UNLOCK);
fling(vel, expand, isFalseTouch(x, y, interactionType));
// don't fling while in keyguard to avoid jump in shade expand animation;
// touch has been intercepted already so flinging here is redundant
if (mBarState == KEYGUARD && mExpandedFraction >= 1.0) {
mShadeLog.d("NPVC endMotionEvent - skipping fling on keyguard");
} else {
fling(vel, expand, isFalseTouch(x, y, interactionType));
}
onTrackingStopped(expand);
mUpdateFlingOnLayout = expand && mPanelClosedOnDown && !mHasLayoutedSinceDown;
if (mUpdateFlingOnLayout) {