From 9866dda5204ba871d83f32cf577c648f8983ae8e Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Thu, 14 Nov 2024 11:20:54 +0800 Subject: [PATCH] =?utf8?q?=E5=A2=9E=E5=8A=A0=E7=9B=AE=E6=A0=87=E8=BE=BE?= =?utf8?q?=E6=88=9010s=E5=90=8E=E8=87=AA=E5=8A=A8=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../src/notify/goal_notification.cpp | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/goal_notification.cpp b/code/sdk/application/wearable/service/msg_center/src/notify/goal_notification.cpp index 7cf2eb2a9..fe5dfb591 100644 --- a/code/sdk/application/wearable/service/msg_center/src/notify/goal_notification.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/notify/goal_notification.cpp @@ -289,7 +289,7 @@ namespace OHOS static void GoalviewShowCallBack(int data) { GoalviewShowCallBack_FALG--; - if(GoalviewShowCallBack_FALG) + if(GoalviewShowCallBack_FALG>=7) { if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { @@ -298,16 +298,19 @@ namespace OHOS } if(GoalviewShowCallBack_FALG==0) { - if(GoalviewShow_timer) - { - osTimerStop(GoalviewShow_timer); - osStatus_t ret = osTimerDelete(GoalviewShow_timer); - if (ret != osOK) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Disatransmitting_timer failed ret = %lx!", ret); - return; - } - GoalviewShow_timer = nullptr; - } + + NotificationManager::GetInstance()->StopNotify(); + + // if(GoalviewShow_timer) + // { + // osTimerStop(GoalviewShow_timer); + // osStatus_t ret = osTimerDelete(GoalviewShow_timer); + // if (ret != osOK) { + // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Disatransmitting_timer failed ret = %lx!", ret); + // return; + // } + // GoalviewShow_timer = nullptr; + // } } WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "hintdialtimerCallBack ??????!"); @@ -331,7 +334,7 @@ namespace OHOS uint32_t tick; osStatus_t retTimer; - GoalviewShowCallBack_FALG=3; + GoalviewShowCallBack_FALG=10; GoalviewShow_timer = osTimerNew((osTimerFunc_t)GoalviewShowCallBack, osTimerPeriodic, NULL, NULL); tick =osMs2Tick(1000);// osMs2Tick(1000); retTimer = osTimerStart(GoalviewShow_timer, tick); -- 2.17.1