Cache the KeystoreKeyBackend with a lazy static.
This patch makes KeystoreKeyBackend Sync and uses a lazy static to cache
the back end in the permissions module.
Test: atest keystore2_test
Bug: 159466840
Change-Id: Ibc7851baede3506acbdf962e59c281fa16cfaf0e
diff --git a/keystore2/Android.bp b/keystore2/Android.bp
index a48396a..154b675 100644
--- a/keystore2/Android.bp
+++ b/keystore2/Android.bp
@@ -21,6 +21,7 @@
"libanyhow",
"libkeystore_aidl_generated",
"libkeystore2_selinux",
+ "liblazy_static",
"liblibsqlite3_sys",
"liblog_rust",
"librand",
@@ -40,6 +41,7 @@
"libanyhow",
"libkeystore_aidl_generated",
"libkeystore2_selinux",
+ "liblazy_static",
"liblibsqlite3_sys",
"liblog_rust",
"librusqlite",