解决4GAI在聆听中界面按按键退出,录音没有关闭bug
authorluozheng <1732036298@qq.com>
Fri, 1 Aug 2025 04:11:40 +0000 (12:11 +0800)
committerluozheng <1732036298@qq.com>
Fri, 1 Aug 2025 04:11:40 +0000 (12:11 +0800)
code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp
code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp

index bad87f6..ba33291 100644 (file)
@@ -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();
     }
 
     /* -------------------------------------------------------------------------- */
index 5dd8f20..c804ef1 100644 (file)
@@ -138,6 +138,7 @@ namespace OHOS
         dinit_ai_task();
 
         uapi_ble_connect_param_update(BLE_CONNECT_INTERVAL_SLOW);
+        return;
     }
 
     /*调转到返回结果界面*/