mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +00:00
Added helper method to check if a server version supports remote thumbnails
This commit is contained in:
parent
5d1f069003
commit
c84530d359
@ -444,9 +444,8 @@ public class OwnCloudClient extends HttpClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setOwnCloudVersion(String version){
|
public void setOwnCloudVersion(OwnCloudVersion version){
|
||||||
OwnCloudVersion ver = new OwnCloudVersion(version);
|
mVersion = version;
|
||||||
mVersion = ver;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public OwnCloudVersion getOwnCloudVersion(){
|
public OwnCloudVersion getOwnCloudVersion(){
|
||||||
|
@ -40,6 +40,8 @@ public class OwnCloudVersion implements Comparable<OwnCloudVersion> {
|
|||||||
public static final int MINIMUM_VERSION_FOR_SHARING_API = 0x05001B00; // 5.0.27
|
public static final int MINIMUM_VERSION_FOR_SHARING_API = 0x05001B00; // 5.0.27
|
||||||
|
|
||||||
public static final int MINIMUM_VERSION_WITH_FORBIDDEN_CHARS = 0x08010000; // 8.1
|
public static final int MINIMUM_VERSION_WITH_FORBIDDEN_CHARS = 0x08010000; // 8.1
|
||||||
|
|
||||||
|
public static final int MINIMUM_SERVER_VERSION_FOR_REMOTE_THUMBNAILS = 0x07080000; // 7.8.0
|
||||||
|
|
||||||
private static final int MAX_DOTS = 3;
|
private static final int MAX_DOTS = 3;
|
||||||
|
|
||||||
@ -126,6 +128,8 @@ public class OwnCloudVersion implements Comparable<OwnCloudVersion> {
|
|||||||
public boolean isVersionWithForbiddenCharacters() {
|
public boolean isVersionWithForbiddenCharacters() {
|
||||||
return (mVersion >= MINIMUM_VERSION_WITH_FORBIDDEN_CHARS);
|
return (mVersion >= MINIMUM_VERSION_WITH_FORBIDDEN_CHARS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean supportsRemoteThumbnails() { return (mVersion >= MINIMUM_SERVER_VERSION_FOR_REMOTE_THUMBNAILS); }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user