修改UI使用接口 1900/1 1900/head 1901/target/1
authorhcj <1224667075@qq.com>
Sat, 28 Jun 2025 09:39:29 +0000 (17:39 +0800)
committerhcj <1224667075@qq.com>
Sat, 28 Jun 2025 09:39:29 +0000 (17:39 +0800)
code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp

index cca2e54..0c67ae1 100644 (file)
@@ -174,7 +174,7 @@ namespace OHOS
                 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GetSelect4gorbt() == AI_SELECT_4G");
                 if (GetInit_4gai_task())
                 {
-                    uapi_start_asr();
+                    uapi_UI_start_asr();
                 }
                 else
                 {
@@ -677,7 +677,10 @@ namespace OHOS
         if (GetSelect4gorbt() == AI_SELECT_4G) // 选的是4G需要关闭asr
         {
             // uapi_stop_asr();
-            stop_AudioCaptureProcess_AI();
+            // stop_AudioCaptureProcess_AI();
+            uapi_UI_stop_asr();
+            
+
         }
         else if (GetSelect4gorbt() == AI_SELECT_BT)
         {
@@ -1158,7 +1161,7 @@ namespace OHOS
                     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "4gAi服务初始化成功");
                     bool state = true;
                     SendMsgToUIService(UI_4G_AI_INIT_STAUS, 0, &state, sizeof(bool));
-                    uapi_start_asr();
+                    uapi_UI_start_asr();
                     AiVoiceModel::GetInstance().stop_ai4g_connect_timer();
                     p_AiVoicePresenter->ChangeViewAndLogicOperator(AIVOICE_4GSERVICECON_VIEW, AIVOICE_AIMODE_CONNECTING);
                 }
@@ -1212,7 +1215,7 @@ namespace OHOS
         // 检查定时器是否存在
         if (g_ai4g_is_suc_connected_Handle != nullptr)
         {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoiceModel::stop_ai4g_connect_timer");
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoiceModel::stop_ai_isready_timer");
             osTimerStop(g_ai4g_is_suc_connected_Handle);
             // 删除定时器并置为 nullptr
             osStatus_t ret = osTimerDelete(g_ai4g_is_suc_connected_Handle);
@@ -1256,7 +1259,7 @@ namespace OHOS
     void AiVoiceModel::start_ai4g_tts_play_timer(uint32_t interval)
     {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoiceModel::start_ai_isready_timer");
-        AI4G_IS_START_TTS_PLAY_TIME = 1;
+        AI4G_IS_START_TTS_PLAY_TIME = 3;
         /* -------------------------- 1.检查定时器是否已经存在,如果存在则返回 ------------------------- */
         if (g_ai4g_is_start_tts_play_Handle != nullptr)
         {
@@ -1294,7 +1297,7 @@ namespace OHOS
         // 检查定时器是否存在
         if (g_ai4g_is_start_tts_play_Handle != nullptr)
         {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoiceModel::stop_ai4g_tts_play_timer");
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoiceModel::stop_ai_isready_timer");
             osTimerStop(g_ai4g_is_start_tts_play_Handle);
             // 删除定时器并置为 nullptr
             osStatus_t ret = osTimerDelete(g_ai4g_is_start_tts_play_Handle);