From: luozheng <1732036298@qq.com> Date: Fri, 1 Aug 2025 04:11:40 +0000 (+0800) Subject: 解决4GAI在聆听中界面按按键退出,录音没有关闭bug X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=d839f1be5e5711c68b7599d7812ffcefda3a3084;p=mirrors%2FFD230.git 解决4GAI在聆听中界面按按键退出,录音没有关闭bug --- 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 bad87f659..ba3329151 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp @@ -1102,6 +1102,8 @@ namespace OHOS void AiVoiceModel::StatusResume(void) { + ClearQuestionAndAiAnswerStr(); + StopListenAndRecordingUserQuestion(); Time = THIRTY_TIME; AiModelConnectTimeout = 5; AiVoiceConnectStatus = false; @@ -1120,8 +1122,6 @@ namespace OHOS AI_BT_state = false; select4gorbt = -1; // init_4gai_task = false;//TOOD:之后需要销毁 - ClearQuestionAndAiAnswerStr(); - StopListenAndRecordingUserQuestion(); } /* -------------------------------------------------------------------------- */ 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 5dd8f20be..c804ef1ea 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp @@ -138,6 +138,7 @@ namespace OHOS dinit_ai_task(); uapi_ble_connect_param_update(BLE_CONNECT_INTERVAL_SLOW); + return; } /*调转到返回结果界面*/