show toast when image cropper get oom
This commit is contained in:
parent
943d0391d4
commit
d85854b686
|
@ -186,6 +186,13 @@ public class PublishProfilePictureActivity extends XmppActivity {
|
|||
loadImageIntoPreview(this.avatarUri);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (requestCode == Crop.REQUEST_CROP) {
|
||||
Throwable throwable = Crop.getError(data);
|
||||
if (throwable != null && throwable instanceof OutOfMemoryError) {
|
||||
Toast.makeText(this,R.string.selection_too_large, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -579,4 +579,5 @@
|
|||
<string name="battery_optimizations_enabled_explained">Your device is doing some heavy battery optimizations on Conversations that might lead to delayed notifications or even message loss.\nIt is recommended to disable those.</string>
|
||||
<string name="battery_optimizations_enabled_dialog">Your device is doing some heavy battery optimizations on Conversations that might lead to delayed notifications or even message loss.\n\nYou will now be asked to disable those.</string>
|
||||
<string name="disable">Disable</string>
|
||||
<string name="selection_too_large">The selected area is too large</string>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue