Snap for 8191477 from 15236643ed9d4590fd131a00b7582edfbcbffd7b to tm-frc-scheduling-release

Change-Id: I0d40d9059f555316e8b160925df1a13856004f28
diff --git a/Android.bp b/Android.bp
index 846786d..7013de3 100644
--- a/Android.bp
+++ b/Android.bp
@@ -41,10 +41,13 @@
     name: "libpin_utils",
     host_supported: true,
     crate_name: "pin_utils",
+    cargo_env_compat: true,
+    cargo_pkg_version: "0.1.0",
     srcs: ["src/lib.rs"],
     edition: "2018",
     apex_available: [
         "//apex_available:platform",
+        "com.android.bluetooth",
         "com.android.resolv",
         "com.android.virt",
     ],
@@ -52,30 +55,10 @@
 }
 
 rust_defaults {
-    name: "pin-utils_defaults",
+    name: "pin-utils_test_defaults",
     crate_name: "pin_utils",
-    srcs: ["src/lib.rs"],
-    test_suites: ["general-tests"],
-    auto_gen_config: true,
-    edition: "2018",
-}
-
-rust_test_host {
-    name: "pin-utils_host_test_src_lib",
-    defaults: ["pin-utils_defaults"],
-    test_options: {
-        unit_test: true,
-    },
-}
-
-rust_test {
-    name: "pin-utils_device_test_src_lib",
-    defaults: ["pin-utils_defaults"],
-}
-
-rust_defaults {
-    name: "pin-utils_defaults_pin_utils",
-    crate_name: "pin_utils",
+    cargo_env_compat: true,
+    cargo_pkg_version: "0.1.0",
     test_suites: ["general-tests"],
     auto_gen_config: true,
     edition: "2018",
@@ -84,9 +67,10 @@
     ],
 }
 
-rust_test_host {
-    name: "pin-utils_host_test_tests_projection",
-    defaults: ["pin-utils_defaults_pin_utils"],
+rust_test {
+    name: "pin-utils_test_tests_projection",
+    defaults: ["pin-utils_test_defaults"],
+    host_supported: true,
     srcs: ["tests/projection.rs"],
     test_options: {
         unit_test: true,
@@ -94,22 +78,11 @@
 }
 
 rust_test {
-    name: "pin-utils_device_test_tests_projection",
-    defaults: ["pin-utils_defaults_pin_utils"],
-    srcs: ["tests/projection.rs"],
-}
-
-rust_test_host {
-    name: "pin-utils_host_test_tests_stack_pin",
-    defaults: ["pin-utils_defaults_pin_utils"],
+    name: "pin-utils_test_tests_stack_pin",
+    defaults: ["pin-utils_test_defaults"],
+    host_supported: true,
     srcs: ["tests/stack_pin.rs"],
     test_options: {
         unit_test: true,
     },
 }
-
-rust_test {
-    name: "pin-utils_device_test_tests_stack_pin",
-    defaults: ["pin-utils_defaults_pin_utils"],
-    srcs: ["tests/stack_pin.rs"],
-}
diff --git a/TEST_MAPPING b/TEST_MAPPING
index c19c652..e517942 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,17 +1,57 @@
-// Generated by cargo2android.py for tests in Android.bp
+// Generated by update_crate_tests.py for tests that depend on this crate.
 {
+  "imports": [
+    {
+      "path": "external/rust/crates/anyhow"
+    },
+    {
+      "path": "external/rust/crates/futures-util"
+    },
+    {
+      "path": "external/rust/crates/tokio"
+    },
+    {
+      "path": "external/rust/crates/tokio-test"
+    }
+  ],
   "presubmit": [
     {
-      "name": "pin-utils_device_test_src_lib"
+      "name": "ZipFuseTest"
     },
     {
-      "name": "pin-utils_device_test_tests_projection"
+      "name": "authfs_device_test_src_lib"
     },
     {
-      "name": "pin-utils_device_test_tests_stack_pin"
+      "name": "doh_unit_test"
     },
     {
-      "name": "futures-util_device_test_src_lib"
+      "name": "pin-utils_test_tests_projection"
+    },
+    {
+      "name": "pin-utils_test_tests_stack_pin"
+    },
+    {
+      "name": "virtualizationservice_device_test"
+    }
+  ],
+  "presubmit-rust": [
+    {
+      "name": "ZipFuseTest"
+    },
+    {
+      "name": "authfs_device_test_src_lib"
+    },
+    {
+      "name": "doh_unit_test"
+    },
+    {
+      "name": "pin-utils_test_tests_projection"
+    },
+    {
+      "name": "pin-utils_test_tests_stack_pin"
+    },
+    {
+      "name": "virtualizationservice_device_test"
     }
   ]
 }
diff --git a/cargo2android.json b/cargo2android.json
index 44e747c..5b266a6 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,12 +1,13 @@
 {
   "apex-available": [
     "//apex_available:platform",
+    "com.android.bluetooth",
     "com.android.resolv",
     "com.android.virt"
   ],
-  "min_sdk_version": "29",
   "dependencies": true,
   "device": true,
+  "min-sdk-version": "29",
   "run": true,
   "tests": true
-}
\ No newline at end of file
+}