Snap for 9867398 from 06b17d6da2cea7b5c0729417f04bc18c95ab7917 to udc-d1-release

Change-Id: Ic1b095f37e80b6554ece28f6a3db58ae2cc3736e
diff --git a/Android.bp b/Android.bp
index 05a9aa3..1d545f3 100644
--- a/Android.bp
+++ b/Android.bp
@@ -20,7 +20,7 @@
     ],
 }
 
-rust_library_rlib {
+rust_library {
     name: "libstatic_assertions",
     host_supported: true,
     crate_name: "static_assertions",
diff --git a/cargo2android.json b/cargo2android.json
index f41bf78..ac5389c 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,6 +1,5 @@
 {
     "device": true,
-    "force-rlib": true,
     "no_pkg_vers": true,
     "min-sdk-version": "29",
     "vendor-available": true,
diff --git a/patches/dylib-std.patch b/patches/dylib-std.patch
new file mode 100644
index 0000000..7864526
--- /dev/null
+++ b/patches/dylib-std.patch
@@ -0,0 +1,14 @@
+diff --git a/src/lib.rs b/src/lib.rs
+index aa7e227..df47529 100644
+--- a/src/lib.rs
++++ b/src/lib.rs
+@@ -101,6 +101,9 @@
+ )]
+ #![no_std]
+ 
++#[cfg(android_dylib)]
++extern crate std;
++
+ #[cfg(feature = "proc_static_assertions")]
+ extern crate proc_static_assertions;
+ #[cfg(feature = "proc_static_assertions")]
diff --git a/src/lib.rs b/src/lib.rs
index aa7e227..df47529 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -101,6 +101,9 @@
 )]
 #![no_std]
 
+#[cfg(android_dylib)]
+extern crate std;
+
 #[cfg(feature = "proc_static_assertions")]
 extern crate proc_static_assertions;
 #[cfg(feature = "proc_static_assertions")]