diff --git a/lib_media_selector/src/main/java/com/android/sdk/mediaselector/SystemMediaSelector.java b/lib_media_selector/src/main/java/com/android/sdk/mediaselector/SystemMediaSelector.java index e51c454..19909d9 100644 --- a/lib_media_selector/src/main/java/com/android/sdk/mediaselector/SystemMediaSelector.java +++ b/lib_media_selector/src/main/java/com/android/sdk/mediaselector/SystemMediaSelector.java @@ -238,9 +238,11 @@ public class SystemMediaSelector { private void processUCropResult(Intent data) { Uri uCropResult = Utils.getUCropResult(data); + Log.d(TAG, "processCameraResult() called with: resultCode = [" + "], data = [" + uCropResult + "]"); if (uCropResult == null) { mMediaSelectorCallback.onTakeFail(); } else { + Log.d(TAG, "processCameraResult() called with: resultCode = [" + "], data = [" + Utils.getAbsolutePath(getContext(), uCropResult) + "]"); mMediaSelectorCallback.onTakeSuccess(Utils.getAbsolutePath(getContext(), uCropResult)); } } diff --git a/lib_media_selector/src/main/java/com/android/sdk/mediaselector/Utils.java b/lib_media_selector/src/main/java/com/android/sdk/mediaselector/Utils.java index 8ac67f0..6d878de 100644 --- a/lib_media_selector/src/main/java/com/android/sdk/mediaselector/Utils.java +++ b/lib_media_selector/src/main/java/com/android/sdk/mediaselector/Utils.java @@ -185,6 +185,8 @@ final class Utils { /////////////////////////////////////////////////////////////////////////// static void toUCrop(Context context, Fragment fragment, String srcPath, String targetPath, CropOptions cropConfig, int requestCode) { + makeFilePath(new File(targetPath)); + Uri srcUri = new Uri.Builder() .scheme("file") .appendPath(srcPath) @@ -227,6 +229,7 @@ final class Utils { } Throwable throwable = UCrop.getError(data); if (throwable != null) { + throwable.printStackTrace(); return null; } return UCrop.getOutput(data);