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
diff --git a/android/api_levels.go b/android/api_levels.go
index 81f5db0..cba13ee 100644
--- a/android/api_levels.go
+++ b/android/api_levels.go
@@ -51,7 +51,7 @@
func (this ApiLevel) FinalOrFutureInt() int {
if this.IsPreview() {
- return FutureApiLevel
+ return FutureApiLevelInt
} else {
return this.number
}
@@ -127,13 +127,6 @@
}
}
-// 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 @@
}
if raw == "current" {
- return CurrentApiLevel, nil
+ return FutureApiLevel, nil
}
for _, preview := range ctx.Config().PreviewApiLevels() {