summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEkin Oguz <ekinoguz@google.com>2016-12-06 03:28:01 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-12-06 03:28:01 +0000
commit785fcc792435085229d1216d3394c84a4a1a8b19 (patch)
tree7d8c94b565871331c0186aee410caa9821ef576d
parentb5fb51165fd44be8e605e91fbe21ac45684f3d0c (diff)
parent7caf02c824998e48292f31ff1d6d2b9198307f08 (diff)
downloadUnifiedEmail-android-7.1.2_r3.tar.gz
am: 7caf02c824 Change-Id: Ic363b26fdae41e8c22c51e94a97cad56eda80e2c
-rw-r--r--src/com/android/mail/compose/ComposeActivity.java18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/com/android/mail/compose/ComposeActivity.java b/src/com/android/mail/compose/ComposeActivity.java
index 2dfac99b9..5f125abe6 100644
--- a/src/com/android/mail/compose/ComposeActivity.java
+++ b/src/com/android/mail/compose/ComposeActivity.java
@@ -2018,19 +2018,15 @@ public class ComposeActivity extends ActionBarActivity
if (contentUri == null) {
return;
}
- try {
- if (handleSpecialAttachmentUri(contentUri)) {
- return;
- }
+ if (handleSpecialAttachmentUri(contentUri)) {
+ return;
+ }
- addAttachmentAndUpdateView(mAttachmentsView.generateLocalAttachment(contentUri));
- } catch (AttachmentFailureException e) {
- LogUtils.e(LOG_TAG, e, "Error adding attachment");
- showErrorToast(getResources().getString(
- e.getErrorRes(),
- AttachmentUtils.convertToHumanReadableSize(
- getApplicationContext(), mAccount.settings.getMaxAttachmentSize())));
+ final long size = handleAttachmentUrisFromIntent(Arrays.asList(contentUri));
+ if (size > 0) {
+ mAttachmentsChanged = true;
+ updateSaveUi();
}
}