am 5249a10e: am 200adbe9: am 14c08377: am 06e38818: am f9757504: Merge "Reload settings immediately after toggling sync" into ub-gmail-ur14-dev

* commit '5249a10e8cc32edd6b93dbd63ae1695629b5b0c3':
  Reload settings immediately after toggling sync
This commit is contained in:
Tony Mantler 2014-11-02 19:03:09 +00:00 committed by Android Git Automerger
commit 774ab0e296
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);