Implement onLockScreenEvent method of IKeystoreAuthorization AIDL interface.
In addition, this CL creates a global instance of LegacyBlobLoader.
Bug: 159475191,166672367
Test: TBD
Change-Id: I04005238f973b5eae98a07400688ea17edba80f8
diff --git a/keystore2/src/globals.rs b/keystore2/src/globals.rs
index 3c79eed..7ceff26 100644
--- a/keystore2/src/globals.rs
+++ b/keystore2/src/globals.rs
@@ -20,6 +20,7 @@
use crate::background_task_handler::BackgroundTaskHandler;
use crate::enforcements::Enforcements;
use crate::gc::Gc;
+use crate::legacy_blob::LegacyBlobLoader;
use crate::super_key::SuperKeyManager;
use crate::utils::Asp;
use crate::{
@@ -91,6 +92,10 @@
/// The other modules (e.g. enforcements) communicate with it via a channel initialized during
/// keystore startup.
pub static ref BACKGROUND_TASK_HANDLER: BackgroundTaskHandler = BackgroundTaskHandler::new();
+ /// LegacyBlobLoader is initialized and exists globally.
+ /// The same directory used by the database is used by the LegacyBlobLoader as well.
+ pub static ref LEGACY_BLOB_LOADER: LegacyBlobLoader = LegacyBlobLoader::new(
+ &std::env::current_dir().expect("Could not get the current working directory."));
}
static KEYMINT_SERVICE_NAME: &str = "android.hardware.security.keymint.IKeyMintDevice";