From: luozheng <1732036298@qq.com> Date: Tue, 5 Mar 2024 11:55:51 +0000 (+0800) Subject: 解决系统升级按钮点击无反应问题 X-Git-Tag: release_V1.2.70_20241020_135402~1274^2~27 X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=6c44b9007a39cc6dadb42ebb384c27426dc57843;p=mirrors%2FFD230.git 解决系统升级按钮点击无反应问题 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemPresenter.cpp index f5fd4bf9a..5d8b16342 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemPresenter.cpp @@ -107,19 +107,20 @@ namespace OHOS SystemView::GetInstance()->ChangeView(SYSTEMVIEW, FACTORYRESETVIEW); return true; } - else if (strcmp(view.GetViewId(), FACTORYRESET_CHECKON)) + else if (strcmp(view.GetViewId(), FACTORYRESET_CHECKON) == 0) { return true; } - else if (strcmp(view.GetViewId(), FACTORYRESET_CHECKOFF)) + else if (strcmp(view.GetViewId(), FACTORYRESET_CHECKOFF) == 0) { p_SystemView->ChangeView(FACTORYRESETVIEW, SYSTEMVIEW); return true; } - else if(strcmp(view.GetViewId(), SYSTEM_UPGRADE)) + else if (strcmp(view.GetViewId(), SYSTEM_UPGRADE) == 0) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "uaip_cmd_update_request"); uaip_cmd_update_request(); + return true; } return false; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemView.cpp b/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemView.cpp index 8aae17802..a897beb6f 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemView.cpp @@ -197,7 +197,7 @@ namespace OHOS SystemUpgradeButtonExt->SetViewId(SYSTEM_UPGRADE); SystemUpgradeButtonExt->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919); SystemUpgradeButtonExt->SetImagePosition(326, 37); - SystemUpgradeButtonExt->SetImageSrc("/user/res/SETTING_NEXT.bin", nullptr); + SystemUpgradeButtonExt->SetImageSrc("/user/res/SETTING_NEXT.bin", "/user/res/SETTING_NEXT.bin"); SystemUpgradeButtonExt->SetText("系统升级"); SystemUpgradeButtonExt->SetAlign(TEXT_ALIGNMENT_LEFT); SystemUpgradeButtonExt->SetLabelPosition(45, 0);