summaryrefslogtreecommitdiff
path: root/libs/binder/ProcessState.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2018-07-09 20:41:11 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-07-09 20:41:11 +0000
commitfc7f6f0a86000922d6d1136f7c3a04c88c8fd9f4 (patch)
treee896db7fcca443f5735c5f038f91ac6d97c94590 /libs/binder/ProcessState.cpp
parentd39da4944fbf89600cfdc0a611cbc28a95cd4872 (diff)
parent2ae2f5e725d10e18f668eadf039480022f4a3b32 (diff)
Merge "libbinder: auto-choose between binder/vndbinder."
Diffstat (limited to 'libs/binder/ProcessState.cpp')
-rw-r--r--libs/binder/ProcessState.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index 6e7c427b12..c8cdb77b9c 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -43,6 +43,12 @@
#define BINDER_VM_SIZE ((1 * 1024 * 1024) - sysconf(_SC_PAGE_SIZE) * 2)
#define DEFAULT_MAX_BINDER_THREADS 15
+#ifdef __ANDROID_VNDK__
+const char* kDefaultDriver = "/dev/vndbinder";
+#else
+const char* kDefaultDriver = "/dev/binder";
+#endif
+
// -------------------------------------------------------------------------
namespace android {
@@ -71,7 +77,7 @@ sp<ProcessState> ProcessState::self()
if (gProcess != nullptr) {
return gProcess;
}
- gProcess = new ProcessState("/dev/binder");
+ gProcess = new ProcessState(kDefaultDriver);
return gProcess;
}