fix(high contrast text): fix grey text sometimes getting lighter when it should get darker and vice-versa

Use perceptual luminance instead of RGB heuristic to decide to lighten
or darken.

Bug: 186567103
Test: manual
1. adb shell setenforce 0 && adb shell setprop persist.device_config.aconfig_flags.accessibility.com.android.graphics.hwui.flags.high_contrast_text_luminance true && adb shell stop && adb shell start

Change-Id: Ief7ae6c10e1043694ffc10b1d827ebeaada61131
diff --git a/libs/hwui/Android.bp b/libs/hwui/Android.bp
index 79a7357..9751d63 100644
--- a/libs/hwui/Android.bp
+++ b/libs/hwui/Android.bp
@@ -38,6 +38,7 @@
 
 cc_aconfig_library {
     name: "hwui_flags_cc_lib",
+    host_supported: true,
     aconfig_declarations: "hwui_flags",
 }
 
@@ -117,12 +118,15 @@
         "libbase",
         "libharfbuzz_ng",
         "libminikin",
+        "server_configurable_flags",
     ],
 
     static_libs: [
         "libui-types",
     ],
 
+    whole_static_libs: ["hwui_flags_cc_lib"],
+
     target: {
         android: {
             shared_libs: [
@@ -154,7 +158,6 @@
                 "libstatspull_lazy",
                 "libstatssocket_lazy",
                 "libtonemap",
-                "hwui_flags_cc_lib",
             ],
         },
         host: {