release-request-7f84484c-eec6-4577-8d5a-55079be4f3c5-for-git_oc-mr1-release-4262309 snap-temp-L02100000091441105

Change-Id: I8e399d935a86dbcfda7cc589d6698270484e530f
diff --git a/Android.bp b/Android.bp
index 01fc87b..3d39506 100644
--- a/Android.bp
+++ b/Android.bp
@@ -34,6 +34,9 @@
 cc_library {
     name: "libxml2",
     vendor_available: true,
+    vndk: {
+        enabled: true,
+    },
     host_supported: true,
     srcs: [
         "SAX.c",
@@ -94,6 +97,9 @@
         host: {
             host_ldlibs: ["-ldl"],
         },
+        vendor: {
+            exclude_shared_libs: ["libicuuc"],
+        },
     },
     shared_libs: ["libicuuc"],
     export_shared_lib_headers: ["libicuuc"],
diff --git a/include/libxml/xmlversion.h b/include/libxml/xmlversion.h
index c8163c6..eb18ea0 100644
--- a/include/libxml/xmlversion.h
+++ b/include/libxml/xmlversion.h
@@ -286,9 +286,14 @@
  * LIBXML_ICU_ENABLED:
  *
  * Whether icu support is available
+ *
+ * This is disabled when libxml2 is built for the VNDK.
+ * libicuuc.so isn't available in the VNDK.
  */
-#if 1
+#ifndef __ANDROID_VNDK__
 #define LIBXML_ICU_ENABLED
+#else
+#undef LIBXML_ICU_ENABLED
 #endif
 
 /**