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

Commit 5b8ca9f6 authored by Selim Cinek's avatar Selim Cinek Committed by Android (Google) Code Review
Browse files

Merge "Disabled touch interaction when in Quick settings." into lmp-preview-dev

parents 3b60d3fe 5158d823
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.
     */