Fix a draft mix-up bug
There's a particular situation that'll cause ComposeMessageActivity
to choose an existing draft even though the new intent is for a totally
different contact. Fixes bug 2254833.
Change-Id: I1065806c7535a48e1c27140c4c76ccf9b9959c03
diff --git a/src/com/android/mms/ui/ComposeMessageActivity.java b/src/com/android/mms/ui/ComposeMessageActivity.java
index 94a76e1..d550095 100644
--- a/src/com/android/mms/ui/ComposeMessageActivity.java
+++ b/src/com/android/mms/ui/ComposeMessageActivity.java
@@ -1781,7 +1781,8 @@
log(" new conversation=" + conversation + ", mConversation=" + mConversation);
}
- if (sameThread || conversation.getThreadId() == mConversation.getThreadId()) {
+ long convThreadId = conversation.getThreadId();
+ if (sameThread || (convThreadId != 0 && convThreadId == mConversation.getThreadId())) {
if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {
log("onNewIntent: same conversation");
}