summaryrefslogtreecommitdiff
path: root/libs/binder/ProcessState.cpp
diff options
context:
space:
mode:
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 5c4cfe2156..9ccf07ca2a 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -317,6 +317,10 @@ void ProcessState::giveThreadPoolName() {
androidSetThreadName( makeBinderThreadName().string() );
}
+String8 ProcessState::getDriverName() {
+ return mDriverName;
+}
+
static int open_driver(const char *driver)
{
int fd = open(driver, O_RDWR | O_CLOEXEC);
@@ -346,7 +350,8 @@ static int open_driver(const char *driver)
}
ProcessState::ProcessState(const char *driver)
- : mDriverFD(open_driver(driver))
+ : mDriverName(String8(driver))
+ , mDriverFD(open_driver(driver))
, mVMStart(MAP_FAILED)
, mThreadCountLock(PTHREAD_MUTEX_INITIALIZER)
, mThreadCountDecrement(PTHREAD_COND_INITIALIZER)
@@ -367,6 +372,7 @@ ProcessState::ProcessState(const char *driver)
ALOGE("Using /dev/binder failed: unable to mmap transaction memory.\n");
close(mDriverFD);
mDriverFD = -1;
+ mDriverName.clear();
}
}