Merge "Generate apex_available from c2a instead of a patch" am: c4379c47f7 am: c46660d000 am: ab28830577 am: 9bd447a748

Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/once_cell/+/1689909

Change-Id: I50cfcf88da27913e4d7e74880cef05f85e1485ec
diff --git a/Android.bp b/Android.bp
index 3207a0c..8c67ad3 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,4 @@
-// This file is generated by cargo2android.py --run --device --dependencies --patch=patches/Android.bp.patch.
+// This file is generated by cargo2android.py --config cargo2android.json.
 // Do not modify this file as changes will be overridden on upgrade.
 
 package {
diff --git a/cargo2android.json b/cargo2android.json
new file mode 100644
index 0000000..2e8c0ea
--- /dev/null
+++ b/cargo2android.json
@@ -0,0 +1,11 @@
+{
+  "apex-available": [
+    "//apex_available:platform",
+    "com.android.resolv",
+    "com.android.virt"
+  ],
+  "dependencies": true,
+  "device": true,
+  "min-sdk-version": "29",
+  "run": true
+}
\ No newline at end of file
diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch
deleted file mode 100644
index 9a416e4..0000000
--- a/patches/Android.bp.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/Android.bp b/Android.bp
-index f122044..eb9a51f 100644
---- a/Android.bp
-+++ b/Android.bp
- rust_library {
-     name: "libonce_cell",
-@@ -11,4 +11,10 @@ rust_library {
-         "default",
-         "std",
-     ],
-+    apex_available: [
-+        "//apex_available:platform",
-+        "com.android.resolv",
-+        "com.android.virt",
-+    ],
-+    min_sdk_version: "29",
- }