diff --git a/services/gam/src/main.rs b/services/gam/src/main.rs index 78ae18082..424e1a80c 100644 --- a/services/gam/src/main.rs +++ b/services/gam/src/main.rs @@ -585,7 +585,7 @@ fn imef_cb(s: String::<4000>) { #[xous::xous_main] fn xmain() -> ! { log_server::init_wait().unwrap(); - log::set_max_level(log::LevelFilter::Debug); + log::set_max_level(log::LevelFilter::Info); info!("my PID is {}", xous::process::id()); let xns = xous_names::XousNames::new().unwrap(); diff --git a/services/root-keys/locales/i18n.json b/services/root-keys/locales/i18n.json index c2189c3c7..365f24378 100644 --- a/services/root-keys/locales/i18n.json +++ b/services/root-keys/locales/i18n.json @@ -1,10 +1,10 @@ { - "rootpass.top": { + "rootkeys.bootpass": { "en": "Password request\nDevice unlock\nSecurity: Low\nTip: a convenience PIN is OK.", "zh": "输入密码\n解锁\n安全含义:低", "en-audio": "Enter unlock password" }, - "update.top": { + "rootkeys.updatepass": { "en": "Password request\nSoftware update key\nSecurity: Critical\nTip: use a phrase instead of a word.", "zh": "输入密码\n软件更新\n安全含义:至关重要 ", "en-audio": "Enter update password. This password is critically important." diff --git a/services/root-keys/src/main.rs b/services/root-keys/src/main.rs index d67f12e85..89614f903 100644 --- a/services/root-keys/src/main.rs +++ b/services/root-keys/src/main.rs @@ -78,7 +78,7 @@ fn xmain() -> ! { use crate::implementation::RootKeys; log_server::init_wait().unwrap(); - log::set_max_level(log::LevelFilter::Debug); + log::set_max_level(log::LevelFilter::Info); log::info!("my PID is {}", xous::process::id()); let xns = xous_names::XousNames::new().unwrap(); @@ -143,7 +143,7 @@ fn xmain() -> ! { let mut rootkeys_modal = Modal::new( crate::api::ROOTKEY_MODAL_NAME, ActionType::TextEntry(password_action), - Some(t!("rootpass.top", xous::LANG)), + Some(t!("rootkeys.bootpass", xous::LANG)), None, GlyphStyle::Small, 4 @@ -209,12 +209,27 @@ fn xmain() -> ! { }), Some(Opcode::UxInitRequestPassword) => { password_action.set_action_opcode(Opcode::UxInitPasswordReturn.to_u32().unwrap()); - rootkeys_modal.modify( - Some(ActionType::TextEntry(password_action)), - Some(t!("rootpass.top", xous::LANG)), false, - None, true, None - ); - rootkeys_modal.activate(); + if let Some(pwt) = keys.get_ux_password_type() { + match pwt { + PasswordType::Boot => { + rootkeys_modal.modify( + Some(ActionType::TextEntry(password_action)), + Some(t!("rootkeys.bootpass", xous::LANG)), false, + None, true, None + ); + } + PasswordType::Update => { + rootkeys_modal.modify( + Some(ActionType::TextEntry(password_action)), + Some(t!("rootkeys.updatepass", xous::LANG)), false, + None, true, None + ); + } + } + rootkeys_modal.activate(); + } else { + log::error!("init password ux request without a password type requested!"); + } } Some(Opcode::UxInitPasswordReturn) => { // assume: