summaryrefslogtreecommitdiff
path: root/android/api_levels.go
diff options
context:
space:
mode:
authorJooyung Han <jooyung@google.com>2021-01-26 11:43:46 +0900
committerJooyung Han <jooyung@google.com>2021-01-26 12:09:07 +0900
commited124c308f50cc8da7ee14856a116af059f1625a (patch)
tree1f7a99b565ff6660e080d3d779e963896ec4a7fa /android/api_levels.go
parent700730e69ee8c64f53f7e7007e54eb1f7bbe3d00 (diff)
apex: checks min_sdk_version for preview/current
If we don't check "current", it won't be checked even in the finalized branch. If we don't check "preview", it should be done during the SDK finalization. It'd be better done before the SDK finalization regarding that setting min_sdk_version is to get approval from deps library owners. Bug: 177833148 Test: m (soong tests) Change-Id: I712b61cfe5a134fbb69c73956d26fb3a1e5c011e
Diffstat (limited to 'android/api_levels.go')
-rw-r--r--android/api_levels.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/android/api_levels.go b/android/api_levels.go
index 08328e16d..1b53f3f2a 100644
--- a/android/api_levels.go
+++ b/android/api_levels.go
@@ -81,6 +81,10 @@ func (this ApiLevel) IsCurrent() bool {
return this.value == "current"
}
+func (this ApiLevel) IsNone() bool {
+ return this.number == -1
+}
+
// Returns -1 if the current API level is less than the argument, 0 if they
// are equal, and 1 if it is greater than the argument.
func (this ApiLevel) CompareTo(other ApiLevel) int {