Allow using url from DnsResolver

Test: m
Bug: 155855709
Change-Id: I4c81c0fbff86d3dfab220076cc1c73a4e26f6734
diff --git a/Android.bp b/Android.bp
index f3305e8..529cb30 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,4 @@
-// This file is generated by cargo2android.py --run --device --dependencies --tests.
+// This file is generated by cargo2android.py --run --device --dependencies --tests --patch=patches/Android.bp.patch.
 
 rust_library {
     name: "liburl",
@@ -12,6 +12,11 @@
         "libmatches",
         "libpercent_encoding",
     ],
+    apex_available: [
+        "//apex_available:platform",
+        "com.android.resolv",
+    ],
+    min_sdk_version: "29",
 }
 
 rust_defaults {
diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch
new file mode 100644
index 0000000..3b90dc3
--- /dev/null
+++ b/patches/Android.bp.patch
@@ -0,0 +1,16 @@
+diff --git a/Android.bp b/Android.bp
+index f3305e8..75e8805 100644
+--- a/Android.bp
++++ b/Android.bp
+@@ -12,6 +12,11 @@ rust_library {
+         "libmatches",
+         "libpercent_encoding",
+     ],
++    apex_available: [
++        "//apex_available:platform",
++        "com.android.resolv",
++    ],
++    min_sdk_version: "29",
+ }
+ 
+ rust_defaults {