Update host build for libhwui

The host build should use the host-compatible version of
libnativehelper, libnativehelper_jvm.
This also removes dependency on the flag libraries for host builds.
Finally this makes more JNI registrations available for Hwui on host,
so that they can be accessed in layoutlib.

Flag: EXEMPT refactor
Bug: 322360037
Test: build libhwui on host
Change-Id: I11ab4dcdb3132e62568e07be967690d31fa3a3eb
diff --git a/libs/hwui/Android.bp b/libs/hwui/Android.bp
index 341599e..e302fa8 100644
--- a/libs/hwui/Android.bp
+++ b/libs/hwui/Android.bp
@@ -114,16 +114,12 @@
         "libbase",
         "libharfbuzz_ng",
         "libminikin",
-        "server_configurable_flags",
-        "libaconfig_storage_read_api_cc"
     ],
 
     static_libs: [
         "libui-types",
     ],
 
-    whole_static_libs: ["hwui_flags_cc_lib"],
-
     target: {
         android: {
             shared_libs: [
@@ -145,6 +141,8 @@
                 "libsync",
                 "libui",
                 "aconfig_text_flags_c_lib",
+                "server_configurable_flags",
+                "libaconfig_storage_read_api_cc",
             ],
             static_libs: [
                 "libEGL_blobCache",
@@ -155,6 +153,7 @@
                 "libstatssocket_lazy",
                 "libtonemap",
             ],
+            whole_static_libs: ["hwui_flags_cc_lib"],
         },
         host: {
             static_libs: [
@@ -419,7 +418,6 @@
     ],
 
     static_libs: [
-        "libnativehelper_lazy",
         "libziparchive_for_incfs",
     ],
 
@@ -446,6 +444,7 @@
             ],
             static_libs: [
                 "libgif",
+                "libnativehelper_lazy",
                 "libstatslog_hwui",
                 "libstatspull_lazy",
                 "libstatssocket_lazy",
@@ -464,6 +463,7 @@
             ],
             static_libs: [
                 "libandroidfw",
+                "libnativehelper_jvm",
             ],
         },
     },