Relocate PipInputConsumer activation logic in InputMonitor
Currently, PipInputConsumer is activated during the window iteration
loop (mDisplayContent.forAllWindows) only when a window in pinned
windowing mode is encountered. However, if a PiP window is created
with the INPUT_FEATURE_NO_INPUT_CHANNEL flag, updateInputWindowsLw
returns early for that window, bypassing the PipInputConsumer
activation logic.
Because PiP tasks are trusted overlays, touches can pass through to
underlying windows if the PipInputConsumer is not present, defeating
tapjacking protections like BLOCK_UNTRUSTED_TOUCHES.
This CL relocates the PipInputConsumer activation logic out of the
window iteration loop and into the main updateInputWindows method.
Activation is now tied directly to the presence of a pinned root task,
ensuring the consumer is correctly shown and configured regardless of
the input channel status of the PiP window.
Flag: EXEMPT CVE_FIX
Bug: 527035500
Test: Manually, verify PiP menu works
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:b3b18685c1fa4f4fbb12480f214ce8a6bc549cc1
Merged-In: I8d3504a56c14c255f6fb5e8835d8c0a2f7ee7e3b
Change-Id: I8d3504a56c14c255f6fb5e8835d8c0a2f7ee7e3b
1 file changed