Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit ca56380c authored by Ricki Hirner's avatar Ricki Hirner Committed by GitHub
Browse files

Update dependencies, including dav4jvm that updates okhttp to 5.x (#1593)

* Update dependencies, including dav4jvm that updates okhttp to 5.x

* Update mockk and okhttp
parent ba9eb144
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@ import dagger.hilt.android.testing.HiltAndroidRule
import dagger.hilt.android.testing.HiltAndroidTest
import io.mockk.junit4.MockKRule
import kotlinx.coroutines.test.runTest
import okhttp3.CookieJar
import okhttp3.mockwebserver.Dispatcher
import okhttp3.mockwebserver.MockResponse
import okhttp3.mockwebserver.MockWebServer
@@ -94,7 +93,7 @@ class DavDocumentsProviderTest {

        // Query
        val actor = davDocumentsActorFactory.create(
            cookieStore = mutableMapOf<Long, CookieJar>(),
            cookieStore = mutableMapOf(),
            credentialsStore = credentialsStore
        )
        actor.queryChildren(parent)
@@ -130,7 +129,7 @@ class DavDocumentsProviderTest {

        // Query - should update the parent displayname and folder name
        val actor = davDocumentsActorFactory.create(
            cookieStore = mutableMapOf<Long, CookieJar>(),
            cookieStore = mutableMapOf(),
            credentialsStore = credentialsStore
        )
        actor.queryChildren(parent)
@@ -157,7 +156,7 @@ class DavDocumentsProviderTest {

        // Query - discovers serverside deletion
        val actor = davDocumentsActorFactory.create(
            cookieStore = mutableMapOf<Long, CookieJar>(),
            cookieStore = mutableMapOf(),
            credentialsStore = credentialsStore
        )
        actor.queryChildren(parent)
@@ -183,7 +182,7 @@ class DavDocumentsProviderTest {

        // Query - find children of two nodes simultaneously
        val actor = davDocumentsActorFactory.create(
            cookieStore = mutableMapOf<Long, CookieJar>(),
            cookieStore = mutableMapOf(),
            credentialsStore = credentialsStore
        )
        actor.queryChildren(parent1)
+1 −3
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ class NextcloudLoginFlow @Inject constructor(
        if (response.code != HttpURLConnection.HTTP_OK)
            throw HttpException(response)

        response.body?.use { body ->
        response.body.use { body ->
            val mimeType = body.contentType() ?: throw DavException("Login Flow response without MIME type")
            if (mimeType.type != "application" || mimeType.subtype != "json")
                throw DavException("Invalid Login Flow response (not JSON)")
@@ -133,8 +133,6 @@ class NextcloudLoginFlow @Inject constructor(
            // decode JSON
            return@withContext JSONObject(body.string())
        }

        throw DavException("Invalid Login Flow response (no body)")
    }

}
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -471,7 +471,7 @@ class ContactsSyncManager @AssistedInject constructor(
                            .build()).execute()

                        if (response.isSuccessful)
                            return response.body?.bytes()
                            return response.body.bytes()
                        else
                            logger.warning("Couldn't download external resource")
                    } catch(e: IOException) {
+1 −1
Original line number Diff line number Diff line
@@ -621,7 +621,7 @@ class DavDocumentsProvider(
                        var result: ByteArray? = null
                        runInterruptible(ioDispatcher) {
                            dav.get("image/*", null) { response ->
                                response.body?.byteStream()?.use { data ->
                                response.body.byteStream().use { data ->
                                    BitmapFactory.decodeStream(data)?.let { bitmap ->
                                        val thumb = ThumbnailUtils.extractThumbnail(bitmap, sizeHint.x, sizeHint.y)
                                        val baos = ByteArrayOutputStream()
+1 −1
Original line number Diff line number Diff line
@@ -215,7 +215,7 @@ class RandomAccessCallback @AssistedInject constructor(
                    else if (response.code != 206)
                        throw HttpException(response)

                    result = response.body?.bytes()
                    result = response.body.bytes()
                }
                result ?: throw DavException("No response body")
            }
Loading