summaryrefslogtreecommitdiff
path: root/libs/binder/Stability.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2021-02-18 19:10:15 +0000
committer Steven Moreland <smoreland@google.com> 2021-02-18 19:12:53 +0000
commit15b7029849a1c59ecb54961fa7417ee0611408a0 (patch)
treea77e42bbff918d0a45529effff82b4fe18b70608 /libs/binder/Stability.cpp
parente9441bcf32c04901807748bde85f16444464eb91 (diff)
Revert "libbinder: remove __ANDROID_APEX__ stability diff"
This reverts commit e9441bcf32c04901807748bde85f16444464eb91. Reason for revert: b/180559880#comment7 Bug: 179906909 Change-Id: I04472d3bbe97c9c42df74c10ce87c176fa7098dd
Diffstat (limited to 'libs/binder/Stability.cpp')
-rw-r--r--libs/binder/Stability.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/libs/binder/Stability.cpp b/libs/binder/Stability.cpp
index b56e09fa6e..339c53833b 100644
--- a/libs/binder/Stability.cpp
+++ b/libs/binder/Stability.cpp
@@ -76,12 +76,18 @@ void Stability::tryMarkCompilationUnit(IBinder* binder) {
}
Stability::Level Stability::getLocalLevel() {
-#ifdef __ANDROID_APEX__
-#error APEX can't use libbinder (must use libbinder_ndk)
-#endif
-
#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;