title: How to get activity of a DecorVIew? .getContext() on DecorView getting a DecorContext
body: <p>On Android 7, getting context of a <code>DecorView</code> returns a <code>DecorContext</code> class and it's not an Activity. I used to get activity using <code>Activity a = (Activity)view.getContext()</code> but it's not working for DecorView on Android 7 anymore. Is there any efficient way to get activity from a DecorView?</p>
  
  <p>I'm using reflection to get the window of DecorView, and then get the context of that window (which is an Acitivity) for now.</p>
  
  <pre><code>Field f = decorView.getClass().getDeclaredField("mWindow");
  f.setAccessible(true);
  Window w = (Window) f.get(decorView);
  Activity a = (Activity) w.getContext();
  </code></pre>
  
  <p>Is there any way that uses standard API?</p>