Skip to content

Commit

Permalink
Include tasks and other services as caldav type
Browse files Browse the repository at this point in the history
  • Loading branch information
sunkup committed May 14, 2024
1 parent a82343d commit deff325
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,11 @@ abstract class SyncManager<ResourceType: LocalResource<*>, out CollectionType: L

private fun logSyncTime() {
val serviceType = when (authority) {
CalendarContract.AUTHORITY -> Service.TYPE_CALDAV
ContactsContract.AUTHORITY,
context.getString(R.string.address_books_authority) -> Service.TYPE_CARDDAV
else -> throw IllegalArgumentException("Invalid authority")
ContactsContract.AUTHORITY, // Contacts
context.getString(R.string.address_books_authority) -> // Address books
Service.TYPE_CARDDAV
else -> // Calendars + other (ie. tasks)
Service.TYPE_CALDAV
}
val db = EntryPointAccessors.fromApplication(context, SyncManagerEntryPoint::class.java).appDatabase()
db.runInTransaction {
Expand Down

0 comments on commit deff325

Please sign in to comment.