InputDispatcher: Call setPointerCapture when resetting Pointer Capture
In InputDispatcher, mFocusedWindowRequestedPointerCapture must be in sync with the Pointer Capture state in InputReaderConfiguration. InputDispatcher is responsible for updating the latter by calling InputDispatcherPolicyInterface::setPointerCapture(). Before, if InputDispatcher received a pointerCaptureChanged notification unexpectedly from Reader, Pointer Capture would be "reset" to the disabled state without notifying the policy. In such a case, the Pointer Capture state in the policy could be out of sync with that in InputDispatcher. While Reader should never send such an unexpected notification in Android, the policy should nevertheless be updated for sake of correctness. Bug: 141749603 Test: atest inputflinger_tests Change-Id: Ida53ad980607bcc7b371b614bd89328842196862
Loading
Please register or sign in to comment