summaryrefslogtreecommitdiff
path: root/libs/input/PointerController.cpp
diff options
context:
space:
mode:
author Prabir Pradhan <prabirmsp@google.com> 2022-03-29 15:54:00 +0000
committer Prabir Pradhan <prabirmsp@google.com> 2022-04-14 18:53:28 +0000
commit294b44d0c740fb8e454517db6c4cc24488df7d64 (patch)
tree7d4dda833b46a0cc108bedcb4ba815cf019318c0 /libs/input/PointerController.cpp
parent7acc9e6bc38e67d38f955d8855504c4c3537bad4 (diff)
Make virtual input device creation synchronous
To ensure that virtual device creation is synchronized with changing other system parameters (such as changing the display of the mouse pointer), we must make virtual input device creation synchronous. This is required to ensure that the VirtualMouse#getCursorPosition API returns the correct value as soon as the virtual mouse device is created. The system only holds on to a PointerController when there is an input device that can control the pointer that is connected. This is so that we don't need to hold on to cursor graphics resources when there's no mouse or touchpad connected. This means we can only synchronize updating the pointer display once we know such an input device is connected. In this CL, we update the virtual input device creation to wait on the binder thread until the system recognizes the new virtual input device. We also clean up the virtual device creation logic to ensure the proper cleanup is done if creation fails at any point. Bug: 216792538 Test: atest VirtualDeviceManagerServiceTest InputControllerTest Test: atest VirtualMouseTest Change-Id: I3b893d23cacec988eb49c9fd3a79cebe31a59c05
Diffstat (limited to 'libs/input/PointerController.cpp')
0 files changed, 0 insertions, 0 deletions