Remove TouchState::down variable

This variable determines whether touch is currently down. However, we
are already storing the pointers that are down for each window. We can
just check whether any of the touched windows have pointers inside to
replace it.

Bug: 211379801
Test: m inputflinger_tests && adb sync data && adb shell -t /data/nativetest64/inputflinger_tests/inputflinger_tests
Change-Id: I4137e180835da1e689c89feff7c8f223b79aa85e
diff --git a/services/inputflinger/dispatcher/TouchState.h b/services/inputflinger/dispatcher/TouchState.h
index f6e9fb6..ceeeb1e 100644
--- a/services/inputflinger/dispatcher/TouchState.h
+++ b/services/inputflinger/dispatcher/TouchState.h
@@ -28,8 +28,6 @@
 namespace inputdispatcher {
 
 struct TouchState {
-    bool down = false;
-
     // id of the device that is currently down, others are rejected
     int32_t deviceId = -1;
     // source of the device that is current down, others are rejected
@@ -59,6 +57,8 @@
     sp<android::gui::WindowInfoHandle> getFirstForegroundWindowHandle() const;
     bool isSlippery() const;
     sp<android::gui::WindowInfoHandle> getWallpaperWindow() const;
+    // Whether any of the windows are currently being touched
+    bool isDown() const;
 };
 
 } // namespace inputdispatcher