Snap for 7325276 from ad3f80dff5fdc35791a70b44c4c9225b338d82d6 to sc-release

Change-Id: I0f305089292edef3c63ff5f7a736fa82c26e6125
diff --git a/Android.bp b/Android.bp
index 2123977..ac11512 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,5 @@
-// 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.
 // TODO(victorhsieh): Add --test. The test in the current version depends on an older rand crate
 // (pre 0.8) to compile due to several API changes. However, Android's rand is already newer.
 
@@ -42,6 +43,7 @@
 
 rust_library {
     name: "libintrusive_collections",
+    // has rustc warnings
     host_supported: true,
     crate_name: "intrusive_collections",
     srcs: ["src/lib.rs"],
diff --git a/cargo2android.json b/cargo2android.json
new file mode 100644
index 0000000..623aa56
--- /dev/null
+++ b/cargo2android.json
@@ -0,0 +1,10 @@
+{
+  "apex-available": [
+    "//apex_available:platform",
+    "com.android.virt"
+  ],
+  "dependencies": true,
+  "device": true,
+  "patch": "patches/Android.bp.patch",
+  "run": true
+}
\ No newline at end of file
diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch
index 15d6516..f0c7569 100644
--- a/patches/Android.bp.patch
+++ b/patches/Android.bp.patch
@@ -2,21 +2,11 @@
 index 9e3c084..d4334b6 100644
 --- a/Android.bp
 +++ b/Android.bp
-@@ -1,4 +1,6 @@
- // This file is generated by cargo2android.py --run --device --dependencies --patch=patches/Android.bp.patch.
+@@ -1,5 +1,7 @@
+ // This file is generated by cargo2android.py --config cargo2android.json.
+ // Do not modify this file as changes will be overridden on upgrade.
 +// TODO(victorhsieh): Add --test. The test in the current version depends on an older rand crate
 +// (pre 0.8) to compile due to several API changes. However, Android's rand is already newer.
  
- rust_library {
-     name: "libintrusive_collections",
-@@ -13,6 +15,10 @@ rust_library {
-     rustlibs: [
-         "libmemoffset",
-     ],
-+    apex_available: [
-+        "//apex_available:platform",
-+        "com.android.virt",
-+    ],
- }
- 
- // dependent_library ["feature_list"]
+ package {
+     default_applicable_licenses: [