Browse Source

Fix crop for scoped storage

renovate/org.robolectric-robolectric-4.x
Ammar Githam 4 years ago
parent
commit
5a8c3bb201
  1. 2
      app/build.gradle
  2. 5
      app/src/main/java/awais/instagrabber/fragments/imageedit/ImageEditFragment.java

2
app/build.gradle

@ -157,7 +157,7 @@ dependencies {
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'org.apache.commons:commons-imaging:1.0-alpha2'
implementation 'com.github.ammargitham:uCrop:2.3-native-beta-2'
implementation 'com.github.ammargitham:uCrop:2.3-beta'
implementation 'com.github.ammargitham:android-gpuimage:2.1.1-beta4'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.7'

5
app/src/main/java/awais/instagrabber/fragments/imageedit/ImageEditFragment.java

@ -225,6 +225,11 @@ public class ImageEditFragment extends Fragment {
@Override
public void onCropFinish(final UCropFragment.UCropResult result) {
Log.d(TAG, "onCropFinish: " + result.mResultCode);
if (result.mResultCode == UCrop.RESULT_ERROR) {
final Throwable t = UCrop.getError(result.mResultData);
Log.e(TAG, "onCropFinish: ", t);
return;
}
if (result.mResultCode == AppCompatActivity.RESULT_OK) {
final Intent resultData = result.mResultData;
final Bundle extras = resultData.getExtras();

Loading…
Cancel
Save