mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-19 12:23:19 +01:00
43 lines
1.3 KiB
Java
43 lines
1.3 KiB
Java
package androidx.camera.extensions.internal;
|
|
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.VisibleForTesting;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes.dex */
|
|
public class ClientVersion {
|
|
private static ClientVersion sCurrent = new ClientVersion("1.4.0");
|
|
private final Version mVersion;
|
|
|
|
public ClientVersion(@NonNull String str) {
|
|
this.mVersion = Version.parse(str);
|
|
}
|
|
|
|
@NonNull
|
|
public static ClientVersion getCurrentVersion() {
|
|
return sCurrent;
|
|
}
|
|
|
|
public static boolean isMaximumCompatibleVersion(@NonNull Version version) {
|
|
return getCurrentVersion().mVersion.compareTo(version.getMajor(), version.getMinor()) <= 0;
|
|
}
|
|
|
|
public static boolean isMinimumCompatibleVersion(@NonNull Version version) {
|
|
return getCurrentVersion().mVersion.compareTo(version.getMajor(), version.getMinor()) >= 0;
|
|
}
|
|
|
|
@VisibleForTesting
|
|
public static void setCurrentVersion(@NonNull ClientVersion clientVersion) {
|
|
sCurrent = clientVersion;
|
|
}
|
|
|
|
@NonNull
|
|
public Version getVersion() {
|
|
return this.mVersion;
|
|
}
|
|
|
|
@NonNull
|
|
public String toVersionString() {
|
|
return this.mVersion.toString();
|
|
}
|
|
}
|