Loading libs/binder/ProcessState.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,10 @@ static void verifyNotForked(bool forked) { LOG_ALWAYS_FATAL_IF(forked, "libbinder ProcessState can not be used after fork"); } bool ProcessState::isVndservicemanagerEnabled() { return access("/vendor/bin/vndservicemanager", R_OK) == 0; } sp<ProcessState> ProcessState::init(const char *driver, bool requireDefault) { #ifdef BINDER_IPC_32BIT Loading @@ -123,6 +127,11 @@ sp<ProcessState> ProcessState::init(const char *driver, bool requireDefault) driver = "/dev/binder"; } if (0 == strcmp(driver, "/dev/vndbinder") && !isVndservicemanagerEnabled()) { ALOGE("vndservicemanager is not started on this device, you can save resources/threads " "by not initializing ProcessState with /dev/vndbinder."); } // we must install these before instantiating the gProcess object, // otherwise this would race with creating it, and there could be the // possibility of an invalid gProcess object forked by another thread Loading libs/binder/include/binder/ProcessState.h +2 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,8 @@ public: static sp<ProcessState> self(); static sp<ProcessState> selfOrNull(); static bool isVndservicemanagerEnabled(); /* initWithDriver() can be used to configure libbinder to use * a different binder driver dev node. It must be called *before* * any call to ProcessState::self(). The default is /dev/vndbinder Loading Loading
libs/binder/ProcessState.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,10 @@ static void verifyNotForked(bool forked) { LOG_ALWAYS_FATAL_IF(forked, "libbinder ProcessState can not be used after fork"); } bool ProcessState::isVndservicemanagerEnabled() { return access("/vendor/bin/vndservicemanager", R_OK) == 0; } sp<ProcessState> ProcessState::init(const char *driver, bool requireDefault) { #ifdef BINDER_IPC_32BIT Loading @@ -123,6 +127,11 @@ sp<ProcessState> ProcessState::init(const char *driver, bool requireDefault) driver = "/dev/binder"; } if (0 == strcmp(driver, "/dev/vndbinder") && !isVndservicemanagerEnabled()) { ALOGE("vndservicemanager is not started on this device, you can save resources/threads " "by not initializing ProcessState with /dev/vndbinder."); } // we must install these before instantiating the gProcess object, // otherwise this would race with creating it, and there could be the // possibility of an invalid gProcess object forked by another thread Loading
libs/binder/include/binder/ProcessState.h +2 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,8 @@ public: static sp<ProcessState> self(); static sp<ProcessState> selfOrNull(); static bool isVndservicemanagerEnabled(); /* initWithDriver() can be used to configure libbinder to use * a different binder driver dev node. It must be called *before* * any call to ProcessState::self(). The default is /dev/vndbinder Loading