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
Loading
Please register or sign in to comment