am 00099da1: Merge "Make EAS Email syncable after GB/HC -> ICS upgrade" into ics-mr1

* commit '00099da1b3b9d91574187e70182e5384debb3731':
  Make EAS Email syncable after GB/HC -> ICS upgrade
This commit is contained in:
Marc Blank 2011-11-09 21:19:26 +00:00 committed by Android Git Automerger
commit 406641ce09

View File

@ -2511,6 +2511,17 @@ outer:
createAccountManagerAccount(accountManagerContext,
accountCursor.getString(V21_ACCOUNT_EMAIL),
hostAuthCursor.getString(V21_HOSTAUTH_PASSWORD));
// If an EAS account, make Email sync automatically (equivalent of
// checking the "Sync Email" box in settings
} else if (HostAuth.SCHEME_EAS.equals(protocol)) {
android.accounts.Account amAccount =
new android.accounts.Account(
accountCursor.getString(V21_ACCOUNT_EMAIL),
AccountManagerTypes.TYPE_POP_IMAP);
ContentResolver.setIsSyncable(amAccount, EmailContent.AUTHORITY, 1);
ContentResolver.setSyncAutomatically(amAccount,
EmailContent.AUTHORITY, true);
}
}
} finally {