Merge "Reload settings immediately after toggling sync" into ub-gmail-ur14-dev

This commit is contained in:
Tony Mantler 2014-10-14 17:27:36 +00:00 committed by Android (Google) Code Review
commit f9757504b6
1 changed files with 3 additions and 0 deletions

View File

@ -367,16 +367,19 @@ public class AccountSettingsFragment extends MailAccountPrefsFragment
mAccount.mEmailAddress, mServiceInfo.accountType);
ContentResolver.setSyncAutomatically(androidAcct, EmailContent.AUTHORITY,
(Boolean) newValue);
loadSettings();
} else if (key.equals(PREFERENCE_SYNC_CONTACTS)) {
final android.accounts.Account androidAcct = new android.accounts.Account(
mAccount.mEmailAddress, mServiceInfo.accountType);
ContentResolver.setSyncAutomatically(androidAcct, ContactsContract.AUTHORITY,
(Boolean) newValue);
loadSettings();
} else if (key.equals(PREFERENCE_SYNC_CALENDAR)) {
final android.accounts.Account androidAcct = new android.accounts.Account(
mAccount.mEmailAddress, mServiceInfo.accountType);
ContentResolver.setSyncAutomatically(androidAcct, CalendarContract.AUTHORITY,
(Boolean) newValue);
loadSettings();
} else if (key.equals(PREFERENCE_BACKGROUND_ATTACHMENTS)) {
int newFlags = mAccount.getFlags() & ~(Account.FLAGS_BACKGROUND_ATTACHMENTS);