Snap for 8730993 from 5d8ae8bf0fff038c7d7ee0da29247192b6a657c4 to mainline-tzdata3-release

Change-Id: I9881d2d768b3fba760cbe84a348c7a826c61c4cd
diff --git a/Android.bp b/Android.bp
index 5eafb67..21bff56 100644
--- a/Android.bp
+++ b/Android.bp
@@ -37,42 +37,68 @@
     ],
 }
 
-rust_test {
-    name: "lazy_static_test_tests_test",
-    // has rustc warnings
-    host_supported: true,
+rust_defaults {
+    name: "lazy_static_defaults",
     crate_name: "lazy_static",
-    cargo_env_compat: true,
-    cargo_pkg_version: "1.4.0",
-    srcs: ["tests/test.rs"],
+    // has rustc warnings
+    srcs: ["src/lib.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 b9ed59b..c17c99e 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,198 +1,23 @@
 // 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": "authfs_device_test_src_lib"
+      "name": "quiche_device_test_src_lib"
     },
     {
-      "name": "diced_open_dice_cbor_test"
+      "name": "lazy_static_device_test_tests_test"
     },
     {
-      "name": "diced_sample_inputs_test"
+      "name": "libsqlite3-sys_device_test_src_lib"
     },
     {
-      "name": "diced_test"
+      "name": "android_logger_device_test_src_lib"
     },
     {
-      "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"
+      "name": "lazy_static_device_test_src_lib"
     }
   ]
 }
diff --git a/cargo2android.json b/cargo2android.json
index c775247..929451a 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,21 +1,12 @@
 {
   "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,
-  "test-blocklist": [
-    "tests/no_std.rs"
-  ],
-  "tests": true,
-  "vendor-available": true
-}
+  "tests": true
+}
\ No newline at end of file
diff --git a/patches/Android.bp.diff b/patches/Android.bp.diff
new file mode 100644
index 0000000..e07e725
--- /dev/null
+++ b/patches/Android.bp.diff
@@ -0,0 +1,43 @@
+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"],