(touch-mode-md 2/n) Add md touch mode support in InputDispatcher
Major changes in this CL:
* Drop kPerDisplayTouchModeEnabled (keep the native layer simple);
* Include display id in TouchModeEntry;
* Cache touch mode state per display id.
Bug: 198499018
Test: atest inputflinger_tests
Change-Id: Idc800e08bfca1c19342ad34865bd6c9e5dc6a7d3
diff --git a/services/inputflinger/dispatcher/Entry.cpp b/services/inputflinger/dispatcher/Entry.cpp
index 8046bbe..33e7e17 100644
--- a/services/inputflinger/dispatcher/Entry.cpp
+++ b/services/inputflinger/dispatcher/Entry.cpp
@@ -195,9 +195,10 @@
// --- TouchModeEntry ---
-TouchModeEntry::TouchModeEntry(int32_t id, nsecs_t eventTime, bool inTouchMode)
+TouchModeEntry::TouchModeEntry(int32_t id, nsecs_t eventTime, bool inTouchMode, int displayId)
: EventEntry(id, Type::TOUCH_MODE_CHANGED, eventTime, POLICY_FLAG_PASS_TO_USER),
- inTouchMode(inTouchMode) {}
+ inTouchMode(inTouchMode),
+ displayId(displayId) {}
TouchModeEntry::~TouchModeEntry() {}