1a2462717e
Handling of API levels within Soong is currently fairly difficult since it isn't always clear based on context what kind of API level a given string represents, how much canonicalizing and error checking the code receiving the string are expected to do, or how those errors should be treated. The API level struct does not export its raw data, so as to keep its "constructor" private to the android package, and to prevent misuse of the `number` field, which is only an implementation detail for preview API levels. API levels can be parsed with either `android.ApiLevelFromUser`, which returns any errors to the caller, or `android.ApiLevelOrPanic`, which is used in the case where the input is trusted and any errors in parsing should panic. Even within the `android` package, these APIs should be preferred over direct construction. For cases where there are context specific parsing requirements, such as handling the "minimum" alias in the cc module, `nativeApiLevelFromUser` and `nativeApiLevelOrPanic` should be used instead. Test: treehugger Bug: http://b/154667674 Change-Id: Id52921fda32cb437fb1775ac2183299dedc0cf20 |
||
---|---|---|
.. | ||
Android.bp | ||
arm64_device.go | ||
arm64_fuchsia_device.go | ||
arm64_linux_host.go | ||
arm_device.go | ||
cfi_exports.map | ||
clang.go | ||
global.go | ||
integer_overflow_blocklist.txt | ||
OWNERS | ||
tidy.go | ||
tidy_test.go | ||
toolchain.go | ||
vndk.go | ||
x86_64_device.go | ||
x86_64_fuchsia_device.go | ||
x86_darwin_host.go | ||
x86_device.go | ||
x86_linux_bionic_host.go | ||
x86_linux_host.go | ||
x86_windows_host.go |