mirror of
https://github.com/etesync/android
synced 2024-11-15 20:38:58 +00:00
Use isAlwaysSyncable for contacts/calendars again because of buggy Android firmwares
This commit is contained in:
parent
098496a4dc
commit
cfb7d6b787
@ -139,17 +139,17 @@ public class SetupEncryptionFragment extends DialogFragment implements LoaderMan
|
||||
// insert CardDAV service
|
||||
insertService(db, accountName, ServiceDB.Services.SERVICE_CARDDAV, config.cardDAV);
|
||||
|
||||
// enable contact sync
|
||||
ContentResolver.setIsSyncable(account, ContactsContract.AUTHORITY, 1);
|
||||
// contact sync is automatically enabled by isAlwaysSyncable="true" in res/xml/sync_contacts.xml
|
||||
settings.setSyncInterval(ContactsContract.AUTHORITY, Constants.DEFAULT_SYNC_INTERVAL);
|
||||
} else {
|
||||
ContentResolver.setIsSyncable(account, ContactsContract.AUTHORITY, 0);
|
||||
}
|
||||
|
||||
if (config.calDAV != null) {
|
||||
// insert CalDAV service
|
||||
insertService(db, accountName, ServiceDB.Services.SERVICE_CALDAV, config.calDAV);
|
||||
|
||||
// enable calendar sync
|
||||
ContentResolver.setIsSyncable(account, CalendarContract.AUTHORITY, 1);
|
||||
// calendar sync is automatically enabled by isAlwaysSyncable="true" in res/xml/sync_contacts.xml
|
||||
settings.setSyncInterval(CalendarContract.AUTHORITY, Constants.DEFAULT_SYNC_INTERVAL);
|
||||
|
||||
// enable task sync if OpenTasks is installed
|
||||
@ -158,6 +158,8 @@ public class SetupEncryptionFragment extends DialogFragment implements LoaderMan
|
||||
ContentResolver.setIsSyncable(account, TaskProvider.ProviderName.OpenTasks.authority, 1);
|
||||
settings.setSyncInterval(TaskProvider.ProviderName.OpenTasks.authority, Constants.DEFAULT_SYNC_INTERVAL);
|
||||
}
|
||||
} else {
|
||||
ContentResolver.setIsSyncable(account, CalendarContract.AUTHORITY, 0);
|
||||
}
|
||||
|
||||
} catch(InvalidAccountException e) {
|
||||
|
@ -11,4 +11,5 @@
|
||||
android:contentAuthority="com.android.calendar"
|
||||
android:allowParallelSyncs="true"
|
||||
android:supportsUploading="true"
|
||||
android:isAlwaysSyncable="true"
|
||||
android:userVisible="true" />
|
||||
|
@ -11,4 +11,5 @@
|
||||
android:contentAuthority="com.android.contacts"
|
||||
android:allowParallelSyncs="true"
|
||||
android:supportsUploading="true"
|
||||
android:isAlwaysSyncable="true"
|
||||
android:userVisible="true" />
|
||||
|
Loading…
Reference in New Issue
Block a user