libprocessgroup users use libcutils

libprocessgroup symbols are being moved into libcutils in order to
optimize linking/memory usage. libprocessgroup will no longer be
required in the future (however removing references to it will come
separately).

Bug: 135145426
Test: boot

Test:
BEFORE:
$ adb shell showmap -a $(pid hwservicemanager) | grep -P "libprocessgroup|libcutils" -A1 | grep -P 'libprocessgroup|libcutils|\.bss' | awk '{s += $9}END{print s}'
28

AFTER:
$ adb shell showmap -a $(pid hwservicemanager) | grep -P "libprocessgroup|libcutils" -A1 | grep -P 'libprocessgroup|libcutils|\.bss' | awk '{s += $9}END{print s}'
12

Change-Id: I10d7c2d2b2b14cbbe0a128b9156d31206419d24c
diff --git a/libprocessgroup/Android.bp b/libprocessgroup/Android.bp
index 0207a75..f486d6c 100644
--- a/libprocessgroup/Android.bp
+++ b/libprocessgroup/Android.bp
@@ -14,13 +14,8 @@
     },
 }
 
+// TODO: remove all usages
 cc_library {
-    srcs: [
-        "cgroup_map.cpp",
-        "processgroup.cpp",
-        "sched_policy.cpp",
-        "task_profiles.cpp",
-    ],
     name: "libprocessgroup",
     host_supported: true,
     recovery_available: true,
@@ -29,13 +24,47 @@
         enabled: true,
         support_system_process: true,
     },
-    shared_libs: [
-        "libbase",
-        "libcgrouprc",
+}
+
+cc_defaults {
+    name: "libprocessgroup_impl_libs",
+    target: {
+        linux: {
+            shared_libs: [
+                "libbase",
+                "libcgrouprc",
+            ],
+            static_libs: [
+                "libjsoncpp",
+            ],
+        },
+    },
+}
+
+cc_defaults {
+    name: "libprocessgroup_impl_provider",
+    defaults: ["libprocessgroup_impl_libs"],
+    target: {
+        linux: {
+            whole_static_libs: [
+                "libprocessgroup_impl",
+            ],
+        },
+    },
+}
+
+cc_library {
+    name: "libprocessgroup_impl",
+    defaults: ["libprocessgroup_impl_libs"],
+    srcs: [
+        "cgroup_map.cpp",
+        "processgroup.cpp",
+        "sched_policy.cpp",
+        "task_profiles.cpp",
     ],
-    static_libs: [
-        "libjsoncpp",
-    ],
+    host_supported: true,
+    recovery_available: true,
+    vendor_available: true,
     // for cutils/android_filesystem_config.h
     header_libs: [
         "libcutils_headers",