diff options
author | Steven Moreland <smoreland@google.com> | 2019-11-18 16:43:07 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-11-18 16:43:07 +0000 |
commit | b5667012c116931ca0c4859f2e1e2a5da1fa30f0 (patch) | |
tree | 86016bbc1835903969df45485dc0c6596d187012 | |
parent | 47322c31dbc4c6335816d3d3bdb7df6d179bd698 (diff) | |
parent | b6d0e76682d251af5004713d049d333a6790d7cd (diff) | |
download | native-b5667012c116931ca0c4859f2e1e2a5da1fa30f0.tar.gz |
Merge "libbinder: log fatal when used in APEX"
-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); |