Snap for 8564071 from cc4850803005b395f1651220c5e351de525b9fdb to mainline-conscrypt-release

Change-Id: Ibb2650e7d5fb13065972609a304cb90d4510c09f
diff --git a/Android.bp b/Android.bp
index 21bff56..5eafb67 100644
--- a/Android.bp
+++ b/Android.bp
@@ -37,68 +37,42 @@
     ],
 }
 
-rust_defaults {
-    name: "lazy_static_defaults",
-    crate_name: "lazy_static",
+rust_test {
+    name: "lazy_static_test_tests_test",
     // has rustc warnings
-    srcs: ["src/lib.rs"],
+    host_supported: true,
+    crate_name: "lazy_static",
+    cargo_env_compat: true,
+    cargo_pkg_version: "1.4.0",
+    srcs: ["tests/test.rs"],
     test_suites: ["general-tests"],
     auto_gen_config: true,
-    edition: "2015",
-}
-
-rust_test_host {
-    name: "lazy_static_host_test_src_lib",
-    defaults: ["lazy_static_defaults"],
     test_options: {
         unit_test: true,
     },
-}
-
-rust_test {
-    name: "lazy_static_device_test_src_lib",
-    defaults: ["lazy_static_defaults"],
-}
-
-rust_defaults {
-    name: "lazy_static_defaults_lazy_static",
-    crate_name: "lazy_static",
-    test_suites: ["general-tests"],
-    auto_gen_config: true,
     edition: "2015",
     rustlibs: [
         "liblazy_static",
     ],
 }
 
-rust_test_host {
-    name: "lazy_static_host_test_tests_test",
-    defaults: ["lazy_static_defaults_lazy_static"],
-    // has rustc warnings
-    srcs: ["tests/test.rs"],
-    test_options: {
-        unit_test: true,
-    },
-}
-
-rust_test {
-    name: "lazy_static_device_test_tests_test",
-    defaults: ["lazy_static_defaults_lazy_static"],
-    // has rustc warnings
-    srcs: ["tests/test.rs"],
-}
-
 rust_library {
     name: "liblazy_static",
     // has rustc warnings
     host_supported: true,
     crate_name: "lazy_static",
+    cargo_env_compat: true,
+    cargo_pkg_version: "1.4.0",
     srcs: ["src/lib.rs"],
     edition: "2015",
     apex_available: [
         "//apex_available:platform",
+        "com.android.bluetooth",
+        "com.android.compos",
         "com.android.resolv",
+        "com.android.uwb",
         "com.android.virt",
     ],
+    vendor_available: true,
     min_sdk_version: "29",
 }
diff --git a/TEST_MAPPING b/TEST_MAPPING
index c17c99e..b9ed59b 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,23 +1,198 @@
 // Generated by update_crate_tests.py for tests that depend on this crate.
 {
+  "imports": [
+    {
+      "path": "external/rust/crates/android_logger"
+    },
+    {
+      "path": "external/rust/crates/base64"
+    },
+    {
+      "path": "external/rust/crates/crossbeam-deque"
+    },
+    {
+      "path": "external/rust/crates/crossbeam-epoch"
+    },
+    {
+      "path": "external/rust/crates/crossbeam-queue"
+    },
+    {
+      "path": "external/rust/crates/crossbeam-utils"
+    },
+    {
+      "path": "external/rust/crates/jni"
+    },
+    {
+      "path": "external/rust/crates/libsqlite3-sys"
+    },
+    {
+      "path": "external/rust/crates/once_cell"
+    },
+    {
+      "path": "external/rust/crates/quiche"
+    },
+    {
+      "path": "external/rust/crates/regex"
+    },
+    {
+      "path": "external/rust/crates/shared_library"
+    },
+    {
+      "path": "external/rust/crates/tinytemplate"
+    },
+    {
+      "path": "external/rust/crates/tinyvec"
+    },
+    {
+      "path": "external/rust/crates/unicode-xid"
+    },
+    {
+      "path": "external/rust/crates/vulkano"
+    },
+    {
+      "path": "external/rust/crates/xml-rs"
+    }
+  ],
   "presubmit": [
     {
-      "name": "quiche_device_test_src_lib"
-    },
-    {
-      "name": "lazy_static_device_test_tests_test"
-    },
-    {
-      "name": "libsqlite3-sys_device_test_src_lib"
-    },
-    {
-      "name": "android_logger_device_test_src_lib"
-    },
-    {
       "name": "authfs_device_test_src_lib"
     },
     {
-      "name": "lazy_static_device_test_src_lib"
+      "name": "diced_open_dice_cbor_test"
+    },
+    {
+      "name": "diced_sample_inputs_test"
+    },
+    {
+      "name": "diced_test"
+    },
+    {
+      "name": "diced_utils_test"
+    },
+    {
+      "name": "diced_vendor_test"
+    },
+    {
+      "name": "doh_unit_test"
+    },
+    {
+      "name": "keystore2_km_compat_test"
+    },
+    {
+      "name": "keystore2_selinux_concurrency_test"
+    },
+    {
+      "name": "keystore2_selinux_test"
+    },
+    {
+      "name": "keystore2_test"
+    },
+    {
+      "name": "keystore2_test_utils_test"
+    },
+    {
+      "name": "lazy_static_test_tests_test"
+    },
+    {
+      "name": "legacykeystore_test"
+    },
+    {
+      "name": "libapkverify.integration_test"
+    },
+    {
+      "name": "libapkverify.test"
+    },
+    {
+      "name": "logger_device_unit_tests"
+    },
+    {
+      "name": "logger_test_config_log_level"
+    },
+    {
+      "name": "logger_test_default_init"
+    },
+    {
+      "name": "logger_test_env_log_level"
+    },
+    {
+      "name": "logger_test_multiple_init"
+    },
+    {
+      "name": "microdroid_manager_test"
+    },
+    {
+      "name": "virtualizationservice_device_test"
+    }
+  ],
+  "presubmit-rust": [
+    {
+      "name": "authfs_device_test_src_lib"
+    },
+    {
+      "name": "diced_open_dice_cbor_test"
+    },
+    {
+      "name": "diced_sample_inputs_test"
+    },
+    {
+      "name": "diced_test"
+    },
+    {
+      "name": "diced_utils_test"
+    },
+    {
+      "name": "diced_vendor_test"
+    },
+    {
+      "name": "doh_unit_test"
+    },
+    {
+      "name": "keystore2_km_compat_test"
+    },
+    {
+      "name": "keystore2_selinux_concurrency_test"
+    },
+    {
+      "name": "keystore2_selinux_test"
+    },
+    {
+      "name": "keystore2_test"
+    },
+    {
+      "name": "keystore2_test_utils_test"
+    },
+    {
+      "name": "lazy_static_test_tests_test"
+    },
+    {
+      "name": "legacykeystore_test"
+    },
+    {
+      "name": "libapkverify.integration_test"
+    },
+    {
+      "name": "libapkverify.test"
+    },
+    {
+      "name": "logger_device_unit_tests"
+    },
+    {
+      "name": "logger_test_config_log_level"
+    },
+    {
+      "name": "logger_test_default_init"
+    },
+    {
+      "name": "logger_test_env_log_level"
+    },
+    {
+      "name": "logger_test_multiple_init"
+    },
+    {
+      "name": "microdroid_manager_test"
+    },
+    {
+      "name": "virtualizationservice_device_test"
     }
   ]
 }
diff --git a/cargo2android.json b/cargo2android.json
index 929451a..c775247 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,12 +1,21 @@
 {
   "apex-available": [
     "//apex_available:platform",
+    "com.android.bluetooth",
+    "com.android.compos",
     "com.android.resolv",
+    "com.android.uwb",
     "com.android.virt"
   ],
+  "dependency-blocklist": [
+    "doc_comment"
+  ],
   "device": true,
   "min-sdk-version": "29",
-  "patch": "patches/Android.bp.diff",
   "run": true,
-  "tests": true
-}
\ No newline at end of file
+  "test-blocklist": [
+    "tests/no_std.rs"
+  ],
+  "tests": true,
+  "vendor-available": true
+}
diff --git a/patches/Android.bp.diff b/patches/Android.bp.diff
deleted file mode 100644
index e07e725..0000000
--- a/patches/Android.bp.diff
+++ /dev/null
@@ -1,43 +0,0 @@
-diff --git a/Android.bp b/Android.bp
-index 5033c27..843fa1c 100644
---- a/Android.bp
-+++ b/Android.bp
-@@ -45,9 +45,6 @@
-     test_suites: ["general-tests"],
-     auto_gen_config: true,
-     edition: "2015",
--    rustlibs: [
--        "libdoc_comment",
--    ],
- }
- 
- rust_test_host {
-@@ -70,28 +67,10 @@
-     auto_gen_config: true,
-     edition: "2015",
-     rustlibs: [
--        "libdoc_comment",
-         "liblazy_static",
-     ],
- }
- 
--rust_test_host {
--    name: "lazy_static_host_test_tests_no_std",
--    defaults: ["lazy_static_defaults_lazy_static"],
--    // has rustc warnings
--    srcs: ["tests/no_std.rs"],
--    test_options: {
--        unit_test: true,
--    },
--}
--
--rust_test {
--    name: "lazy_static_device_test_tests_no_std",
--    defaults: ["lazy_static_defaults_lazy_static"],
--    // has rustc warnings
--    srcs: ["tests/no_std.rs"],
--}
--
- rust_test_host {
-     name: "lazy_static_host_test_tests_test",
-     defaults: ["lazy_static_defaults_lazy_static"],