修复哄睡bug
authorxue <2144439972@qq.com>
Wed, 14 Jan 2026 03:50:00 +0000 (11:50 +0800)
committerxue <2144439972@qq.com>
Wed, 14 Jan 2026 03:50:00 +0000 (11:50 +0800)
code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp
code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp
code/sdk/zhihui/leiniao/imsl_ln/ln_api_websocket.c

index bd6ba0d..cfce431 100644 (file)
@@ -2899,6 +2899,7 @@ extern "C" {
            }
            else//意图识别结果
            {
+            ln_http_download_init();
                 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::HandleSleepModeStart: 意图识别结果,跳转到2");
                 //看后续是否需要
                 ln_ws_end_audio_chat();//结束对话
@@ -3439,7 +3440,7 @@ extern "C" {
                     }
                 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "录音结束,跳转到故事界面");
                 // 初始化HTTP下载服务(语音识别故事)
-                ln_http_download_init();
+                //  ln_http_download_init();
                 // 进入哄睡模式时切换为眨眼表情
                 OnEnterLullabyMode();
                 view->ChangeView(currentView, THUNDERBIRD_LULLABYVIEW, ThunderBirdLullabyView::THUNDERBIRD_LULLABYVIEW_4);
index fa2350c..04407db 100644 (file)
@@ -817,7 +817,7 @@ namespace OHOS
                 break;
             case ThunderBirdLullabyView::THUNDERBIRD_LULLABYVIEW_3:
             {
-                ln_http_download_init();
+                // ln_http_download_init();
                 // 进入哄睡模式时切换为眨眼表情
                 do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_AUDIO_INIT_VAD_DISABLE, NULL, 0);
                 ThunderBirdModel::GetInstance()->OnEnterLullabyMode();
index f1cdff3..70b9b6f 100644 (file)
@@ -1804,6 +1804,7 @@ int ln_ws_send_random_story_request(const char *story_theme)
     
     // 只有当HTTP下载服务正确初始化后才添加returnBytes字段
     if (ln_http_download_is_initialized()) {
+        printf("ln_http_download_is_initialized() returnBytes: false\n");
         cJSON_AddBoolToObject(data, "returnBytes", false);
     }