Don't try to refresh combined inbox

Bug: 6022440
Change-Id: I182c0da80debff5579b850c20015253864a0cf9f
This commit is contained in:
Marc Blank 2012-03-02 10:31:11 -08:00
parent cdd4e8b6ca
commit e1a6088ee4
2 changed files with 6 additions and 4 deletions

View File

@ -315,6 +315,7 @@ public class Controller {
*/
@SuppressWarnings("deprecation")
public void updateMailboxList(final long accountId) {
if (accountId == Account.ACCOUNT_ID_COMBINED_VIEW) return;
Utility.runAsync(new Runnable() {
@Override
public void run() {

View File

@ -18,6 +18,7 @@ package com.android.email.service;
import android.content.Context;
import android.content.Intent;
import com.android.emailcommon.provider.Account;
import com.android.emailcommon.provider.HostAuth;
import com.android.emailcommon.service.EmailServiceProxy;
@ -86,14 +87,14 @@ public class EmailServiceUtils {
public static EmailServiceProxy getServiceForAccount(Context context,
IEmailServiceCallback callback, long accountId) {
String protocol = Account.getProtocol(context, accountId);
if (protocol.equals(HostAuth.SCHEME_IMAP)) {
if (HostAuth.SCHEME_IMAP.equals(protocol)) {
return getImapService(context, callback);
} else if (protocol.equals(HostAuth.SCHEME_POP3)) {
} else if (HostAuth.SCHEME_POP3.equals(protocol)) {
return getPop3Service(context, callback);
} else if (protocol.equals(HostAuth.SCHEME_EAS)) {
} else if (HostAuth.SCHEME_EAS.equals(protocol)) {
return getExchangeService(context, callback);
} else {
throw new IllegalArgumentException("Account with unknown protocol: " + accountId);
return null;
}
}
}