From 6f4c6b496d4d58079446ca35a1a8fd755d47bcdb Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Wed, 17 Dec 2025 15:29:18 +0800 Subject: [PATCH] =?utf8?q?=E8=A7=A3=E5=86=B3=E6=89=8B=E5=8A=A8=E6=B5=8B?= =?utf8?q?=E8=AF=95=E7=94=A8=E4=BE=8B=E4=B8=8D=E8=83=BD=E8=BF=9B=E5=85=A5b?= =?utf8?q?ug?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeui/applist/src/AppItemView.cpp | 7 ++++- .../nativeui/applist/src/ApplistModel.cpp | 29 ++++++++++++------- .../src/ShutDownImageAnimatorView.cpp | 4 ++- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/applist/src/AppItemView.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/applist/src/AppItemView.cpp index 87b35c580..f35dbf06e 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/applist/src/AppItemView.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/applist/src/AppItemView.cpp @@ -57,7 +57,12 @@ namespace OHOS { { itemInfo_ = itemInfo; icon_.SetSrc(itemInfo.iconSmall); - label_.SetTextId(itemInfo_.TextId); + if(VIEW_EXTERN_APP != itemInfo.id) { + label_.SetTextId(itemInfo.TextId); + } else { + // printf("ArcScaleListItemView::SetItemInfo:%s\r\n",itemInfo.label); + label_.SetText(itemInfo.label); + } } AppViewId AppItemView::GetViewId() diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/applist/src/ApplistModel.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/applist/src/ApplistModel.cpp index eb0a8397d..72356f601 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/applist/src/ApplistModel.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/applist/src/ApplistModel.cpp @@ -94,17 +94,24 @@ namespace OHOS { len = APP_MAX_NUM - nativeAppNumTotal; } while (len--) { - applist[appLen] = { - VIEW_EXTERN_APP, - bundleInfos[len].smallIconPath, - bundleInfos[len].bigIconPath, - bundleInfos[len].label, - bundleInfos[len].bundleName - }; - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ResolvingJSAppItems bundleName is %s \r", bundleInfos[len].bundleName); - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ResolvingJSAppItems label is %s \r", bundleInfos[len].label); - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ResolvingJSAppItems smallIconPath is %s \r", bundleInfos[len].smallIconPath); - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ResolvingJSAppItems bigIconPath is %s \r", bundleInfos[len].bigIconPath); + // applist[appLen] = { + // VIEW_EXTERN_APP, + // bundleInfos[len].smallIconPath, + // bundleInfos[len].bigIconPath, + // bundleInfos[len].label, + // bundleInfos[len].bundleName + // }; + applist[appLen].id = VIEW_EXTERN_APP; + applist[appLen].iconLarge = bundleInfos[len].smallIconPath; + applist[appLen].iconSmall = bundleInfos[len].smallIconPath; + applist[appLen].iconHexagon = bundleInfos[len].bigIconPath; + applist[appLen].label = bundleInfos[len].label; + applist[appLen].uid = bundleInfos[len].bundleName; + + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ResolvingJSAppItems bundleName is %s \r", bundleInfos[len].bundleName); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ResolvingJSAppItems label is %s \r", bundleInfos[len].label); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ResolvingJSAppItems smallIconPath is %s \r", bundleInfos[len].smallIconPath); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ResolvingJSAppItems bigIconPath is %s \r", bundleInfos[len].bigIconPath); appLen++; bundleInfos[len].abilityInfo = nullptr; } diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/rebootandshutdown/src/ShutDownImageAnimatorView.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/rebootandshutdown/src/ShutDownImageAnimatorView.cpp index f31ac5a46..80a6666fe 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/rebootandshutdown/src/ShutDownImageAnimatorView.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/rebootandshutdown/src/ShutDownImageAnimatorView.cpp @@ -74,7 +74,9 @@ namespace OHOS shutdown_reboot_prejobs(REBOOT_TYPE); break; case 2: - do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_TYPE_RESTORE_FACTORY_SETTING, NULL, 0); + // do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_TYPE_RESTORE_FACTORY_SETTING, NULL, 0); + shutdown_reboot_prejobs(REBOOT_TYPE); + // uapi_restore_factory_setting(); break; case 3: #ifdef SUPPORT_BLE_SERVICE -- 2.17.1