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
This commit is contained in:
Ben Komalo 2011-07-19 18:16:10 -07:00
parent 1ef8ec61c9
commit c01ce156e8
2 changed files with 7 additions and 2 deletions

View File

@ -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();
}

View File

@ -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;