Android Camera does not return to original activity
===

I create an app that sends intent to the camera app to take picture. 

    if (storageState.equals(Environment.MEDIA_MOUNTED)) {

            try {
                String name=  "pic"+new Date().getTime();
                File photoFile = File.createTempFile(name, ".jpg");
                Log.i(TAG, "created file:"+name+".jpg");
                mImageUri = Uri.fromFile(photoFile);
                takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, mImageUri);
                startActivityForResult(takePictureIntent, ActionCode.TAKE_PHOTO);

            } catch (IOException e) {
                Log.e(TAG, "Could not create file. ", e);
         }


 }

When I take picture and press the "tick" OK button.  It doesn't send any result to my app. 

I found this error in the logcat. 

    07-22 17:56:30.289: E/iu.UploadsManager(5699): upload failed for ID=11 content_uri=content://media/external/images/media/5117 state=1 bytes_total=0,0%
    07-22 17:56:30.289: E/iu.UploadsManager(5699): java.lang.IllegalArgumentException: Zero length file can't be uploaded
    07-22 17:56:30.289: E/iu.UploadsManager(5699): 	at com.google.android.apps.plus.iu.GDataUploader.upload(GDataUploader.java:95)
    07-22 17:56:30.289: E/iu.UploadsManager(5699): 	at com.google.android.apps.plus.iu.UploadsManager.doUpload(UploadsManager.java:819)
    07-22 17:56:30.289: E/iu.UploadsManager(5699): 	at com.google.android.apps.plus.iu.UploadsManager.access$1200(UploadsManager.java:54)
    07-22 17:56:30.289: E/iu.UploadsManager(5699): 	at com.google.android.apps.plus.iu.UploadsManager$UploadTask.performSyncInternal(UploadsManager.java:1390)
    07-22 17:56:30.289: E/iu.UploadsManager(5699): 	at com.google.android.apps.plus.iu.UploadsManager$AutoUploadTask.performSyncInternal(UploadsManager.java:1874)
    07-22 17:56:30.289: E/iu.UploadsManager(5699): 	at com.google.android.apps.plus.iu.UploadsManager$UploadTask.performSync(UploadsManager.java:1309)
    07-22 17:56:30.289: E/iu.UploadsManager(5699): 	at com.google.android.apps.plus.iu.InstantUploadSyncManager.performSyncInternal(InstantUploadSyncManager.java:545)
    07-22 17:56:30.289: E/iu.UploadsManager(5699): 	at com.google.android.apps.plus.iu.InstantUploadSyncManager.performSync(InstantUploadSyncManager.java:591)
    07-22 17:56:30.289: E/iu.UploadsManager(5699): 	at com.google.android.apps.plus.iu.InstantUploadSyncService$InstantUploadSyncAdapter.onPerformSync(InstantUploadSyncService.java:180)
    07-22 17:56:30.289: E/iu.UploadsManager(5699): 	at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:254)
