修复电量过低无法重复显示问题
authorSnickerSun <snickersun@163.com>
Sat, 30 Mar 2024 08:54:57 +0000 (16:54 +0800)
committerSnickerSun <snickersun@163.com>
Sat, 30 Mar 2024 08:54:57 +0000 (16:54 +0800)
code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp

index 772cacc..5c6311f 100755 (executable)
@@ -1,4 +1,4 @@
-/*
+/*,
  * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
  * Description: broadcast feature implement
  * Author: CompanyName
@@ -276,6 +276,8 @@ void MsgCenterNotifyLowPowerAlarmProc(const Topic topic, Request* req)
     {
         //提醒低电充电
         set_lowpower_falg(false);
+        if (NotificationManager::GetInstance()->hasNotifyShowing())
+            NotificationManager::GetInstance()->StopNotify();
         NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_TWO);
         NotificationManager::GetInstance()->ShowNotify(showlowpowerNotify, (uint16_t)topic, true);
     }
@@ -283,6 +285,8 @@ void MsgCenterNotifyLowPowerAlarmProc(const Topic topic, Request* req)
     {
         //电量过低,直接提醒关机
         set_lowpower_falg(true);
+        if (NotificationManager::GetInstance()->hasNotifyShowing())
+            NotificationManager::GetInstance()->StopNotify();
         NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_TWO);
         NotificationManager::GetInstance()->ShowNotify(showlowpowerNotify, (uint16_t)topic, true);