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 3c9d7eaa5511b8957f7235b44cd3b69c90a38d86..893c16f8747a83da6ed984e791aca133fb1adfff 100644 --- a/services/ans/src/notification_smart_reminder/smart_reminder_center.cpp +++ b/services/ans/src/notification_smart_reminder/smart_reminder_center.cpp @@ -349,6 +349,11 @@ void SmartReminderCenter::InitValidDevices( smartDevices.insert(deviceType); request->SetNotificationControlFlags(notificationControlFlags | CONTROL_BY_SMART_REMINDER); } else { + bool distributedSwitch = GetDistributedSwitch(deviceType); + if (!distributedSwitch) { + ANS_LOGI("distributed switch is closed, deveiceType = %{public}s", deviceType.c_str()); + continue; + } bool appSwitch = GetAppSwitch(deviceType, request->GetOwnerBundleName(), request->GetOwnerUid()); // app-close if (!appSwitch) {