From: Caisking Date: Fri, 6 Jun 2025 09:12:02 +0000 (+0800) Subject: 修改默认表盘(暂定) X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=713c7edee7fb5a45d8b9208d87fe8f7e2702da0c;p=mirrors%2FFD230.git 修改默认表盘(暂定) --- diff --git a/code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h b/code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h index 6bcbd0a08..ec11e9c8f 100644 --- a/code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h +++ b/code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h @@ -102,8 +102,8 @@ namespace OHOS static constexpr const char *DEFAULT_DIALBACK_PATH = APP_RES_PATH "/dial_soures/z1background.bin"; static constexpr const char *DEFAULT_DIALPER_PATH = APP_RES_PATH "/dial_soures/Z1VIEW.bin"; #else - static constexpr const char *DEFAULT_DIALBACK_PATH = APP_RES_PATH "/dial_soures/MAIN_FACE_IMAGE.bin"; - static constexpr const char *DEFAULT_DIALPER_PATH = APP_RES_PATH "/dial_soures/KUMIVIEW.bin"; + static constexpr const char *DEFAULT_DIALBACK_PATH = APP_RES_PATH "/dial_soures/main_bg.bin"; + static constexpr const char *DEFAULT_DIALPER_PATH = APP_RES_PATH "/dial_soures/thumbnail.bin"; #endif static constexpr const char *CUSTOM_CLOCK1_DIALBACK_PATH = APP_CUSTOM_DIAL_PATH "/1/main_bg.bin"; static constexpr const char *CUSTOM_CLOCK1_DIALPER_PATH = APP_CUSTOM_DIAL_PATH "/1/thumbnail.bin"; diff --git a/code/sdk/application/wearable/fd230app/nativeui/main/src/MainModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/main/src/MainModel.cpp index 5399da870..215bf8f1a 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/main/src/MainModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/main/src/MainModel.cpp @@ -54,7 +54,7 @@ namespace OHOS #ifdef CUSTOM_Z1 {DIAL_CLOCK, "Z1", DEFAULT_DIALPER_PATH, DEFAULT_TASK_PERIOD}, #else - {DIAL_CLOCK, "KUMI", DEFAULT_DIALPER_PATH, DEFAULT_TASK_PERIOD}, // 默认表盘 Id 0 + {DIAL_CLOCK, "N9", DEFAULT_DIALPER_PATH, DEFAULT_TASK_PERIOD}, // 默认表盘 Id 0 #endif {DIAL_CLOCK_1, "Custom_1", CUSTOM_CLOCK1_DIALPER_PATH, DEFAULT_TASK_PERIOD}, // 表盘 Id 1 {DIAL_CLOCK_2, "Custom_2", CUSTOM_CLOCK2_DIALPER_PATH, DEFAULT_TASK_PERIOD}, // 表盘 Id 2 @@ -436,15 +436,15 @@ namespace OHOS if (len < 0) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Error: Failed to retrieve dial settings. Initializing to default settings.\r\n"); - //判断黑耀表盘是否存在 - if(SetDialModel::GetInstance().IsDialInstalled(DEFAULT_DIAL_ID)) - { - InitDialSettingDefault(DEFAULT_DIAL_ID); - } - else - { + // //判断黑耀表盘是否存在 + // if(SetDialModel::GetInstance().IsDialInstalled(DEFAULT_DIAL_ID)) + // { + // InitDialSettingDefault(DEFAULT_DIAL_ID); + // } + // else + // { InitDialSettingDefault(DIAL_CLOCK); - } + // } return; } @@ -462,15 +462,15 @@ namespace OHOS else { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Error: First value is empty. Initializing to default settings.\r\n"); - //判断黑耀表盘是否存在 - if(SetDialModel::GetInstance().IsDialInstalled(DEFAULT_DIAL_ID)) - { - InitDialSettingDefault(DEFAULT_DIAL_ID); - } - else - { + // //判断黑耀表盘是否存在 + // if(SetDialModel::GetInstance().IsDialInstalled(DEFAULT_DIAL_ID)) + // { + // InitDialSettingDefault(DEFAULT_DIAL_ID); + // } + // else + // { InitDialSettingDefault(DIAL_CLOCK); - } + // } return; } @@ -485,14 +485,14 @@ namespace OHOS { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Error: Second value is empty. Initializing to default settings.\r\n"); //判断黑耀表盘是否存在 - if(SetDialModel::GetInstance().IsDialInstalled(DEFAULT_DIAL_ID)) - { - InitDialSettingDefault(DEFAULT_DIAL_ID); - } - else - { + // if(SetDialModel::GetInstance().IsDialInstalled(DEFAULT_DIAL_ID)) + // { + // InitDialSettingDefault(DEFAULT_DIAL_ID); + // } + // else + // { InitDialSettingDefault(DIAL_CLOCK); - } + // } return; } 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 9b37bc11c..bbb13b3e7 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 @@ -98,7 +98,7 @@ namespace OHOS virtual ~SetDialModel(); int32_t ParseDialHeader(int type, const std::string &dialFileName, SetDialInfo &dialInfo); std::vector dialInfoList; - uint16_t currentDialID = 114; // 设置表盘默认值 + uint16_t currentDialID = DEFAULT_DIAL_ID_0; // 设置表盘默认值 uint16_t download_DialID = 1028; uint32_t download_dialSize = 0; diff --git a/code/sdk/application/wearable/fd230app/nativeui/set_dial/src/SetDialModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/set_dial/src/SetDialModel.cpp index 9e3435b35..4481b9f46 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/set_dial/src/SetDialModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/set_dial/src/SetDialModel.cpp @@ -35,7 +35,7 @@ std::unordered_map registeredDials{ #ifdef CUSTOM_Z1 {DEFAULT_DIAL_ID_0, "Z1"}, #else - {DEFAULT_DIAL_ID_0, "KUMI"}, // 为了预防显示 + {DEFAULT_DIAL_ID_0, "N9"}, // 为了预防显示 {DEFAULT_DIAL_ID, "obsidianrhythm"}, // 默认表盘修改为 黑耀律动 #endif {DEFAULT_DIAL_ID_1, "satellite"}, // 卫星表盘 diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/dial_soures/main_bg.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/dial_soures/main_bg.bin new file mode 100644 index 000000000..5e9f21252 --- /dev/null +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/dial_soures/main_bg.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e268fbbf3e3b07bcae1f530a9cd95f136c8215049f74905238424e43fb72d883 +size 110472 diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/dial_soures/thumbnail.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/dial_soures/thumbnail.bin new file mode 100644 index 000000000..8ac95dd8a --- /dev/null +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/dial_soures/thumbnail.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6b6900d0f00e6be401d8e80a8e2c60e8739430a5a4659fc71cd587f5904cb54 +size 36472