From: Caisking <3449750381@qq.com> Date: Thu, 22 Aug 2024 08:54:49 +0000 (+0800) Subject: 同步屏蔽按键进入AI X-Git-Tag: release_V1.2.70_20241020_135402~606^2~8 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=0c726815f7612aae13d7b02930a05cf3b7fe38bb;p=mirrors%2FFD230.git 同步屏蔽按键进入AI --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownModel.cpp index d2f7fb326..904818bd9 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownModel.cpp @@ -231,6 +231,16 @@ namespace OHOS if (display_api->get_screen_state() == SCREEN_ON) { uint16_t curSliceId = NativeAbility::GetInstance().GetCurSliceId(); + /*处于主界面 或者密码锁界面*/ + if (curSliceId == VIEW_MAIN || curSliceId == VIEW_CODED_LOCK) + { + /*被锁*/ + if (uapi_dev_runtime_get_lock_status()) + { + NativeAbility::GetInstance().EnterSlice(VIEW_CODED_LOCK); + return; + } + } if (curSliceId == VIEW_AI_VOICE) // 如果当前已在ai语音界面不做切换 { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "VIEW_AI_VOICE is not switched"); @@ -289,6 +299,16 @@ namespace OHOS if (display_api->get_screen_state() == SCREEN_ON) { uint16_t curSliceId = NativeAbility::GetInstance().GetCurSliceId(); + /*处于主界面 或者密码锁界面*/ + if (curSliceId == VIEW_MAIN || curSliceId == VIEW_CODED_LOCK) + { + /*被锁*/ + if (uapi_dev_runtime_get_lock_status()) + { + NativeAbility::GetInstance().EnterSlice(VIEW_CODED_LOCK); + return; + } + } if (curSliceId == VIEW_AI_VOICE) // 如果当前已在ai语音界面单击切换模型 { AiVoiceModel::GetInstance().FunctionKeyOnClickToChangeAIModel(); @@ -348,6 +368,16 @@ namespace OHOS if (display_api->get_screen_state() == SCREEN_ON) { uint16_t curSliceId = NativeAbility::GetInstance().GetCurSliceId(); + /*处于主界面 或者密码锁界面*/ + if (curSliceId == VIEW_MAIN || curSliceId == VIEW_CODED_LOCK) + { + /*被锁*/ + if (uapi_dev_runtime_get_lock_status()) + { + NativeAbility::GetInstance().EnterSlice(VIEW_CODED_LOCK); + return; + } + } if (curSliceId != VIEW_AI_VOICE) { NativeAbility::GetInstance().EnterSlice(VIEW_AI_VOICE);