Merge "Revert^2 "Fix erroneous "Field requires API level 33 (current min is 32)" warnings"" am: 100c7ad7f2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2143082 Change-Id: I393938d1bf83b8dc734761679fbd5df10caf1c93 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -54,6 +54,14 @@ type ApiLevel struct {
|
||||
isPreview bool
|
||||
}
|
||||
|
||||
func (this ApiLevel) FinalInt() int {
|
||||
if this.IsPreview() {
|
||||
panic("Requested a final int from a non-final ApiLevel")
|
||||
} else {
|
||||
return this.number
|
||||
}
|
||||
}
|
||||
|
||||
func (this ApiLevel) FinalOrFutureInt() int {
|
||||
if this.IsPreview() {
|
||||
return FutureApiLevelInt
|
||||
|
Reference in New Issue
Block a user