summaryrefslogtreecommitdiff
path: root/libs/input/SpriteController.cpp
diff options
context:
space:
mode:
author Harry Cutts <hcutts@google.com> 2024-01-09 10:44:18 +0000
committer Harry Cutts <hcutts@google.com> 2024-01-09 15:59:56 +0000
commit6b81f535f82328ddf63c3ebf1b8717d91edf68d3 (patch)
tree870e7868f60d88d7fdbe13cba96d55ad93793b52 /libs/input/SpriteController.cpp
parent660c3c947b661e5404268c30cfec5e70d00ac270 (diff)
input: replace pointer acceleration factor with a boolean
InputManagerService's setPointerAcceleration method is only ever called with values of 1 (which disables pointer acceleration completely) or 3 (the default, as specified in IInputConstants.aidl), so it is effectively being used as a boolean toggle for acceleration. Exposing a single number to control pointer acceleration only makes sense because our acceleration "curve" is basically a flat line, of which the number controls the gradient. We are about to replace the acceleration curve with a more sophisticated one, and keeping this numerical factor would make that work more complicated. Since there is only a use case for disabling acceleration altogether, replace setPointerAcceleration with setMousePointerAccelerationEnabled, which takes a boolean. Since the new touchpad mapper was implemented, the pointer speed and acceleration for touchpads and mice have been implemented and controlled separately, so also add "mouse" to the method name to make it clear that only one type of pointer input is affected by the setting. Bug: 315313622 Test: atest InputTests Test: atest FrameworksServicesTests:com.android.server.companion.virtual.VirtualDeviceManagerServiceTest Test: atest VirtualMouseTest Test: atest VirtualDeviceMirrorDisplayTest Change-Id: I88dba6788c51644e7a4672cceca4e0338cde0168
Diffstat (limited to 'libs/input/SpriteController.cpp')
0 files changed, 0 insertions, 0 deletions