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
This commit is contained in:
parent
4012d74867
commit
0b9d3de5aa
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user