Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump minimum required server version #1645

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import androidx.annotation.NonNull;

public class OwnCloudVersion implements Comparable<OwnCloudVersion>, Parcelable {
public static final OwnCloudVersion nextcloud_17 = new OwnCloudVersion(0x11000000); // 17.0
public static final OwnCloudVersion nextcloud_18 = new OwnCloudVersion(0x12000000); // 18.0
public static final OwnCloudVersion nextcloud_19 = new OwnCloudVersion(0x13000000); // 19.0
public static final OwnCloudVersion nextcloud_20 = new OwnCloudVersion(0x14000000); // 20.0
Expand Down Expand Up @@ -115,14 +114,6 @@ static protected int getParsedVersion(String version) throws NumberFormatExcepti
return versionValue;
}

public boolean isShareesOnDavSupported() {
return isNewerOrEqual(nextcloud_17);
}

public boolean isRemoteWipeSupported() {
return isNewerOrEqual(nextcloud_17);
}

/*
* Autogenerated Parcelable
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
public class OwnCloudVersionTest {
@Test
public void testOwnCloudVersion() {
OwnCloudVersion version = new OwnCloudVersion("17.0.0");
OwnCloudVersion version = new OwnCloudVersion("18.0.0");

assertEquals(0, version.compareTo(OwnCloudVersion.nextcloud_17));
assertEquals(0, version.compareTo(OwnCloudVersion.nextcloud_18));

version = new OwnCloudVersion("17.99.99");
version = new OwnCloudVersion("18.99.99");

assertEquals(0, version.compareTo(new OwnCloudVersion(0x11636300))); // 13.99.99 in hex
assertEquals(0, version.compareTo(new OwnCloudVersion(0x12636300))); // 18.99.99 in hex
}

@Test
Expand All @@ -49,16 +49,6 @@ public void testOwnCloudVersionFailure() {
assertFalse(version.isVersionValid());
}

@Test
public void testSupportNC17() {
assertTrue(OwnCloudVersion.nextcloud_17.isShareesOnDavSupported());
}

@Test
public void testSupportNC18() {
assertTrue(OwnCloudVersion.nextcloud_18.isShareesOnDavSupported());
}

@Test
public void testSupportNC21() {
OwnCloudVersion version = new OwnCloudVersion("21.0.0");
Expand Down
Loading