From fcfcab437be742cb37edd85e81cbc7a6a444f946 Mon Sep 17 00:00:00 2001 From: xue <2144439972@qq.com> Date: Thu, 27 Nov 2025 14:45:18 +0800 Subject: [PATCH] =?utf8?q?=E5=A2=9E=E5=8A=A0=E7=9D=A1=E7=9C=A0=E6=A0=87?= =?utf8?q?=E5=BF=97=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeui/thunderbird/src/ThunderBirdDialogueView.cpp | 3 ++- .../nativeui/thunderbird/src/ThunderBirdPresenter.cpp | 5 +++-- code/sdk/zhihui/leiniao/imsl_ln/ln_api.h | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdDialogueView.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdDialogueView.cpp index d4367d131..662c15e88 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdDialogueView.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdDialogueView.cpp @@ -2,7 +2,7 @@ #include "thunderbird/include/ThunderBirdModel.h" #include "wearable_log.h" #include - +#include "ln_api.h" namespace OHOS { @@ -230,6 +230,7 @@ namespace OHOS } case THUNDERBIRD_DIALOGUEVIEW_STATUS_SHOW: { + uapi_set_sleep_mode_active(false);//睡眠模式激活标志位 // 从ThunderBirdModel获取当前表情和状态文本 std::string currentStatusText = "发呆中... "; Isband(true); diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp index 9e4bea338..e2aa84515 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp @@ -606,7 +606,7 @@ namespace OHOS //ThunderBirdModel::GetInstance()->OnEnterDialogueMode(); // 开始对话 do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_AUDIO_INIT, NULL, 0); - ln_ws_start_audio_chat(LN_AUDIO_CHAT_VOICE_CHAT_REQUEST); + // ln_ws_start_audio_chat(LN_AUDIO_CHAT_VOICE_CHAT_REQUEST); break; } @@ -684,6 +684,7 @@ namespace OHOS break; case ThunderBirdLullabyView::THUNDERBIRD_LULLABYVIEW_5: ln_ws_end_audio_chat();//结束对话 + uapi_set_sleep_mode_active(false);//睡眠模式激活标志位 do_ln_http_server_send_data(LN_HTTP_SERVICE_CMD_STORY_FINISH, NULL, 0);//确认结束哄睡 // 退出对话模式时恢复表情 AI_ForceInterrupt(); @@ -691,7 +692,7 @@ namespace OHOS do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_AUDIO_DEINIT, NULL, 0); ThunderBirdModel::GetInstance()->HighFrequence();//恢复视频帧率 ScreenAlwaysOnCtr(CANCEL_SCREEN_ALWAYS_ON); // 关闭屏幕常亮 - ThunderBirdModel::GetInstance()->g_sleep_mode_active = false;//睡眠模式激活标志位 + // ThunderBirdModel::GetInstance()->g_sleep_mode_active = false;//睡眠模式激活标志位 ThunderBirdMainView::GetInstance()->ChangeView(currentView, THUNDERBIRD_DIALOGUEVIEW, ThunderBirdDialogueView::THUNDERBIRD_DIALOGUEVIEW_STATUS_SHOW); break; } diff --git a/code/sdk/zhihui/leiniao/imsl_ln/ln_api.h b/code/sdk/zhihui/leiniao/imsl_ln/ln_api.h index 8e7e5553b..5677ccb36 100644 --- a/code/sdk/zhihui/leiniao/imsl_ln/ln_api.h +++ b/code/sdk/zhihui/leiniao/imsl_ln/ln_api.h @@ -335,6 +335,8 @@ void ln_parse_bluetooth_connect(const char *json_str, int json_len); void ln_parse_bluetooth_unbind(const char *json_str, int json_len); /* 发送蓝牙状态上报(使用消息队列方式) */ void ln_send_bluetooth_status_report(const char *bluetooth_status); +/* 设置睡眠模式状态标志位 */ +void uapi_set_sleep_mode_active(bool active); /* 蓝牙连接命令数据结构 */ typedef struct { char user_id[64]; -- 2.17.1