修改py升级bug
authorxue <2144439972@qq.com>
Wed, 10 Dec 2025 08:44:24 +0000 (16:44 +0800)
committerxue <2144439972@qq.com>
Wed, 10 Dec 2025 08:44:24 +0000 (16:44 +0800)
code/sdk/application/wearable/ln/nativeapp/nativeui/ota/src/OtaModel.cpp
code/sdk/application/wearable/ln/nativeapp/nativeui/ota/src/OtaPresenter.cpp
code/sdk/application/wearable/ln/nativeapp/nativeui/ota/src/OtaView.cpp

index 33ead82..cc57569 100644 (file)
@@ -17,6 +17,7 @@
 #include "system/include/MemoryManager.h"
 #include "thunderbird/include/ThunderBirdModel.h"
 #include "NativeAbility.h"
+#include "graphic_service.h"
 #ifdef SUPPORT_CAT1_SERVICE
 #include "cat1_pub_api.h"
 #endif
@@ -265,7 +266,8 @@ namespace OHOS
                 OtaView::GetInstance()->ChangeView(OtaView::OTA_VIEW_COUNTDOWN, OtaView::OTA_VIEW_UPDATING);
                 if(ThunderBirdModel::GetInstance()->is_Cat1_OtaUpgrade())
                 {
-                    ThunderBirdModel::GetInstance()->Cat1OtaUpgrade();
+                    GraphicService::GetInstance()->PostGraphicEvent(
+                        std::bind(&OHOS::ThunderBirdModel::Cat1OtaUpgrade,OHOS::ThunderBirdModel::GetInstance()));
                 }
             }
             
index d99e413..3dbe40b 100644 (file)
@@ -26,6 +26,7 @@
 #include "ota/include/OtaNightUpdateView.h"
 #include "ota/include/OtaNightUpdateSuccessView.h"
 #include "custom_runtime.h"
+#include "graphic_service.h"
 #ifdef SUPPORT_CAT1_SERVICE
 #include "cat1_server.h"
 #endif
@@ -173,7 +174,8 @@ namespace OHOS
                         OtaView::GetInstance()->ChangeView(OtaView::OTA_VIEW_COUNTDOWN, OtaView::OTA_VIEW_UPDATING);
                         if(ThunderBirdModel::GetInstance()->is_Cat1_OtaUpgrade())
                         {
-                            ThunderBirdModel::GetInstance()->Cat1OtaUpgrade();
+                            GraphicService::GetInstance()->PostGraphicEvent(
+                                std::bind(&OHOS::ThunderBirdModel::Cat1OtaUpgrade,OHOS::ThunderBirdModel::GetInstance()));
                         }
                     }
                     //升级失败界面重试
index a1d7865..a684f4f 100644 (file)
@@ -94,6 +94,7 @@ namespace OHOS
         }
         else {
             m_otaStatus = ThunderBirdModel::GetInstance()->GetOtaStatus();
+            OtaModel::GetInstance()->SetOtaStatus(m_otaStatus);
             if(m_otaStatus == OTA_UI_STATUS_OPTIONAL_START)//选择升级
             {
                 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "选择升级");