(touch-mode-md 1.1/n) Initialize per display touch mode (native)
Include perDisplayTouchModeEnabled in InputDispatcherPolicy.
Bug: 198499018
Test: atest inputflinger_tests inputflinger_benchmarks
Test: atest TouchModeTest
Change-Id: Idc6ad970bd651a8270055d3f197c4a680c00d350
diff --git a/services/inputflinger/dispatcher/InputDispatcher.h b/services/inputflinger/dispatcher/InputDispatcher.h
index da4af48..be619ae 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.h
+++ b/services/inputflinger/dispatcher/InputDispatcher.h
@@ -119,7 +119,8 @@
void setFocusedDisplay(int32_t displayId) override;
void setInputDispatchMode(bool enabled, bool frozen) override;
void setInputFilterEnabled(bool enabled) override;
- bool setInTouchMode(bool inTouchMode, int32_t pid, int32_t uid, bool hasPermission) override;
+ bool setInTouchMode(bool inTouchMode, int32_t pid, int32_t uid, bool hasPermission,
+ int32_t displayId) override;
void setMaximumObscuringOpacityForTouch(float opacity) override;
bool transferTouchFocus(const sp<IBinder>& fromToken, const sp<IBinder>& toToken,
@@ -685,6 +686,9 @@
bool focusedWindowIsOwnedByLocked(int32_t pid, int32_t uid) REQUIRES(mLock);
bool recentWindowsAreOwnedByLocked(int32_t pid, int32_t uid) REQUIRES(mLock);
+ // Per display touch mode enabled
+ const bool kPerDisplayTouchModeEnabled;
+
sp<InputReporterInterface> mReporter;
};