title: Calling DialogFragment's show() from within onRequestPermissionsResult() causes IllegalStateException in Marshmallow
body: <p>Steps:</p>
  
  <ol>
  <li>Request a permission from <code>Fragment</code> or <code>Activity</code></li>
  <li>Show a DialogFragment from within <code>onRequestPermissionsResult()</code></li>
  <li><code>java.lang.IllegalStateException</code> is thrown: Can not perform this action after <code>onSaveInstanceState</code></li>
  </ol>
  
  <p>This doesn't happen when I show dialog after some delay(using postDelayed).
  According to <a href="http://www.androiddesignpatterns.com/2013/08/fragment-transaction-commit-state-loss.html">http://www.androiddesignpatterns.com/2013/08/fragment-transaction-commit-state-loss.html</a>) on post-Honeycomb devices we CAN <code>commit()</code> between <code>onPause()</code> and <code>onStop()</code> without any STATE LOSS or EXCEPTION. 
  Here is a link to sample project source, log file and issue recorded.
  <a href="https://drive.google.com/folderview?id=0BwvvuYbQTUl6STVSZF9TX2VUeHM&amp;usp=sharing">https://drive.google.com/folderview?id=0BwvvuYbQTUl6STVSZF9TX2VUeHM&amp;usp=sharing</a></p>
  
  <p>Also I have opened an issue <a href="https://code.google.com/p/android/issues/detail?id=190966">https://code.google.com/p/android/issues/detail?id=190966</a> but it was marked as WorkingAsIntended and they suggest to just catch exception. But this doesn't solve the issue. I know other ways to solve it, but isn't this android bug?</p>
  
  <p><strong>UPDATE</strong>
  Status fo the bug is again "assigned". Hope it will be fixed soon.
  My temp solution is </p>
  
  <pre><code>new Handler().postDelayed(new Runnable() {
      @Override
      public void run() {
          // do your fragment transaction here
      }
  }, 200);
  </code></pre>