Link libinput as a shared library for host

Since the rust dependencies in libinput are included as a
whole_static_lib, if we add the same rust dependencies in another
library (e.g. in libinputflinger), they will be included more than
once in the binary, resulting in duplicate symbol errors from the
linker. We can add it as a shared lib dependency to get around
the duplicate symbols.

Bug: 278783893
Test: build
Change-Id: I92897f3465852d7be030dbce995435edff9b54fd
diff --git a/libs/input/Android.bp b/libs/input/Android.bp
index 80a8c8d..30e4afe 100644
--- a/libs/input/Android.bp
+++ b/libs/input/Android.bp
@@ -274,9 +274,6 @@
             ],
         },
         host: {
-            shared: {
-                enabled: false,
-            },
             include_dirs: [
                 "bionic/libc/kernel/android/uapi/",
                 "bionic/libc/kernel/uapi",
diff --git a/services/inputflinger/Android.bp b/services/inputflinger/Android.bp
index dc7c75a..b007fd3 100644
--- a/services/inputflinger/Android.bp
+++ b/services/inputflinger/Android.bp
@@ -79,6 +79,7 @@
         "libcrypto",
         "libcutils",
         "libhidlbase",
+        "libinput",
         "libkll",
         "liblog",
         "libprotobuf-cpp-lite",
@@ -95,14 +96,12 @@
         android: {
             shared_libs: [
                 "libgui",
-                "libinput",
                 "libstatspull",
                 "libstatssocket",
             ],
         },
         host: {
             static_libs: [
-                "libinput",
                 "libstatspull",
                 "libstatssocket",
             ],
@@ -179,6 +178,7 @@
         "libbase",
         "libbinder",
         "libcutils",
+        "libinput",
         "liblog",
         "libutils",
     ],
@@ -186,14 +186,8 @@
         "libinputflinger_headers",
     ],
     target: {
-        android: {
-            shared_libs: [
-                "libinput",
-            ],
-        },
         host: {
             static_libs: [
-                "libinput",
                 "libui-types",
             ],
         },
diff --git a/services/inputflinger/dispatcher/Android.bp b/services/inputflinger/dispatcher/Android.bp
index 492551e..8b57730 100644
--- a/services/inputflinger/dispatcher/Android.bp
+++ b/services/inputflinger/dispatcher/Android.bp
@@ -59,6 +59,7 @@
         "libbase",
         "libcrypto",
         "libcutils",
+        "libinput",
         "libkll",
         "liblog",
         "libprotobuf-cpp-lite",
@@ -74,14 +75,12 @@
         android: {
             shared_libs: [
                 "libgui",
-                "libinput",
                 "libstatspull",
                 "libstatssocket",
             ],
         },
         host: {
             static_libs: [
-                "libinput",
                 "libstatspull",
                 "libstatssocket",
             ],
diff --git a/services/inputflinger/reader/Android.bp b/services/inputflinger/reader/Android.bp
index e594e40..c0c6d1f 100644
--- a/services/inputflinger/reader/Android.bp
+++ b/services/inputflinger/reader/Android.bp
@@ -80,6 +80,7 @@
         "libcrypto",
         "libcutils",
         "libjsoncpp",
+        "libinput",
         "liblog",
         "libPlatformProperties",
         "libstatslog",
@@ -98,13 +99,11 @@
     target: {
         android: {
             shared_libs: [
-                "libinput",
                 "libstatspull",
             ],
         },
         host: {
             static_libs: [
-                "libinput",
                 "libbinder",
                 "libstatspull",
             ],
diff --git a/services/inputflinger/tests/Android.bp b/services/inputflinger/tests/Android.bp
index 370e971..187bc0a 100644
--- a/services/inputflinger/tests/Android.bp
+++ b/services/inputflinger/tests/Android.bp
@@ -75,7 +75,6 @@
     target: {
         android: {
             shared_libs: [
-                "libinput",
                 "libvintf",
             ],
         },
@@ -90,9 +89,6 @@
             cflags: [
                 "-D__ANDROID_HOST__",
             ],
-            static_libs: [
-                "libinput",
-            ],
         },
     },
     sanitize: {