From e40b543d1442a95916fc13519376c2b4b7caf9c4 Mon Sep 17 00:00:00 2001 From: xdongs Date: Mon, 11 Aug 2025 11:42:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E5=8A=A8=E5=81=A5=E5=BA=B7=E6=80=BB?= =?UTF-8?q?=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xdongs --- .../notification_smart_reminder/smart_reminder_center.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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 3c9d7eaa5..893c16f87 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) { -- Gitee