From 204cc7d40ef3430e97124d6d571117df5a8a9ece Mon Sep 17 00:00:00 2001 From: Caisking <3449750381@qq.com> Date: Sat, 17 Aug 2024 18:23:26 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E5=A4=8D=E7=9D=A1=E7=9C=A0=E9=97=B9?= =?utf8?q?=E9=92=9F=E5=90=8E=E9=9D=A2=E5=93=8D=E9=93=83=E6=97=B6=E9=97=B4?= =?utf8?q?=E8=B6=8A=E6=9D=A5=E8=B6=8A=E5=B0=91=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../service/msg_center/src/notify/sleep_notification.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/sleep_notification.cpp b/code/sdk/application/wearable/service/msg_center/src/notify/sleep_notification.cpp index 10c4f2832..b708ae7db 100644 --- a/code/sdk/application/wearable/service/msg_center/src/notify/sleep_notification.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/notify/sleep_notification.cpp @@ -44,6 +44,7 @@ namespace OHOS #define CLOSEBUTTON "close_button" #define NOPBUTTON "nop_button" + static int countsleep = 0; /* -------------------------------------------------------------------------- */ /*创建睡眠弹窗*/ @@ -250,6 +251,7 @@ namespace OHOS WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Free SleepView succeed!!"); ScreenTurnOff(); } + countsleep = 0; // 重置 return; } @@ -545,7 +547,6 @@ namespace OHOS void SleepRingPlayerCallbackImpl::OnPlaybackComplete(void) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "OnPlaybackComplete"); - static int countsleep = 0; SleepViewEventListener::GetInstance().PopInterCancelMusic(); /*达到最大次数不再播放*/ if (countsleep <= MAX_SLEEP_RING) -- 2.17.1