Add soong config to build core service without vibrator

Not all Android devices have a vibrator. The VibratorControlService
should be an optional service for Android devices. We create a new
manifest without the VibratorControlService to avoid running VTS of
VibratorControlService for those devices. Devices only need to set the
soong config "without_vibrator" to exclude from the VTS test.

Flag: EXEMPT bugfix
Bug: 351256023
Test: Test on a TV device and the VTS test is ignored.
Change-Id: I396d3b1cb558e297ea9fb001e1a014efeeb0bf77
diff --git a/services/Android.bp b/services/Android.bp
index cd974c5..dce6aa7 100644
--- a/services/Android.bp
+++ b/services/Android.bp
@@ -186,7 +186,15 @@
 
 // merge all required services into one jar
 // ============================================================
-java_library {
+soong_config_module_type {
+    name: "system_java_library",
+    module_type: "java_library",
+    config_namespace: "system_services",
+    bool_variables: ["without_vibrator"],
+    properties: ["vintf_fragments"],
+}
+
+system_java_library {
     name: "services",
     defaults: [
         "services_java_defaults",
@@ -248,9 +256,19 @@
         "service-sdksandbox.stubs.system_server",
     ],
 
-    vintf_fragments: [
-        "manifest_services.xml",
-    ],
+    soong_config_variables: {
+        without_vibrator: {
+            vintf_fragments: [
+                "manifest_services.xml",
+            ],
+            conditions_default: {
+                vintf_fragments: [
+                    "manifest_services.xml",
+                    "manifest_services_android.frameworks.vibrator.xml",
+                ],
+            },
+        },
+    },
 
     required: [
         "libukey2_jni_shared",