Fixed an issue where the panel could be stuck tracking

Multiple issues are fixed that could lead to the panel being
stuck on the lockscreen. The easiest way to reproduce it was
to swipe up while on ambient display, which could easily happen
in a pocket.
This also adds some safeguards, such that it won't happen again
and ensures that notifications can't be swiped in AOD.

Test: add notifications in AOD, try swiping on them
Change-Id: I8ba0ebe72c3a2734b59443f3b93dbe5f1837cbbd
Fixes: 38486627
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java
index e409b9c..41ef781 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java
@@ -59,7 +59,7 @@
     private boolean mPanelTracking;
     private boolean mExpansionChanging;
     private boolean mPanelFullWidth;
-    private boolean mPulsing;
+    private boolean mHasPulsingNotifications;
     private boolean mUnlockHintRunning;
 
     public AmbientState(Context context) {
@@ -287,12 +287,12 @@
         mPanelTracking = panelTracking;
     }
 
-    public boolean isPulsing() {
-        return mPulsing;
+    public boolean hasPulsingNotifications() {
+        return mHasPulsingNotifications;
     }
 
-    public void setPulsing(boolean pulsing) {
-        mPulsing = pulsing;
+    public void setHasPulsingNotifications(boolean hasPulsing) {
+        mHasPulsingNotifications = hasPulsing;
     }
 
     public boolean isPanelTracking() {