title: Detecting Android screen overlays programmatically
body: <p>Is there a way for an app to:</p>
  
  <ol>
  <li>check if there exists screen overlay(s) on top of it, and</li>
  <li>figure out what package name owns the overlay(s)?</li>
  </ol>
  
  <p>I know Android M and above is able to detect screen overlays when in the permissions page and deny permission changes whenever it detects screen overlays, but are developers able to achieve the same things in the app layer?</p>