Disabled touch interaction when in Quick settings.

Bug: 15308429
Change-Id: I7379b7e3d7145033ff733cef9a336e41793ab103
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index e30117f..b8a46c4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -564,6 +564,7 @@
                 ? View.INVISIBLE
                 : View.VISIBLE);
         mScrollView.setTouchEnabled(mQsExpanded);
+        mNotificationStackScroller.setTouchEnabled(!mQsExpanded);
     }
 
     private void setQsExpansion(float height) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
index 4e9a3a4..c29f105 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
@@ -162,7 +162,7 @@
      * animating.
      */
     private boolean mOnlyScrollingInThisMotion;
-
+    private boolean mTouchEnabled = true;
     private ViewTreeObserver.OnPreDrawListener mChildrenUpdater
             = new ViewTreeObserver.OnPreDrawListener() {
         @Override
@@ -1811,6 +1811,18 @@
         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.
      */