diff --git a/frameworks/ans/src/reminder_request.cpp b/frameworks/ans/src/reminder_request.cpp index 12c4d1b53ca7683d272923513a3f1f333d6cc772..9ef4af4582bf6b6ab0846927a5e4e792953949ae 100644 --- a/frameworks/ans/src/reminder_request.cpp +++ b/frameworks/ans/src/reminder_request.cpp @@ -1640,28 +1640,28 @@ void ReminderRequest::UpdateNotificationContent(const bool &setSnooze) if (setSnooze) { if (timeIntervalInMilli_ != 0) { // snooze the reminder by manual - extendContent = GetShowTime(triggerTimeInMilli_) + - (snoozeContent_ == "" ? "" : (" (" + snoozeContent_ + ")")); + extendContent = (snoozeContent_ == "" ? "" : snoozeContent_); notificationRequest_->SetTapDismissed(false); } else { // the reminder is expired now, when timeInterval is 0 - extendContent = GetShowTime(reminderTimeInMilli_) + - (expiredContent_ == "" ? "" : (" (" + expiredContent_ + ")")); + extendContent = (expiredContent_ == "" ? "" : expiredContent_); } } else if (IsAlerting()) { // the reminder is alerting, or ring duration is 0 - extendContent = GetShowTime(reminderTimeInMilli_); + extendContent = ""; } else if (snoozeTimesDynamic_ != snoozeTimes_) { // the reminder is snoozing by period artithmetic, when the ring duration is over. - extendContent = GetShowTime(triggerTimeInMilli_) + - (snoozeContent_ == "" ? "" : (" (" + snoozeContent_ + ")")); + extendContent = (snoozeContent_ == "" ? "" : snoozeContent_); notificationRequest_->SetTapDismissed(false); } else { // the reminder has already snoozed by period arithmetic, when the ring duration is over. - extendContent = GetShowTime(reminderTimeInMilli_) + - (expiredContent_ == "" ? "" : (" (" + expiredContent_ + ")")); + extendContent = (expiredContent_ == "" ? "" : expiredContent_); + } + if(extendContent == ""){ + displayContent_ == content_; + }else{ + displayContent_ == extendContent; } - displayContent_ = content_ + " " + extendContent; ANSR_LOGD("Display content=%{public}s", displayContent_.c_str()); }