summaryrefslogtreecommitdiff
path: root/libs/binder/ProcessState.cpp
diff options
context:
space:
mode:
author Martijn Coenen <maco@google.com> 2019-03-13 11:51:08 +0000
committer Martijn Coenen <maco@google.com> 2019-03-13 11:51:08 +0000
commit7bca77a21bc202621ab60a3599b2cf8a30ef81e2 (patch)
treeb9ef651e8fff78bce9891522804707c62606fab9 /libs/binder/ProcessState.cpp
parent46f95536bec334f8472ea92a7697c37602337398 (diff)
Revert "libbinder: Choose the binder driver at runtime based on system/vendor process."
This reverts commit 46f95536bec334f8472ea92a7697c37602337398. Reason for revert: appears to break (some?) native tests, which start looking for binder services in /dev/vndbinder Change-Id: Id27d90e484d23a5975869729fa274213a9b1e1e4
Diffstat (limited to 'libs/binder/ProcessState.cpp')
-rw-r--r--libs/binder/ProcessState.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index 86afffc079..3798b61ab9 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -26,7 +26,6 @@
#include <utils/String8.h>
#include <utils/String8.h>
#include <utils/threads.h>
-#include <vndksupport/linker.h>
#include <private/binder/binder_module.h>
#include <private/binder/Static.h>
@@ -44,22 +43,16 @@
#define BINDER_VM_SIZE ((1 * 1024 * 1024) - sysconf(_SC_PAGE_SIZE) * 2)
#define DEFAULT_MAX_BINDER_THREADS 15
-const char* kDefaultVendorDriver = "/dev/vndbinder";
+#ifdef __ANDROID_VNDK__
+const char* kDefaultDriver = "/dev/vndbinder";
+#else
const char* kDefaultDriver = "/dev/binder";
+#endif
// -------------------------------------------------------------------------
namespace android {
-static const char *getDefaultBinderDriver() {
- // Some libs might have their system variants loaded in a vendor process, so
- // we cannot depend on a compile time check.
- if (android_is_in_vendor_process()) {
- return kDefaultVendorDriver;
- }
- return kDefaultDriver;
-}
-
class PoolThread : public Thread
{
public:
@@ -84,7 +77,7 @@ sp<ProcessState> ProcessState::self()
if (gProcess != nullptr) {
return gProcess;
}
- gProcess = new ProcessState(getDefaultBinderDriver());
+ gProcess = new ProcessState(kDefaultDriver);
return gProcess;
}