summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/preferences/GeneralPreferencesFragment.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/browser/preferences/GeneralPreferencesFragment.java')
-rw-r--r--src/com/android/browser/preferences/GeneralPreferencesFragment.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/browser/preferences/GeneralPreferencesFragment.java b/src/com/android/browser/preferences/GeneralPreferencesFragment.java
index 99a4ec9bf..273516616 100644
--- a/src/com/android/browser/preferences/GeneralPreferencesFragment.java
+++ b/src/com/android/browser/preferences/GeneralPreferencesFragment.java
@@ -304,7 +304,11 @@ public class GeneralPreferencesFragment extends PreferenceFragment
// Enable bookmark sync on all accounts
Account[] accounts = (Account[]) getArguments().getParcelableArray("accounts");
for (Account account : accounts) {
- ContentResolver.setIsSyncable(account, BrowserContract.AUTHORITY, 1);
+ if (ContentResolver.getIsSyncable(account, BrowserContract.AUTHORITY) == 0) {
+ // Account wasn't syncable, enable it
+ ContentResolver.setIsSyncable(account, BrowserContract.AUTHORITY, 1);
+ ContentResolver.setSyncAutomatically(account, BrowserContract.AUTHORITY, true);
+ }
}
dismiss();