summaryrefslogtreecommitdiff
path: root/android/api_levels.go
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2020-07-23 16:43:25 -0700
committerDan Albert <danalbert@google.com>2020-09-22 15:04:48 -0700
commit0b176c8038d3ec29d3e9cc1b79b5e90599848fcc (patch)
treeb07b6c9b0d7c226a5f629bd7ba6c9978c4708e26 /android/api_levels.go
parentc8060536e85af0a1904f0ff87a8b4ab420b67639 (diff)
Replace FutureApiLevel with an ApiLevel.
Keeping the int constant around for now as FutureApiLevelInt because it's still useful in places that haven't adopted ApiLevel yet for testing if their non-ApiLevel API level is current or not. Test: treehugger Bug: http://b/154667674 Change-Id: I47a7012703f41fdeb56f91edf9c83afa93042deb
Diffstat (limited to 'android/api_levels.go')
-rw-r--r--android/api_levels.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/android/api_levels.go b/android/api_levels.go
index 81f5db02c..cba13ee2d 100644
--- a/android/api_levels.go
+++ b/android/api_levels.go
@@ -51,7 +51,7 @@ type ApiLevel struct {
func (this ApiLevel) FinalOrFutureInt() int {
if this.IsPreview() {
- return FutureApiLevel
+ return FutureApiLevelInt
} else {
return this.number
}
@@ -127,13 +127,6 @@ func uncheckedFinalApiLevel(num int) ApiLevel {
}
}
-// TODO: Merge with FutureApiLevel
-var CurrentApiLevel = ApiLevel{
- value: "current",
- number: 10000,
- isPreview: true,
-}
-
var NoneApiLevel = ApiLevel{
value: "(no version)",
// Not 0 because we don't want this to compare equal with the first preview.
@@ -188,7 +181,7 @@ func ApiLevelFromUser(ctx EarlyModuleContext, raw string) (ApiLevel, error) {
}
if raw == "current" {
- return CurrentApiLevel, nil
+ return FutureApiLevel, nil
}
for _, preview := range ctx.Config().PreviewApiLevels() {