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 Original line Diff line number Diff line
@@ -564,6 +564,7 @@ public class NotificationPanelView extends PanelView implements
                ? View.INVISIBLE
                ? View.INVISIBLE
                : View.VISIBLE);
                : View.VISIBLE);
        mScrollView.setTouchEnabled(mQsExpanded);
        mScrollView.setTouchEnabled(mQsExpanded);
        mNotificationStackScroller.setTouchEnabled(!mQsExpanded);
    }
    }


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

    private boolean mTouchEnabled = true;
    private ViewTreeObserver.OnPreDrawListener mChildrenUpdater
    private ViewTreeObserver.OnPreDrawListener mChildrenUpdater
            = new ViewTreeObserver.OnPreDrawListener() {
            = new ViewTreeObserver.OnPreDrawListener() {
        @Override
        @Override
@@ -1811,6 +1811,18 @@ public class NotificationStackScrollLayout extends ViewGroup
        return mTopPadding + getTranslationY();
        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.
     * A listener that is notified when some child locations might have changed.
     */
     */