outputStream.write(data);
outputStream.close();
+ Log.v(TAG, "saved result to URI: " + mSaveUri);
mActivity.setResultEx(Activity.RESULT_OK);
mActivity.finish();
} catch (IOException ex) {
+ Log.w(TAG, "exception saving result to URI: " + mSaveUri, ex);
// ignore exception
} finally {
CameraUtil.closeSilently(outputStream);
int orientation = Exif.getOrientation(exif);
Bitmap bitmap = CameraUtil.makeBitmap(data, 50 * 1024);
bitmap = CameraUtil.rotate(bitmap, orientation);
+ Log.v(TAG, "inlined bitmap into capture intent result");
mActivity.setResultEx(Activity.RESULT_OK,
new Intent("inline-data").putExtra("data", bitmap));
mActivity.finish();
tempStream.write(data);
tempStream.close();
tempUri = Uri.fromFile(path);
+ Log.v(TAG, "wrote temp file for cropping to: " + sTempCropFilename);
} catch (FileNotFoundException ex) {
+ Log.w(TAG, "error writing temp cropping file to: " + sTempCropFilename, ex);
mActivity.setResultEx(Activity.RESULT_CANCELED);
mActivity.finish();
return;
} catch (IOException ex) {
+ Log.w(TAG, "error writing temp cropping file to: " + sTempCropFilename, ex);
mActivity.setResultEx(Activity.RESULT_CANCELED);
mActivity.finish();
return;
newExtras.putString("circleCrop", "true");
}
if (mSaveUri != null) {
+ Log.v(TAG, "setting output of cropped file to: " + mSaveUri);
newExtras.putParcelable(MediaStore.EXTRA_OUTPUT, mSaveUri);
} else {
newExtras.putBoolean(CameraUtil.KEY_RETURN_DATA, true);
cropIntent.setData(tempUri);
cropIntent.putExtras(newExtras);
-
+ Log.v(TAG, "starting CROP intent for capture");
mActivity.startActivityForResult(cropIntent, REQUEST_CROP);
}
}