summaryrefslogtreecommitdiff
path: root/services/inputflinger/InputReaderBase.cpp
diff options
context:
space:
mode:
author Prabir Pradhan <prabirmsp@google.com> 2021-08-06 14:01:18 +0000
committer Prabir Pradhan <prabirmsp@google.com> 2021-09-01 06:42:26 -0700
commit5cc1a69bd232d2291861607d64a0e43c1fa1409b (patch)
tree9ba6f95fd58959873c43c6c115914b5a65e1d20b /services/inputflinger/InputReaderBase.cpp
parentc564282c3697a50a78605ca392640bdd7c835356 (diff)
Use sequence numbers to synchronize enabling Pointer Capture (1/2)
InputReader only processes configuration change from its main thread. This means that if there is more than one Pointer Capture change request when the thread is busy or sleeping, it will only process the latest one. To ensure requests to enable Pointer Capture are synchronized with Dispatcher, we must use sequence numbers. Requests to enable Pointer Capture have a sequence number. Requests to disable Pointer Capture do not have a value. Bug: 195312888 Test: atest inputflinger_tests Test: manual with GeforceNow app, see bug. Change-Id: I6ae9c5498dc2f783b4c7211fa3665d42e29d2919
Diffstat (limited to 'services/inputflinger/InputReaderBase.cpp')
-rw-r--r--services/inputflinger/InputReaderBase.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/inputflinger/InputReaderBase.cpp b/services/inputflinger/InputReaderBase.cpp
index f26a9a986d..05ef489133 100644
--- a/services/inputflinger/InputReaderBase.cpp
+++ b/services/inputflinger/InputReaderBase.cpp
@@ -67,6 +67,9 @@ std::string InputReaderConfiguration::changesToString(uint32_t changes) {
if (changes & CHANGE_EXTERNAL_STYLUS_PRESENCE) {
result += "EXTERNAL_STYLUS_PRESENCE | ";
}
+ if (changes & CHANGE_POINTER_CAPTURE) {
+ result += "POINTER_CAPTURE | ";
+ }
if (changes & CHANGE_ENABLED_STATE) {
result += "ENABLED_STATE | ";
}