Revert "libbinder: disallow APEX at build time"
Build breakage.
This reverts commit 8852cc78a0f0c02caf61f21cb3c520583025ea69.
Bug: 161926892
Reason for revert: b/165698873 - broken build
Change-Id: I4708d5e5aaba655b3399bf59ba342f303af7a8ff
diff --git a/libs/binder/Stability.cpp b/libs/binder/Stability.cpp
index cdd14266..6115aec 100644
--- a/libs/binder/Stability.cpp
+++ b/libs/binder/Stability.cpp
@@ -50,7 +50,17 @@
Stability::Level Stability::getLocalStability() {
#ifdef __ANDROID_VNDK__
- return Level::VENDOR;
+ #ifdef __ANDROID_APEX__
+ // TODO(b/142684679) avoid use_vendor on system APEXes
+ #if !defined(__ANDROID_APEX_COM_ANDROID_MEDIA_SWCODEC__) \
+ && !defined(__ANDROID_APEX_TEST_COM_ANDROID_MEDIA_SWCODEC__)
+ #error VNDK + APEX only defined for com.android.media.swcodec
+ #endif
+ // TODO(b/142684679) avoid use_vendor on system APEXes
+ return Level::SYSTEM;
+ #else
+ return Level::VENDOR;
+ #endif
#else
// TODO(b/139325195): split up stability levels for system/APEX.
return Level::SYSTEM;