diff options
author | Andy Scherzinger <info@andy-scherzinger.de> | 2021-05-08 14:00:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-08 14:00:37 +0300 |
commit | 742218d4991e552f7134c53b8a950c141d3ff2fe (patch) | |
tree | e5cdf6a3bf4953d96a7ebef294a8d09c0eba41be /app/src | |
parent | b06f449830ba5ca5dbf633fdd98d21998292b202 (diff) | |
parent | 7a574285dbcf9598b79482c190e7122a9d02e915 (diff) |
Merge pull request #1204 from nextcloud/dependabot/gradle/com.gitlab.bitfireAT-dav4jvm-2.1.2
Bump dav4jvm from f2078bc846 to 2.1.2
Diffstat (limited to 'app/src')
13 files changed, 56 insertions, 43 deletions
diff --git a/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/BrowserFile.java b/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/BrowserFile.java index c57549951..c52359027 100644 --- a/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/BrowserFile.java +++ b/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/BrowserFile.java @@ -36,12 +36,12 @@ import org.parceler.Parcel; import java.io.File; import java.util.List; -import at.bitfire.dav4android.Property; -import at.bitfire.dav4android.Response; -import at.bitfire.dav4android.property.DisplayName; -import at.bitfire.dav4android.property.GetContentType; -import at.bitfire.dav4android.property.GetLastModified; -import at.bitfire.dav4android.property.ResourceType; +import at.bitfire.dav4jvm.Property; +import at.bitfire.dav4jvm.Response; +import at.bitfire.dav4jvm.property.DisplayName; +import at.bitfire.dav4jvm.property.GetContentType; +import at.bitfire.dav4jvm.property.GetLastModified; +import at.bitfire.dav4jvm.property.ResourceType; @JsonObject @Parcel diff --git a/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/DavResponse.java b/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/DavResponse.java index 55d26e608..ff3256cde 100644 --- a/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/DavResponse.java +++ b/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/DavResponse.java @@ -20,7 +20,7 @@ package com.nextcloud.talk.components.filebrowser.models; -import at.bitfire.dav4android.Response; +import at.bitfire.dav4jvm.Response; public class DavResponse { public Response response; diff --git a/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/NCEncrypted.java b/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/NCEncrypted.java index 21932245f..457f8b84e 100644 --- a/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/NCEncrypted.java +++ b/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/NCEncrypted.java @@ -32,9 +32,9 @@ import org.xmlpull.v1.XmlPullParserException; import java.io.IOException; -import at.bitfire.dav4android.Property; -import at.bitfire.dav4android.PropertyFactory; -import at.bitfire.dav4android.XmlUtils; +import at.bitfire.dav4jvm.Property; +import at.bitfire.dav4jvm.PropertyFactory; +import at.bitfire.dav4jvm.XmlUtils; public class NCEncrypted implements Property { public static final Name NAME = new Name(DavUtils.NC_NAMESPACE, DavUtils.EXTENDED_PROPERTY_IS_ENCRYPTED); diff --git a/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/NCPermission.java b/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/NCPermission.java index 92b3e10ea..c40c4b679 100644 --- a/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/NCPermission.java +++ b/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/NCPermission.java @@ -34,9 +34,9 @@ import org.xmlpull.v1.XmlPullParserException; import java.io.IOException; -import at.bitfire.dav4android.Property; -import at.bitfire.dav4android.PropertyFactory; -import at.bitfire.dav4android.XmlUtils; +import at.bitfire.dav4jvm.Property; +import at.bitfire.dav4jvm.PropertyFactory; +import at.bitfire.dav4jvm.XmlUtils; public class NCPermission implements Property { public static final Name NAME = new Name(DavUtils.OC_NAMESPACE, DavUtils.EXTENDED_PROPERTY_NAME_PERMISSIONS); diff --git a/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/NCPreview.java b/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/NCPreview.java index 0c034ab86..b65bb4121 100644 --- a/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/NCPreview.java +++ b/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/NCPreview.java @@ -32,9 +32,9 @@ import org.xmlpull.v1.XmlPullParserException; import java.io.IOException; -import at.bitfire.dav4android.Property; -import at.bitfire.dav4android.PropertyFactory; -import at.bitfire.dav4android.XmlUtils; +import at.bitfire.dav4jvm.Property; +import at.bitfire.dav4jvm.PropertyFactory; +import at.bitfire.dav4jvm.XmlUtils; public class NCPreview implements Property { public static final Property.Name NAME = new Property.Name(DavUtils.NC_NAMESPACE, DavUtils.EXTENDED_PROPERTY_HAS_PREVIEW); diff --git a/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/OCFavorite.java b/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/OCFavorite.java index 9ffdb01d0..10dff0e4a 100644 --- a/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/OCFavorite.java +++ b/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/OCFavorite.java @@ -32,9 +32,9 @@ import org.xmlpull.v1.XmlPullParserException; import java.io.IOException; -import at.bitfire.dav4android.Property; -import at.bitfire.dav4android.PropertyFactory; -import at.bitfire.dav4android.XmlUtils; +import at.bitfire.dav4jvm.Property; +import at.bitfire.dav4jvm.PropertyFactory; +import at.bitfire.dav4jvm.XmlUtils; public class OCFavorite implements Property { public static final Property.Name NAME = new Property.Name(DavUtils.OC_NAMESPACE, DavUtils.EXTENDED_PROPERTY_FAVORITE); diff --git a/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/OCId.java b/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/OCId.java index a90ac2e04..87f58ce26 100644 --- a/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/OCId.java +++ b/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/OCId.java @@ -32,9 +32,9 @@ import org.xmlpull.v1.XmlPullParserException; import java.io.IOException; -import at.bitfire.dav4android.Property; -import at.bitfire.dav4android.PropertyFactory; -import at.bitfire.dav4android.XmlUtils; +import at.bitfire.dav4jvm.Property; +import at.bitfire.dav4jvm.PropertyFactory; +import at.bitfire.dav4jvm.XmlUtils; public class OCId implements Property { public static final Name NAME = new Name(DavUtils.OC_NAMESPACE, DavUtils.EXTENDED_PROPERTY_NAME_REMOTE_ID); diff --git a/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/OCSize.java b/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/OCSize.java index 188fc3c3b..f2a0a2f96 100644 --- a/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/OCSize.java +++ b/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/OCSize.java @@ -32,9 +32,9 @@ import org.xmlpull.v1.XmlPullParserException; import java.io.IOException; -import at.bitfire.dav4android.Property; -import at.bitfire.dav4android.PropertyFactory; -import at.bitfire.dav4android.XmlUtils; +import at.bitfire.dav4jvm.Property; +import at.bitfire.dav4jvm.PropertyFactory; +import at.bitfire.dav4jvm.XmlUtils; public class OCSize implements Property { public static final Property.Name NAME = new Property.Name(DavUtils.OC_NAMESPACE, DavUtils.EXTENDED_PROPERTY_NAME_SIZE); diff --git a/app/src/main/java/com/nextcloud/talk/components/filebrowser/webdav/DavUtils.java b/app/src/main/java/com/nextcloud/talk/components/filebrowser/webdav/DavUtils.java index f2193d57d..bb0ffb4f5 100644 --- a/app/src/main/java/com/nextcloud/talk/components/filebrowser/webdav/DavUtils.java +++ b/app/src/main/java/com/nextcloud/talk/components/filebrowser/webdav/DavUtils.java @@ -20,11 +20,12 @@ package com.nextcloud.talk.components.filebrowser.webdav; -import at.bitfire.dav4android.Property; -import at.bitfire.dav4android.PropertyFactory; -import at.bitfire.dav4android.PropertyRegistry; -import at.bitfire.dav4android.property.*; -import com.nextcloud.talk.components.filebrowser.models.properties.*; +import com.nextcloud.talk.components.filebrowser.models.properties.NCEncrypted; +import com.nextcloud.talk.components.filebrowser.models.properties.NCPermission; +import com.nextcloud.talk.components.filebrowser.models.properties.NCPreview; +import com.nextcloud.talk.components.filebrowser.models.properties.OCFavorite; +import com.nextcloud.talk.components.filebrowser.models.properties.OCId; +import com.nextcloud.talk.components.filebrowser.models.properties.OCSize; import java.lang.reflect.Field; import java.util.ArrayList; @@ -32,6 +33,17 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import at.bitfire.dav4jvm.Property; +import at.bitfire.dav4jvm.PropertyFactory; +import at.bitfire.dav4jvm.PropertyRegistry; +import at.bitfire.dav4jvm.property.CreationDate; +import at.bitfire.dav4jvm.property.DisplayName; +import at.bitfire.dav4jvm.property.GetContentLength; +import at.bitfire.dav4jvm.property.GetContentType; +import at.bitfire.dav4jvm.property.GetETag; +import at.bitfire.dav4jvm.property.GetLastModified; +import at.bitfire.dav4jvm.property.ResourceType; + public class DavUtils { public static final String OC_NAMESPACE = "http://owncloud.org/ns"; public static final String NC_NAMESPACE = "http://nextcloud.org/ns"; diff --git a/app/src/main/java/com/nextcloud/talk/components/filebrowser/webdav/ReadFilesystemOperation.java b/app/src/main/java/com/nextcloud/talk/components/filebrowser/webdav/ReadFilesystemOperation.java index 19ff8f58f..ad8ed5893 100644 --- a/app/src/main/java/com/nextcloud/talk/components/filebrowser/webdav/ReadFilesystemOperation.java +++ b/app/src/main/java/com/nextcloud/talk/components/filebrowser/webdav/ReadFilesystemOperation.java @@ -20,23 +20,24 @@ package com.nextcloud.talk.components.filebrowser.webdav; -import at.bitfire.dav4android.DavResource; -import at.bitfire.dav4android.Response; -import at.bitfire.dav4android.exception.DavException; import com.nextcloud.talk.components.filebrowser.models.BrowserFile; import com.nextcloud.talk.components.filebrowser.models.DavResponse; import com.nextcloud.talk.dagger.modules.RestModule; import com.nextcloud.talk.models.database.UserEntity; import com.nextcloud.talk.utils.ApiUtils; -import kotlin.Unit; -import kotlin.jvm.functions.Function2; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; import java.io.IOException; import java.util.ArrayList; import java.util.List; +import at.bitfire.dav4jvm.DavResource; +import at.bitfire.dav4jvm.Response; +import at.bitfire.dav4jvm.exception.DavException; +import kotlin.Unit; +import kotlin.jvm.functions.Function2; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; + public class ReadFilesystemOperation { private final OkHttpClient okHttpClient; private final String url; diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt index c261145d5..cc0129a07 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt +++ b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt @@ -1267,7 +1267,7 @@ class ChatController(args: Bundle) : val xChatLastCommonRead = response.headers().get("X-Chat-Last-Common-Read")?.let { Integer.parseInt(it) } - if (response.headers().size() > 0 && !TextUtils.isEmpty(xChatLastGivenHeader)) { + if (response.headers().size > 0 && !TextUtils.isEmpty(xChatLastGivenHeader)) { val header = Integer.parseInt(xChatLastGivenHeader!!) if (header > 0) { diff --git a/app/src/main/java/com/nextcloud/talk/jobs/ContactAddressBookWorker.kt b/app/src/main/java/com/nextcloud/talk/jobs/ContactAddressBookWorker.kt index f7703623c..26f995a15 100644 --- a/app/src/main/java/com/nextcloud/talk/jobs/ContactAddressBookWorker.kt +++ b/app/src/main/java/com/nextcloud/talk/jobs/ContactAddressBookWorker.kt @@ -54,8 +54,8 @@ import io.reactivex.Observer import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.disposables.Disposable import io.reactivex.schedulers.Schedulers -import okhttp3.MediaType -import okhttp3.RequestBody +import okhttp3.MediaType.Companion.toMediaTypeOrNull +import okhttp3.RequestBody.Companion.toRequestBody import javax.inject.Inject @AutoInjector(NextcloudTalkApplication::class) @@ -122,7 +122,7 @@ class ContactAddressBookWorker(val context: Context, workerParameters: WorkerPar ncApi.searchContactsByPhoneNumber( ApiUtils.getCredentials(currentUser.username, currentUser.token), ApiUtils.getUrlForSearchByNumber(currentUser.baseUrl), - RequestBody.create(MediaType.parse("application/json"), json) + json.toRequestBody("application/json".toMediaTypeOrNull()) ) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) diff --git a/app/src/main/java/com/nextcloud/talk/jobs/UploadAndShareFilesWorker.kt b/app/src/main/java/com/nextcloud/talk/jobs/UploadAndShareFilesWorker.kt index 4eb4a9157..7d655a807 100644 --- a/app/src/main/java/com/nextcloud/talk/jobs/UploadAndShareFilesWorker.kt +++ b/app/src/main/java/com/nextcloud/talk/jobs/UploadAndShareFilesWorker.kt @@ -44,7 +44,7 @@ import io.reactivex.Observer import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.disposables.Disposable import io.reactivex.schedulers.Schedulers -import okhttp3.MediaType +import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.RequestBody import retrofit2.Response import java.io.File @@ -103,7 +103,7 @@ class UploadAndShareFilesWorker(val context: Context, workerParameters: WorkerPa val input: InputStream = context.contentResolver.openInputStream(sourcefileUri)!! val buf = ByteArray(input.available()) while (input.read(buf) != -1); - requestBody = RequestBody.create(MediaType.parse("application/octet-stream"), buf) + requestBody = RequestBody.create("application/octet-stream".toMediaTypeOrNull(), buf) } catch (e: Exception) { Log.e(javaClass.simpleName, "failed to create RequestBody for $sourcefileUri", e) } |