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

Commit c9a52ab0 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Fix weird state when flinging with open quick settings.

Change-Id: Ib590eb091f8b5cae218824cf1d4c4ee78377b016
parent 87cd5e71
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -249,6 +249,11 @@ public class NotificationPanelView extends PanelView implements

            case MotionEvent.ACTION_CANCEL:
            case MotionEvent.ACTION_UP:
                trackMovement(event);
                if (mTracking) {
                    flingWithCurrentVelocity();
                    mTracking = false;
                }
                mIntercepting = false;
                break;
        }
@@ -264,6 +269,13 @@ public class NotificationPanelView extends PanelView implements
        }
    }

    private void flingWithCurrentVelocity() {
        float vel = getCurrentVelocity();

        // TODO: Better logic whether we should expand or not.
        flingSettings(vel, vel > 0);
    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        // TODO: Handle doublefinger swipe to notifications again. Look at history for a reference
@@ -313,12 +325,7 @@ public class NotificationPanelView extends PanelView implements
                    mTracking = false;
                    mTrackingPointer = -1;
                    trackMovement(event);

                    float vel = getCurrentVelocity();

                    // TODO: Better logic whether we should expand or not.
                    flingSettings(vel, vel > 0);

                    flingWithCurrentVelocity();
                    if (mVelocityTracker != null) {
                        mVelocityTracker.recycle();
                        mVelocityTracker = null;