充电弹窗:修改回调与UI的析构顺序
authorCaisking <3449750381@qq.com>
Sat, 5 Oct 2024 09:50:41 +0000 (17:50 +0800)
committerCaisking <3449750381@qq.com>
Sat, 5 Oct 2024 09:50:41 +0000 (17:50 +0800)
code/sdk/application/wearable/service/msg_center/src/notify/charge_notification.cpp

index bc26730..85dcdd5 100644 (file)
@@ -122,7 +122,6 @@ namespace OHOS
     {
        if (UIViewGroup_charge != nullptr) 
        {
-        UIViewGroup_charge->RemoveAll();
 
         if(Chargeing_timer)
         {
@@ -131,6 +130,8 @@ namespace OHOS
             Chargeing_timer = NULL;
         }
 
+        UIViewGroup_charge->RemoveAll();
+
         if (batteryprogress) {
           delete batteryprogress;
           batteryprogress = nullptr;