From c01ce156e8447ba707f802b01a7625375ff8b230 Mon Sep 17 00:00:00 2001 From: Ben Komalo Date: Tue, 19 Jul 2011 18:16:10 -0700 Subject: [PATCH] Minor change to keep same account if possible. On second thought, it's probably best to stick with the same account if I can't find a particular folder. This at least is less jarring if the user has multiple accounts. Change-Id: Ifd5d631b220e260399681008ac17203f5451c8ff --- src/com/android/email/activity/UIControllerBase.java | 8 +++++++- src/com/android/email/activity/UIControllerOnePane.java | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/com/android/email/activity/UIControllerBase.java b/src/com/android/email/activity/UIControllerBase.java index 8796c3a7e..fc937d958 100644 --- a/src/com/android/email/activity/UIControllerBase.java +++ b/src/com/android/email/activity/UIControllerBase.java @@ -870,7 +870,13 @@ abstract class UIControllerBase implements MailboxListFragment.Callback, // Something bad happened - the account or mailbox we were looking for was deleted. // Just restart and let the entry flow find a good default view. Utility.showToast(mActivity, R.string.toast_mailbox_not_found); - Welcome.actionStart(mActivity); + long accountId = getUIAccountId(); + if (accountId != Account.NO_ACCOUNT) { + mActivity.startActivity(Welcome.createOpenAccountInboxIntent(mActivity, accountId)); + } else { + Welcome.actionStart(mActivity); + + } mActivity.finish(); } diff --git a/src/com/android/email/activity/UIControllerOnePane.java b/src/com/android/email/activity/UIControllerOnePane.java index 89145775e..815325b5c 100644 --- a/src/com/android/email/activity/UIControllerOnePane.java +++ b/src/com/android/email/activity/UIControllerOnePane.java @@ -32,7 +32,6 @@ import com.android.emailcommon.Logging; import com.android.emailcommon.provider.Account; import com.android.emailcommon.provider.EmailContent.Message; import com.android.emailcommon.provider.Mailbox; -import com.android.emailcommon.utility.Utility; import java.util.Set;