Workaround for bug 2873538

Prevent NPE.

Change-Id: I6d80e6f574d6c37adb9d7a402850c39e2a79f04a
This commit is contained in:
Makoto Onuki 2010-07-27 12:53:28 -07:00
parent f08b061ea8
commit c435d7ad24

View File

@ -787,7 +787,7 @@ public class MailService extends Service {
while (c.moveToNext()) {
long accountId = c.getLong(Account.CONTENT_ID_COLUMN);
String protocol = Account.getProtocol(context, accountId);
if (protocol.equals("pop3") || protocol.equals("imap")) {
if ("pop3".equals(protocol) || "imap".equals(protocol)) {
Account account = Account.restoreAccountWithId(context, accountId);
if (account != null) {
providerAccounts.add(account);