title: There is a way to detect the some app is obscured my app, not by touch
body: <p>I know there is a way to detect if some app overlays my app, i.e. touch filtering(flag android:filterTouchesWhenObscured) against hijacking attacks. 
  If you want to create some policy to handle touches you may override the method </p>
  
  <p><code>public boolean onFilterTouchEventForSecurity(MotionEvent event)
  </code> </p>
  
  <p>of the View. For example, you want to show some dialog if your app is obscured by an other window.
  But all of these solutions you can do if a user touches the view. I want to show some dialog when the user opens the app. Is it possible?
  Also I tried to emulate touch event, but I don't know where I can get <b>MotionEvent.FLAG_WINDOW_IS_OBSCURED</b> and after that to set to motion event flags.</p>
  
  <p>And the second question: is there a way to say what app is obscuring my app?
  For example, I know there are a lot of apps, such as twilight, that add some filter over your display. They use specific permission (<b>android.permission.SYSTEM_ALERT_WINDOW</b>) to do it. </p>
  
  <p>Thanks.</p>