aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-01-15 23:47:16 +0100
committerDaniel Gultsch <daniel@gultsch.de>2016-01-15 23:47:16 +0100
commitd85854b686a886d06b4c92b6aaf80e9a3a6d9a2f (patch)
tree44d67f6f5582931a32fbb797e90de66b7e71a308 /src/main/java
parent943d0391d44596090cb100a749b461f75b5615dc (diff)
show toast when image cropper get oom
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/PublishProfilePictureActivity.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/PublishProfilePictureActivity.java b/src/main/java/eu/siacs/conversations/ui/PublishProfilePictureActivity.java
index 0743b9305..e203b86db 100644
--- a/src/main/java/eu/siacs/conversations/ui/PublishProfilePictureActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/PublishProfilePictureActivity.java
@@ -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();
+ }
+ }
}
}