libbinder_ndk: V APIs are guarded with V
Using __ANDROID_API_FUTURE__ for V symbols was a workaround because
__builtin_available(android __ANDROID_API_V__,*) didn't work when V is
still a preview. It's fixed now in clang and we can use
__ANDROID_API_V__ when gaurding V symbols. The guard evaluates to true
if the platform SDK version is V or higher or it's a preview.
Bug: 322384429
Test: presubmit
Change-Id: If35077330d0b002091cf191c2de31dc93e09178d
diff --git a/libs/binder/ndk/include_cpp/android/persistable_bundle_aidl.h b/libs/binder/ndk/include_cpp/android/persistable_bundle_aidl.h
index d570eab..cf7dc1a 100644
--- a/libs/binder/ndk/include_cpp/android/persistable_bundle_aidl.h
+++ b/libs/binder/ndk/include_cpp/android/persistable_bundle_aidl.h
@@ -26,13 +26,10 @@
#if defined(__ANDROID_VENDOR__)
#include <android/llndk-versioning.h>
#else // __ANDROID_VENDOR__
-#if defined(API_LEVEL_AT_LEAST)
-// Redefine API_LEVEL_AT_LEAST here to replace the version to __ANDROID_API_FUTURE__ as a workaround
-#undef API_LEVEL_AT_LEAST
-#endif
-// TODO(b/322384429) switch this __ANDROID_API_FUTURE__ to sdk_api_level when V is finalized
+#if !defined(API_LEVEL_AT_LEAST)
#define API_LEVEL_AT_LEAST(sdk_api_level, vendor_api_level) \
- (__builtin_available(android __ANDROID_API_FUTURE__, *))
+ (__builtin_available(android sdk_api_level, *))
+#endif
#endif // __ANDROID_VENDOR__
namespace aidl::android::os {