diff options
author | 2019-11-18 09:10:17 -0800 | |
---|---|---|
committer | 2019-11-18 09:10:17 -0800 | |
commit | bf7cd4304b4192e1926dbc12f4ffa453c3ef0a8a (patch) | |
tree | e89ca1b2cf154c9921d83e7374e93857898f1e4d /libs/binder/ProcessState.cpp | |
parent | 5b3d1a8690841749fc9b3e1d5288a225921a15b7 (diff) | |
parent | 0376fad03bfe3aa5c9c0f1b9e5864a0769889b8e (diff) |
Merge "libbinder: log fatal when used in APEX" am: b5667012c1
am: 0376fad03b
Change-Id: I59e98b12fe21cd740bb7dd875fc905bf4bdcfdca
Diffstat (limited to 'libs/binder/ProcessState.cpp')
-rw-r--r-- | libs/binder/ProcessState.cpp | 6 |
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); |