ro.vndk.version cannot be simply replaced with ro.board.api_level with
the vndk deprecation. Even with the latest system updates, devices may
still run on old vendor images that do not define ro.board.api_level,
but define ro.vndk.version.
To provide the replacement of ro.vndk.version, provide a platform API
AVendorSupport_getVendorApiLevel() to return the expected vendor
version.
Bug: 312311458
Bug: 312315580
Test: manual test for AVendorSupport_getVendorApiLevel()
Change-Id: Id7c04483956d95fd49414cebde41d7cc4d2fb1d1
Compiler still requires the LLNDK symbols even if they are removed
when compiling. Still the unavailable symbols break the build in
linking if called with wrong api level.
Bug: 333973388
Bug: 320347314
Test: TH
Change-Id: I79cb921cf6f2789e97f11b88cddf7ca1325998a5
Non-vendor modules may define llndk versioning macros manually. Avoid
redefining the macros if they are already defined outside of
llndk-versioning.h header.
Bug: 302113279
Test: m && m cts
Change-Id: Ibf984f2f2eed3594c824f2e97e17f2698e0515dd
__INTRODUCED_IN_LLNDK(vendor_api_level) is for the LLNDK APIs
introduced in the vendor_api_level. It is ignored for non-vendor
modules.
API_LEVEL_AT_LEAST(sdk_api_level, vendor_api_level) is used as a
statement for 'if' to guard the API callers. For example:
if API_LEVEL_AT_LEAST(__ANDROID_API_V__, 202404) {
new_api_for_V_and_202404();
} else {
fallback_function();
}
Bug: 302113279
Test: build trunk-staging and next configurations
Change-Id: I60d40655b1f8afdfa5c69b2ac4be2205f8057bea
The ABI tool analyzes the source code of LLNDK libraries. It compiles
the source with the flags for core variants where __INTRODUCED_IN_LLNDK
does not version the API. To expose the version information to the ABI
tool, __INTRODUCED_IN_LLNDK is defined as an "annotate" attribute in
core variants.
Test: make
Bug: 314010764
Change-Id: I798a397f0e7567ca54db5e4aff4235933ebd3943
libvendorsupport_llndk_headers provide libvendorsupport_llndk_headers
macro that can be used in any libraries including APEXes.
Bug: 302113279
Test: TH
Change-Id: I8fc7879a378a3711ae7264c9a2d8b0955895147f
Symbols with __INTRODUCED_IN_LLNDK are available for LLNDK only if
the vendor api level set by the RELEASE_BOARD_API_LEVEL is equal to
or newer than the target vendor api level in __INTRODUCED_IN_LLNDK.
This works only for the vendor variants at the same time ignoring
__INTRODUCED_IN annotation for the vendor variants. On the other
hand, __INTRODUCED_IN_LLNDK will be ignored from non-vendor variants.
Bug: 302113279
Test: build
Change-Id: I5317a73dbc73095f8d5d95131ca4d9ed39df6be1
Remove temporary 'vendor_api_level_of' function from init and replace
the function with the same in libvendorsupport.
Bug: 312403948
Test: getprop ro.vendor.api_level
Change-Id: I095353e602397220571e131431e7cbd1b8511fa6
Merged-In: I095353e602397220571e131431e7cbd1b8511fa6
The library provides mapping functions between SDK versions and
vendor api levels.
Bug: 315056516
Test: atest libvendorsupport-tests
Change-Id: I4a4eae0456ebf756badcc80f09a2946f741843c5