From: xue <2144439972@qq.com> Date: Wed, 17 Dec 2025 07:35:24 +0000 (+0800) Subject: 优化对话故事模式进退蓝牙操作 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F2937%2Fhead;p=mirrors%2FFD230.git 优化对话故事模式进退蓝牙操作 --- diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp index 9c669fe09..7514a1574 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp @@ -897,6 +897,11 @@ namespace OHOS } InvalidateGroup1(false); } + if(showView == THUNDERBIRD_BLUEVIEW && hideView == THUNDERBIRD_LULLABYVIEW) + { + do_ln_http_server_send_data(LN_HTTP_SERVICE_CMD_STORY_FINISH, NULL, 0);//确认结束哄睡 + ThunderBirdModel::GetInstance()->OnExitLullabyMode(); + } if (hideView != MAXVIEW) { if (group[hideView] == nullptr) diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp index 48eed8dd1..14500f5ab 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp @@ -2826,7 +2826,21 @@ extern "C" { //亮屏 uapi_set_screen_on_api(); int currentView = ThunderBirdMainView::GetInstance()->GetCurrentView(); //获取当前视图 - + //如果在对话界面,则停止对话 + if(currentView == THUNDERBIRD_DIALOGUEVIEW) + { + ln_ws_end_audio_chat();//结束对话 + AI_ForceInterrupt(); + ln_ws_send_voice_chat_interrupt("退出对话"); + do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_AUDIO_DEINIT, NULL, 0); + } + //如果在哄睡界面,则停止哄睡 + if(currentView == THUNDERBIRD_LULLABYVIEW) + { + do_ln_http_server_send_data(LN_HTTP_SERVICE_CMD_STORY_FINISH, NULL, 0);//确认结束哄睡 + // 退出哄睡模式时恢复时间线表情 + ThunderBirdModel::GetInstance()->OnExitLullabyMode(); + } // 检查是否有已绑定的设备 BluetoothModel* btModel = BluetoothModel::GetInstance(); if (btModel != nullptr) {