#include "lwip/err.h"
#endif
-#ifdef SUPPORT_PHONE_SERVICE
#include "phoneservice/include/PhoneService.h"
#include "phoneservice/include/PhoneServiceC.h"
-#endif
+
#include "vibrator_service.h"
//获取状态[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");
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,
"uapi_close_voice_recognition is failed");
}
-#endif
}
//语音回答界面->主界面