优化OTA传输过程中刷新进度条代码#725待测试是否不再复现 1012/7
authorhcj <1224667075@qq.com>
Wed, 25 Sep 2024 12:53:54 +0000 (20:53 +0800)
committerhcj <1224667075@qq.com>
Wed, 25 Sep 2024 12:53:54 +0000 (20:53 +0800)
code/sdk/application/wearable/service/msg_center/src/notify/transmitting.cpp

index e614e02..3e18da3 100644 (file)
@@ -158,10 +158,21 @@ namespace OHOS
     }
     static uint8_t timer_falg_low_power=5;
 
+    static uint8_t test_flag=0;
+
+    static void OTATimerCallBackProc(int data)
+    {   
+        #if 0
+        updatasider->SetValue(test_flag++);
+        #else
+        updatasider->SetValue(get_OTA_recv_value());
+        #endif
+        updatasider->Invalidate();
+    }
+
     void OTATimerCallBack(int data)
     {
-       updatasider->SetValue(get_OTA_recv_value());
-       RootView::GetInstance()->Invalidate();
+        GraphicService::GetInstance()->PostGraphicEvent(std::bind(OTATimerCallBackProc, data));
     }
 
     void dialtimerCallBack(int data)