解决ota界面文本显示异常问题,ota界面50%下载,修改为30%下载 2689/1 2689/head 2690/target/1 2691/target/1
authorluozheng <1732036298@qq.com>
Wed, 5 Nov 2025 10:36:49 +0000 (18:36 +0800)
committerluozheng <1732036298@qq.com>
Wed, 5 Nov 2025 10:36:49 +0000 (18:36 +0800)
code/sdk/application/wearable/ln/nativeapp/nativeui/ota/include/OtaModel.h
code/sdk/application/wearable/ln/nativeapp/nativeui/ota/src/OtaLowBatteryView.cpp
code/sdk/application/wearable/ln/nativeapp/nativeui/ota/src/OtaModel.cpp

index 6a03427..5f971e6 100644 (file)
@@ -73,7 +73,7 @@ namespace OHOS
         void HandleDownloadEta(int seconds);
         void HandleDownloadFail(int type);
         
-        void SetUpgradeDescription(const std::string& description);
+        void SetUpgradeDescription(const std::string description);
         std::string GetUpgradeDescription() const;
     private:
         OtaModel();
index 651c249..833d4fb 100644 (file)
@@ -65,7 +65,7 @@ namespace OHOS
             LittleTextLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
             LittleTextLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 18);
             LittleTextLabel->SetStyle(STYLE_TEXT_COLOR, 0xffcccccc);
-            LittleTextLabel->SetText("请至少充至50%电量哦");
+            LittleTextLabel->SetText("请至少充至30%电量哦");
             LittleTextLabel->SetVisible(true);
             group->Add(LittleTextLabel);
         }
index c0a8bcc..9ccc15e 100644 (file)
@@ -498,9 +498,10 @@ namespace OHOS
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "OtaModel: Night update status cleared from KV storage");
     }
 
-    void OtaModel::SetUpgradeDescription(const std::string& description)
+    void OtaModel::SetUpgradeDescription(const std::string description)
     {
         m_upgradeDescription = description;
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SetUpgradeDescription:%s",m_upgradeDescription.c_str());
     }
 
     std::string OtaModel::GetUpgradeDescription() const