Generate apex_available from c2a instead of a patch am: 34cbfaba65 am: 0dc6e78761 am: 1573b08797 am: e1f9dc69e4

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

Change-Id: Iaa966ac7515c9aa6ff9de7fdc4f52e7f1866aa26
diff --git a/Android.bp b/Android.bp
index 8eaf57e..774be52 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,5 @@
-// This file is generated by cargo2android.py --run --dependencies --device --features= --tests.
+// 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_env_logger_license"],
@@ -67,9 +68,7 @@
     test_suites: ["general-tests"],
     auto_gen_config: true,
     edition: "2018",
-    flags: [
-        "--cfg test",
-    ],
+    cfgs: ["test"],
     rustlibs: [
         "libenv_logger",
         "liblog_rust",
diff --git a/cargo2android.json b/cargo2android.json
new file mode 100644
index 0000000..806cd85
--- /dev/null
+++ b/cargo2android.json
@@ -0,0 +1,11 @@
+{
+  "apex-available": [
+    "//apex_available:platform",
+    "com.android.virt"
+  ],
+  "dependencies": true,
+  "device": true,
+  "features": "",
+  "run": true,
+  "tests": true
+}
\ No newline at end of file
diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch
deleted file mode 100644
index 524b483..0000000
--- a/patches/Android.bp.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/Android.bp b/Android.bp
-index a1abfe9..0dadb42 100644
---- a/Android.bp
-+++ b/Android.bp
-@@ -109,6 +109,10 @@ rust_library {
-     rustlibs: [
-         "liblog_rust",
-     ],
-+    apex_available: [
-+        "//apex_available:platform",
-+        "com.android.virt",
-+    ],
- }
- 
- // dependent_library ["feature_list"]