Loading
Prevent targeted injection into non-owned windows
Before this CL, it was possible to send ACTION_OUTSIDE events to non-owned windows even during targeted injection. However: 1) It's not clear why we actually need this behaviour, and it requires extra work to support this 2) The block of code that we used to "support" this didn't actually do anything. 3) During targeted injection, you should only be allowed to affect owned windows. If you want to affect the entire system, you: a) Should use global rather than targeted injection b) Must be very careful to clean up any remaining state that you cause In this CL, we remove the block of code that did nothing, and also add an explicit target pass to remove any non-owned windows. This should allow further future refactors. Bug: 211379801 Fixes: 281091008 Test: m inputflinger_tests && $ANDROID_HOST_OUT/nativetest64/inputflinger_tests/inputflinger_tests Change-Id: Ib065d39ab162188bf2f6e73601e2bb7e2c5d0409