From e6ec9d86e8acd2b0b736f5ea05d13a12355d6511 Mon Sep 17 00:00:00 2001 From: Mihai Preda Date: Thu, 4 Jun 2009 12:48:20 -0700 Subject: [PATCH] AI 149578: Fixed possible NullPointerException in MessageCompose. Integrates 148996,149295 from imode email. BUG=1862155,1798576,1860250 Automated import of CL 149578 --- src/com/android/email/activity/MessageCompose.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/email/activity/MessageCompose.java b/src/com/android/email/activity/MessageCompose.java index d4d0f834c..0734261e2 100644 --- a/src/com/android/email/activity/MessageCompose.java +++ b/src/com/android/email/activity/MessageCompose.java @@ -211,6 +211,7 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus try { Intent i = new Intent(context, MessageCompose.class); i.putExtra(EXTRA_ACCOUNT, account); + i.putExtra(EXTRA_FOLDER, account.getDraftsFolderName()); context.startActivity(i); } catch (ActivityNotFoundException anfe) { // Swallow it - this is usually a race condition, especially under automated test. @@ -1239,7 +1240,7 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus setNewMessageFocus(); mSourceMessageProcessed = true; - mDraftNeedsSaving = false; + mDraftNeedsSaving = mFolder != null && !mFolder.equals(mAccount.getDraftsFolderName()); } /**