Add libstatspull and libstatssocket to the apex

Also make libstatssocket dependency static in statsd_test temporarily to use
AStatsEvent_getBuffer in tests.

Bug: 145922701
Bug: 145923416
Test: m

Change-Id: Idb8107cfe4f7d08d08c7a242c037fcc63912bb5f
diff --git a/apex/statsd/Android.bp b/apex/statsd/Android.bp
index 0e93110..86a3a7d 100644
--- a/apex/statsd/Android.bp
+++ b/apex/statsd/Android.bp
@@ -21,6 +21,8 @@
 apex_defaults {
     native_shared_libs: [
         "libstats_jni",
+        "libstatspull",
+        "libstatssocket",
     ],
     // binaries: ["vold"],
     java_libs: [
diff --git a/cmds/statsd/Android.bp b/cmds/statsd/Android.bp
index 93522d4..4991a95 100644
--- a/cmds/statsd/Android.bp
+++ b/cmds/statsd/Android.bp
@@ -299,6 +299,11 @@
     static_libs: [
         "libgmock",
         "libplatformprotos",
+
+        // TODO(b/149842105): Make libstatssocket shared and remove libcutils once statsd_test is
+        // moved to the apex.
+        "libstatssocket",
+        "libcutils",
     ],
 
     proto: {
@@ -308,7 +313,6 @@
 
     shared_libs: [
         "libprotobuf-cpp-lite",
-        "libstatssocket"
     ],
 
 }