From 6bab4e34e906e1cc3142a7b8f46f36cc67d189f1 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Thu, 15 Aug 2024 16:54:43 +0800 Subject: [PATCH] =?utf8?q?=E4=BC=98=E5=8C=96=E4=B9=85=E5=9D=90=E6=8F=90?= =?utf8?q?=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../service/msg_center/src/msg_center_customer.cpp | 9 +-------- .../src/notify/sedentaryReminder_notification.cpp | 1 + 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp b/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp index 1967f25d3..7fd301ed7 100644 --- a/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp @@ -1144,19 +1144,12 @@ void MsgCenterNotifyInactivityProc(const Topic topic, Request *req) WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "cywee_Inactivity_Info->output_number = %d", cywee_Inactivity_Info->output_number); - static int interval = 0;//久坐间隔时间 switch (cywee_Inactivity_Info->output_number) { case INACTIVITY_MODE_SEDENTARY_OUTPUT: if(cywee_Inactivity_Info->status == 1) { - //NotificationManager::GetInstance()->ShowNotify(showSedentaryReminderNotify, (uint16_t)topic, true); - //根据久坐间隔时间和是否在设置的提醒时间段内判断是否弹出久坐视图 - interval++; - if( interval % SedentaryReminderViewEventListener::GetInstance().GetIntervalTime() == 0){ - SedentaryReminderViewEventListener::GetInstance().SetSedentaryReminderNoteIntervalTime(interval); - NotificationManager::GetInstance()->ShowNotify(showSedentaryReminderNotify, (uint16_t)topic, true); - } + NotificationManager::GetInstance()->ShowNotify(showSedentaryReminderNotify, (uint16_t)topic, true); } else if(cywee_Inactivity_Info->status==9) { diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/sedentaryReminder_notification.cpp b/code/sdk/application/wearable/service/msg_center/src/notify/sedentaryReminder_notification.cpp index 004fa7a5a..5a28f093a 100644 --- a/code/sdk/application/wearable/service/msg_center/src/notify/sedentaryReminder_notification.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/notify/sedentaryReminder_notification.cpp @@ -194,6 +194,7 @@ namespace OHOS SedentaryReminderNoteLabel->SetTextId(STR_SEDENTARY_REMINDER_NOTE); #endif // UpdateLabel(SedentaryReminderNoteLabel,"1",STR_SEDENTARY_REMINDER_NOTE); + SedentaryReminderViewEventListener::GetInstance().SetSedentaryReminderNoteIntervalTime(SedentaryReminderViewEventListener::GetInstance().GetIntervalTime()); SedentaryReminderNoteLabel->SetLineBreakMode(UILabel::LINE_BREAK_WRAP); SedentaryReminderNoteLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); SedentaryReminderNoteLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); -- 2.17.1