Upgrade rust/crates/lock_api to 0.4.4 am: 94091c9ae2

Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/lock_api/+/1712770

Change-Id: I1f88b202e84feb571639c5eb205e1851510d2d5a
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index e1a0b04..6ffdcd3 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
 {
   "git": {
-    "sha1": "86969fd7baf94312520e0b5a5f3b0861a0fd411b"
+    "sha1": "0dcf7ce54a4f8ca76367c1bd2eeb48644b416d84"
   }
 }
diff --git a/Android.bp b/Android.bp
index cc03613..74f015c 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,5 @@
 // This file is generated by cargo2android.py --run --device --dependencies --tests.
+// Do not modify this file as changes will be overridden on upgrade.
 
 package {
     default_applicable_licenses: ["external_rust_crates_lock_api_license"],
@@ -62,6 +63,9 @@
 rust_test_host {
     name: "lock_api_host_test_src_lib",
     defaults: ["lock_api_defaults"],
+    test_options: {
+        unit_test: true,
+    },
 }
 
 rust_test {
diff --git a/Cargo.toml b/Cargo.toml
index cdc5b16..213250b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@
 [package]
 edition = "2018"
 name = "lock_api"
-version = "0.4.2"
+version = "0.4.4"
 authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
 description = "Wrappers to create fully-featured Mutex and RwLock types. Compatible with no_std."
 keywords = ["mutex", "rwlock", "lock", "no_std"]
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 9e884a4..55b5c35 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
 [package]
 name = "lock_api"
-version = "0.4.2"
+version = "0.4.4"
 authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
 description = "Wrappers to create fully-featured Mutex and RwLock types. Compatible with no_std."
 license = "Apache-2.0/MIT"
diff --git a/METADATA b/METADATA
index a684451..efad828 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@
   }
   url {
     type: ARCHIVE
-    value: "https://static.crates.io/crates/lock_api/lock_api-0.4.2.crate"
+    value: "https://static.crates.io/crates/lock_api/lock_api-0.4.4.crate"
   }
-  version: "0.4.2"
+  version: "0.4.4"
   license_type: NOTICE
   last_upgrade_date {
-    year: 2020
-    month: 11
-    day: 17
+    year: 2021
+    month: 5
+    day: 19
   }
 }
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 738f5ec..d3f0059 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,4 +1,4 @@
-// Generated by cargo2android.py for tests in Android.bp
+// Generated by update_crate_tests.py for tests that depend on this crate.
 {
   "presubmit": [
     {
diff --git a/src/lib.rs b/src/lib.rs
index d9097a3..6d58135 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -88,7 +88,7 @@
 #![no_std]
 #![warn(missing_docs)]
 #![warn(rust_2018_idioms)]
-#![cfg_attr(feature = "nightly", feature(const_fn))]
+#![cfg_attr(feature = "nightly", feature(const_fn_trait_bound))]
 
 #[macro_use]
 extern crate scopeguard;
diff --git a/src/remutex.rs b/src/remutex.rs
index 09833b0..b49ec6c 100644
--- a/src/remutex.rs
+++ b/src/remutex.rs
@@ -135,6 +135,13 @@
     pub fn is_locked(&self) -> bool {
         self.mutex.is_locked()
     }
+
+    /// Checks whether the mutex is currently held by the current thread.
+    #[inline]
+    pub fn is_owned_by_current_thread(&self) -> bool {
+        let id = self.get_thread_id.nonzero_thread_id().get();
+        self.owner.load(Ordering::Relaxed) == id
+    }
 }
 
 impl<R: RawMutexFair, G: GetThreadId> RawReentrantMutex<R, G> {
@@ -333,6 +340,12 @@
         self.raw.is_locked()
     }
 
+    /// Checks whether the mutex is currently held by the current thread.
+    #[inline]
+    pub fn is_owned_by_current_thread(&self) -> bool {
+        self.raw.is_owned_by_current_thread()
+    }
+
     /// Forcibly unlocks the mutex.
     ///
     /// This is useful when combined with `mem::forget` to hold a lock without