make all libsurfaceflinger and libsensorservice symbols's visibility hidden
we only export the main entry-point.
this saves about 150KB.
Change-Id: I55eb2b6705386fdfa43860deb62f9cdd2a0982aa
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 @@
}
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();
}
};