From e481343ae78f9961f1d42752d0227e6850693278 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Thu, 24 Jul 2025 19:01:28 +0800 Subject: [PATCH] =?utf8?q?4GAI=E5=88=87=E6=8D=A2=E7=95=8C=E9=9D=A2?= =?utf8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeui/aivoice/src/AiVoiceModel.cpp | 3 ++- .../nativeui/aivoice/src/AiVoicePresenter.cpp | 16 +++++++++++++--- .../nativeui/aivoice/src/AiVoiceView.cpp | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp index da611ab36..ee4c8c4cb 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp @@ -533,7 +533,7 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "传入的问题为空"); return; } - userQuestionStr = str; + userQuestionStr += str; if (!entryTextViewState) { SendMsgToUIService(UI_AI_JUMP_TO_RESULT_VIEW, 0, nullptr, 0); @@ -997,6 +997,7 @@ namespace OHOS } else if (AiVoiceModel::GetInstance().GetSelect4gorbt() == AI_SELECT_4G) { + LOS_Msleep(20); startAudioCaptureTask(); } #else diff --git a/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp index bbde5aa1a..7bb3fcfeb 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp @@ -147,7 +147,17 @@ namespace OHOS { preHeight = 0; if (model->GetCurView() == AIVOICE_LISTENING_VIEWID || model->GetCurView() == AIVOICE_THINKING_VIEWID) - ChangeViewAndLogicOperator(model->GetCurView(), AIVOICE_RETURN_RESULT_TEXT_VIEWID); + { + if (view_->GetAiVoiceScrollView(AIVOICE_LISTENING_VIEWID) || view_->GetAiVoiceScrollView(AIVOICE_THINKING_VIEWID)) + { + ChangeViewAndLogicOperator(model->GetCurView(), AIVOICE_RETURN_RESULT_TEXT_VIEWID); + } + else + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoicePresenter::JumpToReturnResultTextView fail"); + return false; + } + } } else if (model->GetSelect4gorbt() == AI_SELECT_BT) { @@ -557,8 +567,8 @@ namespace OHOS if (model->GetSelect4gorbt() == AI_SELECT_4G) { uapi_UI_stop_asr(); - usleep(10000); - if (!model->is_need_to_jump_result_view()) //没有数据就跳转到思考中界面 + usleep(10000); + if (!model->is_need_to_jump_result_view()) // 没有数据就跳转到思考中界面 { ChangeViewAndLogicOperator(AIVOICE_LISTENING_VIEWID, AIVOICE_THINKING_VIEWID); } diff --git a/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceView.cpp b/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceView.cpp index c14874408..b48036da6 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceView.cpp @@ -1121,7 +1121,7 @@ namespace OHOS void AiVoiceView::ChangeView(int16_t hideView, int16_t showView) { - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AiVoiceView::ChangeView"); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoiceView::ChangeView hideView:%d, showView:%d", hideView, showView); if (!CheckViewParam(hideView, showView)) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoiceView::CheckViewParam failed."); -- 2.17.1