Handling the touch better when the screen turns off

Previously we were only cancelling touches when
showing keyguard, but this is not enough, since
a user might be touching it while on the keyguard
(e.g with falsing)

Fixes: 37287962
Fixes: 36416066
Fixes: 37696557
Test: manual, turn of screen while interacting
Change-Id: I572ade2380986ef087468dff721b1d1dfa7a48ab
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 f40de79..b191b91 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -2477,6 +2477,14 @@
         }
     };
 
+    @Override
+    public void setTouchDisabled(boolean disabled) {
+        super.setTouchDisabled(disabled);
+        if (disabled && mAffordanceHelper.isSwipingInProgress() && !mIsLaunchTransitionRunning) {
+            mAffordanceHelper.resetImmediately();
+        }
+    }
+
     public void setDark(boolean dark) {
         mDark = dark;
         mKeyguardStatusView.setDark(dark);