Prevent clickjacking attacks.
An app with the permission SYSTEM_ALERT_WINDOW could overlay certain regions of the screen to trick the user into unwanted actions, namely into enabling an accessibility service which can read all the screen contents.
The flag SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS prevents overlays from non-system apps in the settings activity. Note that this requires permission HIDE_NON_SYSTEM_OVERLAY_WINDOWS.
Bug: 243377869
Test: Tested with the app in b/action/issues/243377869/attachments/38624405
Change-Id: I7b8c36ea6c574c7a7f6cd6d72cab217829586054
2 files changed