diff --git a/interfaces/inner_api/notification_constant.h b/interfaces/inner_api/notification_constant.h index bf3f6e3eb969a136a16e6fb10205a21bb095153c..5b45966be7e5c8d3b21de333be6ed9a408a1e9f3 100644 --- a/interfaces/inner_api/notification_constant.h +++ b/interfaces/inner_api/notification_constant.h @@ -429,6 +429,7 @@ public: constexpr static const char* PC_DEVICE_TYPE = "pc"; constexpr static const char* DEVICESTYPES[] = {"headset", "liteWearable", "wearable", "pc", "pad"}; constexpr static const char* ANS_VOIP = "ANS_VOIP"; + constexpr static const char* PC_PAD_VOIP_FLAG = "110101"; }; } // namespace Notification } // namespace OHOS diff --git a/services/ans/src/notification_smart_reminder/smart_reminder_center.cpp b/services/ans/src/notification_smart_reminder/smart_reminder_center.cpp index 7ac232e5102a72095160d80308fed3e365871fda..524896607b1e8701963161ee3283348be017875f 100644 --- a/services/ans/src/notification_smart_reminder/smart_reminder_center.cpp +++ b/services/ans/src/notification_smart_reminder/smart_reminder_center.cpp @@ -496,14 +496,23 @@ void SmartReminderCenter::HandleReminderMethods( shared_ptr>> notificationFlagsOfDevices) const { std::string classfication = request->GetClassification(); - if (deviceType.compare(NotificationConstant::CURRENT_DEVICE_TYPE) == 0 && - classfication == NotificationConstant::ANS_VOIP) { - ANS_LOGI("VOIP or CALL is not affected with SmartReminder"); + + if (syncDevices.find(deviceType) == syncDevices.end()) { return; } - if (syncDevices.find(deviceType) == syncDevices.end()) { - return; + if (request->GetClassification() == NotificationConstant::ANS_VOIP) { + ANS_LOGI("VOIP CALL"); + if (deviceType.compare(NotificationConstant::CURRENT_DEVICE_TYPE) == 0) { + return; + } + if (deviceType.compare(NotificationConstant::PAD_DEVICE_TYPE) == 0 || + deviceType.compare(NotificationConstant::PC_DEVICE_TYPE) == 0) { + std::shared_ptr reminderFlags; + NotificationFlags::GetReminderFlagsByString(NotificationConstant::PC_PAD_VOIP_FLAG, reminderFlags); + (*notificationFlagsOfDevices)[deviceType] = reminderFlags; + return; + } } if (smartDevices.find(deviceType) == smartDevices.end()) {