title: Can't override taken photo with same URI
body: <p>This is the weirdest behaviour I have faced from android so far.</p>
  
  <p>I want to take a photo and crop it afterwards. This is the relevant code:</p>
  
  <pre><code>private void manageTakePhotoClicked() {
      outputFileUri = prepareNewFileUri();
      if(outputFileUri == null){
          Toast.makeText(ProfilePicture.this, "Unable to prepare directory", Toast.LENGTH_SHORT);
      }
      try {
          Intent i = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
          i.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
          startActivityForResult(i, RESULT_FROM_PHOTO_TAKEN);
      } catch (ActivityNotFoundException e) {
          Toast.makeText(ProfilePicture.this, "No camera found", Toast.LENGTH_SHORT);
      }
  }
  
  private Uri prepareNewFileUri(){
      if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
          File directory = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + FOLDER);
          if (directory.isDirectory() || directory.mkdirs()) {
              File file = new File(directory, "avatar.jpg");
              return Uri.fromFile(file);
          } else {
              Log.d("foo", "Couldn't create directions");
          }
      } else {
          Log.d("foo", "not mounted ");
      }
      return null;
  }
  </code></pre>
  
  <p>In OnActivityResult, I just trigger the image cropping:</p>
  
  <pre><code>private void startCropActivity() {
      Intent intent = new Intent("com.android.camera.action.CROP");
      intent.setDataAndType(outputFileUri, "image/*");
      intent.putExtra("crop", "true");
      intent.putExtra("aspectX", THUMBNAIL_SIZE_WIDTH);
      intent.putExtra("aspectY", THUMBNAIL_SIZE_HEIGHT);
      intent.putExtra("outputX", THUMBNAIL_SIZE_WIDTH);
      intent.putExtra("outputY", THUMBNAIL_SIZE_HEIGHT);
      intent.putExtra("return-data", false);
      intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
      startActivityForResult(intent, FROM_CROP);
  }
  </code></pre>
  
  <p>This works only the first time. The next time I take a picture and want to crop it, the first picture is taken for cropping. If I take a look in this folder from a file manager, I can see the correct thumbnail from the latest taken photo. If I click on it, it takes about 5-8 seconds to open the photo, it shows the first photo taken and if I zoom in or out, it switches to the second picture taken (on the fly) but not further. summed up: I take 5 pictures, I cancel the crop process, I see the latest picture in the thumbnail, the first picture by default and the second picture when I pinchzoom.</p>
  
  <p>One more thing: I can delete the whole folder and still get the same effect.</p>
  
  <p>btw: everything works fine when I use unique names for the prepared file. But thats not what I want.</p>