Snap for 8564071 from 55824547eee198424773a34434dd21daa91a06a6 to mainline-conscrypt-release

Change-Id: I69d160f3eb81b1a30008b91f1b845c37062629cf
diff --git a/Android.bp b/Android.bp
index cab84c6..907d6e6 100644
--- a/Android.bp
+++ b/Android.bp
@@ -23,60 +23,39 @@
     // has rustc warnings
     host_supported: true,
     crate_name: "untrusted",
+    cargo_env_compat: true,
+    cargo_pkg_version: "0.7.1",
     srcs: ["src/untrusted.rs"],
     edition: "2018",
     apex_available: [
         "//apex_available:platform",
+        "com.android.compos",
         "com.android.resolv",
+        "com.android.virt",
     ],
     min_sdk_version: "29",
 }
 
-rust_defaults {
-    name: "untrusted_defaults",
-    crate_name: "untrusted",
-    // has rustc warnings
-    srcs: ["src/untrusted.rs"],
-    test_suites: ["general-tests"],
-    auto_gen_config: true,
-    edition: "2018",
-}
-
-rust_test_host {
-    name: "untrusted_host_test_src_untrusted",
-    defaults: ["untrusted_defaults"],
-    test_options: {
-        unit_test: true,
-    },
-}
-
 rust_test {
-    name: "untrusted_device_test_src_untrusted",
-    defaults: ["untrusted_defaults"],
-}
-
-rust_defaults {
-    name: "untrusted_defaults_tests",
-    crate_name: "tests",
+    name: "untrusted_test_tests_tests",
     // has rustc warnings
+    host_supported: true,
+    crate_name: "tests",
+    cargo_env_compat: true,
+    cargo_pkg_version: "0.7.1",
     srcs: ["tests/tests.rs"],
     test_suites: ["general-tests"],
     auto_gen_config: true,
+    test_options: {
+        unit_test: true,
+    },
     edition: "2018",
     rustlibs: [
         "libuntrusted",
     ],
 }
 
-rust_test_host {
-    name: "untrusted_host_test_tests_tests",
-    defaults: ["untrusted_defaults_tests"],
-    test_options: {
-        unit_test: true,
-    },
-}
-
-rust_test {
-    name: "untrusted_device_test_tests_tests",
-    defaults: ["untrusted_defaults_tests"],
-}
+// Errors when listing tests:
+// error: lint `non_autolinks` has been renamed to `rustdoc::bare_urls`
+// error: aborting due to previous error
+// error: test failed, to rerun pass '--doc'
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..ca1b239
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,72 @@
+// Generated by update_crate_tests.py for tests that depend on this crate.
+{
+  "imports": [
+    {
+      "path": "external/rust/crates/quiche"
+    },
+    {
+      "path": "external/rust/crates/ring"
+    },
+    {
+      "path": "external/rust/crates/webpki"
+    }
+  ],
+  "presubmit": [
+    {
+      "name": "apkdmverity.test"
+    },
+    {
+      "name": "authfs_device_test_src_lib"
+    },
+    {
+      "name": "doh_unit_test"
+    },
+    {
+      "name": "libapkverify.integration_test"
+    },
+    {
+      "name": "libapkverify.test"
+    },
+    {
+      "name": "libidsig.test"
+    },
+    {
+      "name": "microdroid_manager_test"
+    },
+    {
+      "name": "untrusted_test_tests_tests"
+    },
+    {
+      "name": "virtualizationservice_device_test"
+    }
+  ],
+  "presubmit-rust": [
+    {
+      "name": "apkdmverity.test"
+    },
+    {
+      "name": "authfs_device_test_src_lib"
+    },
+    {
+      "name": "doh_unit_test"
+    },
+    {
+      "name": "libapkverify.integration_test"
+    },
+    {
+      "name": "libapkverify.test"
+    },
+    {
+      "name": "libidsig.test"
+    },
+    {
+      "name": "microdroid_manager_test"
+    },
+    {
+      "name": "untrusted_test_tests_tests"
+    },
+    {
+      "name": "virtualizationservice_device_test"
+    }
+  ]
+}
diff --git a/cargo2android.json b/cargo2android.json
index 911c36f..506d866 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,7 +1,9 @@
 {
   "apex-available": [
     "//apex_available:platform",
-    "com.android.resolv"
+    "com.android.compos",
+    "com.android.resolv",
+    "com.android.virt"
   ],
   "dependencies": true,
   "device": true,