Snap for 8192738 from f18fa1fa75f47e4b23b11222e390b42aabf9c88b to tm-frc-extservices-release

Change-Id: I742042f639c70b4cd5f6dfb8357a0cd2f93ab34d
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 0fa03ad..56bc629 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
 {
   "git": {
-    "sha1": "eff71cffcc21f0b6d84a7dc3009cacb9ff16b4ea"
+    "sha1": "1f72ffddf0dbc4e6905d8543d113324d6967e038"
   }
 }
diff --git a/Android.bp b/Android.bp
index 4d1f5e3..9450606 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,5 @@
-// This file is generated by cargo2android.py --run --device --dependencies.
+// This file is generated by cargo2android.py --config cargo2android.json.
+// Do not modify this file as changes will be overridden on upgrade.
 
 package {
     default_applicable_licenses: ["external_rust_crates_instant_license"],
@@ -21,12 +22,17 @@
     name: "libinstant",
     host_supported: true,
     crate_name: "instant",
+    cargo_env_compat: true,
+    cargo_pkg_version: "0.1.10",
     srcs: ["src/lib.rs"],
     edition: "2018",
     rustlibs: [
         "libcfg_if",
     ],
+    apex_available: [
+        "//apex_available:platform",
+        "com.android.bluetooth",
+        "com.android.virt",
+    ],
+    min_sdk_version: "29",
 }
-
-// dependent_library ["feature_list"]
-//   cfg-if-1.0.0
diff --git a/Cargo.toml b/Cargo.toml
index 58dea4e..9e648c8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@
 [package]
 edition = "2018"
 name = "instant"
-version = "0.1.9"
+version = "0.1.10"
 authors = ["sebcrozet <developer@crozet.re>"]
 description = "A partial replacement for std::time::Instant that works on WASM too."
 readme = "README.md"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index f6be57f..7cd1dc4 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
 [package]
 name = "instant"
-version = "0.1.9"
+version = "0.1.10"
 authors = ["sebcrozet <developer@crozet.re>"]
 description = "A partial replacement for std::time::Instant that works on WASM too."
 repository = "https://github.com/sebcrozet/instant"
diff --git a/METADATA b/METADATA
index c8d8100..c22facd 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@
   }
   url {
     type: ARCHIVE
-    value: "https://static.crates.io/crates/instant/instant-0.1.9.crate"
+    value: "https://static.crates.io/crates/instant/instant-0.1.10.crate"
   }
-  version: "0.1.9"
+  version: "0.1.10"
   license_type: NOTICE
   last_upgrade_date {
-    year: 2020
-    month: 11
-    day: 19
+    year: 2021
+    month: 8
+    day: 9
   }
 }
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 7213fe9..83a6c6c 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,8 +1,11 @@
-// Generated by cargo2android.py for tests that depend on this crate.
+// Generated by update_crate_tests.py for tests that depend on this crate.
 {
-  "presubmit": [
+  "imports": [
     {
-      "name": "parking_lot_core_device_test_src_lib"
+      "path": "external/rust/crates/parking_lot_core"
+    },
+    {
+      "path": "external/rust/crates/vulkano"
     }
   ]
 }
diff --git a/cargo2android.json b/cargo2android.json
new file mode 100644
index 0000000..e48e3b8
--- /dev/null
+++ b/cargo2android.json
@@ -0,0 +1,10 @@
+{
+  "apex-available": [
+    "//apex_available:platform",
+    "com.android.bluetooth",
+    "com.android.virt"
+  ],
+  "device": true,
+  "min-sdk-version": "29",
+  "run": true
+}
diff --git a/src/wasm.rs b/src/wasm.rs
index 986bbf6..57ea39c 100644
--- a/src/wasm.rs
+++ b/src/wasm.rs
@@ -128,11 +128,17 @@
 #[cfg(not(any(feature = "wasm-bindgen", feature = "stdweb")))]
 mod js {
     extern "C" {
+        #[cfg(not(target_os = "emscripten"))]
         pub fn now() -> f64;
+        #[cfg(target_os = "emscripten")]
+        pub fn _emscripten_get_now() -> f64;
     }
 }
 // Make the unsafe extern function "safe" so it can be called like the other 'now' functions
 #[cfg(not(any(feature = "wasm-bindgen", feature = "stdweb")))]
 pub fn now() -> f64 {
-    unsafe { js::now() }
+    #[cfg(not(target_os = "emscripten"))]
+    return unsafe { js::now() };
+    #[cfg(target_os = "emscripten")]
+    return unsafe { js::_emscripten_get_now() };
 }