Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6b81f535 authored by Harry Cutts's avatar Harry Cutts
Browse files

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
parent 660c3c94
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment