Update dav4jvm to new okhttp package (#1786)

* Upgrade dav4jvm

* Exclude ktor from dav4jvm

* Fix imports and fix usages

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Fix imports for instrumented tests

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Fix imports

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Upgrade dav4jvm

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Do not exclude ktor in dav4jvm

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Upgrade dav4jvm

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

---------

Signed-off-by: Arnau Mora <arnyminerz@proton.me>
This commit is contained in:
Arnau Mora
2025-11-17 13:38:10 +01:00
committed by GitHub
parent 28dcf90775
commit 084ba3b630
39 changed files with 100 additions and 105 deletions

View File

@@ -6,7 +6,7 @@ package at.bitfire.davdroid.db
import android.security.NetworkSecurityPolicy import android.security.NetworkSecurityPolicy
import androidx.test.filters.SmallTest import androidx.test.filters.SmallTest
import at.bitfire.dav4jvm.DavResource import at.bitfire.dav4jvm.okhttp.DavResource
import at.bitfire.dav4jvm.property.webdav.ResourceType import at.bitfire.dav4jvm.property.webdav.ResourceType
import at.bitfire.davdroid.network.HttpClientBuilder import at.bitfire.davdroid.network.HttpClientBuilder
import dagger.hilt.android.testing.HiltAndroidRule import dagger.hilt.android.testing.HiltAndroidRule

View File

@@ -5,7 +5,7 @@
package at.bitfire.davdroid.servicedetection package at.bitfire.davdroid.servicedetection
import android.security.NetworkSecurityPolicy import android.security.NetworkSecurityPolicy
import at.bitfire.dav4jvm.DavResource import at.bitfire.dav4jvm.okhttp.DavResource
import at.bitfire.dav4jvm.property.carddav.AddressbookHomeSet import at.bitfire.dav4jvm.property.carddav.AddressbookHomeSet
import at.bitfire.dav4jvm.property.webdav.ResourceType import at.bitfire.dav4jvm.property.webdav.ResourceType
import at.bitfire.davdroid.network.HttpClientBuilder import at.bitfire.davdroid.network.HttpClientBuilder

View File

@@ -8,9 +8,9 @@ import android.accounts.Account
import android.content.Context import android.content.Context
import androidx.core.app.NotificationManagerCompat import androidx.core.app.NotificationManagerCompat
import androidx.hilt.work.HiltWorkerFactory import androidx.hilt.work.HiltWorkerFactory
import at.bitfire.dav4jvm.PropStat import at.bitfire.dav4jvm.okhttp.PropStat
import at.bitfire.dav4jvm.Response import at.bitfire.dav4jvm.okhttp.Response
import at.bitfire.dav4jvm.Response.HrefRelation import at.bitfire.dav4jvm.okhttp.Response.HrefRelation
import at.bitfire.dav4jvm.property.webdav.GetETag import at.bitfire.dav4jvm.property.webdav.GetETag
import at.bitfire.davdroid.TestUtils import at.bitfire.davdroid.TestUtils
import at.bitfire.davdroid.TestUtils.assertWithin import at.bitfire.davdroid.TestUtils.assertWithin

View File

@@ -5,9 +5,9 @@
package at.bitfire.davdroid.sync package at.bitfire.davdroid.sync
import android.accounts.Account import android.accounts.Account
import at.bitfire.dav4jvm.DavCollection import at.bitfire.dav4jvm.okhttp.DavCollection
import at.bitfire.dav4jvm.MultiResponseCallback import at.bitfire.dav4jvm.okhttp.MultiResponseCallback
import at.bitfire.dav4jvm.Response import at.bitfire.dav4jvm.okhttp.Response
import at.bitfire.dav4jvm.property.caldav.GetCTag import at.bitfire.dav4jvm.property.caldav.GetCTag
import at.bitfire.davdroid.db.Collection import at.bitfire.davdroid.db.Collection
import at.bitfire.davdroid.di.SyncDispatcher import at.bitfire.davdroid.di.SyncDispatcher

View File

@@ -10,8 +10,8 @@ import androidx.room.Entity
import androidx.room.ForeignKey import androidx.room.ForeignKey
import androidx.room.Index import androidx.room.Index
import androidx.room.PrimaryKey import androidx.room.PrimaryKey
import at.bitfire.dav4jvm.Response import at.bitfire.dav4jvm.okhttp.Response
import at.bitfire.dav4jvm.UrlUtils import at.bitfire.dav4jvm.okhttp.UrlUtils
import at.bitfire.dav4jvm.property.caldav.CalendarColor import at.bitfire.dav4jvm.property.caldav.CalendarColor
import at.bitfire.dav4jvm.property.caldav.CalendarDescription import at.bitfire.dav4jvm.property.caldav.CalendarDescription
import at.bitfire.dav4jvm.property.caldav.CalendarTimezone import at.bitfire.dav4jvm.property.caldav.CalendarTimezone

View File

@@ -8,8 +8,8 @@ import androidx.room.Entity
import androidx.room.ForeignKey import androidx.room.ForeignKey
import androidx.room.Index import androidx.room.Index
import androidx.room.PrimaryKey import androidx.room.PrimaryKey
import at.bitfire.dav4jvm.Response import at.bitfire.dav4jvm.okhttp.Response
import at.bitfire.dav4jvm.UrlUtils import at.bitfire.dav4jvm.okhttp.UrlUtils
import at.bitfire.dav4jvm.property.webdav.DisplayName import at.bitfire.dav4jvm.property.webdav.DisplayName
import at.bitfire.dav4jvm.property.webdav.ResourceType import at.bitfire.dav4jvm.property.webdav.ResourceType
import at.bitfire.davdroid.util.trimToNull import at.bitfire.davdroid.util.trimToNull

View File

View File

@@ -8,8 +8,8 @@ import android.accounts.Account
import android.content.Context import android.content.Context
import androidx.annotation.WorkerThread import androidx.annotation.WorkerThread
import at.bitfire.cert4android.CustomCertManager import at.bitfire.cert4android.CustomCertManager
import at.bitfire.dav4jvm.BasicDigestAuthHandler import at.bitfire.dav4jvm.okhttp.BasicDigestAuthHandler
import at.bitfire.dav4jvm.UrlUtils import at.bitfire.dav4jvm.okhttp.UrlUtils
import at.bitfire.davdroid.BuildConfig import at.bitfire.davdroid.BuildConfig
import at.bitfire.davdroid.di.IoDispatcher import at.bitfire.davdroid.di.IoDispatcher
import at.bitfire.davdroid.settings.AccountSettings import at.bitfire.davdroid.settings.AccountSettings

View File

@@ -4,8 +4,8 @@
package at.bitfire.davdroid.network package at.bitfire.davdroid.network
import at.bitfire.dav4jvm.exception.DavException import at.bitfire.dav4jvm.okhttp.exception.DavException
import at.bitfire.dav4jvm.exception.HttpException import at.bitfire.dav4jvm.okhttp.exception.HttpException
import at.bitfire.davdroid.settings.Credentials import at.bitfire.davdroid.settings.Credentials
import at.bitfire.davdroid.ui.setup.LoginInfo import at.bitfire.davdroid.ui.setup.LoginInfo
import at.bitfire.davdroid.util.SensitiveString.Companion.toSensitiveString import at.bitfire.davdroid.util.SensitiveString.Companion.toSensitiveString

View File

@@ -11,12 +11,12 @@ import androidx.work.ExistingPeriodicWorkPolicy
import androidx.work.NetworkType import androidx.work.NetworkType
import androidx.work.PeriodicWorkRequest import androidx.work.PeriodicWorkRequest
import androidx.work.WorkManager import androidx.work.WorkManager
import at.bitfire.dav4jvm.DavCollection
import at.bitfire.dav4jvm.DavResource
import at.bitfire.dav4jvm.HttpUtils import at.bitfire.dav4jvm.HttpUtils
import at.bitfire.dav4jvm.XmlUtils import at.bitfire.dav4jvm.XmlUtils
import at.bitfire.dav4jvm.XmlUtils.insertTag import at.bitfire.dav4jvm.XmlUtils.insertTag
import at.bitfire.dav4jvm.exception.DavException import at.bitfire.dav4jvm.okhttp.DavCollection
import at.bitfire.dav4jvm.okhttp.DavResource
import at.bitfire.dav4jvm.okhttp.exception.DavException
import at.bitfire.dav4jvm.property.push.AuthSecret import at.bitfire.dav4jvm.property.push.AuthSecret
import at.bitfire.dav4jvm.property.push.PushRegister import at.bitfire.dav4jvm.property.push.PushRegister
import at.bitfire.dav4jvm.property.push.PushResource import at.bitfire.dav4jvm.property.push.PushResource

View File

@@ -6,12 +6,12 @@ package at.bitfire.davdroid.repository
import android.accounts.Account import android.accounts.Account
import android.content.Context import android.content.Context
import at.bitfire.dav4jvm.DavResource
import at.bitfire.dav4jvm.XmlUtils import at.bitfire.dav4jvm.XmlUtils
import at.bitfire.dav4jvm.XmlUtils.insertTag import at.bitfire.dav4jvm.XmlUtils.insertTag
import at.bitfire.dav4jvm.exception.GoneException import at.bitfire.dav4jvm.okhttp.DavResource
import at.bitfire.dav4jvm.exception.HttpException import at.bitfire.dav4jvm.okhttp.exception.GoneException
import at.bitfire.dav4jvm.exception.NotFoundException import at.bitfire.dav4jvm.okhttp.exception.HttpException
import at.bitfire.dav4jvm.okhttp.exception.NotFoundException
import at.bitfire.dav4jvm.property.caldav.CalendarColor import at.bitfire.dav4jvm.property.caldav.CalendarColor
import at.bitfire.dav4jvm.property.caldav.CalendarDescription import at.bitfire.dav4jvm.property.caldav.CalendarDescription
import at.bitfire.dav4jvm.property.caldav.CalendarTimezone import at.bitfire.dav4jvm.property.caldav.CalendarTimezone

View File

@@ -4,8 +4,8 @@
package at.bitfire.davdroid.servicedetection package at.bitfire.davdroid.servicedetection
import at.bitfire.dav4jvm.DavResource import at.bitfire.dav4jvm.okhttp.DavResource
import at.bitfire.dav4jvm.exception.HttpException import at.bitfire.dav4jvm.okhttp.exception.HttpException
import at.bitfire.dav4jvm.property.webdav.Owner import at.bitfire.dav4jvm.property.webdav.Owner
import at.bitfire.davdroid.db.AppDatabase import at.bitfire.davdroid.db.AppDatabase
import at.bitfire.davdroid.db.Collection import at.bitfire.davdroid.db.Collection

View File

@@ -6,13 +6,13 @@ package at.bitfire.davdroid.servicedetection
import android.app.ActivityManager import android.app.ActivityManager
import android.content.Context import android.content.Context
import androidx.core.content.getSystemService import androidx.core.content.getSystemService
import at.bitfire.dav4jvm.DavResource
import at.bitfire.dav4jvm.Property import at.bitfire.dav4jvm.Property
import at.bitfire.dav4jvm.Response import at.bitfire.dav4jvm.okhttp.DavResource
import at.bitfire.dav4jvm.UrlUtils import at.bitfire.dav4jvm.okhttp.Response
import at.bitfire.dav4jvm.exception.DavException import at.bitfire.dav4jvm.okhttp.UrlUtils
import at.bitfire.dav4jvm.exception.HttpException import at.bitfire.dav4jvm.okhttp.exception.DavException
import at.bitfire.dav4jvm.exception.UnauthorizedException import at.bitfire.dav4jvm.okhttp.exception.HttpException
import at.bitfire.dav4jvm.okhttp.exception.UnauthorizedException
import at.bitfire.dav4jvm.property.caldav.CalendarColor import at.bitfire.dav4jvm.property.caldav.CalendarColor
import at.bitfire.dav4jvm.property.caldav.CalendarDescription import at.bitfire.dav4jvm.property.caldav.CalendarDescription
import at.bitfire.dav4jvm.property.caldav.CalendarHomeSet import at.bitfire.dav4jvm.property.caldav.CalendarHomeSet

View File

@@ -4,9 +4,9 @@
package at.bitfire.davdroid.servicedetection package at.bitfire.davdroid.servicedetection
import at.bitfire.dav4jvm.DavResource import at.bitfire.dav4jvm.okhttp.DavResource
import at.bitfire.dav4jvm.Response import at.bitfire.dav4jvm.okhttp.Response
import at.bitfire.dav4jvm.exception.HttpException import at.bitfire.dav4jvm.okhttp.exception.HttpException
import at.bitfire.dav4jvm.property.webdav.CurrentUserPrivilegeSet import at.bitfire.dav4jvm.property.webdav.CurrentUserPrivilegeSet
import at.bitfire.dav4jvm.property.webdav.DisplayName import at.bitfire.dav4jvm.property.webdav.DisplayName
import at.bitfire.dav4jvm.property.webdav.Owner import at.bitfire.dav4jvm.property.webdav.Owner

View File

@@ -4,8 +4,8 @@
package at.bitfire.davdroid.servicedetection package at.bitfire.davdroid.servicedetection
import at.bitfire.dav4jvm.DavResource import at.bitfire.dav4jvm.okhttp.DavResource
import at.bitfire.dav4jvm.exception.HttpException import at.bitfire.dav4jvm.okhttp.exception.HttpException
import at.bitfire.dav4jvm.property.webdav.DisplayName import at.bitfire.dav4jvm.property.webdav.DisplayName
import at.bitfire.dav4jvm.property.webdav.ResourceType import at.bitfire.dav4jvm.property.webdav.ResourceType
import at.bitfire.davdroid.db.AppDatabase import at.bitfire.davdroid.db.AppDatabase

View File

@@ -22,7 +22,7 @@ import androidx.work.OutOfQuotaPolicy
import androidx.work.WorkInfo import androidx.work.WorkInfo
import androidx.work.WorkManager import androidx.work.WorkManager
import androidx.work.WorkerParameters import androidx.work.WorkerParameters
import at.bitfire.dav4jvm.exception.UnauthorizedException import at.bitfire.dav4jvm.okhttp.exception.UnauthorizedException
import at.bitfire.davdroid.R import at.bitfire.davdroid.R
import at.bitfire.davdroid.network.HttpClientBuilder import at.bitfire.davdroid.network.HttpClientBuilder
import at.bitfire.davdroid.push.PushRegistrationManager import at.bitfire.davdroid.push.PushRegistrationManager

View File

@@ -4,10 +4,10 @@
package at.bitfire.davdroid.servicedetection package at.bitfire.davdroid.servicedetection
import at.bitfire.dav4jvm.DavResource
import at.bitfire.dav4jvm.Property import at.bitfire.dav4jvm.Property
import at.bitfire.dav4jvm.UrlUtils import at.bitfire.dav4jvm.okhttp.DavResource
import at.bitfire.dav4jvm.exception.HttpException import at.bitfire.dav4jvm.okhttp.UrlUtils
import at.bitfire.dav4jvm.okhttp.exception.HttpException
import at.bitfire.dav4jvm.property.caldav.CalendarHomeSet import at.bitfire.dav4jvm.property.caldav.CalendarHomeSet
import at.bitfire.dav4jvm.property.caldav.CalendarProxyReadFor import at.bitfire.dav4jvm.property.caldav.CalendarProxyReadFor
import at.bitfire.dav4jvm.property.caldav.CalendarProxyWriteFor import at.bitfire.dav4jvm.property.caldav.CalendarProxyWriteFor

View File

@@ -6,10 +6,10 @@ package at.bitfire.davdroid.sync
import android.accounts.Account import android.accounts.Account
import android.text.format.Formatter import android.text.format.Formatter
import at.bitfire.dav4jvm.DavCalendar import at.bitfire.dav4jvm.okhttp.DavCalendar
import at.bitfire.dav4jvm.MultiResponseCallback import at.bitfire.dav4jvm.okhttp.MultiResponseCallback
import at.bitfire.dav4jvm.Response import at.bitfire.dav4jvm.okhttp.Response
import at.bitfire.dav4jvm.exception.DavException import at.bitfire.dav4jvm.okhttp.exception.DavException
import at.bitfire.dav4jvm.property.caldav.CalendarData import at.bitfire.dav4jvm.property.caldav.CalendarData
import at.bitfire.dav4jvm.property.caldav.GetCTag import at.bitfire.dav4jvm.property.caldav.GetCTag
import at.bitfire.dav4jvm.property.caldav.MaxResourceSize import at.bitfire.dav4jvm.property.caldav.MaxResourceSize

View File

@@ -7,10 +7,10 @@ package at.bitfire.davdroid.sync
import android.accounts.Account import android.accounts.Account
import android.content.ContentProviderClient import android.content.ContentProviderClient
import android.text.format.Formatter import android.text.format.Formatter
import at.bitfire.dav4jvm.DavAddressBook import at.bitfire.dav4jvm.okhttp.DavAddressBook
import at.bitfire.dav4jvm.MultiResponseCallback import at.bitfire.dav4jvm.okhttp.MultiResponseCallback
import at.bitfire.dav4jvm.Response import at.bitfire.dav4jvm.okhttp.Response
import at.bitfire.dav4jvm.exception.DavException import at.bitfire.dav4jvm.okhttp.exception.DavException
import at.bitfire.dav4jvm.property.caldav.GetCTag import at.bitfire.dav4jvm.property.caldav.GetCTag
import at.bitfire.dav4jvm.property.carddav.AddressData import at.bitfire.dav4jvm.property.carddav.AddressData
import at.bitfire.dav4jvm.property.carddav.MaxResourceSize import at.bitfire.dav4jvm.property.carddav.MaxResourceSize
@@ -51,6 +51,7 @@ import okhttp3.HttpUrl
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
import okhttp3.MediaType import okhttp3.MediaType
import okhttp3.OkHttpClient import okhttp3.OkHttpClient
import okhttp3.MediaType.Companion.toMediaTypeOrNull
import okhttp3.Request import okhttp3.Request
import okhttp3.RequestBody.Companion.toRequestBody import okhttp3.RequestBody.Companion.toRequestBody
import java.io.ByteArrayOutputStream import java.io.ByteArrayOutputStream
@@ -357,7 +358,7 @@ class ContactsSyncManager @AssistedInject constructor(
?: throw DavException("Received multi-get response without ETag") ?: throw DavException("Received multi-get response without ETag")
var isJCard = hasJCard // assume that server has sent what we have requested (we ask for jCard only when the server advertises it) var isJCard = hasJCard // assume that server has sent what we have requested (we ask for jCard only when the server advertises it)
response[GetContentType::class.java]?.type?.let { type -> response[GetContentType::class.java]?.type?.toMediaTypeOrNull()?.let { type ->
isJCard = type.sameTypeAs(DavUtils.MEDIA_TYPE_JCARD) isJCard = type.sameTypeAs(DavUtils.MEDIA_TYPE_JCARD)
} }

View File

@@ -7,10 +7,10 @@ package at.bitfire.davdroid.sync
import android.accounts.Account import android.accounts.Account
import android.text.format.Formatter import android.text.format.Formatter
import androidx.annotation.OpenForTesting import androidx.annotation.OpenForTesting
import at.bitfire.dav4jvm.DavCalendar import at.bitfire.dav4jvm.okhttp.DavCalendar
import at.bitfire.dav4jvm.MultiResponseCallback import at.bitfire.dav4jvm.okhttp.MultiResponseCallback
import at.bitfire.dav4jvm.Response import at.bitfire.dav4jvm.okhttp.Response
import at.bitfire.dav4jvm.exception.DavException import at.bitfire.dav4jvm.okhttp.exception.DavException
import at.bitfire.dav4jvm.property.caldav.CalendarData import at.bitfire.dav4jvm.property.caldav.CalendarData
import at.bitfire.dav4jvm.property.caldav.GetCTag import at.bitfire.dav4jvm.property.caldav.GetCTag
import at.bitfire.dav4jvm.property.caldav.MaxResourceSize import at.bitfire.dav4jvm.property.caldav.MaxResourceSize

View File

@@ -9,21 +9,21 @@ import android.content.Context
import android.os.DeadObjectException import android.os.DeadObjectException
import android.os.RemoteException import android.os.RemoteException
import androidx.annotation.VisibleForTesting import androidx.annotation.VisibleForTesting
import at.bitfire.dav4jvm.DavCollection
import at.bitfire.dav4jvm.DavResource
import at.bitfire.dav4jvm.Error import at.bitfire.dav4jvm.Error
import at.bitfire.dav4jvm.MultiResponseCallback
import at.bitfire.dav4jvm.QuotedStringUtils import at.bitfire.dav4jvm.QuotedStringUtils
import at.bitfire.dav4jvm.Response import at.bitfire.dav4jvm.okhttp.DavCollection
import at.bitfire.dav4jvm.exception.ConflictException import at.bitfire.dav4jvm.okhttp.DavResource
import at.bitfire.dav4jvm.exception.DavException import at.bitfire.dav4jvm.okhttp.MultiResponseCallback
import at.bitfire.dav4jvm.exception.ForbiddenException import at.bitfire.dav4jvm.okhttp.Response
import at.bitfire.dav4jvm.exception.GoneException import at.bitfire.dav4jvm.okhttp.exception.ConflictException
import at.bitfire.dav4jvm.exception.HttpException import at.bitfire.dav4jvm.okhttp.exception.DavException
import at.bitfire.dav4jvm.exception.NotFoundException import at.bitfire.dav4jvm.okhttp.exception.ForbiddenException
import at.bitfire.dav4jvm.exception.PreconditionFailedException import at.bitfire.dav4jvm.okhttp.exception.GoneException
import at.bitfire.dav4jvm.exception.ServiceUnavailableException import at.bitfire.dav4jvm.okhttp.exception.HttpException
import at.bitfire.dav4jvm.exception.UnauthorizedException import at.bitfire.dav4jvm.okhttp.exception.NotFoundException
import at.bitfire.dav4jvm.okhttp.exception.PreconditionFailedException
import at.bitfire.dav4jvm.okhttp.exception.ServiceUnavailableException
import at.bitfire.dav4jvm.okhttp.exception.UnauthorizedException
import at.bitfire.dav4jvm.property.caldav.GetCTag import at.bitfire.dav4jvm.property.caldav.GetCTag
import at.bitfire.dav4jvm.property.caldav.ScheduleTag import at.bitfire.dav4jvm.property.caldav.ScheduleTag
import at.bitfire.dav4jvm.property.webdav.GetETag import at.bitfire.dav4jvm.property.webdav.GetETag

View File

@@ -15,7 +15,7 @@ import android.provider.Settings
import androidx.core.app.NotificationCompat import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat import androidx.core.app.NotificationManagerCompat
import androidx.core.net.toUri import androidx.core.net.toUri
import at.bitfire.dav4jvm.exception.UnauthorizedException import at.bitfire.dav4jvm.okhttp.exception.UnauthorizedException
import at.bitfire.davdroid.R import at.bitfire.davdroid.R
import at.bitfire.davdroid.db.Collection import at.bitfire.davdroid.db.Collection
import at.bitfire.davdroid.resource.LocalCollection import at.bitfire.davdroid.resource.LocalCollection

View File

@@ -6,10 +6,10 @@ package at.bitfire.davdroid.sync
import android.accounts.Account import android.accounts.Account
import android.text.format.Formatter import android.text.format.Formatter
import at.bitfire.dav4jvm.DavCalendar import at.bitfire.dav4jvm.okhttp.DavCalendar
import at.bitfire.dav4jvm.MultiResponseCallback import at.bitfire.dav4jvm.okhttp.MultiResponseCallback
import at.bitfire.dav4jvm.Response import at.bitfire.dav4jvm.okhttp.Response
import at.bitfire.dav4jvm.exception.DavException import at.bitfire.dav4jvm.okhttp.exception.DavException
import at.bitfire.dav4jvm.property.caldav.CalendarData import at.bitfire.dav4jvm.property.caldav.CalendarData
import at.bitfire.dav4jvm.property.caldav.GetCTag import at.bitfire.dav4jvm.property.caldav.GetCTag
import at.bitfire.dav4jvm.property.caldav.MaxResourceSize import at.bitfire.dav4jvm.property.caldav.MaxResourceSize

View File

@@ -31,7 +31,7 @@ import androidx.core.content.pm.PackageInfoCompat
import androidx.work.WorkInfo import androidx.work.WorkInfo
import androidx.work.WorkManager import androidx.work.WorkManager
import androidx.work.WorkQuery import androidx.work.WorkQuery
import at.bitfire.dav4jvm.exception.DavException import at.bitfire.dav4jvm.okhttp.exception.DavException
import at.bitfire.davdroid.BuildConfig import at.bitfire.davdroid.BuildConfig
import at.bitfire.davdroid.R import at.bitfire.davdroid.R
import at.bitfire.davdroid.TextTable import at.bitfire.davdroid.TextTable

View File

@@ -43,8 +43,8 @@ import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel import androidx.hilt.navigation.compose.hiltViewModel
import at.bitfire.dav4jvm.exception.DavException import at.bitfire.dav4jvm.okhttp.exception.DavException
import at.bitfire.dav4jvm.exception.HttpException import at.bitfire.dav4jvm.okhttp.exception.HttpException
import at.bitfire.davdroid.R import at.bitfire.davdroid.R
import at.bitfire.davdroid.ui.composable.CardWithImage import at.bitfire.davdroid.ui.composable.CardWithImage
import at.bitfire.davdroid.ui.composable.ProgressBar import at.bitfire.davdroid.ui.composable.ProgressBar

View File

@@ -5,25 +5,18 @@
package at.bitfire.davdroid.ui.composable package at.bitfire.davdroid.ui.composable
import android.accounts.Account import android.accounts.Account
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.rounded.Error import androidx.compose.material.icons.rounded.Error
import androidx.compose.material3.AlertDialog import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Button import androidx.compose.material3.Button
import androidx.compose.material3.Icon import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedButton import androidx.compose.material3.OutlinedButton
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp import at.bitfire.dav4jvm.okhttp.exception.HttpException
import at.bitfire.dav4jvm.exception.HttpException
import at.bitfire.davdroid.R import at.bitfire.davdroid.R
import at.bitfire.davdroid.ui.DebugInfoActivity import at.bitfire.davdroid.ui.DebugInfoActivity
import okhttp3.HttpUrl import okhttp3.HttpUrl

View File

@@ -13,7 +13,7 @@ import android.provider.DocumentsContract.buildChildDocumentsUri
import android.provider.DocumentsContract.buildRootsUri import android.provider.DocumentsContract.buildRootsUri
import android.webkit.MimeTypeMap import android.webkit.MimeTypeMap
import androidx.core.app.TaskStackBuilder import androidx.core.app.TaskStackBuilder
import at.bitfire.dav4jvm.exception.HttpException import at.bitfire.dav4jvm.okhttp.exception.HttpException
import at.bitfire.davdroid.R import at.bitfire.davdroid.R
import at.bitfire.davdroid.ui.webdav.WebdavMountsActivity import at.bitfire.davdroid.ui.webdav.WebdavMountsActivity
import java.io.FileNotFoundException import java.io.FileNotFoundException

View File

@@ -5,8 +5,8 @@
package at.bitfire.davdroid.webdav package at.bitfire.davdroid.webdav
import androidx.annotation.WorkerThread import androidx.annotation.WorkerThread
import at.bitfire.dav4jvm.DavResource
import at.bitfire.dav4jvm.HttpUtils import at.bitfire.dav4jvm.HttpUtils
import at.bitfire.dav4jvm.okhttp.DavResource
import at.bitfire.dav4jvm.property.webdav.GetETag import at.bitfire.dav4jvm.property.webdav.GetETag
import okhttp3.HttpUrl import okhttp3.HttpUrl
import okhttp3.OkHttpClient import okhttp3.OkHttpClient

View File

@@ -14,10 +14,10 @@ import android.system.ErrnoException
import android.system.OsConstants import android.system.OsConstants
import androidx.annotation.RequiresApi import androidx.annotation.RequiresApi
import androidx.core.content.getSystemService import androidx.core.content.getSystemService
import at.bitfire.dav4jvm.DavResource
import at.bitfire.dav4jvm.HttpUtils import at.bitfire.dav4jvm.HttpUtils
import at.bitfire.dav4jvm.exception.DavException import at.bitfire.dav4jvm.okhttp.DavResource
import at.bitfire.dav4jvm.exception.HttpException import at.bitfire.dav4jvm.okhttp.exception.DavException
import at.bitfire.dav4jvm.okhttp.exception.HttpException
import at.bitfire.davdroid.util.DavUtils import at.bitfire.davdroid.util.DavUtils
import com.google.common.cache.CacheBuilder import com.google.common.cache.CacheBuilder
import com.google.common.cache.CacheLoader import com.google.common.cache.CacheLoader

View File

@@ -5,8 +5,8 @@
package at.bitfire.davdroid.webdav package at.bitfire.davdroid.webdav
import android.os.ParcelFileDescriptor import android.os.ParcelFileDescriptor
import at.bitfire.dav4jvm.DavResource import at.bitfire.dav4jvm.okhttp.DavResource
import at.bitfire.dav4jvm.exception.HttpException import at.bitfire.dav4jvm.okhttp.exception.HttpException
import at.bitfire.davdroid.di.IoDispatcher import at.bitfire.davdroid.di.IoDispatcher
import at.bitfire.davdroid.util.DavUtils import at.bitfire.davdroid.util.DavUtils
import dagger.assisted.Assisted import dagger.assisted.Assisted

View File

@@ -7,7 +7,7 @@ package at.bitfire.davdroid.webdav
import android.content.Context import android.content.Context
import android.provider.DocumentsContract import android.provider.DocumentsContract
import androidx.annotation.VisibleForTesting import androidx.annotation.VisibleForTesting
import at.bitfire.dav4jvm.DavResource import at.bitfire.dav4jvm.okhttp.DavResource
import at.bitfire.davdroid.R import at.bitfire.davdroid.R
import at.bitfire.davdroid.db.AppDatabase import at.bitfire.davdroid.db.AppDatabase
import at.bitfire.davdroid.db.WebDavMount import at.bitfire.davdroid.db.WebDavMount

View File

@@ -5,8 +5,8 @@
package at.bitfire.davdroid.webdav.operation package at.bitfire.davdroid.webdav.operation
import android.content.Context import android.content.Context
import at.bitfire.dav4jvm.DavResource import at.bitfire.dav4jvm.okhttp.DavResource
import at.bitfire.dav4jvm.exception.HttpException import at.bitfire.dav4jvm.okhttp.exception.HttpException
import at.bitfire.davdroid.db.AppDatabase import at.bitfire.davdroid.db.AppDatabase
import at.bitfire.davdroid.db.WebDavDocument import at.bitfire.davdroid.db.WebDavDocument
import at.bitfire.davdroid.di.IoDispatcher import at.bitfire.davdroid.di.IoDispatcher

View File

@@ -6,8 +6,8 @@ package at.bitfire.davdroid.webdav.operation
import android.content.Context import android.content.Context
import android.provider.DocumentsContract.Document import android.provider.DocumentsContract.Document
import at.bitfire.dav4jvm.DavResource import at.bitfire.dav4jvm.okhttp.DavResource
import at.bitfire.dav4jvm.exception.HttpException import at.bitfire.dav4jvm.okhttp.exception.HttpException
import at.bitfire.davdroid.db.AppDatabase import at.bitfire.davdroid.db.AppDatabase
import at.bitfire.davdroid.db.WebDavDocument import at.bitfire.davdroid.db.WebDavDocument
import at.bitfire.davdroid.di.IoDispatcher import at.bitfire.davdroid.di.IoDispatcher

View File

@@ -5,8 +5,8 @@
package at.bitfire.davdroid.webdav.operation package at.bitfire.davdroid.webdav.operation
import android.content.Context import android.content.Context
import at.bitfire.dav4jvm.DavResource import at.bitfire.dav4jvm.okhttp.DavResource
import at.bitfire.dav4jvm.exception.HttpException import at.bitfire.dav4jvm.okhttp.exception.HttpException
import at.bitfire.davdroid.db.AppDatabase import at.bitfire.davdroid.db.AppDatabase
import at.bitfire.davdroid.di.IoDispatcher import at.bitfire.davdroid.di.IoDispatcher
import at.bitfire.davdroid.webdav.DavHttpClientBuilder import at.bitfire.davdroid.webdav.DavHttpClientBuilder

View File

@@ -5,8 +5,8 @@
package at.bitfire.davdroid.webdav.operation package at.bitfire.davdroid.webdav.operation
import android.content.Context import android.content.Context
import at.bitfire.dav4jvm.DavResource import at.bitfire.dav4jvm.okhttp.DavResource
import at.bitfire.dav4jvm.exception.HttpException import at.bitfire.dav4jvm.okhttp.exception.HttpException
import at.bitfire.davdroid.db.AppDatabase import at.bitfire.davdroid.db.AppDatabase
import at.bitfire.davdroid.di.IoDispatcher import at.bitfire.davdroid.di.IoDispatcher
import at.bitfire.davdroid.webdav.DavHttpClientBuilder import at.bitfire.davdroid.webdav.DavHttpClientBuilder

View File

@@ -14,7 +14,7 @@ import android.net.ConnectivityManager
import android.os.CancellationSignal import android.os.CancellationSignal
import android.os.ParcelFileDescriptor import android.os.ParcelFileDescriptor
import androidx.core.content.getSystemService import androidx.core.content.getSystemService
import at.bitfire.dav4jvm.DavResource import at.bitfire.dav4jvm.okhttp.DavResource
import at.bitfire.davdroid.db.AppDatabase import at.bitfire.davdroid.db.AppDatabase
import at.bitfire.davdroid.di.IoDispatcher import at.bitfire.davdroid.di.IoDispatcher
import at.bitfire.davdroid.webdav.DavHttpClientBuilder import at.bitfire.davdroid.webdav.DavHttpClientBuilder

View File

@@ -7,8 +7,8 @@ package at.bitfire.davdroid.webdav.operation
import android.content.Context import android.content.Context
import android.provider.DocumentsContract.Document import android.provider.DocumentsContract.Document
import android.provider.DocumentsContract.buildChildDocumentsUri import android.provider.DocumentsContract.buildChildDocumentsUri
import at.bitfire.dav4jvm.DavCollection import at.bitfire.dav4jvm.okhttp.DavCollection
import at.bitfire.dav4jvm.Response import at.bitfire.dav4jvm.okhttp.Response
import at.bitfire.dav4jvm.property.webdav.CurrentUserPrivilegeSet import at.bitfire.dav4jvm.property.webdav.CurrentUserPrivilegeSet
import at.bitfire.dav4jvm.property.webdav.DisplayName import at.bitfire.dav4jvm.property.webdav.DisplayName
import at.bitfire.dav4jvm.property.webdav.GetContentLength import at.bitfire.dav4jvm.property.webdav.GetContentLength
@@ -33,6 +33,7 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.coroutines.runInterruptible import kotlinx.coroutines.runInterruptible
import okhttp3.MediaType.Companion.toMediaTypeOrNull
import java.io.FileNotFoundException import java.io.FileNotFoundException
import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.ConcurrentHashMap
import java.util.logging.Level import java.util.logging.Level
@@ -155,7 +156,7 @@ class QueryChildDocumentsOperation @Inject constructor(
isDirectory = response[ResourceType::class.java]?.types?.contains(ResourceType.COLLECTION) isDirectory = response[ResourceType::class.java]?.types?.contains(ResourceType.COLLECTION)
?: resource.isDirectory, ?: resource.isDirectory,
displayName = response[DisplayName::class.java]?.displayName, displayName = response[DisplayName::class.java]?.displayName,
mimeType = response[GetContentType::class.java]?.type, mimeType = response[GetContentType::class.java]?.type?.toMediaTypeOrNull(),
eTag = response[GetETag::class.java]?.takeIf { !it.weak }?.eTag, eTag = response[GetETag::class.java]?.takeIf { !it.weak }?.eTag,
lastModified = response[GetLastModified::class.java]?.lastModified?.toEpochMilli(), lastModified = response[GetLastModified::class.java]?.lastModified?.toEpochMilli(),
size = response[GetContentLength::class.java]?.contentLength, size = response[GetContentLength::class.java]?.contentLength,

View File

@@ -5,8 +5,8 @@
package at.bitfire.davdroid.webdav.operation package at.bitfire.davdroid.webdav.operation
import android.content.Context import android.content.Context
import at.bitfire.dav4jvm.DavResource import at.bitfire.dav4jvm.okhttp.DavResource
import at.bitfire.dav4jvm.exception.HttpException import at.bitfire.dav4jvm.okhttp.exception.HttpException
import at.bitfire.davdroid.db.AppDatabase import at.bitfire.davdroid.db.AppDatabase
import at.bitfire.davdroid.di.IoDispatcher import at.bitfire.davdroid.di.IoDispatcher
import at.bitfire.davdroid.webdav.DavHttpClientBuilder import at.bitfire.davdroid.webdav.DavHttpClientBuilder

View File

@@ -19,7 +19,7 @@ androidx-test-rules = "1.7.0"
androidx-test-junit = "1.3.0" androidx-test-junit = "1.3.0"
androidx-work = "2.11.0" androidx-work = "2.11.0"
bitfire-cert4android = "b3160b02b8" bitfire-cert4android = "b3160b02b8"
bitfire-dav4jvm = "f11523619b" bitfire-dav4jvm = "0979bd7e56"
bitfire-synctools = "5fc6688ff6" bitfire-synctools = "5fc6688ff6"
compose-accompanist = "0.37.3" compose-accompanist = "0.37.3"
compose-bom = "2025.11.00" compose-bom = "2025.11.00"