From: xue <2144439972@qq.com> Date: Wed, 5 Nov 2025 06:24:55 +0000 (+0800) Subject: 优化设备端哄睡流程 X-Git-Tag: V1.0.9_20251128_194606_LN~110^2~1 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=e4f4d24e10a3dc558fde41e724b161315260b4f6;p=mirrors%2FFD230.git 优化设备端哄睡流程 --- diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdLullabyView.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdLullabyView.cpp index b32f14d08..80fcc2a5d 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdLullabyView.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdLullabyView.cpp @@ -254,9 +254,9 @@ namespace OHOS switch (showView) { - listenAnimator->Stop(); case THUNDERBIRD_LULLABYVIEW_1: { + listenAnimator->Stop(); if (TextLabel) { TextLabel->SetPosition(43, 64, 280, 42); @@ -279,6 +279,7 @@ namespace OHOS } case THUNDERBIRD_LULLABYVIEW_2: { + listenAnimator->Stop(); ThunderBirdMainView::GetInstance()->OpenBackGround(); if (TextLabel) { @@ -308,6 +309,7 @@ namespace OHOS } case THUNDERBIRD_LULLABYVIEW_3: { + listenAnimator->Stop(); ln_ws_start_audio_chat(LN_AUDIO_CHAT_CHOOSE_STORY_REQUEST); ThunderBirdMainView::GetInstance()->OpenBackGround(); if (TextLabel) @@ -362,6 +364,7 @@ namespace OHOS } case THUNDERBIRD_LULLABYVIEW_4: { + listenAnimator->Stop(); ThunderBirdModel::GetInstance()->LowFrequence();//减低视频帧率 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdLullabyView::Show: THUNDERBIRD_LULLABYVIEW_4"); @@ -380,11 +383,11 @@ namespace OHOS WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ThunderBirdLullabyView::Show: Stopped AI audio playback"); // 结束音频聊天 - ln_ws_end_audio_chat(); + // ln_ws_end_audio_chat(); - // 强制中断AI - AI_ForceInterrupt(); - ln_ws_send_voice_chat_interrupt("进入故事模式"); + // // 强制中断AI + // AI_ForceInterrupt(); + // ln_ws_send_voice_chat_interrupt("进入故事模式"); // 反初始化音频 // do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_AUDIO_DEINIT, NULL, 0); @@ -393,7 +396,7 @@ namespace OHOS presenter->isDialogueing = false; // 调用退出对话模式 - ThunderBirdModel::GetInstance()->OnExitDialogueMode(); + //ThunderBirdModel::GetInstance()->OnExitDialogueMode(); } //长亮屏 ScreenAlwaysOnCtr(OPEN_SCREEN_ALWAYS_ON); @@ -417,7 +420,8 @@ namespace OHOS break; } case THUNDERBIRD_LULLABYVIEW_5: - { + { + listenAnimator->Stop(); ThunderBirdMainView::GetInstance()->OpenBackGround(); if (TextLabel) { 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 5476a2a44..772c93c39 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 @@ -1935,6 +1935,7 @@ if(currentView != THUNDERBIRD_REMINDERVIEW && currentSubView != ThunderBirdReminderView::THUNDERBIRD_REMINDERVIEW_TASK_REMINDER) { ThunderBirdMainView::GetInstance()->ChangeView(currentView, THUNDERBIRD_REMINDERVIEW, ThunderBirdReminderView::THUNDERBIRD_REMINDERVIEW_TASK_REMINDER); + ThunderBirdReminderView::GetInstance()->IsIcon(false); } @@ -1970,6 +1971,7 @@ if(currentView != THUNDERBIRD_REMINDERVIEW && currentSubView != ThunderBirdReminderView::THUNDERBIRD_REMINDERVIEW_TASK_REMINDER) { ThunderBirdMainView::GetInstance()->ChangeView(currentView, THUNDERBIRD_REMINDERVIEW, ThunderBirdReminderView::THUNDERBIRD_REMINDERVIEW_TASK_REMINDER); + ThunderBirdReminderView::GetInstance()->IsIcon(true); } // 更新任务提醒的文本内容 if (ThunderBirdReminderView::GetInstance()) { @@ -1995,7 +1997,10 @@ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, " eyesColor: %s", eyesColor ? eyesColor : "null"); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, " hairStyle: %s", hairStyle ? hairStyle : "null"); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, " screenImageAsEmoji: %d", screenImageAsEmoji); - + if(hairColor == "warm-orange") + { + hairColor = "orange"; + } if(eyesShape == last_eyesShape_ && hairColor == last_hairColor_ && eyesColor == last_eyesColor_ && hairStyle == last_hairStyle_ && screenImageAsEmoji == last_screenImageAsEmoji_) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::HandleCharacterConfigChange: 角色配置没有变化,不进行处理"); 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 5968f89d1..224b4e3b2 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 @@ -591,6 +591,7 @@ namespace OHOS case ThunderBirdLullabyView::THUNDERBIRD_LULLABYVIEW_3: ThunderBirdMainView::GetInstance()->ChangeView(currentView, THUNDERBIRD_LULLABYVIEW, ThunderBirdLullabyView::THUNDERBIRD_LULLABYVIEW_4); // ln_ws_start_audio_chat(LN_AUDIO_CHAT_CHOOSE_STORY_REQUEST); + ln_ws_audio_init();//功耗优化 ln_ws_send_random_story_request("随机故事"); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HandleLullabyViewNavigation: 随机故事"); break;