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

Commit 12174a7d authored by Jorim Jaggi's avatar Jorim Jaggi Committed by Android (Google) Code Review
Browse files

Merge "Cancel lockscreen/shade gestures when orientation changes" into lmp-mr1-dev

parents f2bd3cc9 aea80f40
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -453,7 +453,8 @@ public class SwipeHelper implements Gefingerpoken {
                            && !mTouchAboveFalsingThreshold;

                    boolean dismissChild = mCallback.canChildBeDismissed(mCurrView)
                            && !falsingDetected && (childSwipedFastEnough || childSwipedFarEnough);
                            && !falsingDetected && (childSwipedFastEnough || childSwipedFarEnough)
                            && ev.getActionMasked() == MotionEvent.ACTION_UP;

                    if (dismissChild) {
                        // flingadingy
+6 −4
Original line number Diff line number Diff line
@@ -523,7 +523,8 @@ public class NotificationPanelView extends PanelView implements
            case MotionEvent.ACTION_UP:
                trackMovement(event);
                if (mQsTracking) {
                    flingQsWithCurrentVelocity();
                    flingQsWithCurrentVelocity(
                            event.getActionMasked() == MotionEvent.ACTION_CANCEL);
                    mQsTracking = false;
                }
                mIntercepting = false;
@@ -558,9 +559,9 @@ public class NotificationPanelView extends PanelView implements
        super.requestDisallowInterceptTouchEvent(disallowIntercept);
    }

    private void flingQsWithCurrentVelocity() {
    private void flingQsWithCurrentVelocity(boolean isCancelMotionEvent) {
        float vel = getCurrentVelocity();
        flingSettings(vel, flingExpandsQs(vel));
        flingSettings(vel, flingExpandsQs(vel) && !isCancelMotionEvent);
    }

    private boolean flingExpandsQs(float vel) {
@@ -729,7 +730,8 @@ public class NotificationPanelView extends PanelView implements
                float fraction = getQsExpansionFraction();
                if ((fraction != 0f || y >= mInitialTouchY)
                        && (fraction != 1f || y <= mInitialTouchY)) {
                    flingQsWithCurrentVelocity();
                    flingQsWithCurrentVelocity(
                            event.getActionMasked() == MotionEvent.ACTION_CANCEL);
                } else {
                    mScrollYOverride = -1;
                }
+2 −1
Original line number Diff line number Diff line
@@ -330,7 +330,8 @@ public abstract class PanelView extends FrameLayout {
                        vectorVel = (float) Math.hypot(
                                mVelocityTracker.getXVelocity(), mVelocityTracker.getYVelocity());
                    }
                    boolean expand = flingExpands(vel, vectorVel);
                    boolean expand = flingExpands(vel, vectorVel)
                            || event.getActionMasked() == MotionEvent.ACTION_CANCEL;
                    onTrackingStopped(expand);
                    DozeLog.traceFling(expand, mTouchAboveFalsingThreshold,
                            mStatusBar.isFalsingThresholdNeeded(),