1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-22 14:47:29 +00:00

Fix crop for scoped storage

This commit is contained in:
Ammar Githam 2021-04-08 07:51:37 +09:00
parent 6005e91d8a
commit 5a8c3bb201
2 changed files with 6 additions and 1 deletions

View File

@ -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'

View File

@ -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();