优化对话故事模式进退蓝牙操作 2937/1 2937/head 2938/target/1
authorxue <2144439972@qq.com>
Wed, 17 Dec 2025 07:35:24 +0000 (15:35 +0800)
committerxue <2144439972@qq.com>
Wed, 17 Dec 2025 07:35:24 +0000 (15:35 +0800)
code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp
code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp

index 9c669fe..7514a15 100644 (file)
@@ -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)
index 48eed8d..14500f5 100644 (file)
@@ -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) {