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

Unverified Commit 0acd5d47 authored by Mario Danic's avatar Mario Danic Committed by AndyScherzinger
Browse files

Add support for checking if search is supported

parent c24012e1
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -52,7 +52,9 @@ public class OwnCloudVersion implements Comparable<OwnCloudVersion> {

    public static final int MINIMUM_VERSION_CAPABILITIES_API = 0x08010000; // 8.1

    public static final int MINIMUM_SELF_API = 0x0B000200;
    public static final int MINIMUM_VERSION_FOR_SELF_API = 0x0B000200;

    public static final int MINIMUM_VERSION_FOR_SEARCH_API = 0x0C000000;
    
    private static final int MAX_DOTS = 3;
    
@@ -161,7 +163,11 @@ public class OwnCloudVersion implements Comparable<OwnCloudVersion> {
    }

    public boolean isSelfSupported() {
        return (mVersion >= MINIMUM_SELF_API);
        return (mVersion >= MINIMUM_VERSION_FOR_SELF_API);
    }

    public boolean isSearchSupported() {
        return (mVersion >= MINIMUM_VERSION_FOR_SEARCH_API);
    }

}