summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2019-11-18 09:00:40 -0800
committerandroid-build-merger <android-build-merger@google.com>2019-11-18 09:00:40 -0800
commit0376fad03bfe3aa5c9c0f1b9e5864a0769889b8e (patch)
tree4478179f2f3cbe0100438699f8802228aa93aae7
parent287399b569985d046da5e3a9b9db684f90116488 (diff)
parentb5667012c116931ca0c4859f2e1e2a5da1fa30f0 (diff)
downloadnative-0376fad03bfe3aa5c9c0f1b9e5864a0769889b8e.tar.gz
Merge "libbinder: log fatal when used in APEX"
am: b5667012c1 Change-Id: I56058a38c854cc88d7ab3232f63693a685a45431
-rw-r--r--libs/binder/ProcessState.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index ea61dc5aff..ce2cd9969f 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -385,6 +385,12 @@ ProcessState::ProcessState(const char *driver)
, mThreadPoolSeq(1)
, mCallRestriction(CallRestriction::NONE)
{
+
+// TODO(b/139016109): enforce in build system
+#if defined(__ANDROID_APEX__) && !defined(__ANDROID_APEX_COM_ANDROID_VNDK_CURRENT__)
+ LOG_ALWAYS_FATAL("Cannot use libbinder in APEX (only system.img libbinder) since it is not stable.");
+#endif
+
if (mDriverFD >= 0) {
// mmap the binder, providing a chunk of virtual address space to receive transactions.
mVMStart = mmap(nullptr, BINDER_VM_SIZE, PROT_READ, MAP_PRIVATE | MAP_NORESERVE, mDriverFD, 0);