summaryrefslogtreecommitdiffstats
path: root/include/binder/BinderService.h
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2013-05-09 14:53:35 -0700
committerMathias Agopian <mathias@google.com>2013-05-09 16:51:37 -0700
commitb6df7d0e4c2117ca476662bd52b6745b3d8a305f (patch)
tree6d3440cc26cd449391323fac1c0905a637383fcf /include/binder/BinderService.h
parent5d85d72a17ab4c87957c2802b92e5b67b5605558 (diff)
downloadframeworks_native-b6df7d0e4c2117ca476662bd52b6745b3d8a305f.zip
frameworks_native-b6df7d0e4c2117ca476662bd52b6745b3d8a305f.tar.gz
frameworks_native-b6df7d0e4c2117ca476662bd52b6745b3d8a305f.tar.bz2
make all libsurfaceflinger and libsensorservice symbols's visibility hidden
we only export the main entry-point. this saves about 150KB. Change-Id: I55eb2b6705386fdfa43860deb62f9cdd2a0982aa
Diffstat (limited to 'include/binder/BinderService.h')
-rw-r--r--include/binder/BinderService.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/include/binder/BinderService.h b/include/binder/BinderService.h
index 5ac36d9..ef703bd 100644
--- a/include/binder/BinderService.h
+++ b/include/binder/BinderService.h
@@ -42,19 +42,20 @@ public:
}
static void publishAndJoinThreadPool(bool allowIsolated = false) {
- sp<IServiceManager> sm(defaultServiceManager());
- sm->addService(
- String16(SERVICE::getServiceName()),
- new SERVICE(), allowIsolated);
- ProcessState::self()->startThreadPool();
- ProcessState::self()->giveThreadPoolName();
- IPCThreadState::self()->joinThreadPool();
+ publish(allowIsolated);
+ joinThreadPool();
}
static void instantiate() { publish(); }
- static status_t shutdown() {
- return NO_ERROR;
+ static status_t shutdown() { return NO_ERROR; }
+
+private:
+ static void joinThreadPool() {
+ sp<ProcessState> ps(ProcessState::self());
+ ps->startThreadPool();
+ ps->giveThreadPoolName();
+ IPCThreadState::self()->joinThreadPool();
}
};