List of usage examples for android.os StrictMode enableDeathOnFileUriExposure
@UnsupportedAppUsage public static void enableDeathOnFileUriExposure()
From source file:com.android.settings.users.EditUserPhotoController.java
private void cropPhoto(Uri pictureUri) { // TODO: Use a public intent, when there is one. Intent intent = new Intent("com.android.camera.action.CROP"); intent.setDataAndType(pictureUri, "image/*"); appendOutputExtra(intent, mCropPictureUri); appendCropExtras(intent);/*from ww w. ja v a 2s. co m*/ if (intent.resolveActivity(mContext.getPackageManager()) != null) { try { StrictMode.disableDeathOnFileUriExposure(); mFragment.startActivityForResult(intent, REQUEST_CODE_CROP_PHOTO); } finally { StrictMode.enableDeathOnFileUriExposure(); } } else { onPhotoCropped(pictureUri, false); } }