Merge "Remove patch." am: ffa228e858 am: fa98e513d7 am: e1376d072b am: cd274dcc26

Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/android_log-sys/+/1733439

Change-Id: Icacb06bf2fb5c5eb10201909dbc0278c75125600
diff --git a/Android.bp b/Android.bp
index 48ecfb4..5646c99 100644
--- a/Android.bp
+++ b/Android.bp
@@ -45,12 +45,6 @@
     crate_name: "android_log_sys",
     srcs: ["src/lib.rs"],
     edition: "2015",
-    target: {
-        linux_glibc: {
-            // liblog is not added as a dependency for linux_glibc target
-            enabled: false,
-        },
-    },
     apex_available: [
         "//apex_available:platform",
         "com.android.compos",
@@ -58,4 +52,10 @@
         "com.android.virt",
     ],
     min_sdk_version: "29",
+    target: {
+        linux_glibc: {
+            // liblog is not added as a dependency for linux_glibc target
+            enabled: false,
+        },
+    },
 }
diff --git a/cargo2android.json b/cargo2android.json
index 34bf360..1eff91b 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,4 +1,5 @@
 {
+  "add-module-block": "cargo2android_glibc.bp",
   "apex-available": [
     "//apex_available:platform",
     "com.android.compos",
@@ -8,6 +9,5 @@
   "min_sdk_version": "29",
   "dependencies": true,
   "device": true,
-  "patch": "patches/Android.bp.patch",
   "run": true
 }
\ No newline at end of file
diff --git a/cargo2android_glibc.bp b/cargo2android_glibc.bp
new file mode 100644
index 0000000..f4d25cf
--- /dev/null
+++ b/cargo2android_glibc.bp
@@ -0,0 +1,6 @@
+target: {
+    linux_glibc: {
+        // liblog is not added as a dependency for linux_glibc target
+        enabled: false,
+    },
+}
\ No newline at end of file
diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch
deleted file mode 100644
index 988834c..0000000
--- a/patches/Android.bp.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/Android.bp
-+++ b/Android.bp
-@@ -45,6 +45,12 @@ rust_library {
-     crate_name: "android_log_sys",
-     srcs: ["src/lib.rs"],
-     edition: "2015",
-+    target: {
-+        linux_glibc: {
-+            // liblog is not added as a dependency for linux_glibc target
-+            enabled: false,
-+        },
-+    },
-     apex_available: [
-         "//apex_available:platform",
-         "com.android.resolv",