title: onResume() called twice in a row after onCreate() > onPause()
body: <p>I've run into a weird occurrence with regards to my child activity's life-cycle methods. If I launch and close the activity enough times, there eventually comes a point where for some reason, upon launching, <code>onPause</code> gets called immediately after <code>onCreate</code> (skipping <code>onResume</code>), which is then followed by <code>onResume</code> being called twice in a row. This ends up causing a <code>RuntimeException</code> in my <code>onResume</code>.</p>
  
  <p>Here's the code that starts my activity:</p>
  
  <pre><code>Intent intent = new Intent(MainActivity.this, RecorderActivity.class);
  startActivityForResult(intent, AV_CAPTURE);
  </code></pre>
  
  <p>My onPause:</p>
  
  <pre><code>protected void onPause() {
      camera.stopPreview();
      camera.setPreviewCallback(null);
      camera.release();
      camera = null;
      super.onPause();
  };
  </code></pre>
  
  <p>I'm not really sure what else I can provide here, it's all pretty straightforward. <code>finish()</code> is called to close the activity, etc.</p>
  
  <p>I should also probably mention that the activity is being triggered from a Javascript Interface attached to a WebView. Another interesting thing to mention is that setting a breakpoint anywhere in the first code block above seems to prevent the issue from happening.</p>