mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-02-01 10:42:01 -05:00
handle null intent from ucrop for when user just exits without finish cropping
This commit is contained in:
@@ -528,7 +528,8 @@ public class LoyaltyCardEditActivity extends CatimaAppCompatActivity {
|
||||
public void onActivityResult(ActivityResult result) {
|
||||
Intent intent = result.getData();
|
||||
if (intent == null){
|
||||
throw(new RuntimeException("ucrop returned a null intent"));
|
||||
Log.d("cropper", "ucrop returned a null intent");
|
||||
return;
|
||||
}
|
||||
if (result.getResultCode() == Activity.RESULT_OK) {
|
||||
Uri debugUri = UCrop.getOutput(intent);
|
||||
@@ -578,7 +579,7 @@ public class LoyaltyCardEditActivity extends CatimaAppCompatActivity {
|
||||
|
||||
private void setCropperOptions(){
|
||||
mCropperOptions.setCompressionFormat(Bitmap.CompressFormat.JPEG);
|
||||
mCropperOptions.setFreeStyleCropEnabled(false);
|
||||
mCropperOptions.setFreeStyleCropEnabled(true);
|
||||
}
|
||||
|
||||
private void setCropperTheme(){
|
||||
|
||||
Reference in New Issue
Block a user