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

Commit 5158d823 authored by Selim Cinek's avatar Selim Cinek
Browse files

Disabled touch interaction when in Quick settings.

Bug: 15308429
Change-Id: I7379b7e3d7145033ff733cef9a336e41793ab103
parent 56109b0c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -564,6 +564,7 @@ public class NotificationPanelView extends PanelView implements
                ? View.INVISIBLE
                : View.VISIBLE);
        mScrollView.setTouchEnabled(mQsExpanded);
        mNotificationStackScroller.setTouchEnabled(!mQsExpanded);
    }

    private void setQsExpansion(float height) {
+13 −1
Original line number Diff line number Diff line
@@ -162,7 +162,7 @@ public class NotificationStackScrollLayout extends ViewGroup
     * animating.
     */
    private boolean mOnlyScrollingInThisMotion;

    private boolean mTouchEnabled = true;
    private ViewTreeObserver.OnPreDrawListener mChildrenUpdater
            = new ViewTreeObserver.OnPreDrawListener() {
        @Override
@@ -1811,6 +1811,18 @@ public class NotificationStackScrollLayout extends ViewGroup
        return mTopPadding + getTranslationY();
    }

    public void setTouchEnabled(boolean touchEnabled) {
        mTouchEnabled = touchEnabled;
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent ev) {
        if (!mTouchEnabled) {
            return false;
        }
        return super.dispatchTouchEvent(ev);
    }

    /**
     * A listener that is notified when some child locations might have changed.
     */