am 76e07e77: Merge "Fix 6474712: Disable the google gesture on prime while notifications are open" into jb-dev

* commit '76e07e7767098a885365e4ae8c8bb51f6a8c3b09':
  Fix 6474712: Disable the google gesture on prime while notifications are open
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index a310b1d..a44279a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -751,6 +751,7 @@
     protected abstract void tick(IBinder key, StatusBarNotification n, boolean firstTime);
     protected abstract void updateExpandedViewPos(int expandedPosition);
     protected abstract int getExpandedViewMaxHeight();
+    protected abstract boolean isStatusBarExpanded();
 
     protected boolean isTopNotification(ViewGroup parent, NotificationData.Entry entry) {
         return parent.indexOfChild(entry.row) == 0;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/DelegateViewHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/DelegateViewHelper.java
index e074a80..912a165 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/DelegateViewHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/DelegateViewHelper.java
@@ -53,6 +53,9 @@
     }
 
     public boolean onInterceptTouchEvent(MotionEvent event) {
+        if (mBar.isStatusBarExpanded()) {
+            return false;
+        }
         switch (event.getAction()) {
             case MotionEvent.ACTION_DOWN:
                 mDownPoint[0] = event.getX();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index d3fbdab..6122390 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -2109,5 +2109,10 @@
     protected void haltTicker() {
         mTicker.halt();
     }
+
+    @Override
+    protected boolean isStatusBarExpanded() {
+        return mExpanded;
+    }
 }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
index 906d1aa..a2c7637 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -1618,6 +1618,11 @@
     @Override
     protected void updateExpandedViewPos(int expandedPosition) {
     }
+
+    @Override
+    protected boolean isStatusBarExpanded() {
+        return mNotificationPanel.getVisibility() == View.VISIBLE;
+    }
 }