Merge "Make libstatssocket shared" into rvc-dev
diff --git a/apex/aidl/Android.bp b/apex/aidl/Android.bp
index 487c8e1..404c632 100644
--- a/apex/aidl/Android.bp
+++ b/apex/aidl/Android.bp
@@ -31,7 +31,7 @@
     ],
     backend: {
         java: {
-            enabled: false, // the platform uses statsd_java_aidl
+            enabled: false, // framework-statsd and service-statsd use framework-statsd-aidl-sources
         },
         cpp: {
             enabled: false,
diff --git a/apex/tests/libstatspull/Android.bp b/apex/tests/libstatspull/Android.bp
index e813964..2d64f19 100644
--- a/apex/tests/libstatspull/Android.bp
+++ b/apex/tests/libstatspull/Android.bp
@@ -48,9 +48,13 @@
         "-Werror",
     ],
     shared_libs: [
-        "libbinder",
-        "libutils",
-        "libstatspull",
-        "libstatssocket",
+        "libbinder_ndk",
+        "statsd-aidl-ndk_platform",
     ],
-}
\ No newline at end of file
+    static_libs: [
+        "libstatspull_private",
+        "libstatssocket_private",
+        "libutils",
+        "libcutils",
+    ],
+}
diff --git a/apex/tests/libstatspull/jni/stats_pull_helper.cpp b/apex/tests/libstatspull/jni/stats_pull_helper.cpp
index 22daa8e..eb97f65 100644
--- a/apex/tests/libstatspull/jni/stats_pull_helper.cpp
+++ b/apex/tests/libstatspull/jni/stats_pull_helper.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include <binder/ProcessState.h>
+#include <android/binder_process.h>
 #include <jni.h>
 #include <log/log.h>
 #include <stats_event.h>
@@ -24,7 +24,6 @@
 #include <thread>
 
 using std::this_thread::sleep_for;
-using namespace android;
 
 namespace {
 static int32_t sAtomTag;
@@ -39,10 +38,8 @@
     if (!initialized) {
         initialized = true;
         // Set up the binder
-        sp<ProcessState> ps(ProcessState::self());
-        ps->setThreadPoolMaxThreadCount(9);
-        ps->startThreadPool();
-        ps->giveThreadPoolName();
+        ABinderProcess_setThreadPoolMaxThreadCount(9);
+        ABinderProcess_startThreadPool();
     }
 }