Revert^2 "Making NN hardware interface libs "host supported""

This is a revert of I6f657743, which is a revert of I1d7c66516.

Changing static libraries in hardware/interfaces/neuralnetworks to be
"host supported", meaning that the libraries within this directory
will be available on the host/linux build to make integration and
debugging more efficient.

Host Supported Libs:
* neuralnetworks_utils_hal_1_0
* neuralnetworks_utils_hal_1_1
* neuralnetworks_utils_hal_1_2
* neuralnetworks_utils_hal_1_3
* neuralnetworks_utils_hal_aidl
* neuralnetworks_utils_hal_common

Host Supported Tests:
* neuralnetworks_utils_hal_1_0_test
* neuralnetworks_utils_hal_1_1_test
* neuralnetworks_utils_hal_1_2_test
* neuralnetworks_utils_hal_1_3_test
* neuralnetworks_utils_hal_aidl_test
* neuralnetworks_utils_hal_common_test

Bug: 146324523
Test: neuralnetworks_utils_hal_*_test
Change-Id: I6c3cc00cd1ceefe4ae4ca5e40a8f3062d3251ff1
diff --git a/neuralnetworks/aidl/utils/Android.bp b/neuralnetworks/aidl/utils/Android.bp
index 0ccc711..955f21f 100644
--- a/neuralnetworks/aidl/utils/Android.bp
+++ b/neuralnetworks/aidl/utils/Android.bp
@@ -41,8 +41,12 @@
         "android.hardware.neuralnetworks-V1-ndk_platform",
         "libbinder_ndk",
         "libhidlbase",
-        "libnativewindow",
     ],
+    target: {
+        android: {
+            shared_libs: ["libnativewindow"],
+        },
+    },
 }
 
 cc_test {
@@ -70,9 +74,21 @@
         "libhidlbase",
         "libhidlmemory",
         "liblog",
-        "libnativewindow",
         "libutils",
     ],
+    target: {
+        android: {
+            shared_libs: ["libnativewindow"],
+        },
+        host: {
+            cflags: [
+                "-D__INTRODUCED_IN(x)=",
+                "-D__assert(a,b,c)=",
+                // We want all the APIs to be available on the host.
+                "-D__ANDROID_API__=10000",
+            ],
+        },
+    },
     cflags: [
         /* GMOCK defines functions for printing all MOCK_DEVICE arguments and
          * MockDevice contains a string pointer which triggers a warning in the