diff --git a/frameworks/js/napi/src/common.cpp b/frameworks/js/napi/src/common.cpp index 53d3738f6f3acea2517d06586b7a0b7525e35ebe..310a5942af7ba86a656126206816ad104fd352fa 100644 --- a/frameworks/js/napi/src/common.cpp +++ b/frameworks/js/napi/src/common.cpp @@ -204,6 +204,10 @@ napi_value Common::SetNotificationSlot(const napi_env &env, const NotificationSl napi_create_int32(env, slot.GetAuthorizedStatus(), &value); napi_set_named_property(env, result, "authorizedStatus", value); + // reminderMode?: number + napi_create_int32(env, slot.GetReminderMode(), &value); + napi_set_named_property(env, result, "reminderMode", value); + return NapiGetBoolean(env, true); } diff --git a/services/ans/src/advanced_notification_slot_service.cpp b/services/ans/src/advanced_notification_slot_service.cpp index 67b3693969dc52c9b3e1933130b9e976e01a5fbf..f1918d56e20f5541aa9e135231501b8be6fc8b05 100644 --- a/services/ans/src/advanced_notification_slot_service.cpp +++ b/services/ans/src/advanced_notification_slot_service.cpp @@ -477,7 +477,9 @@ ErrCode AdvancedNotificationService::UpdateSlotReminderModeBySlotFlags( } for (auto slot : slots) { - slot->SetReminderMode(slot->GetReminderMode() & slotFlags); + auto configSlotReminderMode = + DelayedSingleton::GetInstance()->GetConfigSlotReminderModeByType(slot->GetType()); + slot->SetReminderMode((slot->GetReminderMode() ! slotFlags) & configSlotReminderMode); std::string bundleName = (bundle == nullptr) ? "" : bundle->GetBundleName(); ANS_LOGD("Update reminderMode of %{public}d in %{public}s, value is %{public}d.", slot->GetType(), bundleName.c_str(), slot->GetReminderMode()); diff --git a/services/ans/src/common/notification_config_parse.cpp b/services/ans/src/common/notification_config_parse.cpp index d83fd3ae8c3283843bff701d9580f19f099685bf..7952574a5587780934d99641ac027de753783b9f 100644 --- a/services/ans/src/common/notification_config_parse.cpp +++ b/services/ans/src/common/notification_config_parse.cpp @@ -33,7 +33,7 @@ NotificationConfigParse::NotificationConfigParse() {NotificationConstant::SlotType::SERVICE_REMINDER, 0b111111}, {NotificationConstant::SlotType::CONTENT_INFORMATION, 0b000000}, {NotificationConstant::SlotType::OTHER, 0b000000}, - {NotificationConstant::SlotType::LIVE_VIEW, 0b110011}, + {NotificationConstant::SlotType::LIVE_VIEW, 0b111011}, {NotificationConstant::SlotType::CUSTOMER_SERVICE, 0b110001}, {NotificationConstant::SlotType::EMERGENCY_INFORMATION, 0b111111} };