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

Skip to content
Commit c6d9967e authored by Prabir Pradhan's avatar Prabir Pradhan Committed by Garfield Tan
Browse files

TouchInputMapper: Use default viewport for PointerController

There was a possibility of accidental mouse warping between multiple
displays. InputReader has the responsibility of setting the
DisplayViewport that the pointer is associated with, but framework sets
a recommended "defaultPointerDisplayId".

TouchInputMapper uses PointerController for touchpads
(DEVICE_MODE_POINTER) and for when "showTouches" (touch spots) are
enabled. In the latter case, TouchInputMapper was setting the pointer's
DisplayViewport to the viewport that the mapper itself was associated
with. When this viewport differs from the one recommended by framework,
there is a possibility that the pointer is moved unexpectedly to the
display associated with the mapper. The possibility of this happening
depends upon the the order in which the various input mappers are
configured.

This CL removes the possibility of unexpected warping by making
TouchInputMapper always use the viewport recommended by framework.

Bug: 146385350
Test: atest inputflinger_tests
Change-Id: Id73c59bce825855bc8c829c3a5a18c141593057e
Merged-In: Id73c59bce825855bc8c829c3a5a18c141593057e
parent 0a080c36
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment