mirror of
https://github.com/bitfireAT/davx5-ose
synced 2024-10-15 15:59:18 +00:00
Update dav4jvm and other dependencies (bitfireAT/davx5#518)
* Upgrade Compose Compiler to 1.5.8 Signed-off-by: Arnau Mora <arnyminerz@proton.me> * Upgrade Kotlin to 1.9.22 Signed-off-by: Arnau Mora <arnyminerz@proton.me> * Upgrade KSP to 1.0.17 Signed-off-by: Arnau Mora <arnyminerz@proton.me> * Upgrade dav4jvm 93dddcd Signed-off-by: Arnau Mora <arnyminerz@proton.me> * Upgrade ViewModel to 2.7.0 Signed-off-by: Arnau Mora <arnyminerz@proton.me> * Updated imports Signed-off-by: Arnau Mora <arnyminerz@proton.me> * Updated imports Signed-off-by: Arnau Mora <arnyminerz@proton.me> * Updated imports Signed-off-by: Arnau Mora <arnyminerz@proton.me> --------- Signed-off-by: Arnau Mora <arnyminerz@proton.me>
This commit is contained in:
parent
ea5fc54003
commit
88e41d1eed
|
@ -56,7 +56,7 @@ android {
|
|||
composeOptions {
|
||||
// Keep this in sync with Kotlin version:
|
||||
// https://developer.android.com/jetpack/androidx/releases/compose-kotlin
|
||||
kotlinCompilerExtensionVersion = "1.5.7"
|
||||
kotlinCompilerExtensionVersion = "1.5.8"
|
||||
}
|
||||
|
||||
// Java namespace for our classes (not to be confused with Android package ID)
|
||||
|
@ -148,8 +148,8 @@ dependencies {
|
|||
implementation 'androidx.hilt:hilt-work:1.1.0'
|
||||
kapt 'androidx.hilt:hilt-compiler:1.1.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.6.2'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0'
|
||||
implementation 'androidx.paging:paging-runtime-ktx:3.2.1'
|
||||
implementation 'androidx.preference:preference-ktx:1.2.1'
|
||||
implementation 'androidx.security:security-crypto:1.1.0-alpha06'
|
||||
|
|
|
@ -8,7 +8,7 @@ import android.security.NetworkSecurityPolicy
|
|||
import androidx.test.filters.SmallTest
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import at.bitfire.dav4jvm.DavResource
|
||||
import at.bitfire.dav4jvm.property.ResourceType
|
||||
import at.bitfire.dav4jvm.property.webdav.ResourceType
|
||||
import at.bitfire.davdroid.network.HttpClient
|
||||
import at.bitfire.davdroid.settings.SettingsManager
|
||||
import dagger.hilt.android.testing.HiltAndroidRule
|
||||
|
@ -17,7 +17,10 @@ import okhttp3.HttpUrl.Companion.toHttpUrl
|
|||
import okhttp3.mockwebserver.MockResponse
|
||||
import okhttp3.mockwebserver.MockWebServer
|
||||
import org.junit.After
|
||||
import org.junit.Assert.*
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertNull
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Assume
|
||||
import org.junit.Before
|
||||
import org.junit.Rule
|
||||
|
|
|
@ -8,8 +8,8 @@ import android.security.NetworkSecurityPolicy
|
|||
import androidx.test.filters.SmallTest
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import at.bitfire.dav4jvm.DavResource
|
||||
import at.bitfire.dav4jvm.property.AddressbookHomeSet
|
||||
import at.bitfire.dav4jvm.property.ResourceType
|
||||
import at.bitfire.dav4jvm.property.carddav.AddressbookHomeSet
|
||||
import at.bitfire.dav4jvm.property.webdav.ResourceType
|
||||
import at.bitfire.davdroid.db.Credentials
|
||||
import at.bitfire.davdroid.log.Logger
|
||||
import at.bitfire.davdroid.network.HttpClient
|
||||
|
|
|
@ -17,7 +17,7 @@ import androidx.work.testing.WorkManagerTestInitHelper
|
|||
import at.bitfire.dav4jvm.PropStat
|
||||
import at.bitfire.dav4jvm.Response
|
||||
import at.bitfire.dav4jvm.Response.HrefRelation
|
||||
import at.bitfire.dav4jvm.property.GetETag
|
||||
import at.bitfire.dav4jvm.property.webdav.GetETag
|
||||
import at.bitfire.davdroid.R
|
||||
import at.bitfire.davdroid.TestUtils.assertWithin
|
||||
import at.bitfire.davdroid.db.Credentials
|
||||
|
|
|
@ -10,9 +10,9 @@ import android.content.SyncResult
|
|||
import at.bitfire.dav4jvm.DavCollection
|
||||
import at.bitfire.dav4jvm.MultiResponseCallback
|
||||
import at.bitfire.dav4jvm.Response
|
||||
import at.bitfire.dav4jvm.property.GetCTag
|
||||
import at.bitfire.davdroid.network.HttpClient
|
||||
import at.bitfire.dav4jvm.property.caldav.GetCTag
|
||||
import at.bitfire.davdroid.db.SyncState
|
||||
import at.bitfire.davdroid.network.HttpClient
|
||||
import at.bitfire.davdroid.resource.LocalResource
|
||||
import at.bitfire.davdroid.settings.AccountSettings
|
||||
import at.bitfire.davdroid.util.DavUtils
|
||||
|
|
|
@ -4,10 +4,21 @@
|
|||
|
||||
package at.bitfire.davdroid.db
|
||||
|
||||
import androidx.room.*
|
||||
import androidx.room.Entity
|
||||
import androidx.room.ForeignKey
|
||||
import androidx.room.Index
|
||||
import androidx.room.PrimaryKey
|
||||
import at.bitfire.dav4jvm.Response
|
||||
import at.bitfire.dav4jvm.UrlUtils
|
||||
import at.bitfire.dav4jvm.property.*
|
||||
import at.bitfire.dav4jvm.property.caldav.CalendarColor
|
||||
import at.bitfire.dav4jvm.property.caldav.CalendarDescription
|
||||
import at.bitfire.dav4jvm.property.caldav.CalendarTimezone
|
||||
import at.bitfire.dav4jvm.property.caldav.Source
|
||||
import at.bitfire.dav4jvm.property.caldav.SupportedCalendarComponentSet
|
||||
import at.bitfire.dav4jvm.property.carddav.AddressbookDescription
|
||||
import at.bitfire.dav4jvm.property.webdav.CurrentUserPrivilegeSet
|
||||
import at.bitfire.dav4jvm.property.webdav.DisplayName
|
||||
import at.bitfire.dav4jvm.property.webdav.ResourceType
|
||||
import at.bitfire.davdroid.util.DavUtils
|
||||
import okhttp3.HttpUrl
|
||||
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
|
||||
|
|
|
@ -10,8 +10,8 @@ import androidx.room.Index
|
|||
import androidx.room.PrimaryKey
|
||||
import at.bitfire.dav4jvm.Response
|
||||
import at.bitfire.dav4jvm.UrlUtils
|
||||
import at.bitfire.dav4jvm.property.DisplayName
|
||||
import at.bitfire.dav4jvm.property.ResourceType
|
||||
import at.bitfire.dav4jvm.property.webdav.DisplayName
|
||||
import at.bitfire.dav4jvm.property.webdav.ResourceType
|
||||
import okhttp3.HttpUrl
|
||||
import org.apache.commons.lang3.StringUtils
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
package at.bitfire.davdroid.db
|
||||
|
||||
import at.bitfire.dav4jvm.property.SyncToken
|
||||
import at.bitfire.dav4jvm.property.webdav.SyncToken
|
||||
import org.json.JSONException
|
||||
import org.json.JSONObject
|
||||
|
||||
|
|
|
@ -12,6 +12,19 @@ import at.bitfire.dav4jvm.exception.DavException
|
|||
import at.bitfire.dav4jvm.exception.HttpException
|
||||
import at.bitfire.dav4jvm.exception.UnauthorizedException
|
||||
import at.bitfire.dav4jvm.property.*
|
||||
import at.bitfire.dav4jvm.property.caldav.CalendarColor
|
||||
import at.bitfire.dav4jvm.property.caldav.CalendarDescription
|
||||
import at.bitfire.dav4jvm.property.caldav.CalendarHomeSet
|
||||
import at.bitfire.dav4jvm.property.caldav.CalendarTimezone
|
||||
import at.bitfire.dav4jvm.property.caldav.CalendarUserAddressSet
|
||||
import at.bitfire.dav4jvm.property.caldav.SupportedCalendarComponentSet
|
||||
import at.bitfire.dav4jvm.property.carddav.AddressbookDescription
|
||||
import at.bitfire.dav4jvm.property.carddav.AddressbookHomeSet
|
||||
import at.bitfire.dav4jvm.property.webdav.CurrentUserPrincipal
|
||||
import at.bitfire.dav4jvm.property.webdav.CurrentUserPrivilegeSet
|
||||
import at.bitfire.dav4jvm.property.webdav.DisplayName
|
||||
import at.bitfire.dav4jvm.property.webdav.HrefListProperty
|
||||
import at.bitfire.dav4jvm.property.webdav.ResourceType
|
||||
import at.bitfire.davdroid.db.Collection
|
||||
import at.bitfire.davdroid.db.Credentials
|
||||
import at.bitfire.davdroid.log.StringHandler
|
||||
|
|
|
@ -29,22 +29,22 @@ import at.bitfire.dav4jvm.Response
|
|||
import at.bitfire.dav4jvm.UrlUtils
|
||||
import at.bitfire.dav4jvm.exception.HttpException
|
||||
import at.bitfire.dav4jvm.exception.UnauthorizedException
|
||||
import at.bitfire.dav4jvm.property.AddressbookDescription
|
||||
import at.bitfire.dav4jvm.property.AddressbookHomeSet
|
||||
import at.bitfire.dav4jvm.property.CalendarColor
|
||||
import at.bitfire.dav4jvm.property.CalendarDescription
|
||||
import at.bitfire.dav4jvm.property.CalendarHomeSet
|
||||
import at.bitfire.dav4jvm.property.CalendarProxyReadFor
|
||||
import at.bitfire.dav4jvm.property.CalendarProxyWriteFor
|
||||
import at.bitfire.dav4jvm.property.CurrentUserPrivilegeSet
|
||||
import at.bitfire.dav4jvm.property.DisplayName
|
||||
import at.bitfire.dav4jvm.property.GroupMembership
|
||||
import at.bitfire.dav4jvm.property.HrefListProperty
|
||||
import at.bitfire.dav4jvm.property.Owner
|
||||
import at.bitfire.dav4jvm.property.ResourceType
|
||||
import at.bitfire.dav4jvm.property.Source
|
||||
import at.bitfire.dav4jvm.property.SupportedAddressData
|
||||
import at.bitfire.dav4jvm.property.SupportedCalendarComponentSet
|
||||
import at.bitfire.dav4jvm.property.caldav.CalendarColor
|
||||
import at.bitfire.dav4jvm.property.caldav.CalendarDescription
|
||||
import at.bitfire.dav4jvm.property.caldav.CalendarHomeSet
|
||||
import at.bitfire.dav4jvm.property.caldav.CalendarProxyReadFor
|
||||
import at.bitfire.dav4jvm.property.caldav.CalendarProxyWriteFor
|
||||
import at.bitfire.dav4jvm.property.caldav.Source
|
||||
import at.bitfire.dav4jvm.property.caldav.SupportedCalendarComponentSet
|
||||
import at.bitfire.dav4jvm.property.carddav.AddressbookDescription
|
||||
import at.bitfire.dav4jvm.property.carddav.AddressbookHomeSet
|
||||
import at.bitfire.dav4jvm.property.carddav.SupportedAddressData
|
||||
import at.bitfire.dav4jvm.property.webdav.CurrentUserPrivilegeSet
|
||||
import at.bitfire.dav4jvm.property.webdav.DisplayName
|
||||
import at.bitfire.dav4jvm.property.webdav.GroupMembership
|
||||
import at.bitfire.dav4jvm.property.webdav.HrefListProperty
|
||||
import at.bitfire.dav4jvm.property.webdav.Owner
|
||||
import at.bitfire.dav4jvm.property.webdav.ResourceType
|
||||
import at.bitfire.davdroid.InvalidAccountException
|
||||
import at.bitfire.davdroid.R
|
||||
import at.bitfire.davdroid.db.AppDatabase
|
||||
|
|
|
@ -11,16 +11,22 @@ import at.bitfire.dav4jvm.DavCalendar
|
|||
import at.bitfire.dav4jvm.MultiResponseCallback
|
||||
import at.bitfire.dav4jvm.Response
|
||||
import at.bitfire.dav4jvm.exception.DavException
|
||||
import at.bitfire.dav4jvm.property.*
|
||||
import at.bitfire.davdroid.util.DavUtils
|
||||
import at.bitfire.davdroid.network.HttpClient
|
||||
import at.bitfire.dav4jvm.property.caldav.CalendarData
|
||||
import at.bitfire.dav4jvm.property.caldav.GetCTag
|
||||
import at.bitfire.dav4jvm.property.caldav.MaxResourceSize
|
||||
import at.bitfire.dav4jvm.property.caldav.ScheduleTag
|
||||
import at.bitfire.dav4jvm.property.webdav.GetETag
|
||||
import at.bitfire.dav4jvm.property.webdav.SupportedReportSet
|
||||
import at.bitfire.dav4jvm.property.webdav.SyncToken
|
||||
import at.bitfire.davdroid.R
|
||||
import at.bitfire.davdroid.db.SyncState
|
||||
import at.bitfire.davdroid.log.Logger
|
||||
import at.bitfire.davdroid.network.HttpClient
|
||||
import at.bitfire.davdroid.resource.LocalCalendar
|
||||
import at.bitfire.davdroid.resource.LocalEvent
|
||||
import at.bitfire.davdroid.resource.LocalResource
|
||||
import at.bitfire.davdroid.settings.AccountSettings
|
||||
import at.bitfire.davdroid.util.DavUtils
|
||||
import at.bitfire.ical4android.Event
|
||||
import at.bitfire.ical4android.InvalidCalendarException
|
||||
import at.bitfire.ical4android.util.DateUtils
|
||||
|
@ -69,9 +75,9 @@ class CalendarSyncManager(
|
|||
override fun queryCapabilities(): SyncState? =
|
||||
remoteExceptionContext {
|
||||
var syncState: SyncState? = null
|
||||
it.propfind(0, MaxICalendarSize.NAME, SupportedReportSet.NAME, GetCTag.NAME, SyncToken.NAME) { response, relation ->
|
||||
it.propfind(0, MaxResourceSize.NAME, SupportedReportSet.NAME, GetCTag.NAME, SyncToken.NAME) { response, relation ->
|
||||
if (relation == Response.HrefRelation.SELF) {
|
||||
response[MaxICalendarSize::class.java]?.maxSize?.let { maxSize ->
|
||||
response[MaxResourceSize::class.java]?.maxSize?.let { maxSize ->
|
||||
Logger.log.info("Calendar accepts events up to ${FileUtils.byteCountToDisplaySize(maxSize)}")
|
||||
}
|
||||
|
||||
|
|
|
@ -14,17 +14,29 @@ import at.bitfire.dav4jvm.DavAddressBook
|
|||
import at.bitfire.dav4jvm.MultiResponseCallback
|
||||
import at.bitfire.dav4jvm.Response
|
||||
import at.bitfire.dav4jvm.exception.DavException
|
||||
import at.bitfire.dav4jvm.property.*
|
||||
import at.bitfire.davdroid.util.DavUtils
|
||||
import at.bitfire.davdroid.util.DavUtils.sameTypeAs
|
||||
import at.bitfire.davdroid.network.HttpClient
|
||||
import at.bitfire.dav4jvm.property.caldav.GetCTag
|
||||
import at.bitfire.dav4jvm.property.carddav.AddressData
|
||||
import at.bitfire.dav4jvm.property.carddav.MaxResourceSize
|
||||
import at.bitfire.dav4jvm.property.carddav.SupportedAddressData
|
||||
import at.bitfire.dav4jvm.property.webdav.GetContentType
|
||||
import at.bitfire.dav4jvm.property.webdav.GetETag
|
||||
import at.bitfire.dav4jvm.property.webdav.ResourceType
|
||||
import at.bitfire.dav4jvm.property.webdav.SupportedReportSet
|
||||
import at.bitfire.dav4jvm.property.webdav.SyncToken
|
||||
import at.bitfire.davdroid.R
|
||||
import at.bitfire.davdroid.db.SyncState
|
||||
import at.bitfire.davdroid.log.Logger
|
||||
import at.bitfire.davdroid.resource.*
|
||||
import at.bitfire.davdroid.network.HttpClient
|
||||
import at.bitfire.davdroid.resource.LocalAddress
|
||||
import at.bitfire.davdroid.resource.LocalAddressBook
|
||||
import at.bitfire.davdroid.resource.LocalContact
|
||||
import at.bitfire.davdroid.resource.LocalGroup
|
||||
import at.bitfire.davdroid.resource.LocalResource
|
||||
import at.bitfire.davdroid.settings.AccountSettings
|
||||
import at.bitfire.davdroid.syncadapter.groups.CategoriesStrategy
|
||||
import at.bitfire.davdroid.syncadapter.groups.VCard4Strategy
|
||||
import at.bitfire.davdroid.util.DavUtils
|
||||
import at.bitfire.davdroid.util.DavUtils.sameTypeAs
|
||||
import at.bitfire.vcard4android.Contact
|
||||
import at.bitfire.vcard4android.GroupMethod
|
||||
import ezvcard.VCardVersion
|
||||
|
@ -131,9 +143,9 @@ class ContactsSyncManager(
|
|||
override fun queryCapabilities(): SyncState? {
|
||||
return remoteExceptionContext {
|
||||
var syncState: SyncState? = null
|
||||
it.propfind(0, MaxVCardSize.NAME, SupportedAddressData.NAME, SupportedReportSet.NAME, GetCTag.NAME, SyncToken.NAME) { response, relation ->
|
||||
it.propfind(0, MaxResourceSize.NAME, SupportedAddressData.NAME, SupportedReportSet.NAME, GetCTag.NAME, SyncToken.NAME) { response, relation ->
|
||||
if (relation == Response.HrefRelation.SELF) {
|
||||
response[MaxVCardSize::class.java]?.maxSize?.let { maxSize ->
|
||||
response[MaxResourceSize::class.java]?.maxSize?.let { maxSize ->
|
||||
Logger.log.info("Address book accepts vCards up to ${FileUtils.byteCountToDisplaySize(maxSize)}")
|
||||
}
|
||||
|
||||
|
|
|
@ -11,16 +11,20 @@ import at.bitfire.dav4jvm.DavCalendar
|
|||
import at.bitfire.dav4jvm.MultiResponseCallback
|
||||
import at.bitfire.dav4jvm.Response
|
||||
import at.bitfire.dav4jvm.exception.DavException
|
||||
import at.bitfire.dav4jvm.property.*
|
||||
import at.bitfire.davdroid.util.DavUtils
|
||||
import at.bitfire.davdroid.network.HttpClient
|
||||
import at.bitfire.dav4jvm.property.caldav.CalendarData
|
||||
import at.bitfire.dav4jvm.property.caldav.GetCTag
|
||||
import at.bitfire.dav4jvm.property.caldav.MaxResourceSize
|
||||
import at.bitfire.dav4jvm.property.webdav.GetETag
|
||||
import at.bitfire.dav4jvm.property.webdav.SyncToken
|
||||
import at.bitfire.davdroid.R
|
||||
import at.bitfire.davdroid.db.SyncState
|
||||
import at.bitfire.davdroid.log.Logger
|
||||
import at.bitfire.davdroid.network.HttpClient
|
||||
import at.bitfire.davdroid.resource.LocalJtxCollection
|
||||
import at.bitfire.davdroid.resource.LocalJtxICalObject
|
||||
import at.bitfire.davdroid.resource.LocalResource
|
||||
import at.bitfire.davdroid.settings.AccountSettings
|
||||
import at.bitfire.davdroid.util.DavUtils
|
||||
import at.bitfire.ical4android.InvalidCalendarException
|
||||
import at.bitfire.ical4android.JtxICalObject
|
||||
import okhttp3.HttpUrl
|
||||
|
@ -54,9 +58,9 @@ class JtxSyncManager(
|
|||
override fun queryCapabilities() =
|
||||
remoteExceptionContext {
|
||||
var syncState: SyncState? = null
|
||||
it.propfind(0, GetCTag.NAME, MaxICalendarSize.NAME, SyncToken.NAME) { response, relation ->
|
||||
it.propfind(0, GetCTag.NAME, MaxResourceSize.NAME, SyncToken.NAME) { response, relation ->
|
||||
if (relation == Response.HrefRelation.SELF) {
|
||||
response[MaxICalendarSize::class.java]?.maxSize?.let { maxSize ->
|
||||
response[MaxResourceSize::class.java]?.maxSize?.let { maxSize ->
|
||||
Logger.log.info("Collection accepts resources up to ${FileUtils.byteCountToDisplaySize(maxSize)}")
|
||||
}
|
||||
|
||||
|
|
|
@ -16,19 +16,38 @@ import android.provider.CalendarContract
|
|||
import android.provider.ContactsContract
|
||||
import androidx.core.app.NotificationCompat
|
||||
import androidx.core.app.NotificationManagerCompat
|
||||
import at.bitfire.dav4jvm.*
|
||||
import at.bitfire.dav4jvm.exception.*
|
||||
import at.bitfire.dav4jvm.property.GetCTag
|
||||
import at.bitfire.dav4jvm.property.GetETag
|
||||
import at.bitfire.dav4jvm.property.ScheduleTag
|
||||
import at.bitfire.dav4jvm.property.SyncToken
|
||||
import at.bitfire.davdroid.*
|
||||
import at.bitfire.dav4jvm.DavCollection
|
||||
import at.bitfire.dav4jvm.DavResource
|
||||
import at.bitfire.dav4jvm.Error
|
||||
import at.bitfire.dav4jvm.MultiResponseCallback
|
||||
import at.bitfire.dav4jvm.Response
|
||||
import at.bitfire.dav4jvm.exception.ConflictException
|
||||
import at.bitfire.dav4jvm.exception.DavException
|
||||
import at.bitfire.dav4jvm.exception.ForbiddenException
|
||||
import at.bitfire.dav4jvm.exception.GoneException
|
||||
import at.bitfire.dav4jvm.exception.HttpException
|
||||
import at.bitfire.dav4jvm.exception.NotFoundException
|
||||
import at.bitfire.dav4jvm.exception.PreconditionFailedException
|
||||
import at.bitfire.dav4jvm.exception.ServiceUnavailableException
|
||||
import at.bitfire.dav4jvm.exception.UnauthorizedException
|
||||
import at.bitfire.dav4jvm.property.caldav.GetCTag
|
||||
import at.bitfire.dav4jvm.property.caldav.ScheduleTag
|
||||
import at.bitfire.dav4jvm.property.webdav.GetETag
|
||||
import at.bitfire.dav4jvm.property.webdav.SyncToken
|
||||
import at.bitfire.davdroid.Constants
|
||||
import at.bitfire.davdroid.InvalidAccountException
|
||||
import at.bitfire.davdroid.R
|
||||
import at.bitfire.davdroid.db.AppDatabase
|
||||
import at.bitfire.davdroid.db.SyncState
|
||||
import at.bitfire.davdroid.db.SyncStats
|
||||
import at.bitfire.davdroid.log.Logger
|
||||
import at.bitfire.davdroid.network.HttpClient
|
||||
import at.bitfire.davdroid.resource.*
|
||||
import at.bitfire.davdroid.resource.LocalAddressBook
|
||||
import at.bitfire.davdroid.resource.LocalCollection
|
||||
import at.bitfire.davdroid.resource.LocalContact
|
||||
import at.bitfire.davdroid.resource.LocalEvent
|
||||
import at.bitfire.davdroid.resource.LocalResource
|
||||
import at.bitfire.davdroid.resource.LocalTask
|
||||
import at.bitfire.davdroid.settings.AccountSettings
|
||||
import at.bitfire.davdroid.ui.DebugInfoActivity
|
||||
import at.bitfire.davdroid.ui.NotificationUtils
|
||||
|
@ -43,7 +62,9 @@ import dagger.hilt.EntryPoint
|
|||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.android.EntryPointAccessors
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.coroutineScope
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import okhttp3.HttpUrl
|
||||
import okhttp3.RequestBody
|
||||
import org.apache.commons.io.FileUtils
|
||||
|
@ -54,7 +75,7 @@ import java.io.InterruptedIOException
|
|||
import java.net.HttpURLConnection
|
||||
import java.security.cert.CertificateException
|
||||
import java.time.Instant
|
||||
import java.util.*
|
||||
import java.util.LinkedList
|
||||
import java.util.concurrent.LinkedBlockingQueue
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
import java.util.logging.Level
|
||||
|
@ -559,7 +580,7 @@ abstract class SyncManager<ResourceType: LocalResource<*>, out CollectionType: L
|
|||
return@listRemote
|
||||
|
||||
// ignore collections
|
||||
if (response[at.bitfire.dav4jvm.property.ResourceType::class.java]?.types?.contains(at.bitfire.dav4jvm.property.ResourceType.COLLECTION) == true)
|
||||
if (response[at.bitfire.dav4jvm.property.webdav.ResourceType::class.java]?.types?.contains(at.bitfire.dav4jvm.property.webdav.ResourceType.COLLECTION) == true)
|
||||
return@listRemote
|
||||
|
||||
val name = response.hrefName()
|
||||
|
|
|
@ -11,16 +11,20 @@ import at.bitfire.dav4jvm.DavCalendar
|
|||
import at.bitfire.dav4jvm.MultiResponseCallback
|
||||
import at.bitfire.dav4jvm.Response
|
||||
import at.bitfire.dav4jvm.exception.DavException
|
||||
import at.bitfire.dav4jvm.property.*
|
||||
import at.bitfire.davdroid.util.DavUtils
|
||||
import at.bitfire.davdroid.network.HttpClient
|
||||
import at.bitfire.dav4jvm.property.caldav.CalendarData
|
||||
import at.bitfire.dav4jvm.property.caldav.GetCTag
|
||||
import at.bitfire.dav4jvm.property.caldav.MaxResourceSize
|
||||
import at.bitfire.dav4jvm.property.webdav.GetETag
|
||||
import at.bitfire.dav4jvm.property.webdav.SyncToken
|
||||
import at.bitfire.davdroid.R
|
||||
import at.bitfire.davdroid.db.SyncState
|
||||
import at.bitfire.davdroid.log.Logger
|
||||
import at.bitfire.davdroid.network.HttpClient
|
||||
import at.bitfire.davdroid.resource.LocalResource
|
||||
import at.bitfire.davdroid.resource.LocalTask
|
||||
import at.bitfire.davdroid.resource.LocalTaskList
|
||||
import at.bitfire.davdroid.settings.AccountSettings
|
||||
import at.bitfire.davdroid.util.DavUtils
|
||||
import at.bitfire.ical4android.InvalidCalendarException
|
||||
import at.bitfire.ical4android.Task
|
||||
import okhttp3.HttpUrl
|
||||
|
@ -57,9 +61,9 @@ class TasksSyncManager(
|
|||
override fun queryCapabilities() =
|
||||
remoteExceptionContext {
|
||||
var syncState: SyncState? = null
|
||||
it.propfind(0, MaxICalendarSize.NAME, GetCTag.NAME, SyncToken.NAME) { response, relation ->
|
||||
it.propfind(0, MaxResourceSize.NAME, GetCTag.NAME, SyncToken.NAME) { response, relation ->
|
||||
if (relation == Response.HrefRelation.SELF) {
|
||||
response[MaxICalendarSize::class.java]?.maxSize?.let { maxSize ->
|
||||
response[MaxResourceSize::class.java]?.maxSize?.let { maxSize ->
|
||||
Logger.log.info("Calendar accepts tasks up to ${FileUtils.byteCountToDisplaySize(maxSize)}")
|
||||
}
|
||||
|
||||
|
|
|
@ -12,9 +12,19 @@ import android.view.View
|
|||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.fragment.app.viewModels
|
||||
import androidx.lifecycle.*
|
||||
import androidx.lifecycle.AndroidViewModel
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import at.bitfire.dav4jvm.DavResource
|
||||
import at.bitfire.dav4jvm.XmlUtils
|
||||
import at.bitfire.dav4jvm.property.caldav.NS_APPLE_ICAL
|
||||
import at.bitfire.dav4jvm.property.caldav.NS_CALDAV
|
||||
import at.bitfire.dav4jvm.property.carddav.NS_CARDDAV
|
||||
import at.bitfire.dav4jvm.property.webdav.NS_WEBDAV
|
||||
import at.bitfire.davdroid.R
|
||||
import at.bitfire.davdroid.db.AppDatabase
|
||||
import at.bitfire.davdroid.db.Collection
|
||||
|
@ -168,84 +178,84 @@ class CreateCollectionFragment: DialogFragment() {
|
|||
with(serializer) {
|
||||
setOutput(writer)
|
||||
startDocument("UTF-8", null)
|
||||
setPrefix("", XmlUtils.NS_WEBDAV)
|
||||
setPrefix("CAL", XmlUtils.NS_CALDAV)
|
||||
setPrefix("CARD", XmlUtils.NS_CARDDAV)
|
||||
setPrefix("", NS_WEBDAV)
|
||||
setPrefix("CAL", NS_CALDAV)
|
||||
setPrefix("CARD", NS_CARDDAV)
|
||||
|
||||
startTag(XmlUtils.NS_WEBDAV, "mkcol")
|
||||
startTag(XmlUtils.NS_WEBDAV, "set")
|
||||
startTag(XmlUtils.NS_WEBDAV, "prop")
|
||||
startTag(XmlUtils.NS_WEBDAV, "resourcetype")
|
||||
startTag(XmlUtils.NS_WEBDAV, "collection")
|
||||
endTag(XmlUtils.NS_WEBDAV, "collection")
|
||||
startTag(NS_WEBDAV, "mkcol")
|
||||
startTag(NS_WEBDAV, "set")
|
||||
startTag(NS_WEBDAV, "prop")
|
||||
startTag(NS_WEBDAV, "resourcetype")
|
||||
startTag(NS_WEBDAV, "collection")
|
||||
endTag(NS_WEBDAV, "collection")
|
||||
if (collection.type == Collection.TYPE_ADDRESSBOOK) {
|
||||
startTag(XmlUtils.NS_CARDDAV, "addressbook")
|
||||
endTag(XmlUtils.NS_CARDDAV, "addressbook")
|
||||
startTag(NS_CARDDAV, "addressbook")
|
||||
endTag(NS_CARDDAV, "addressbook")
|
||||
} else if (collection.type == Collection.TYPE_CALENDAR) {
|
||||
startTag(XmlUtils.NS_CALDAV, "calendar")
|
||||
endTag(XmlUtils.NS_CALDAV, "calendar")
|
||||
startTag(NS_CALDAV, "calendar")
|
||||
endTag(NS_CALDAV, "calendar")
|
||||
}
|
||||
endTag(XmlUtils.NS_WEBDAV, "resourcetype")
|
||||
endTag(NS_WEBDAV, "resourcetype")
|
||||
collection.displayName?.let {
|
||||
startTag(XmlUtils.NS_WEBDAV, "displayname")
|
||||
startTag(NS_WEBDAV, "displayname")
|
||||
text(it)
|
||||
endTag(XmlUtils.NS_WEBDAV, "displayname")
|
||||
endTag(NS_WEBDAV, "displayname")
|
||||
}
|
||||
|
||||
// addressbook-specific properties
|
||||
if (collection.type == Collection.TYPE_ADDRESSBOOK) {
|
||||
collection.description?.let {
|
||||
startTag(XmlUtils.NS_CARDDAV, "addressbook-description")
|
||||
startTag(NS_CARDDAV, "addressbook-description")
|
||||
text(it)
|
||||
endTag(XmlUtils.NS_CARDDAV, "addressbook-description")
|
||||
endTag(NS_CARDDAV, "addressbook-description")
|
||||
}
|
||||
}
|
||||
|
||||
// calendar-specific properties
|
||||
if (collection.type == Collection.TYPE_CALENDAR) {
|
||||
collection.description?.let {
|
||||
startTag(XmlUtils.NS_CALDAV, "calendar-description")
|
||||
startTag(NS_CALDAV, "calendar-description")
|
||||
text(it)
|
||||
endTag(XmlUtils.NS_CALDAV, "calendar-description")
|
||||
endTag(NS_CALDAV, "calendar-description")
|
||||
}
|
||||
|
||||
collection.color?.let {
|
||||
startTag(XmlUtils.NS_APPLE_ICAL, "calendar-color")
|
||||
startTag(NS_APPLE_ICAL, "calendar-color")
|
||||
text(DavUtils.ARGBtoCalDAVColor(it))
|
||||
endTag(XmlUtils.NS_APPLE_ICAL, "calendar-color")
|
||||
endTag(NS_APPLE_ICAL, "calendar-color")
|
||||
}
|
||||
|
||||
collection.timezone?.let {
|
||||
startTag(XmlUtils.NS_CALDAV, "calendar-timezone")
|
||||
startTag(NS_CALDAV, "calendar-timezone")
|
||||
cdsect(it)
|
||||
endTag(XmlUtils.NS_CALDAV, "calendar-timezone")
|
||||
endTag(NS_CALDAV, "calendar-timezone")
|
||||
}
|
||||
|
||||
if (collection.supportsVEVENT != null || collection.supportsVTODO != null || collection.supportsVJOURNAL != null) {
|
||||
// only if there's at least one explicitly supported calendar component set, otherwise don't include the property
|
||||
startTag(XmlUtils.NS_CALDAV, "supported-calendar-component-set")
|
||||
startTag(NS_CALDAV, "supported-calendar-component-set")
|
||||
if (collection.supportsVEVENT != false) {
|
||||
startTag(XmlUtils.NS_CALDAV, "comp")
|
||||
startTag(NS_CALDAV, "comp")
|
||||
attribute(null, "name", "VEVENT")
|
||||
endTag(XmlUtils.NS_CALDAV, "comp")
|
||||
endTag(NS_CALDAV, "comp")
|
||||
}
|
||||
if (collection.supportsVTODO != false) {
|
||||
startTag(XmlUtils.NS_CALDAV, "comp")
|
||||
startTag(NS_CALDAV, "comp")
|
||||
attribute(null, "name", "VTODO")
|
||||
endTag(XmlUtils.NS_CALDAV, "comp")
|
||||
endTag(NS_CALDAV, "comp")
|
||||
}
|
||||
if (collection.supportsVJOURNAL != false) {
|
||||
startTag(XmlUtils.NS_CALDAV, "comp")
|
||||
startTag(NS_CALDAV, "comp")
|
||||
attribute(null, "name", "VJOURNAL")
|
||||
endTag(XmlUtils.NS_CALDAV, "comp")
|
||||
endTag(NS_CALDAV, "comp")
|
||||
}
|
||||
endTag(XmlUtils.NS_CALDAV, "supported-calendar-component-set")
|
||||
endTag(NS_CALDAV, "supported-calendar-component-set")
|
||||
}
|
||||
}
|
||||
|
||||
endTag(XmlUtils.NS_WEBDAV, "prop")
|
||||
endTag(XmlUtils.NS_WEBDAV, "set")
|
||||
endTag(XmlUtils.NS_WEBDAV, "mkcol")
|
||||
endTag(NS_WEBDAV, "prop")
|
||||
endTag(NS_WEBDAV, "set")
|
||||
endTag(NS_WEBDAV, "mkcol")
|
||||
endDocument()
|
||||
}
|
||||
} catch(e: IOException) {
|
||||
|
|
|
@ -30,6 +30,15 @@ import at.bitfire.dav4jvm.DavResource
|
|||
import at.bitfire.dav4jvm.Response
|
||||
import at.bitfire.dav4jvm.exception.HttpException
|
||||
import at.bitfire.dav4jvm.property.*
|
||||
import at.bitfire.dav4jvm.property.webdav.CurrentUserPrivilegeSet
|
||||
import at.bitfire.dav4jvm.property.webdav.DisplayName
|
||||
import at.bitfire.dav4jvm.property.webdav.GetContentLength
|
||||
import at.bitfire.dav4jvm.property.webdav.GetContentType
|
||||
import at.bitfire.dav4jvm.property.webdav.GetETag
|
||||
import at.bitfire.dav4jvm.property.webdav.GetLastModified
|
||||
import at.bitfire.dav4jvm.property.webdav.QuotaAvailableBytes
|
||||
import at.bitfire.dav4jvm.property.webdav.QuotaUsedBytes
|
||||
import at.bitfire.dav4jvm.property.webdav.ResourceType
|
||||
import at.bitfire.davdroid.R
|
||||
import at.bitfire.davdroid.db.AppDatabase
|
||||
import at.bitfire.davdroid.db.WebDavDocument
|
||||
|
|
|
@ -6,7 +6,7 @@ package at.bitfire.davdroid.webdav
|
|||
|
||||
import at.bitfire.dav4jvm.DavResource
|
||||
import at.bitfire.dav4jvm.HttpUtils
|
||||
import at.bitfire.dav4jvm.property.GetETag
|
||||
import at.bitfire.dav4jvm.property.webdav.GetETag
|
||||
import at.bitfire.davdroid.network.HttpClient
|
||||
import okhttp3.HttpUrl
|
||||
import java.time.Instant
|
||||
|
|
|
@ -9,7 +9,7 @@ buildscript {
|
|||
appIntro: '7.0.0-beta02',
|
||||
composeBom: '2023.10.01',
|
||||
hilt: '2.50',
|
||||
kotlin: '1.9.21', // keep in sync with * app/build.gradle composeOptions.kotlinCompilerExtensionVersion
|
||||
kotlin: '1.9.22', // keep in sync with * app/build.gradle composeOptions.kotlinCompilerExtensionVersion
|
||||
// * com.google.devtools.ksp at the end of this file
|
||||
okhttp: '4.12.0',
|
||||
room: '2.6.1',
|
||||
|
@ -20,7 +20,7 @@ buildscript {
|
|||
commonsText: '1.11.0',
|
||||
// own libraries
|
||||
cert4android: '2bb3898',
|
||||
dav4jvm: '8d22ff2',
|
||||
dav4jvm: '93dddcd',
|
||||
ical4android: '8972b85',
|
||||
vcard4android: 'a7a1f42'
|
||||
]
|
||||
|
@ -43,7 +43,7 @@ buildscript {
|
|||
|
||||
plugins {
|
||||
// see https://github.com/google/ksp/releases for version numbers
|
||||
id 'com.google.devtools.ksp' version '1.9.21-1.0.15' apply false
|
||||
id 'com.google.devtools.ksp' version '1.9.22-1.0.17' apply false
|
||||
}
|
||||
|
||||
allprojects {
|
||||
|
|
Loading…
Reference in a new issue