From 727b15d9cdbbe58f3ccca1f8dbef23e0dd41a5fa Mon Sep 17 00:00:00 2001 From: Harry Cutts Date: Fri, 23 Aug 2024 11:11:13 +0000 Subject: CapturedTouchpadEventConverter: report relative axes In the old touchpad stack, when a touchpad was captured we'd report AXIS_RELATIVE_(X|Y) values for each finger, as offsets from the location it had in the previous frame. When I implemented captured mode in the new stack I didn't realize this, so the new stack introduced in Android U doesn't report them. This causes problems for games that capture the mouse pointer and use the relative axes for camera movement. Bug: 330522990 Test: check the axis values using a test app Test: $ atest inputflinger_tests:CapturedTouchpadEventConverterTest Flag: com.android.input.flags.include_relative_axis_values_for_captured_touchpads Change-Id: I8a1caa4c9315dd41bc712fd9467146bb608cf6f3 --- libs/input/input_flags.aconfig | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libs') diff --git a/libs/input/input_flags.aconfig b/libs/input/input_flags.aconfig index 500f7b4d8a..ab117b875e 100644 --- a/libs/input/input_flags.aconfig +++ b/libs/input/input_flags.aconfig @@ -164,3 +164,10 @@ flag { description: "Show touch and pointer indicators when mirroring a single task" bug: "310179437" } + +flag { + name: "include_relative_axis_values_for_captured_touchpads" + namespace: "input" + description: "Include AXIS_RELATIVE_X and AXIS_RELATIVE_Y values when reporting touches from captured touchpads." + bug: "330522990" +} -- cgit v1.2.3-59-g8ed1b