title: Coming back from Camera Intent crashes Activity
body: <p>I have an Activity that launches a Camera Intent like this (nothing special):</p>
  
  <pre><code>    Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
      File photo = new File(Environment.getExternalStorageDirectory(),  filename);
      intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(photo));
      Uri imageUri = Uri.fromFile(photo);
      startActivityForResult(intent, CAMERA_REQUEST);
  </code></pre>
  
  <p>Than I get the result in <code>onActivityResult()</code> and set the bitmap to an ImageView. Again, nothing special.</p>
  
  <p>The problem is that the Camera app is always in landscape. So if the user keeps the device in the horizontal orientation when they hit OK to send it back to my Activity, and my Activity was previously in portrait, then it crashes my activity because it has to rebuild it. If you tilt the device to portrait orientation before you tap OK in the camera, then it does not crash. How do I get around this?</p>