summaryrefslogtreecommitdiff
path: root/libs/binder/ProcessState.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2019-11-18 09:13:49 -0800
committer android-build-merger <android-build-merger@google.com> 2019-11-18 09:13:49 -0800
commit46bd3b0756da3f0a52967a222c57f50e6e278d4d (patch)
tree23d415b7a00a3ced4f11e0a9303ddc4c80732706 /libs/binder/ProcessState.cpp
parentf874d9093989ca7d290a49734a92c30931f0bc99 (diff)
parentbf7cd4304b4192e1926dbc12f4ffa453c3ef0a8a (diff)
Merge "libbinder: log fatal when used in APEX" am: b5667012c1 am: 0376fad03b
am: bf7cd4304b Change-Id: I229834da444b56bdfd98fe922b5a08cd902891c3
Diffstat (limited to 'libs/binder/ProcessState.cpp')
-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 3f47f3b1fb..37c0d77781 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);