From c435d7ad244195bb15dfba49b6a377ca3bf5a1c1 Mon Sep 17 00:00:00 2001 From: Makoto Onuki Date: Tue, 27 Jul 2010 12:53:28 -0700 Subject: [PATCH] Workaround for bug 2873538 Prevent NPE. Change-Id: I6d80e6f574d6c37adb9d7a402850c39e2a79f04a --- src/com/android/email/service/MailService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/android/email/service/MailService.java b/src/com/android/email/service/MailService.java index b2026489a..6da9deaf6 100644 --- a/src/com/android/email/service/MailService.java +++ b/src/com/android/email/service/MailService.java @@ -559,7 +559,7 @@ public class MailService extends Service { Email.POP_IMAP_ACCOUNT_MANAGER_TYPE); report.syncEnabled = ContentResolver.getSyncAutomatically(accountManagerAccount, EmailProvider.EMAIL_AUTHORITY); - + // TODO lookup # new in inbox mSyncReports.put(report.accountId, report); } @@ -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);