Fix drag and drop failed while recording video
The 'transferTouchFocus' would check if the two windows are exist and
if they are coming from same display. But the mirror surface would
share the same token of the original one. That could cause
'getWindowHandle' return the first window that not belongs to the
display of the target window.
To fix this, we would check the touch state to see if the from window
is being touched, and check if the target window is also coming from
same display, then do the transfer touch focus.
Bug: 195380978
Test: atest inputflinger_tests
Test: atest CrossAppDragAndDropTests
Test: enable video recording, do drag and drop
Change-Id: I458dfb138d446656117828f1229fcc871e8b5e1d
3 files changed