summaryrefslogtreecommitdiff
path: root/libs/input/InputFlags.cpp
diff options
context:
space:
mode:
author nergi <nergi@google.com> 2025-02-17 17:20:24 +0900
committer nergi <nergi@google.com> 2025-02-25 19:24:22 +0900
commit96df7be319ce19ea86c53ad4f04f0d964a39e73f (patch)
tree6ddfd5e5bcd7ebd5c9dfd854c105ac8013ef448b /libs/input/InputFlags.cpp
parent3c769a4d1ba7f422e5b21d6d5f7e0f6b1ae5b2f0 (diff)
[CD Cursor] Apply selection logic to change cursor displayId
In connected displays scenario, this tracks the latest display the cursor is at, within the DisplayTopology. By default, this will be set to topology primary display, and updated when mouse crossed to another display. Note: If associatedDisplay is in different topology, mouse will simply be on the associatedDisplay, keeping existing behavior Doc: go/connected-displays-cursor-behavior Bug: 396568321 Test: atest inputflinger_tests Test: atest InputTests Test: atest CtsInputTestCases Flag: com.android.input.flags.connected_displays_associated_display_cursor_bugfix Change-Id: I6a68d9cd5a4de06896e0e29104c25b8a4493b852
Diffstat (limited to 'libs/input/InputFlags.cpp')
-rw-r--r--libs/input/InputFlags.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/input/InputFlags.cpp b/libs/input/InputFlags.cpp
index 555b1387ba..f866f9b8f0 100644
--- a/libs/input/InputFlags.cpp
+++ b/libs/input/InputFlags.cpp
@@ -39,4 +39,9 @@ bool InputFlags::connectedDisplaysCursorEnabled() {
return com::android::input::flags::connected_displays_cursor();
}
+bool InputFlags::connectedDisplaysCursorAndAssociatedDisplayCursorBugfixEnabled() {
+ return connectedDisplaysCursorEnabled() &&
+ com::android::input::flags::connected_displays_associated_display_cursor_bugfix();
+}
+
} // namespace android \ No newline at end of file