Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0376fad0 authored by Steven Moreland's avatar Steven Moreland Committed by android-build-merger
Browse files

Merge "libbinder: log fatal when used in APEX"

am: b5667012

Change-Id: I56058a38c854cc88d7ab3232f63693a685a45431
parents 287399b5 b5667012
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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);