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
1 file changed