Remove obsolete references to IPCThreadState/ProcessState.

Threadpool can now be configured/joined if needed with
configureRpcThreadpool() / joinRpcThreadpool().

Bug: 31226656
Test: mma
Change-Id: I0d7d9924cc8c8851cc2b61ebdae906204909890e
diff --git a/example/extension/light/2.0/default/service.cpp b/example/extension/light/2.0/default/service.cpp
index 3eb7bdf..d3fb4de 100644
--- a/example/extension/light/2.0/default/service.cpp
+++ b/example/extension/light/2.0/default/service.cpp
@@ -16,15 +16,14 @@
 #define LOG_TAG "android.hardware.light@2.0-service"
 
 #include <android/log.h>
+#include <hidl/HidlTransportSupport.h>
 
 #include "Light.h"
 
+using android::hardware::configureRpcThreadpool;
+using android::hardware::joinRpcThreadpool;
 using android::sp;
 
-// libhwbinder:
-using android::hardware::IPCThreadState;
-using android::hardware::ProcessState;
-
 // Generated HIDL files
 using android::hardware::light::V2_0::ILight;
 
@@ -32,10 +31,7 @@
     const char instance[] = "light";
 
     android::sp<ILight> service = new Light();
-
+    configureRpcThreadpool(1, true /*callerWillJoin*/);
     service->registerAsService(instance);
-
-    ProcessState::self()->setThreadPoolMaxThreadCount(0);
-    ProcessState::self()->startThreadPool();
-    IPCThreadState::self()->joinThreadPool();
+    joinRpcThreadpool();
 }