Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6388d2ed authored by Shawn Lee's avatar Shawn Lee Committed by Automerger Merge Worker
Browse files

Merge "Prevent flings after motion gestures on fully expanded keyguard" into...

Merge "Prevent flings after motion gestures on fully expanded keyguard" into tm-qpr-dev am: 6c78bab2 am: 7a2f650a am: 8963d739 am: 10b4ae30

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



Change-Id: I3b9486bea7c7e5f00ab7f7998694ad753279c759
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 057a8374 10b4ae30
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -3581,12 +3581,15 @@ 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 ((mTracking && mTouchSlopExceeded) || Math.abs(x - mInitialExpandX) > mTouchSlop
        if (!fullyExpandedInKeyguard && ((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(
@@ -3634,9 +3637,9 @@ public final class NotificationPanelViewController implements Dumpable {
            if (mUpdateFlingOnLayout) {
                mUpdateFlingVelocity = vel;
            }
        } else if (!mCentralSurfaces.isBouncerShowing()
        } else if (fullyExpandedInKeyguard || (!mCentralSurfaces.isBouncerShowing()
                && !mAlternateBouncerInteractor.isVisibleState()
                && !mKeyguardStateController.isKeyguardGoingAway()) {
                && !mKeyguardStateController.isKeyguardGoingAway())) {
            onEmptySpaceClick();
            onTrackingStopped(true);
        }