summaryrefslogtreecommitdiff
path: root/libs/androidfw/AttributeResolution.cpp
diff options
context:
space:
mode:
author Prabir Pradhan <prabirmsp@google.com> 2022-03-10 14:39:46 +0000
committer Prabir Pradhan <prabirmsp@google.com> 2022-05-05 14:20:45 +0000
commitd4fd3a112b4cb46da17dc996daf745131664cc65 (patch)
treebffc21a4903544284e00af021b2f59de37693a95 /libs/androidfw/AttributeResolution.cpp
parenteb2d1e65b52268ce790379af8d7314f818c68cbd (diff)
Synchronize pointer display change requests
Previously, when InputManagerService requests for PointerController to change the pointer display, there was no way to know when the request was completed or whether it succeeded. This could lead to a few issues: - WM's MousePositionTracker's coordinates would not be updated until the next mouse event was generated, meaning the position would be out of sync. - The creation of a virtual mouse device moves the pointer to a specific displayId. In order to test this behavior, we would need to sleep in the test code to wait for the system to update the pointer display and position, resulting in generally flaky tests. Here, we add a way to synchonize changes to the pointer display so that InputMangerService can know the current pointer display with certainty. PointerController, which is updated in the InputReader thread, is the source of truth of the pointer display. We add a policy call to notify IMS when the pointer display changes. When the pointer display is changed, the cursor position on the updated display is also updated so that the VirtualMouse#getCursorPosition() API is synchronized to the pointer display change. Bug: 216792538 Test: atest FrameworksServicesTests:InputManagerServiceTests Test: atest PointerIconTest Change-Id: I578fd1aba9335e2e078d749321e55a6d05299f3b Merged-In: I578fd1aba9335e2e078d749321e55a6d05299f3b
Diffstat (limited to 'libs/androidfw/AttributeResolution.cpp')
0 files changed, 0 insertions, 0 deletions