From f793cd93b9137b121bb30801121b26548b099f6f Mon Sep 17 00:00:00 2001 From: Makoto Onuki Date: Mon, 12 Apr 2010 11:23:24 -0700 Subject: [PATCH] Set CLEAR_WHEN_TASK_RESET flag when launching Calendar and Contacts, so that when you relaunch Email from Home, you always see the Email app, not Calendar/Contacts. Note as stated in the corresponding bug, this CL itself won't fix the issue, because CLEAR_WHEN_TASK_RESET will be lost when Contacts/Calendar apps handle the intent. There's a feature request against the framework (bug 2586404) which should fix this losing flag problem. Bug 2584792 Change-Id: I34ac3707b99926fc07529ea2229f2a6b3c4f93e4 --- src/com/android/email/activity/MessageView.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/com/android/email/activity/MessageView.java b/src/com/android/email/activity/MessageView.java index aab0ff671..c37b751d9 100644 --- a/src/com/android/email/activity/MessageView.java +++ b/src/com/android/email/activity/MessageView.java @@ -594,6 +594,7 @@ public class MessageView extends Activity implements OnClickListener { if (!TextUtils.isEmpty(senderPersonal)) { intent.putExtra(ContactsContract.Intents.Insert.NAME, senderPersonal); } + intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); startActivity(intent); } @@ -811,6 +812,7 @@ public class MessageView extends Activity implements OnClickListener { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(uri); intent.putExtra("VIEW", "DAY"); + intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); startActivity(intent); } else { Email.log("meetingInfo without DTSTART " + mMessage.mMeetingInfo);