private void addAttachmentImage(Uri imageUri) { try { attachmentManager.setImage(imageUri); } catch (IOException e) { Log.w(TAG, e); attachmentManager.clear(); Toast.makeText( this, R.string.ConversationActivity_sorry_there_was_an_error_setting_your_attachment, Toast.LENGTH_LONG) .show(); } catch (BitmapDecodingException e) { Log.w(TAG, e); attachmentManager.clear(); Toast.makeText( this, R.string.ConversationActivity_sorry_there_was_an_error_setting_your_attachment, Toast.LENGTH_LONG) .show(); } }