summaryrefslogtreecommitdiff
path: root/libs/input/Input.cpp
diff options
context:
space:
mode:
author Prabir Pradhan <prabirmsp@google.com> 2024-02-13 21:46:41 +0000
committer Prabir Pradhan <prabirmsp@google.com> 2024-02-13 22:02:32 +0000
commit65455c7f7ee20a68dffe6fdb569aecfa63c7d243 (patch)
treeaa5adb506a11a1e854a0492a7aaea3a32accb674 /libs/input/Input.cpp
parent4497c862673b25ba675d52af23df18a45c5367b3 (diff)
InputDispatcher: Do not change focus when using transferTouch
Since window focus requests are not fully synchronized between InputDispatcher and WM, there can be adverse impacts of rapid gesture transfers on the focused window. This is because when transferring touch, we synthesize a pointer DOWN, and if that event id directed to a non-focused window, Dispatcher will notify the policy that onPointerDownOutsideFocus to get WM to change the focused window. We want the concepts of touched windows and focused windows to be orthogonal. To support this, change the behavior of the transferTouch API to ensure that transfering touches don't result in changes in focus. Bug: 324265767 Test: atest inputflinger_tests Change-Id: I07607c6ac6c91a1a5ad4433b451aa8dfb23f42a7
Diffstat (limited to 'libs/input/Input.cpp')
-rw-r--r--libs/input/Input.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/input/Input.cpp b/libs/input/Input.cpp
index 0d29b4db96..1c713f9163 100644
--- a/libs/input/Input.cpp
+++ b/libs/input/Input.cpp
@@ -1037,6 +1037,9 @@ std::ostream& operator<<(std::ostream& out, const MotionEvent& event) {
if (event.getMetaState() != 0) {
out << ", metaState=" << event.getMetaState();
}
+ if (event.getFlags() != 0) {
+ out << ", flags=0x" << std::hex << event.getFlags() << std::dec;
+ }
if (event.getEdgeFlags() != 0) {
out << ", edgeFlags=" << event.getEdgeFlags();
}