diff options
author | Tom Taylor <tomtaylor@google.com> | 2010-06-24 11:32:31 -0700 |
---|---|---|
committer | android-build SharedAccount <android-build@sekiwake.mtv.corp.google.com> | 2010-06-24 12:31:46 -0700 |
commit | e0958a47a7e8610b1233824f4a538d5c6c9e7543 (patch) | |
tree | 41874ceca9a1d97a943181aabf51d6b7c6c4476c | |
parent | ffadc4bc7da30cf61e33092133efb37b7e483f63 (diff) | |
download | Mms-e0958a47a7e8610b1233824f4a538d5c6c9e7543.tar.gz |
DO NOT MERGE
A particular set of repo steps involving creating a draft, then deleting
the draft and then receiving a new message can lead to a situation where
a new incoming message gets the old thread id of the discarded
draft. The compose activity can end up displaying the recipients of the
old message with the contents of the new message. Recognize this dangerous
situation and bail out to the ConversationList where the user can
enter the compose activity in a clean manner.
Bug 2793874
Change-Id: I04727de3908e3c50d4687cb6e2a9cc6589daed9c
-rw-r--r-- | src/com/android/mms/ui/ComposeMessageActivity.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/com/android/mms/ui/ComposeMessageActivity.java b/src/com/android/mms/ui/ComposeMessageActivity.java index 6364dfa6..7cd685b0 100644 --- a/src/com/android/mms/ui/ComposeMessageActivity.java +++ b/src/com/android/mms/ui/ComposeMessageActivity.java @@ -1860,7 +1860,16 @@ public class ComposeMessageActivity extends Activity super.onRestart(); if (mWorkingMessage.isDiscarded()) { - mWorkingMessage.unDiscard(); // it was discarded in onStop(). + // If the message isn't worth saving, don't resurrect it. Doing so can lead to + // a situation where a new incoming message gets the old thread id of the discarded + // draft. This activity can end up displaying the recipients of the old message with + // the contents of the new message. Recognize that dangerous situation and bail out + // to the ConversationList where the user can enter this in a clean manner. + if (mWorkingMessage.isWorthSaving()) { + mWorkingMessage.unDiscard(); // it was discarded in onStop(). + } else { + goToConversationList(); + } } } |