title: onActivityResult() is called to early for Settings.ACTION_MANAGE_OVERLAY_PERMISSION
body: <p>I want to request the Overlay permission for my app to draw on top of other apps. For this I use <a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_MANAGE_OVERLAY_PERMISSION" rel="nofollow">ACTION_MANAGE_OVERLAY_PERMISSION</a> </p>
  
  <pre><code>    Intent intent = new Intent(android.provider.Settings.ACTION_MANAGE_OVERLAY_PERMISSION, Uri.parse("package:" + getPackageName()));
      intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
      startActivityForResult(intent, 1234);
  </code></pre>
  
  <p>This works well and shows the appropriate setting screen but <code>onActivityResult</code> is called when the setting activity is first shown and not when destroyed so I never get the permission in <code>onActivityResult</code>. Do I miss something ?</p>