Skip to content

Commit

Permalink
Drop support for Nextcloud 17
Browse files Browse the repository at this point in the history
Signed-off-by: ZetaTom <[email protected]>
  • Loading branch information
ZetaTom committed Jan 22, 2025
1 parent bf5fa88 commit 87358f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
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,11 +16,11 @@
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
}
Expand Down Expand Up @@ -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

0 comments on commit 87358f4

Please sign in to comment.