In the example below, I’m using Twilight-a “night mode” app-which uses a screen overlay to do its thing.
So, if you install a new app and launch it for the first time while also having a conversation over a Facebook Chat Head, you’ll get an error as the new app tries to request its permissions. Android absolutely will not allow permissions to be changed when an overlay is running, thus resulting in the “Screen Overlay Detected” error. Unfortunately, some apps do odd things when an overlay is actively running, especially if the app in question needs to request a new permission.