Snap for 8730993 from 8d895366089df6377d66967371f86ece5197c720 to mainline-tzdata3-release

Change-Id: I7d15a5d18ffa89657e730579b7f54e50be096e3c
diff --git a/Android.bp b/Android.bp
index 752ec2e..b8d90c9 100644
--- a/Android.bp
+++ b/Android.bp
@@ -37,55 +37,63 @@
     ],
 }
 
-rust_test {
-    name: "cfg-if_test_src_lib",
-    host_supported: true,
+rust_defaults {
+    name: "cfg-if_defaults",
     crate_name: "cfg_if",
-    cargo_env_compat: true,
-    cargo_pkg_version: "1.0.0",
     srcs: ["src/lib.rs"],
     test_suites: ["general-tests"],
     auto_gen_config: true,
-    test_options: {
-        unit_test: true,
-    },
     edition: "2018",
 }
 
-rust_test {
-    name: "cfg-if_test_tests_xcrate",
-    host_supported: true,
-    crate_name: "xcrate",
-    cargo_env_compat: true,
-    cargo_pkg_version: "1.0.0",
-    srcs: ["tests/xcrate.rs"],
-    test_suites: ["general-tests"],
-    auto_gen_config: true,
+rust_test_host {
+    name: "cfg-if_host_test_src_lib",
+    defaults: ["cfg-if_defaults"],
     test_options: {
         unit_test: true,
     },
+}
+
+rust_test {
+    name: "cfg-if_device_test_src_lib",
+    defaults: ["cfg-if_defaults"],
+}
+
+rust_defaults {
+    name: "cfg-if_defaults_xcrate",
+    crate_name: "xcrate",
+    srcs: ["tests/xcrate.rs"],
+    test_suites: ["general-tests"],
+    auto_gen_config: true,
     edition: "2018",
     rustlibs: [
         "libcfg_if",
     ],
 }
 
+rust_test_host {
+    name: "cfg-if_host_test_tests_xcrate",
+    defaults: ["cfg-if_defaults_xcrate"],
+    test_options: {
+        unit_test: true,
+    },
+}
+
+rust_test {
+    name: "cfg-if_device_test_tests_xcrate",
+    defaults: ["cfg-if_defaults_xcrate"],
+}
+
 rust_library {
     name: "libcfg_if",
     host_supported: true,
     crate_name: "cfg_if",
-    cargo_env_compat: true,
-    cargo_pkg_version: "1.0.0",
     srcs: ["src/lib.rs"],
     edition: "2018",
     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 da760e2..40be7a2 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,267 +1,29 @@
-// Generated by update_crate_tests.py for tests that depend on this crate.
+// Generated by cargo2android.py for tests in Android.bp
 {
-  "imports": [
-    {
-      "path": "external/rust/crates/android_logger"
-    },
-    {
-      "path": "external/rust/crates/ash"
-    },
-    {
-      "path": "external/rust/crates/base64"
-    },
-    {
-      "path": "external/rust/crates/cast"
-    },
-    {
-      "path": "external/rust/crates/crc32fast"
-    },
-    {
-      "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/env_logger"
-    },
-    {
-      "path": "external/rust/crates/futures-util"
-    },
-    {
-      "path": "external/rust/crates/gdbstub_arch"
-    },
-    {
-      "path": "external/rust/crates/getrandom"
-    },
-    {
-      "path": "external/rust/crates/jni"
-    },
-    {
-      "path": "external/rust/crates/libsqlite3-sys"
-    },
-    {
-      "path": "external/rust/crates/mio"
-    },
-    {
-      "path": "external/rust/crates/once_cell"
-    },
-    {
-      "path": "external/rust/crates/parking_lot_core"
-    },
-    {
-      "path": "external/rust/crates/quiche"
-    },
-    {
-      "path": "external/rust/crates/quickcheck"
-    },
-    {
-      "path": "external/rust/crates/rand_chacha"
-    },
-    {
-      "path": "external/rust/crates/rand_core"
-    },
-    {
-      "path": "external/rust/crates/rand_xorshift"
-    },
-    {
-      "path": "external/rust/crates/regex"
-    },
-    {
-      "path": "external/rust/crates/ryu"
-    },
-    {
-      "path": "external/rust/crates/serde-xml-rs"
-    },
-    {
-      "path": "external/rust/crates/tinytemplate"
-    },
-    {
-      "path": "external/rust/crates/tinyvec"
-    },
-    {
-      "path": "external/rust/crates/tokio"
-    },
-    {
-      "path": "external/rust/crates/tokio-test"
-    },
-    {
-      "path": "external/rust/crates/unicode-xid"
-    },
-    {
-      "path": "external/rust/crates/vulkano"
-    }
-  ],
   "presubmit": [
     {
-      "name": "ZipFuseTest"
+      "name": "cfg-if_device_test_src_lib"
     },
     {
-      "name": "apkdmverity.test"
+      "name": "cfg-if_device_test_tests_xcrate"
     },
     {
-      "name": "authfs_device_test_src_lib"
+      "name": "env_logger_device_test_src_lib"
     },
     {
-      "name": "cfg-if_test_src_lib"
+      "name": "rand_core_device_test_src_lib"
     },
     {
-      "name": "cfg-if_test_tests_xcrate"
+      "name": "getrandom_device_test_src_lib"
     },
     {
-      "name": "diced_open_dice_cbor_test"
+      "name": "android_logger_device_test_src_lib"
     },
     {
-      "name": "diced_sample_inputs_test"
+      "name": "parking_lot_core_device_test_src_lib"
     },
     {
-      "name": "diced_test"
-    },
-    {
-      "name": "diced_utils_test"
-    },
-    {
-      "name": "diced_vendor_test"
-    },
-    {
-      "name": "doh_unit_test"
-    },
-    {
-      "name": "keystore2_crypto_test_rust"
-    },
-    {
-      "name": "keystore2_selinux_concurrency_test"
-    },
-    {
-      "name": "keystore2_selinux_test"
-    },
-    {
-      "name": "keystore2_test"
-    },
-    {
-      "name": "keystore2_test_utils_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": "rustBinderTest"
-    },
-    {
-      "name": "virtualizationservice_device_test"
-    }
-  ],
-  "presubmit-rust": [
-    {
-      "name": "ZipFuseTest"
-    },
-    {
-      "name": "apkdmverity.test"
-    },
-    {
-      "name": "authfs_device_test_src_lib"
-    },
-    {
-      "name": "cfg-if_test_src_lib"
-    },
-    {
-      "name": "cfg-if_test_tests_xcrate"
-    },
-    {
-      "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_crypto_test_rust"
-    },
-    {
-      "name": "keystore2_selinux_concurrency_test"
-    },
-    {
-      "name": "keystore2_selinux_test"
-    },
-    {
-      "name": "keystore2_test"
-    },
-    {
-      "name": "keystore2_test_utils_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": "rustBinderTest"
-    },
-    {
-      "name": "virtualizationservice_device_test"
+      "name": "libsqlite3-sys_device_test_src_lib"
     }
   ]
 }
diff --git a/cargo2android.json b/cargo2android.json
index 19c5df8..5412b5b 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,16 +1,12 @@
 {
   "apex-available": [
     "//apex_available:platform",
-    "com.android.bluetooth",
-    "com.android.compos",
     "com.android.resolv",
-    "com.android.uwb",
     "com.android.virt"
   ],
   "dependencies": true,
   "device": true,
   "min-sdk-version": "29",
   "run": true,
-  "tests": true,
-  "vendor-available": true
-}
+  "tests": true
+}
\ No newline at end of file
diff --git a/src/lib.rs b/src/lib.rs
index 485e1a7..41fe587 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -29,7 +29,6 @@
 #![cfg_attr(test, deny(warnings))]
 
 // ANDROID: Use std to allow building as a dylib.
-#[cfg(android_dylib)]
 extern crate std;
 
 /// The main macro provided by this crate. See crate documentation for more