diff --git a/frameworks/ans/native/src/reminder_request_alarm.cpp b/frameworks/ans/native/src/reminder_request_alarm.cpp index f1334689b7764f1a85879601012eeeebdb22834f..2c0de6b23f3ab63f6925b6b1916eac72e34f86a4 100644 --- a/frameworks/ans/native/src/reminder_request_alarm.cpp +++ b/frameworks/ans/native/src/reminder_request_alarm.cpp @@ -109,7 +109,7 @@ uint64_t ReminderRequestAlarm::GetNextTriggerTime(bool forceToGetNext) const } ANSR_LOGD("Now: year=%{public}d, mon=%{public}d, day=%{public}d, hour=%{public}d, " - "min=%{public}d, sec=%{public}d, week=%{public}d, \n Target: tar_hour=%{public}d, tar_min=%{public}d", + "min=%{public}d, sec=%{public}d, week=%{public}d, Target: tar_hour=%{public}d, tar_min=%{public}d", GetActualTime(TimeTransferType::YEAR, nowTime->tm_year), GetActualTime(TimeTransferType::MONTH, nowTime->tm_mon), nowTime->tm_mday, nowTime->tm_hour, nowTime->tm_min, nowTime->tm_sec, @@ -159,7 +159,7 @@ int8_t ReminderRequestAlarm::GetNextAlarm(const time_t now, const time_t target) if (repeatDays_ == 0) { return INVALID_INT_VALUE; } - int today = gmtime(&now)->tm_wday; + int today = GetActualTime(TimeTransferType::WEEK, gmtime(&now)->tm_wday); int dayCount = now >= target ? 1 : 0; for (; dayCount <= DAYS_PER_WEEK; dayCount++) { int day = (today + dayCount) % DAYS_PER_WEEK; diff --git a/services/ans/src/reminder_data_manager.cpp b/services/ans/src/reminder_data_manager.cpp index 18f09d8b6cf6f212a9dbc8c946d9a5a72b52838c..0eebcf1a794f9e3a7cd883a9a0c01293b9cc6410 100644 --- a/services/ans/src/reminder_data_manager.cpp +++ b/services/ans/src/reminder_data_manager.cpp @@ -57,8 +57,8 @@ void ReminderDataManager::CancelReminder( StopTimerLocked(TimerType::TRIGGER_TIMER); } if (alertingReminderId_ == reminderId) { - StopTimerLocked(TimerType::ALERTING_TIMER); StopSoundAndVibrationLocked(reminder); + StopTimerLocked(TimerType::ALERTING_TIMER); } int32_t id = reminderId; RemoveReminderLocked(id); @@ -324,8 +324,8 @@ void ReminderDataManager::CloseReminder(const sptr &reminder, b StopTimerLocked(TimerType::TRIGGER_TIMER); } if (alertingReminderId_ == reminderId) { - StopTimerLocked(TimerType::ALERTING_TIMER); StopSoundAndVibrationLocked(reminder); + StopTimerLocked(TimerType::ALERTING_TIMER); } reminder->OnClose(true); RemoveFromShowedReminders(reminder); @@ -572,8 +572,8 @@ void ReminderDataManager::SnoozeReminderImpl(sptr &reminder) // 1) Snooze the reminder by manual if (alertingReminderId_ == reminder->GetReminderId()) { - StopTimerLocked(TimerType::ALERTING_TIMER); StopSoundAndVibrationLocked(reminder); + StopTimerLocked(TimerType::ALERTING_TIMER); } reminder->OnSnooze();