关闭语音助手的宏
authorCaisking <Casiking@zhihuishixun.com>
Thu, 11 Sep 2025 06:58:54 +0000 (14:58 +0800)
committerCaisking <Casiking@zhihuishixun.com>
Thu, 11 Sep 2025 06:58:54 +0000 (14:58 +0800)
code/sdk/application/wearable/fd230/nativeapp/nativeui/assistant/src/AssistantModel.cpp

index 3b5135c..8cb9908 100644 (file)
 #include "lwip/err.h"
 #endif
 
-#ifdef SUPPORT_PHONE_SERVICE
 #include "phoneservice/include/PhoneService.h"
 #include "phoneservice/include/PhoneServiceC.h"
-#endif
+
 
 #include "vibrator_service.h"
 
@@ -153,32 +152,27 @@ void AssistantModel::Init() {
 
 //获取状态[hfp]
 bool AssistantModel::GetHFPStatus(void) {
-#ifdef SUPPORT_PHONE_SERVICE
   if (uapi_hfp_connect_state()) {
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "uapi_hfp_connect_state is ok");
     return true;
   }
-#endif
   WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "uapi_hfp_connect_state is failed");
   return false;
 }
 //开启语音助手[soc]
 bool AssistantModel::StartAssistant(void) {
-#ifdef SUPPORT_PHONE_SERVICE
   if (uapi_open_voice_recognition() == 0) {
     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "uapi_open_voice_recognition is ok");
     //成功开启语音助手
     uapi_dev_runtime_set_voice_status(1);
     return true;
   }
-#endif
   WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,
                 "uapi_open_voice_recognition is failed");
   return false;
 }
 //关闭语音助手
 void AssistantModel::StopAssistant(void) {
-#ifdef SUPPORT_PHONE_SERVICE
   if (uapi_close_voice_recognition() == 0) {
     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,
                   "uapi_close_voice_recognition is ok");
@@ -186,7 +180,6 @@ void AssistantModel::StopAssistant(void) {
     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,
                   "uapi_close_voice_recognition is failed");
   }
-#endif
 }
 
 //语音回答界面->主界面