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

Commit 177fd432 authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixed a bug where the notifications could get scrolled on keyguard

When dragging down due to falsing, the scrollposition could
become modified and never reset again.

Change-Id: I15d24dc8a5a3302faeaf30fb20a81d77dcceb059
parent 53e64a43
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -120,12 +120,12 @@ public class DragDownHelper implements Gefingerpoken {
                if (mLastHeight > mMinDragDistance) {
                    if (!mDraggedFarEnough) {
                        mDraggedFarEnough = true;
                        mDragDownCallback.onThresholdReached();
                        mDragDownCallback.onCrossedThreshold(true);
                    }
                } else {
                    if (mDraggedFarEnough) {
                        mDraggedFarEnough = false;
                        mDragDownCallback.onDragDownReset();
                        mDragDownCallback.onCrossedThreshold(false);
                    }
                }
                return true;
@@ -236,7 +236,12 @@ public class DragDownHelper implements Gefingerpoken {
         */
        boolean onDraggedDown(View startingChild, int dragLengthY);
        void onDragDownReset();
        void onThresholdReached();

        /**
         * The user has dragged either above or below the threshold
         * @param above whether he dragged above it
         */
        void onCrossedThreshold(boolean above);
        void onTouchSlopExceeded();
        void setEmptyDragAmount(float amount);
    }
+3 −2
Original line number Diff line number Diff line
@@ -3944,11 +3944,12 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
    @Override
    public void onDragDownReset() {
        mStackScroller.setDimmed(true /* dimmed */, true /* animated */);
        mStackScroller.resetScrollPosition();
    }

    @Override
    public void onThresholdReached() {
        mStackScroller.setDimmed(false /* dimmed */, true /* animate */);
    public void onCrossedThreshold(boolean above) {
        mStackScroller.setDimmed(!above /* dimmed */, true /* animate */);
    }

    @Override