title: Android app hangs after subsequent call to startActivityForResult
body: <p>Not sure if this is know behavior or what, but here's the logical flow:</p>
  
  <ol>
  <li>User opens app</li>
  <li>Pulls nav drawer out, clicks profile pic to change it</li>
  <li>Gallery intent pops up, user picks image, everything works fine</li>
  <li>Subsequent attempt to open gallery works fine, upon choosing picture, application hangs</li>
  </ol>
  
  <p>onResume() is not called, neither is onActivityResult(). I even commented out all the code in onActivityResult and it still happens. Any ideas what would cause this?</p>
  
  <p>Here is code from onCreate() in the main activity</p>
  
  <pre><code>    ImageButton profilePictureButton = (ImageButton) findViewById(R.id.change_profile_picture);
      profilePictureButton.requestFocus();
      profilePictureButton.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Intent intent = new Intent(Intent.ACTION_PICK);
              intent.setType("image/*");
  
              startActivityForResult(intent, 1);
          }
      });
  </code></pre>
  
  <p>And here's the handler:</p>
  
  <pre><code>@Override
  protected void onActivityResult(int requestCode, int resultCode, final Intent data) {
      if(resultCode == RESULT_OK) {
          if(requestCode == 1) {
              ImageView view = ((ImageView) findViewById(R.id.nav_profile_picture));
  
              if(data != null) {
                  /*Picasso.with(this).load(data.getData()).into(view);
  
                  UsersCache.getInstance().GetUser("", new Response.Listener&lt;UserItem&gt;() {
                      @Override
                      public void onResponse(UserItem response) {
                          String pictureName = response.username + UUID.randomUUID().toString();
                          String url = "&lt;redacted&gt;";
  
                          JSONObject requestBody = new JSONObject();
                          try {
                              requestBody.put("profilePicture", "&lt;redacted&gt;/media/profile_pictures/" + pictureName);
                          } catch(JSONException e) {
                              e.printStackTrace();
                              return;
                          }
  
                          FlareJsonObjectRequest request = new FlareJsonObjectRequest(Method.POST, url, requestBody, new Response.Listener&lt;JSONObject&gt;() {
                              @Override
                              public void onResponse(JSONObject response) {
                                  String tet = null;
                              }
                          }, new Response.ErrorListener() {
                              @Override
                              public void onErrorResponse(VolleyError error) {
                                  String tet = null;
                              }
                          });
  
                          new AmazonS3Uploader(data.getData(), "profile_pictures/" + pictureName);
  
                          VolleyQueue.getInstance().getQueue().add(request);
                      }
                  }, new Response.ErrorListener() {
                      @Override
                      public void onErrorResponse(VolleyError error) {
                          String tet = null;
                      }
                  });*/
              }
          }
  </code></pre>