Guard __AActivityManager_* APIs with __builtin_available
* AActivityManager_checkPermission
* AActivityManager_addUidImportanceListener
* AActivityManager_removeUidImportanceListener
* AActivityManager_isUidActive
* AActivityManager_getUidImportance
Above APIs were added for the API level 31 and beyond. Currently,their
existence is not tested before calling them, which can result linkage
error at runtime when the code runs on pre-31 platforms.
Now, we have a preferred way of testing the API availability;
__builtin_available. The calls to the APIs are now guarded with the
macro so that they get called only on the platforms they are available.
Bug: 150860940
Bug: 134795810
Test: m
Change-Id: I442426641a33bcdb341a166e68f300e539fc85d2
3 files changed