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

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

Merge "Revert "Prevent flings after motion gestures on fully expanded...

Merge "Revert "Prevent flings after motion gestures on fully expanded keyguard"" into tm-qpr-dev am: 90254003 am: 4002108d

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



Change-Id: I5c6553c9674e1969d0467b1a24159905e8bc6ea0
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents e9defd54 4002108d
Loading
Loading
Loading
Loading
+4 −7
Original line number Original line Diff line number Diff line
@@ -3581,15 +3581,12 @@ public final class NotificationPanelViewController implements Dumpable {
    }
    }


    private void endMotionEvent(MotionEvent event, float x, float y, boolean forceCancel) {
    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;
        mTrackingPointer = -1;
        mAmbientState.setSwipingUp(false);
        mAmbientState.setSwipingUp(false);
        if (!fullyExpandedInKeyguard && ((mTracking && mTouchSlopExceeded)
        if ((mTracking && mTouchSlopExceeded) || Math.abs(x - mInitialExpandX) > mTouchSlop
                || Math.abs(x - mInitialExpandX) > mTouchSlop
                || Math.abs(y - mInitialExpandY) > mTouchSlop
                || Math.abs(y - mInitialExpandY) > mTouchSlop
                || (!isFullyExpanded() && !isFullyCollapsed())
                || (!isFullyExpanded() && !isFullyCollapsed())
                || event.getActionMasked() == MotionEvent.ACTION_CANCEL || forceCancel)) {
                || event.getActionMasked() == MotionEvent.ACTION_CANCEL || forceCancel) {
            mVelocityTracker.computeCurrentVelocity(1000);
            mVelocityTracker.computeCurrentVelocity(1000);
            float vel = mVelocityTracker.getYVelocity();
            float vel = mVelocityTracker.getYVelocity();
            float vectorVel = (float) Math.hypot(
            float vectorVel = (float) Math.hypot(
@@ -3637,9 +3634,9 @@ public final class NotificationPanelViewController implements Dumpable {
            if (mUpdateFlingOnLayout) {
            if (mUpdateFlingOnLayout) {
                mUpdateFlingVelocity = vel;
                mUpdateFlingVelocity = vel;
            }
            }
        } else if (fullyExpandedInKeyguard || (!mCentralSurfaces.isBouncerShowing()
        } else if (!mCentralSurfaces.isBouncerShowing()
                && !mAlternateBouncerInteractor.isVisibleState()
                && !mAlternateBouncerInteractor.isVisibleState()
                && !mKeyguardStateController.isKeyguardGoingAway())) {
                && !mKeyguardStateController.isKeyguardGoingAway()) {
            onEmptySpaceClick();
            onEmptySpaceClick();
            onTrackingStopped(true);
            onTrackingStopped(true);
        }
        }