Use new c2a functionality instead of a patch. am: b3fa6077a0

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

Change-Id: I184270046981f1be7d88a516b35eb8f50900f67f
diff --git a/Android.bp b/Android.bp
index 54e1607..ba2feb9 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,5 @@
-// This file is generated by cargo2android.py --run --device --tests --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 {
     default_applicable_licenses: ["external_rust_crates_rand_xorshift_license"],
@@ -56,8 +57,6 @@
     auto_gen_config: true,
     edition: "2018",
     rustlibs: [
-        // ANDROID: not really used
-        //"libbincode",
         "librand_core",
     ],
 }
@@ -65,6 +64,9 @@
 rust_test_host {
     name: "rand_xorshift_host_test_src_lib",
     defaults: ["rand_xorshift_defaults"],
+    test_options: {
+        unit_test: true,
+    },
 }
 
 rust_test {
@@ -80,8 +82,6 @@
     auto_gen_config: true,
     edition: "2018",
     rustlibs: [
-        // ANDROID: not really used
-        //"libbincode",
         "librand_core",
         "librand_xorshift",
     ],
@@ -90,6 +90,9 @@
 rust_test_host {
     name: "rand_xorshift_host_test_tests_mod",
     defaults: ["rand_xorshift_defaults_mod"],
+    test_options: {
+        unit_test: true,
+    },
 }
 
 rust_test {
@@ -98,7 +101,6 @@
 }
 
 // dependent_library ["feature_list"]
-//   bincode-1.3.1
-//   byteorder-1.3.4 "default,std"
-//   rand_core-0.6.0
-//   serde-1.0.118 "default,std"
+//   bincode-1.3.3
+//   rand_core-0.6.2
+//   serde-1.0.126 "default,std"
diff --git a/cargo2android.json b/cargo2android.json
new file mode 100644
index 0000000..7f3828f
--- /dev/null
+++ b/cargo2android.json
@@ -0,0 +1,9 @@
+{
+  "dependencies": true,
+  "dependency-blocklist": [
+    "bincode"
+  ],
+  "device": true,
+  "run": true,
+  "tests": true
+}
diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch
deleted file mode 100644
index 13b71ce..0000000
--- a/patches/Android.bp.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/Android.bp b/Android.bp
-index 704654e..0e6db92 100644
---- a/Android.bp
-+++ b/Android.bp
-@@ -19,7 +19,8 @@ rust_defaults {
-     auto_gen_config: true,
-     edition: "2018",
-     rustlibs: [
--        "libbincode",
-+        // ANDROID: not really used
-+        //"libbincode",
-         "librand_core",
-     ],
- }
-@@ -42,7 +43,8 @@ rust_defaults {
-     auto_gen_config: true,
-     edition: "2018",
-     rustlibs: [
--        "libbincode",
-+        // ANDROID: not really used
-+        //"libbincode",
-         "librand_core",
-         "librand_xorshift",
-     ],