title: finish() not closing activity when called after the first run
body: <p>I have three activities</p>
  
  <ul>
  <li><code>MessagesAttachPhotoActivity</code></li>
  <li><code>MessageGalleryFolderSelectorActivity</code></li>
  <li><code>ImagePickerActivity</code></li>
  </ul>
  
  <p><code>MessagesAttachPhotoActivity</code> calls <code>MessageGalleryFolderSelectorActivity</code> with <code>startActivityForResult()</code>. </p>
  
  <p><code>MessageGalleryFolderSelectorActivity</code> activity displays the photo folders on the phone and one selects a folder. </p>
  
  <p><code>ImagePickerActivity</code> is then called with <code>setActivityForResult()</code>. Once an image is selected from <code>ImagePickerActivity</code>, it is passed back to <code>MessagesAttachPhotoActivity</code> via <code>MessageGalleryFolderSelectorActivity</code>. </p>
  
  <p>When I run the app for the first time, everything works fine. However, if I try to select an image again afterwards, <code>MessageGalleryFolderSelectorActivity</code> does not close after <code>setResult()</code>. </p>
  
  <p>I have tried calling <code>finish()</code>, <code>this.finish()</code>, <code>((Activity)getApplicationContext()).finish()</code>, and <code>super.onBackPressed()</code> without success. </p>
  
  <p>Why does the activity not close on successive runs? </p>
  
  <h2>Here is my code:</h2>
  
  <h3>Calling MessageGalleryFolderSelectorActivity:</h3>
  
  <pre><code>Intent intent;
  Bundle arguments = new Bundle();
  
  Bundle bundle;
  intent = new Intent(this, MessageGalleryFolderSelectorActivity.class);
  bundle = new Bundle();
  bundle.putInt(Constants.INTENT_EXTRA_LIMIT, Constants.IMAGES_SELECT_LIMIT);
  bundle.putInt("Request", MessageThread.MessageType.IMAGE);
  intent.putExtras(bundle);
  startActivityForResult(intent, MessageThread.MessageType.IMAGE);
  </code></pre>
  
  <h3>ImagePickerActivity:</h3>
  
  <pre><code>imagesIntent.putExtra(ImagePickerActivity.INTENT_EXTRA_MODE,
                        ImagePickerActivity.MODE_MULTIPLE);
  imagesIntent.putExtra(ImagePickerActivity.INTENT_EXTRA_LIMIT, 10);
  imagesIntent.putExtra(ImagePickerActivity.INTENT_EXTRA_SHOW_CAMERA, false);
  imagesIntent.putExtra(ImagePickerActivity.INTENT_EXTRA_ALBUM,album);
  
  //imagesIntent.putExtra(ImagePickerActivity.INTENT_EXTRA_SELECTED_IMAGES, images);
  startActivityForResult(imagesIntent, MessageThread.MessageType.IMAGE);
  </code></pre>
  
  <h3>Passing data back to MessageGalleryFolderSelectorActivity:</h3>
  
  <pre><code>Intent data = new Intent();
  data.putParcelableArrayListExtra
       (ImagePickerActivity.INTENT_EXTRA_SELECTED_IMAGES, selectedImages);               
  data.putExtra(ImagePickerActivity.INTENT_EXTRA_ALBUM,album);
  setResult(RESULT_OK, data);
  finish();
  return true;
  </code></pre>
  
  <h3>Trying to pass data back to the initial calling activity but this activity does not close MessageGalleryFolderSelectorActivity:</h3> 
  
  <pre><code>@Override
  protected void onActivityResult(int requestCode, int resultCode, final Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
  
      if (resultCode == RESULT_OK) {
          ArrayList&lt;Image&gt; selectedImages = data.getParcelableArrayListExtra
              (ImagePickerActivity.INTENT_EXTRA_SELECTED_IMAGES);
  
          String album = data.getStringExtra(ImagePickerActivity.INTENT_EXTRA_ALBUM);
  
          Intent intent = new Intent();
          intent.putExtra(ImagePickerActivity.INTENT_EXTRA_ALBUM, album);
          intent.putParcelableArrayListExtra
            (ImagePickerActivity.INTENT_EXTRA_SELECTED_IMAGES, selectedImages);
  
           setResult(Activity.RESULT_OK, intent);
  
           this.finish();
           return;
      } else if (resultCode == RESULT_CANCELED) {
  
      }
  }
  </code></pre>