diff options
author | 2022-07-01 22:48:49 +0000 | |
---|---|---|
committer | 2022-07-01 22:48:49 +0000 | |
commit | 100c7ad7f28c44ca9110f73b9886c22d00a005d1 (patch) | |
tree | c65fbfd1022bfec3bfdbd18c818a16f45249763d /android/api_levels.go | |
parent | 4b1fe58b7deca2e581b9e2df1a706f687006b4f8 (diff) | |
parent | e5bf3fb4c2ef475051ef74b29ef732118b8766bf (diff) |
Merge "Revert^2 "Fix erroneous "Field requires API level 33 (current min is 32)" warnings""
Diffstat (limited to 'android/api_levels.go')
-rw-r--r-- | android/api_levels.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/android/api_levels.go b/android/api_levels.go index 41b338c8a..da50b1927 100644 --- a/android/api_levels.go +++ b/android/api_levels.go @@ -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 |