From 8f15e56c385e9a6641a57fac4aeb0fa1a321f7e4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E8=A2=81=E6=B8=85=E6=A2=A6?= <3449750381@qq.com> Date: Mon, 21 Oct 2024 07:41:40 +0000 Subject: [PATCH] Merge #1232 into sdk602patch0911 from refs/changes/1232/head MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Code review from 袁清梦 * refs/changes/1232/head: (9 commits squashed) - #105 5手表开启勿扰模式表盘界面会显示勿扰图标,重启后表盘勿扰图标消失(实际还是勿扰状态,下拉状态栏的勿扰图标是高亮的) - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0911 - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0911 - 系统:删除res无用资源 - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0911 - 语音助手:修复对话界面的异常滑动 - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0911 - 表盘:同步修改表盘分区路径 - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0911 Signed-off-by: Caisking <3449750381@qq.com> Reviewed-by: snickersun@163.com Merged-by: snickersun@163.com CR-link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/1232 --- .../wearable/fd230app/nativelauncher/include/UiConfig.h | 6 +++--- .../nativeui/assistant/src/AssistantAnswerView.cpp | 3 ++- .../fd230app/nativeui/set_dial/include/SetDialModel.h | 2 +- .../fd230app/nativeui/system/include/SystemLogModel.h | 6 +++--- .../wearable/service/ble_service/blemoder/bletest.cpp | 2 +- .../wearable/service/ble_service/bleservice/bleEvent.c | 2 +- .../wearable/service/ble_service/bleservice/bleEvent.h | 2 +- .../fd230/fs/user/dial/{ => res_dial}/birdie.bin | 0 .../fd230/fs/user/dial/{ => res_dial}/obsidianrhythm.bin | 0 .../fd230/fs/user/dial/{ => res_dial}/satellite.bin | 0 code/sdk/drivers/peripheral/utils/custom_utils.c | 9 ++++++--- 11 files changed, 18 insertions(+), 14 deletions(-) rename code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/dial/{ => res_dial}/birdie.bin (100%) rename code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/dial/{ => res_dial}/obsidianrhythm.bin (100%) rename code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/dial/{ => res_dial}/satellite.bin (100%) diff --git a/code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h b/code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h index e47fae385..13bd86c85 100644 --- a/code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h +++ b/code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h @@ -67,9 +67,9 @@ namespace OHOS #define APP_RES_PATH "/user/res" #define APP_MUSIC_PATH "/user/userdata/music" #define APP_VIDEO_PATH "/user/video" -#define APP_DEFAULT_DIAL_PATH "/user/dial" /*默认表盘安装路径*/ -#define APP_DOWNLOAD_DIAL_PATH "/user/userdata/dial" /*表盘市场安装路径*/ -#define APP_CUSTOM_DIAL_PATH "/user/userdata/custom_dial" /*自定义表盘安装路径*/ +#define APP_DEFAULT_DIAL_PATH "/user/dial/res_dial" /*默认表盘安装路径*/ +#define APP_DOWNLOAD_DIAL_PATH "/user/dial/offline_dial" /*表盘市场安装路径*/ +#define APP_CUSTOM_DIAL_PATH "/user/dial/custom_dial" /*自定义表盘安装路径*/ #define APP_LIST_PATH "/user/res/applist_icon" #define APP_HEARET_ICON_PATH "/user/res/heart_chart/hearticon"//心率动画 diff --git a/code/sdk/application/wearable/fd230app/nativeui/assistant/src/AssistantAnswerView.cpp b/code/sdk/application/wearable/fd230app/nativeui/assistant/src/AssistantAnswerView.cpp index db716306a..6a48af947 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/assistant/src/AssistantAnswerView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/assistant/src/AssistantAnswerView.cpp @@ -257,7 +257,7 @@ void AssistantAnswerView::InitScrollView() { scrollView->SetMaxScrollDistance(1000); scrollView->SetThrowDrag(true); scrollView->SetHorizontalScrollState(false); // 禁止水平滑动 - // scrollView->SetVerticalScrollState(false); // 禁止垂直滑动 + scrollView->SetVerticalScrollState(false); // 禁止垂直滑动 } void AssistantAnswerView::InitImageAnimator() { @@ -286,6 +286,7 @@ void AssistantAnswerView::InitNoteLabel() { notelabel->Resize(380, 60); notelabel->SetViewId("notelabel"); notelabel->SetStyle(STYLE_TEXT_FONT, 30); + //TODO:多国语言 notelabel->SetText("试试对我说“打电话给某人”"); notelabel->SetLineBreakMode(UILabel::LINE_BREAK_ELLIPSIS); notelabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); diff --git a/code/sdk/application/wearable/fd230app/nativeui/set_dial/include/SetDialModel.h b/code/sdk/application/wearable/fd230app/nativeui/set_dial/include/SetDialModel.h index 50119e2a0..ef0fcfa76 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/set_dial/include/SetDialModel.h +++ b/code/sdk/application/wearable/fd230app/nativeui/set_dial/include/SetDialModel.h @@ -35,7 +35,7 @@ namespace OHOS constexpr uint16_t CUSTOM_DIAL_ID_5 = 5; #define DIAL_ID_LENGTH 2 #define DIAL_NAME_LENGTH 50 - #define DIAL_ID_PATH "user/userdata/dial_id.bin" + #define DIAL_ID_PATH "user/dial/dial_id.bin" class SetDialModel { diff --git a/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemLogModel.h b/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemLogModel.h index 341933e8a..b4849c483 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemLogModel.h +++ b/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemLogModel.h @@ -17,13 +17,13 @@ #define TOTAL_RING_SPACE_PATH "/user/musci/ring" #define TOTAL_DIAL_SPACE (27 * 1024 * 1024) // 27M -#define TOTAL_DIAL_SPACE_PATH "/user/dial/offlinedial" +#define TOTAL_DIAL_SPACE_PATH "/user/dial/offline_dial" #define TOTAL_RES_DIAL_SPACE (7 * 1024 * 1024) // 7M -#define TOTAL_RES_DIAL_SPACE_PATH "/user/dial/resdial" +#define TOTAL_RES_DIAL_SPACE_PATH "/user/dial/res_dial" #define TOTAL_CUSTOM_DAIL_SPACE (1 * 1024 * 1024) // 1M -#define TOTAL_CUSTOM_DAIL_SPACE_PATH "/user/dial/customdial" +#define TOTAL_CUSTOM_DAIL_SPACE_PATH "/user/dial/custom_dial" #define TOTAL_SYSTEM_SPACE (5 * 1024 * 1024) // 5M #define TOTAL_SYSTEM_SPACE_PATH "/user/system" diff --git a/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp b/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp index 9bbea7bda..c58611b31 100644 --- a/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp +++ b/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp @@ -591,7 +591,7 @@ char * dir_to_json_buf_malloc_(uint8_t type) get_music_path(dir_path,128); break; case 3: // - sprintf_s(dir_path,64,"%s","user/userdata/dial"); + sprintf_s(dir_path,64,"%s","user/dial/offline_dial"); return NULL; default: diff --git a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c index c7c804a37..6563c350e 100644 --- a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c +++ b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c @@ -221,7 +221,7 @@ static errcode_t get_dial_file_path(char* input_dialname ,uint32_t input_size, c return ERRCODE_FAIL; } - int ret = sprintf_s(output_file_path,max_output_size,"/user/userdata/dial/%s.bin",input_dialname); + int ret = sprintf_s(output_file_path,max_output_size,"/user/dial/offline_dial/%s.bin",input_dialname); if (ret < 0) return ERRCODE_FAIL; diff --git a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.h b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.h index bddcd74ab..c271094bd 100644 --- a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.h +++ b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.h @@ -14,7 +14,7 @@ extern "C" { #define ALARM_DATA_CONFIG_PATH "/user/userdata/alarm_test.json" #define ANCS_DATA_CONFIG_DIR "/user/userdata/message" -#define DIAL_DATA_DIR "/user/userdata/dial" +#define DIAL_DATA_DIR "/user/dial/offline_dial" #define ANCS_DATA_CJSON_PATH "/user/userdata/message/ancs.json" //消息文件可以任意更改 diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/dial/birdie.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/dial/res_dial/birdie.bin similarity index 100% rename from code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/dial/birdie.bin rename to code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/dial/res_dial/birdie.bin diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/dial/obsidianrhythm.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/dial/res_dial/obsidianrhythm.bin similarity index 100% rename from code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/dial/obsidianrhythm.bin rename to code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/dial/res_dial/obsidianrhythm.bin diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/dial/satellite.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/dial/res_dial/satellite.bin similarity index 100% rename from code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/dial/satellite.bin rename to code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/dial/res_dial/satellite.bin diff --git a/code/sdk/drivers/peripheral/utils/custom_utils.c b/code/sdk/drivers/peripheral/utils/custom_utils.c index 478f58ee4..47d000078 100644 --- a/code/sdk/drivers/peripheral/utils/custom_utils.c +++ b/code/sdk/drivers/peripheral/utils/custom_utils.c @@ -2071,9 +2071,12 @@ void uapi_restore_factory_setting(void) resume_report_log(); #ifdef SINGLE_USER_PARTITION - char *filebuf[] = {"/user/system/ConfigModel.json", - "/user/userdata", - "/user/system/kvstore", + char *filebuf[] = { + "/user/system/ConfigModel.json", + "/user/userdata", + "/user/system/kvstore", + "/user/dial/custom_dial/", //自定义表盘 + "/user/dial/offline_dial/",//离线表盘 }; #else -- 2.17.1