diff options
| author | 2023-03-15 23:38:22 +0000 | |
|---|---|---|
| committer | 2023-03-15 23:38:22 +0000 | |
| commit | 902540032ccdef869240cdb4bbe0fe6f67d2c95c (patch) | |
| tree | f26fb3a57b240d43daa6c621a4c740a04e10abcf | |
| parent | 743a409ac9f7ef4642c9aa3646cec7814d58219c (diff) | |
| parent | 607f50d5a3fd07786f17c8c5da2db5ccf66cb856 (diff) | |
Merge "Revert "Prevent flings after motion gestures on fully expanded keyguard"" into tm-qpr-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java index fdaeeee26812..6b2d7443392d 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java @@ -3508,15 +3508,12 @@ public final class NotificationPanelViewController implements Dumpable { } private void endMotionEvent(MotionEvent event, float x, float y, boolean forceCancel) { - // don't fling while in keyguard to avoid jump in shade expand animation - boolean fullyExpandedInKeyguard = mBarState == KEYGUARD && mExpandedFraction >= 1.0; mTrackingPointer = -1; mAmbientState.setSwipingUp(false); - if (!fullyExpandedInKeyguard && ((mTracking && mTouchSlopExceeded) - || Math.abs(x - mInitialExpandX) > mTouchSlop + if ((mTracking && mTouchSlopExceeded) || Math.abs(x - mInitialExpandX) > mTouchSlop || Math.abs(y - mInitialExpandY) > mTouchSlop || (!isFullyExpanded() && !isFullyCollapsed()) - || event.getActionMasked() == MotionEvent.ACTION_CANCEL || forceCancel)) { + || event.getActionMasked() == MotionEvent.ACTION_CANCEL || forceCancel) { mVelocityTracker.computeCurrentVelocity(1000); float vel = mVelocityTracker.getYVelocity(); float vectorVel = (float) Math.hypot( @@ -3564,9 +3561,9 @@ public final class NotificationPanelViewController implements Dumpable { if (mUpdateFlingOnLayout) { mUpdateFlingVelocity = vel; } - } else if (fullyExpandedInKeyguard || (!mCentralSurfaces.isBouncerShowing() + } else if (!mCentralSurfaces.isBouncerShowing() && !mAlternateBouncerInteractor.isVisibleState() - && !mKeyguardStateController.isKeyguardGoingAway())) { + && !mKeyguardStateController.isKeyguardGoingAway()) { onEmptySpaceClick(); onTrackingStopped(true); } |