am 06e38818: am f9757504: Merge "Reload settings immediately after toggling sync" into ub-gmail-ur14-dev

* commit '06e38818a7a117c5f500d3906b867b353625e398':
  Reload settings immediately after toggling sync
This commit is contained in:
Tony Mantler 2014-11-02 17:30:25 +00:00 committed by Android Git Automerger
commit 14c08377e6

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);