Show "sync contacts" setting properly in the settings page
Change-Id: I9c198e7795a8f2ea348361092eae22c8ff22a1a0
This commit is contained in:
parent
c06b6290c7
commit
7b79163aac
@ -247,9 +247,8 @@ public class AccountSettings extends PreferenceActivity {
|
|||||||
|
|
||||||
mSyncContacts = (CheckBoxPreference) findPreference(PREFERENCE_SYNC_CONTACTS);
|
mSyncContacts = (CheckBoxPreference) findPreference(PREFERENCE_SYNC_CONTACTS);
|
||||||
if (mAccount.mHostAuthRecv.mProtocol.equals("eas")) {
|
if (mAccount.mHostAuthRecv.mProtocol.equals("eas")) {
|
||||||
String login = mAccount.mHostAuthRecv.mLogin;
|
|
||||||
android.accounts.Account acct =
|
android.accounts.Account acct =
|
||||||
new android.accounts.Account(login, Eas.ACCOUNT_MANAGER_TYPE);
|
new android.accounts.Account(mAccount.mEmailAddress, Eas.ACCOUNT_MANAGER_TYPE);
|
||||||
mSyncContacts.setChecked(ContentResolver
|
mSyncContacts.setChecked(ContentResolver
|
||||||
.getSyncAutomatically(acct, ContactsContract.AUTHORITY));
|
.getSyncAutomatically(acct, ContactsContract.AUTHORITY));
|
||||||
} else {
|
} else {
|
||||||
@ -319,9 +318,8 @@ public class AccountSettings extends PreferenceActivity {
|
|||||||
mAccount.setFlags(newFlags);
|
mAccount.setFlags(newFlags);
|
||||||
|
|
||||||
if (mAccount.mHostAuthRecv.mProtocol.equals("eas")) {
|
if (mAccount.mHostAuthRecv.mProtocol.equals("eas")) {
|
||||||
String login = mAccount.mHostAuthRecv.mLogin;
|
|
||||||
android.accounts.Account acct =
|
android.accounts.Account acct =
|
||||||
new android.accounts.Account(login, Eas.ACCOUNT_MANAGER_TYPE);
|
new android.accounts.Account(mAccount.mEmailAddress, Eas.ACCOUNT_MANAGER_TYPE);
|
||||||
ContentResolver.setSyncAutomatically(acct, ContactsContract.AUTHORITY,
|
ContentResolver.setSyncAutomatically(acct, ContactsContract.AUTHORITY,
|
||||||
mSyncContacts.isChecked());
|
mSyncContacts.isChecked());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user