From 0b9d3de5aa93b6094f068815bdecbf829c7053c5 Mon Sep 17 00:00:00 2001 From: Tony Mantler Date: Mon, 13 Oct 2014 13:32:46 -0700 Subject: [PATCH] Reload settings immediately after toggling sync Twiddling the AccountManager bits doesn't automatically trigger a content update, so we refresh manually in those cases. b/17330140 Change-Id: I294173c9baca231a6f3ff045d0b7795c6b2b2219 --- .../android/email/activity/setup/AccountSettingsFragment.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/android/email/activity/setup/AccountSettingsFragment.java b/src/com/android/email/activity/setup/AccountSettingsFragment.java index 91e14d608..30c3d9cb3 100644 --- a/src/com/android/email/activity/setup/AccountSettingsFragment.java +++ b/src/com/android/email/activity/setup/AccountSettingsFragment.java @@ -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);