From 6a226be1478cf78a5bbf2ff7ccf4cb97f8892c3c Mon Sep 17 00:00:00 2001 From: Enming Xie Date: Thu, 1 Sep 2016 20:08:29 +0200 Subject: [PATCH 1/2] Fix Can not attach MMS from Compose --- .../com/moez/QKSMS/ui/compose/ComposeFragment.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/QKSMS/src/main/java/com/moez/QKSMS/ui/compose/ComposeFragment.java b/QKSMS/src/main/java/com/moez/QKSMS/ui/compose/ComposeFragment.java index e6b84abe..852b9fb6 100644 --- a/QKSMS/src/main/java/com/moez/QKSMS/ui/compose/ComposeFragment.java +++ b/QKSMS/src/main/java/com/moez/QKSMS/ui/compose/ComposeFragment.java @@ -1,5 +1,6 @@ package com.moez.QKSMS.ui.compose; +import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.view.LayoutInflater; @@ -88,6 +89,16 @@ public class ComposeFragment extends QKFragment implements ActivityLauncher, Rec return addresses; } + /** + * Photo Selection result + */ + @Override + public void onActivityResult(int requestCode, int resultCode, final Intent data) { + if (!mComposeView.onActivityResult(requestCode, resultCode, data)) { + // Wasn't handled by ComposeView + } + } + @Override public void onItemClick(AdapterView parent, View view, int position, long id) { mRecipients.onItemClick(parent, view, position, id); From 017e064b53e9474ed3f120a14fd1a518c8d0e077 Mon Sep 17 00:00:00 2001 From: Enming Xie Date: Thu, 1 Sep 2016 20:09:07 +0200 Subject: [PATCH 2/2] Enhancement Do not remove the attached MMS if no recipient set when pressing Send button --- QKSMS/src/main/java/com/moez/QKSMS/ui/view/ComposeView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/QKSMS/src/main/java/com/moez/QKSMS/ui/view/ComposeView.java b/QKSMS/src/main/java/com/moez/QKSMS/ui/view/ComposeView.java index e77e223c..328358ab 100644 --- a/QKSMS/src/main/java/com/moez/QKSMS/ui/view/ComposeView.java +++ b/QKSMS/src/main/java/com/moez/QKSMS/ui/view/ComposeView.java @@ -426,7 +426,6 @@ public class ComposeView extends LinearLayout implements View.OnClickListener { } else { attachment = null; } - clearAttachment(); String[] recipients = null; if (mConversation != null) { @@ -440,6 +439,8 @@ public class ComposeView extends LinearLayout implements View.OnClickListener { // If we have some recipients, send the message! if (recipients != null && recipients.length > 0) { + clearAttachment(); + mReplyText.setText(""); AnalyticsManager.getInstance().sendEvent(