From 792b5ccc1ab907cb25e65748bf28b1ca59dc6409 Mon Sep 17 00:00:00 2001 From: rcy-hw Date: Mon, 23 May 2022 10:02:17 +0800 Subject: [PATCH] fixed a48f093 from https://gitee.com/renchunyang2008/notification_ans_standard_for_release3.1/pulls/445 fix reminder time display error Signed-off-by: rcy-hw Change-Id: I11e30bcb5670a51fced857adc5707dc52608dec5 --- frameworks/ans/core/src/ans_manager_proxy.cpp | 2 +- services/ans/src/reminder_data_manager.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frameworks/ans/core/src/ans_manager_proxy.cpp b/frameworks/ans/core/src/ans_manager_proxy.cpp index 55d1f9a72..1d04c0876 100644 --- a/frameworks/ans/core/src/ans_manager_proxy.cpp +++ b/frameworks/ans/core/src/ans_manager_proxy.cpp @@ -2231,7 +2231,7 @@ ErrCode AnsManagerProxy::PublishReminder(sptr &reminder) } int32_t reminderId = -1; if (!reply.ReadInt32(reminderId)) { - ANSR_LOGE("[PublishReminder] fail: derek read reminder id failed."); + ANSR_LOGE("[PublishReminder] fail: read reminder id failed."); return ERR_ANS_PARCELABLE_FAILED; } reminder->SetReminderId(reminderId); diff --git a/services/ans/src/reminder_data_manager.cpp b/services/ans/src/reminder_data_manager.cpp index 417848546..287f54218 100644 --- a/services/ans/src/reminder_data_manager.cpp +++ b/services/ans/src/reminder_data_manager.cpp @@ -572,6 +572,10 @@ void ReminderDataManager::ShowReminder(const sptr &reminder, co reminder->OnShow(isNeedToPlaySound, isSysTimeChanged, true); AddToShowedReminders(reminder); UpdateNotification(reminder); // this should be called after OnShow + + if (alertingReminderId_ != -1) { + TerminateAlerting(alertingReminder_, "PlaySoundAndVibration"); + } ANSR_LOGD("publish notification.(reminderId=%{public}d)", reminder->GetReminderId()); ErrCode errCode = advancedNotificationService_->PublishPreparedNotification(notificationRequest, bundleOption); if (errCode != ERR_OK) { -- Gitee