diff --git a/src/com/owncloud/android/lib/resources/status/GetRemoteCapabilitiesOperation.java b/src/com/owncloud/android/lib/resources/status/GetRemoteCapabilitiesOperation.java index 4221962af..aef215e2e 100644 --- a/src/com/owncloud/android/lib/resources/status/GetRemoteCapabilitiesOperation.java +++ b/src/com/owncloud/android/lib/resources/status/GetRemoteCapabilitiesOperation.java @@ -71,6 +71,7 @@ public class GetRemoteCapabilitiesOperation extends RemoteOperation { private static final String NODE_FILES_SHARING = "files_sharing"; private static final String NODE_PUBLIC = "public"; private static final String NODE_PASSWORD = "password"; + private static final String NODE_FILES_DROP = "upload_files_drop"; private static final String NODE_EXPIRE_DATE = "expire_date"; private static final String NODE_USER = "user"; private static final String NODE_FEDERATION = "federation"; @@ -186,6 +187,12 @@ protected RemoteOperationResult run(OwnCloudClient client) { CapabilityBooleanType.fromBooleanValue( respPublic.getJSONObject(NODE_PASSWORD).getBoolean(PROPERTY_ENFORCED))); } + if(respPublic.has(NODE_FILES_DROP)) { + capability.setFilesFileDrop( + CapabilityBooleanType.fromBooleanValue( + respPublic.getBoolean(NODE_FILES_DROP)) + ); + } if(respPublic.has(NODE_EXPIRE_DATE)){ JSONObject respExpireDate = respPublic.getJSONObject(NODE_EXPIRE_DATE); capability.setFilesSharingPublicExpireDateEnabled( diff --git a/src/com/owncloud/android/lib/resources/status/OCCapability.java b/src/com/owncloud/android/lib/resources/status/OCCapability.java index e69c1ce85..572debaaa 100644 --- a/src/com/owncloud/android/lib/resources/status/OCCapability.java +++ b/src/com/owncloud/android/lib/resources/status/OCCapability.java @@ -66,6 +66,7 @@ public class OCCapability { private CapabilityBooleanType mFilesBigFileChuncking; private CapabilityBooleanType mFilesUndelete; private CapabilityBooleanType mFilesVersioning; + private CapabilityBooleanType mFilesFileDrop; public OCCapability(){ mId = 0; @@ -95,6 +96,7 @@ public OCCapability(){ mFilesBigFileChuncking = CapabilityBooleanType.UNKNOWN; mFilesUndelete = CapabilityBooleanType.UNKNOWN; mFilesVersioning = CapabilityBooleanType.UNKNOWN; + mFilesFileDrop = CapabilityBooleanType.UNKNOWN; } @@ -285,6 +287,13 @@ public void setFilesVersioning(CapabilityBooleanType filesVersioning) { this.mFilesVersioning = filesVersioning; } + public CapabilityBooleanType getFilesFileDrop() { + return mFilesFileDrop; + } + + public void setFilesFileDrop(CapabilityBooleanType mFilesFileDrop) { + this.mFilesFileDrop = mFilesFileDrop; + }