Skip to content

API 31 tapjacking protection

akwizgran requested to merge api-31-tapjacking-protection into master

This branch applies the new tapjacking protection available since API 31: instead of detecting and filtering touch events that were passed on by overlay windows, we can just prevent non-system overlays from being drawn over our windows.

The old protection remains in force "just in case" but it's inactive on phones running API >= 31 that honour the new API.

ExitActivity and HideUiActivity don't use the new (or old) protection because they have nothing to click: their purpose is just to clear away other activities.

Tested on the Samsung A21s and the Honor 70 Lite, with Red Moon providing the overlay window. This was fun because the Honor 70 Lite's system UI ignores touch events that have been passed on by overlay windows, so once you launch Red Moon most of the system UI is unresponsive. \o/

Merge request reports