From: luozheng <1732036298@qq.com> Date: Sat, 24 May 2025 08:16:26 +0000 (+0800) Subject: AI界面添加deepseek和九天多国语言,打开恢复出厂设置接口 X-Git-Tag: leiniao_debug_1.0.0_20250922_020716~281 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=8779fccc7dda623242055ce080f359dce0009d4e;p=mirrors%2FFD230.git AI界面添加deepseek和九天多国语言,打开恢复出厂设置接口 --- diff --git a/code/sdk/application/brandy/brandy_standard/thread_pri_init.c b/code/sdk/application/brandy/brandy_standard/thread_pri_init.c index c64cc04c6..770e095ef 100644 --- a/code/sdk/application/brandy/brandy_standard/thread_pri_init.c +++ b/code/sdk/application/brandy/brandy_standard/thread_pri_init.c @@ -504,10 +504,10 @@ static void thread_main(const void *unused) #endif -// #ifdef CUSTOM_UTILS -// uapi_custom_cmd_service_init(); -// uapi_custom_fileoperate_service_init(); -// #endif +#ifdef CUSTOM_UTILS + uapi_custom_cmd_service_init(); + // uapi_custom_fileoperate_service_init(); +#endif #ifdef SUPPORT_CAT1_SERVICE diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoiceBluetoothFailedStartView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoiceBluetoothFailedStartView.cpp index 37c2407ba..1094f3238 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoiceBluetoothFailedStartView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoiceBluetoothFailedStartView.cpp @@ -90,22 +90,7 @@ namespace OHOS label->SetPosition(labelconfig.left, labelconfig.top, labelconfig.width, labelconfig.height); label->SetStyle(STYLE_TEXT_FONT, labelconfig.fontSize); label->SetStyle(STYLE_LINE_HEIGHT, labelconfig.lineHeigh); - //TOOD: 待优化 - if(labelconfig.textId == STR_DEEPSEEK) { - label->SetText("DeepSeek"); - }else if(labelconfig.textId == STR_AIMODES_LINGXI) { - int language = ConfigModel::GetInstance()->GetLanguage(); - if (language == 0) // 如果当前系统为中文 - { - label->SetText("九天大模型"); - } - else - { - label->SetText("jiutian"); - } - } else{ - label->SetTextId(labelconfig.textId); - } + label->SetTextId(labelconfig.textId); label->SetLineBreakMode(labelconfig.lineBreakMode); label->SetRollSpeed(23); label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); @@ -290,22 +275,7 @@ namespace OHOS { if (title) { - if(textId == STR_DEEPSEEK) { - title->SetText("DeepSeek"); - }else if(textId == STR_AIMODES_LINGXI) { - int language = ConfigModel::GetInstance()->GetLanguage(); - if (language == 0) // 如果当前系统为中文 - { - title->SetText("九天大模型"); - } - else - { - title->SetText("jiutian"); - } - } else{ - title->SetTextId(textId); - } - + title->SetTextId(textId); title->ForceResetText(); } } diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoiceView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoiceView.cpp index e5922c9d1..5ee1d2840 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoiceView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoiceView.cpp @@ -154,22 +154,7 @@ namespace OHOS label->SetPosition(labelconfig.left, labelconfig.top, labelconfig.width, labelconfig.height); label->SetStyle(STYLE_TEXT_FONT, labelconfig.fontSize); label->SetStyle(STYLE_LINE_HEIGHT, labelconfig.lineHeigh); - //TOOD: 待优化 - if(labelconfig.textId == STR_DEEPSEEK) { - label->SetText("DeepSeek"); - }else if(labelconfig.textId == STR_AIMODES_LINGXI) { - int language = ConfigModel::GetInstance()->GetLanguage(); - if (language == 0) // 如果当前系统为中文 - { - label->SetText("九天大模型"); - } - else - { - label->SetText("jiutian"); - } - } else{ - label->SetTextId(labelconfig.textId); - } + label->SetTextId(labelconfig.textId); label->SetLineBreakMode(labelconfig.lineBreakMode); label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); label->SetRollSpeed(23); @@ -915,22 +900,7 @@ namespace OHOS int textId = AiVoiceModel::GetInstance().GetAiModelTextId(); if (title) { - if(textId == STR_DEEPSEEK) { - title->SetText("DeepSeek"); - }else if(textId == STR_AIMODES_LINGXI) { - int language = ConfigModel::GetInstance()->GetLanguage(); - if (language == 0) // 如果当前系统为中文 - { - title->SetText("九天大模型"); - } - else - { - title->SetText("jiutian"); - } - } else{ - title->SetTextId(textId); - } - + title->SetTextId(textId); title->ForceResetText(); } if (aiModelImage) diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AivoiceConnectTimeoutView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AivoiceConnectTimeoutView.cpp index 517752f38..fab01ccb9 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AivoiceConnectTimeoutView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AivoiceConnectTimeoutView.cpp @@ -82,22 +82,7 @@ namespace OHOS label->SetPosition(labelconfig.left, labelconfig.top, labelconfig.width, labelconfig.height); label->SetStyle(STYLE_TEXT_FONT, labelconfig.fontSize); label->SetStyle(STYLE_LINE_HEIGHT, labelconfig.lineHeigh); - //TOOD: 待优化 - if(labelconfig.textId == STR_DEEPSEEK) { - label->SetText("DeepSeek"); - }else if(labelconfig.textId == STR_AIMODES_LINGXI) { - int language = ConfigModel::GetInstance()->GetLanguage(); - if (language == 0) // 如果当前系统为中文 - { - label->SetText("九天大模型"); - } - else - { - label->SetText("jiutian"); - } - } else{ - label->SetTextId(labelconfig.textId); - } + label->SetTextId(labelconfig.textId); label->SetLineBreakMode(labelconfig.lineBreakMode); label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelconfig.fontSize); @@ -281,22 +266,7 @@ namespace OHOS { if (title) { - if(textId == STR_DEEPSEEK) { - title->SetText("DeepSeek"); - }else if(textId == STR_AIMODES_LINGXI) { - int language = ConfigModel::GetInstance()->GetLanguage(); - if (language == 0) // 如果当前系统为中文 - { - title->SetText("九天大模型"); - } - else - { - title->SetText("jiutian"); - } - } else{ - title->SetTextId(textId); - } - + title->SetTextId(textId); title->ForceResetText(); } } diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AivoiceMobileDataFailedStartView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AivoiceMobileDataFailedStartView.cpp index 4f9646455..01423d8eb 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AivoiceMobileDataFailedStartView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AivoiceMobileDataFailedStartView.cpp @@ -90,22 +90,7 @@ namespace OHOS label->SetPosition(labelconfig.left, labelconfig.top, labelconfig.width, labelconfig.height); label->SetStyle(STYLE_TEXT_FONT, labelconfig.fontSize); label->SetStyle(STYLE_LINE_HEIGHT, labelconfig.lineHeigh); - //TOOD: 待优化 - if(labelconfig.textId == STR_DEEPSEEK) { - label->SetText("DeepSeek"); - }else if(labelconfig.textId == STR_AIMODES_LINGXI) { - int language = ConfigModel::GetInstance()->GetLanguage(); - if (language == 0) // 如果当前系统为中文 - { - label->SetText("九天大模型"); - } - else - { - label->SetText("jiutian"); - } - } else{ - label->SetTextId(labelconfig.textId); - } + label->SetTextId(labelconfig.textId); label->SetLineBreakMode(labelconfig.lineBreakMode); label->SetRollSpeed(23); label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); @@ -291,22 +276,7 @@ namespace OHOS { if (title) { - if(textId == STR_DEEPSEEK) { - title->SetText("DeepSeek"); - }else if(textId == STR_AIMODES_LINGXI) { - int language = ConfigModel::GetInstance()->GetLanguage(); - if (language == 0) // 如果当前系统为中文 - { - title->SetText("九天大模型"); - } - else - { - title->SetText("jiutian"); - } - } else{ - title->SetTextId(textId); - } - + title->SetTextId(textId); title->ForceResetText(); } } diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AivoiceReturnResultTextView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AivoiceReturnResultTextView.cpp index 1e0b85d3a..e81a42d23 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AivoiceReturnResultTextView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AivoiceReturnResultTextView.cpp @@ -126,22 +126,7 @@ namespace OHOS label->SetPosition(labelconfig.left, labelconfig.top, labelconfig.width, labelconfig.height); label->SetStyle(STYLE_TEXT_FONT, labelconfig.fontSize); label->SetStyle(STYLE_LINE_HEIGHT, labelconfig.lineHeight); - //TOOD: 待优化 - if(labelconfig.textId == STR_DEEPSEEK) { - label->SetText("DeepSeek"); - }else if(labelconfig.textId == STR_AIMODES_LINGXI) { - int language = ConfigModel::GetInstance()->GetLanguage(); - if (language == 0) // 如果当前系统为中文 - { - label->SetText("九天大模型"); - } - else - { - label->SetText("jiutian"); - } - } else{ - label->SetTextId(labelconfig.textId); - } + label->SetTextId(labelconfig.textId); label->SetLineBreakMode(labelconfig.lineBreakMode); label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelconfig.fontSize); @@ -364,22 +349,7 @@ namespace OHOS { if (title) { - if(textId == STR_DEEPSEEK) { - title->SetText("DeepSeek"); - }else if(textId == STR_AIMODES_LINGXI) { - int language = ConfigModel::GetInstance()->GetLanguage(); - if (language == 0) // 如果当前系统为中文 - { - title->SetText("九天大模型"); - } - else - { - title->SetText("jiutian"); - } - } else{ - title->SetTextId(textId); - } - + title->SetTextId(textId); title->ForceResetText(); } } diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp index eeaf2237a..a2216b6f4 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp @@ -516,12 +516,16 @@ extern "C" if ((curTime->tm_hour == wake_time_hour && curTime->tm_min == wake_time_min && curTime->tm_sec == 0) || (curTime->tm_hour == sleep_time_hour && curTime->tm_min == sleep_time_min && curTime->tm_sec == 0) && curTime->tm_min) { + #ifdef CUSTOM_UTILS uapi_cywee_time_sync(); + #endif } else if (!time_sync_flag && curTime->tm_min) { time_sync_flag = 1; + #ifdef CUSTOM_UTILS uapi_cywee_time_sync(); + #endif } // 退出睡眠检测模式并进入小睡检测模式 if (!is_time_range(*curTime, sleep_time_hour, sleep_time_min, wake_time_hour, wake_time_min) && (uapi_dev_runtime_get_nap_monitoring_status() == 0)) diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/include/SystemPresenter.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/include/SystemPresenter.h index 61fa32687..63c3ef8d1 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/include/SystemPresenter.h +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/include/SystemPresenter.h @@ -37,9 +37,6 @@ namespace OHOS virtual ~SystemPresenter(); void OnStart() override; - void OnPause() override; - void OnResume() override; - void OnStop() override; static SystemPresenter *GetInstance(); diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/SystemPresenter.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/SystemPresenter.cpp index aaf1c2c51..72a45da85 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/SystemPresenter.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/SystemPresenter.cpp @@ -47,28 +47,7 @@ namespace OHOS return g_pSystemPresenter; } - void SystemPresenter::OnStart() - { - - Presenter::OnStart(); - } - - void SystemPresenter::OnPause(void) - { - Presenter::OnPause(); - } - - void SystemPresenter::OnResume(void) - { - - Presenter::OnResume(); - } - - void SystemPresenter::OnStop(void) - { - - Presenter::OnStop(); - } + void SystemPresenter::OnStart(){} static uint32_t time = 0; static uint32_t OnClick_num = 0; diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/uiservice/src/ui_service.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/uiservice/src/ui_service.cpp index 24d03ec55..96dab4ba5 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/uiservice/src/ui_service.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/uiservice/src/ui_service.cpp @@ -664,16 +664,15 @@ void HandleUpdateDialState(Request *request) void HandleUpdatelcdMode(int type) { WEARABLE_LOGI(WEARABLE_LOG_MODULE_UI_SERVICE, "HandleUpdateSilentMode"); - GraphicService::GetInstance()->PostGraphicEvent( - std::bind(&OHOS::testModel::testModelupdata, OHOS::testModel::GetInstance(), type)); + // GraphicService::GetInstance()->PostGraphicEvent( + // std::bind(&OHOS::testModel::testModelupdata, OHOS::testModel::GetInstance(), type)); } static void HandleUpdateAlarmInfo(Request *request) { - #ifdef fd230_650 + WEARABLE_LOGI(WEARABLE_LOG_MODULE_UI_SERVICE, "HandleUpdateAlarmInfo"); GraphicService::GetInstance()->PostGraphicEvent( std::bind(&OHOS::AlarmClockModel::UpdateAlarmInfoByAppSet, OHOS::AlarmClockModel::GetInstance())); - #endif } static void HandleUpdateGoalInfo(Request *request) diff --git a/code/sdk/build/config/target_config/brandy/config.py b/code/sdk/build/config/target_config/brandy/config.py index e6aa1ce87..6e9e5e06a 100644 --- a/code/sdk/build/config/target_config/brandy/config.py +++ b/code/sdk/build/config/target_config/brandy/config.py @@ -337,7 +337,7 @@ target = { 'BOARD_FD230', 'FT_SINGLE_UART', 'CONFIG_EFUSE_READ_TO_RAM', - #'CUSTOM_UTILS', + 'CUSTOM_UTILS', # 'CUSTOM_HID_SERVICE', # 'WEARABLE_LOG_DEBUG', 'SUPPORT_RC_CALIBRATION', diff --git a/code/sdk/files/fd230/fs/user/res/font/en.lang b/code/sdk/files/fd230/fs/user/res/font/en.lang index e16d0c47e..e737dabdf 100644 Binary files a/code/sdk/files/fd230/fs/user/res/font/en.lang and b/code/sdk/files/fd230/fs/user/res/font/en.lang differ diff --git a/code/sdk/files/fd230/fs/user/res/font/ui_resource_string.h b/code/sdk/files/fd230/fs/user/res/font/ui_resource_string.h index 05a9b80b9..64565ce03 100644 --- a/code/sdk/files/fd230/fs/user/res/font/ui_resource_string.h +++ b/code/sdk/files/fd230/fs/user/res/font/ui_resource_string.h @@ -651,7 +651,9 @@ enum UIResourceTextId : uint16_t { STR_FRE_CONTACT = 638, STR_RECORD_MAX = 639, STR_CLEAR_ALL_RECORDS = 640, - STR_MAX_ID = 641, + STR_DEEPSEEK = 641, + STR_AIMODES_LINGXI = 642, + STR_MAX_ID = 643, }; // UIResourceTextId enum FontLanguageId : uint8_t { diff --git a/code/sdk/files/fd230/fs/user/res/font/zh.lang b/code/sdk/files/fd230/fs/user/res/font/zh.lang index 2e9368aae..2fd356c0e 100644 Binary files a/code/sdk/files/fd230/fs/user/res/font/zh.lang and b/code/sdk/files/fd230/fs/user/res/font/zh.lang differ diff --git a/code/sdk/zhihui/utils/custom_utils.c b/code/sdk/zhihui/utils/custom_utils.c index a4b50daf8..b82d67960 100644 --- a/code/sdk/zhihui/utils/custom_utils.c +++ b/code/sdk/zhihui/utils/custom_utils.c @@ -2375,6 +2375,7 @@ void uapi_restore_factory_setting(void) "/user/log/",//离线日志 "/user/app_store/",//应用市场安装包文件 "/user/app/",//应用文件解压文件 + "/user/alipay/",//支付宝文件 }; #else @@ -2910,6 +2911,14 @@ void uapi_cywee_reset_daily_data(void) #endif } +//cywee时间更新 +void uapi_cywee_time_sync(void) +{ + #ifdef CYWEE_SPORT + do_cywee_service_check_msg(CYWEE_SERVICE_CMD_TIME_SYNC,NULL); + #endif +} + void uapi_cywee_get_id(uint8_t *id) { custom_i2c_read_regs(0x19,0x0FU,1,id,1,I2C_BUS_2); diff --git a/tools/language_tool/Language_xml/input_list_en.txt b/tools/language_tool/Language_xml/input_list_en.txt index 3b89c689b..ffafb47e7 100644 --- a/tools/language_tool/Language_xml/input_list_en.txt +++ b/tools/language_tool/Language_xml/input_list_en.txt @@ -640,4 +640,6 @@ STR_CALL_LIST$Call log STR_DELETE_ALL$Clear all STR_FRE_CONTACT$Frequent contact STR_RECORD_MAX$The recording space is full -STR_CLEAR_ALL_RECORDS$Clear all records \ No newline at end of file +STR_CLEAR_ALL_RECORDS$Clear all records +STR_DEEPSEEK$DeepSeek +STR_AIMODES_LINGXI$jiutian \ No newline at end of file diff --git a/tools/language_tool/Language_xml/input_list_zh.txt b/tools/language_tool/Language_xml/input_list_zh.txt index 27a1119aa..a0be7d7de 100644 --- a/tools/language_tool/Language_xml/input_list_zh.txt +++ b/tools/language_tool/Language_xml/input_list_zh.txt @@ -640,4 +640,6 @@ STR_CALL_LIST$通话记录 STR_DELETE_ALL$全部清除 STR_FRE_CONTACT$常用联系人 STR_RECORD_MAX$录音空间已满 -STR_CLEAR_ALL_RECORDS$清除全部记录 \ No newline at end of file +STR_CLEAR_ALL_RECORDS$清除全部记录 +STR_DEEPSEEK$DeepSeek +STR_AIMODES_LINGXI$九天大模型 \ No newline at end of file diff --git a/tools/language_tool/Language_xml/language_custom.xlsx b/tools/language_tool/Language_xml/language_custom.xlsx index d19277e28..214b00981 100644 Binary files a/tools/language_tool/Language_xml/language_custom.xlsx and b/tools/language_tool/Language_xml/language_custom.xlsx differ diff --git a/tools/language_tool/Language_xml/language_en.xml b/tools/language_tool/Language_xml/language_en.xml index 71b1e8cf0..ca5ed51d5 100644 --- a/tools/language_tool/Language_xml/language_en.xml +++ b/tools/language_tool/Language_xml/language_en.xml @@ -642,4 +642,6 @@ + + diff --git a/tools/language_tool/Language_xml/language_zh.xml b/tools/language_tool/Language_xml/language_zh.xml index 19692f1f9..ecc53438d 100644 --- a/tools/language_tool/Language_xml/language_zh.xml +++ b/tools/language_tool/Language_xml/language_zh.xml @@ -642,4 +642,6 @@ + + diff --git a/tools/language_tool/font/en.lang b/tools/language_tool/font/en.lang index e16d0c47e..e737dabdf 100644 Binary files a/tools/language_tool/font/en.lang and b/tools/language_tool/font/en.lang differ diff --git a/tools/language_tool/font/ui_resource_string.h b/tools/language_tool/font/ui_resource_string.h index 05a9b80b9..64565ce03 100644 --- a/tools/language_tool/font/ui_resource_string.h +++ b/tools/language_tool/font/ui_resource_string.h @@ -651,7 +651,9 @@ enum UIResourceTextId : uint16_t { STR_FRE_CONTACT = 638, STR_RECORD_MAX = 639, STR_CLEAR_ALL_RECORDS = 640, - STR_MAX_ID = 641, + STR_DEEPSEEK = 641, + STR_AIMODES_LINGXI = 642, + STR_MAX_ID = 643, }; // UIResourceTextId enum FontLanguageId : uint8_t { diff --git a/tools/language_tool/font/zh.lang b/tools/language_tool/font/zh.lang index 2e9368aae..2fd356c0e 100644 Binary files a/tools/language_tool/font/zh.lang and b/tools/language_tool/font/zh.lang differ diff --git a/tools/language_tool/make_language.sh b/tools/language_tool/make_language.sh index 21066595a..08b3cab2c 100644 --- a/tools/language_tool/make_language.sh +++ b/tools/language_tool/make_language.sh @@ -35,7 +35,7 @@ echo "脚本生成文件执行完成。" cp ../font/ui_resource_string.h ../../../code/sdk/application/wearable/fd230app/nativelauncher/include/ #复制资源文件 -cp -r ../font ../../../code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/ +cp -r ./font ../../code/sdk/files/fd230/fs/user/res/ #打印完成信息 echo "脚本复制文件执行完成。"