1 /*
2 * Copyright (c) 2021-2025 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 #include "notification_helper.h"
17 #include "ans_notification.h"
18 #include "singleton.h"
19 #include <memory>
20
21 namespace OHOS {
22 namespace Notification {
AddNotificationSlot(const NotificationSlot & slot)23 ErrCode NotificationHelper::AddNotificationSlot(const NotificationSlot &slot)
24 {
25 return DelayedSingleton<AnsNotification>::GetInstance()->AddNotificationSlot(slot);
26 }
27
AddSlotByType(const NotificationConstant::SlotType & slotType)28 ErrCode NotificationHelper::AddSlotByType(const NotificationConstant::SlotType &slotType)
29 {
30 return DelayedSingleton<AnsNotification>::GetInstance()->AddSlotByType(slotType);
31 }
32
AddNotificationSlots(const std::vector<NotificationSlot> & slots)33 ErrCode NotificationHelper::AddNotificationSlots(const std::vector<NotificationSlot> &slots)
34 {
35 return DelayedSingleton<AnsNotification>::GetInstance()->AddNotificationSlots(slots);
36 }
37
RemoveNotificationSlot(const NotificationConstant::SlotType & slotType)38 ErrCode NotificationHelper::RemoveNotificationSlot(const NotificationConstant::SlotType &slotType)
39 {
40 return DelayedSingleton<AnsNotification>::GetInstance()->RemoveNotificationSlot(slotType);
41 }
42
RemoveAllSlots()43 ErrCode NotificationHelper::RemoveAllSlots()
44 {
45 return DelayedSingleton<AnsNotification>::GetInstance()->RemoveAllSlots();
46 }
47
GetNotificationSlot(const NotificationConstant::SlotType & slotType,sptr<NotificationSlot> & slot)48 ErrCode NotificationHelper::GetNotificationSlot(
49 const NotificationConstant::SlotType &slotType, sptr<NotificationSlot> &slot)
50 {
51 return DelayedSingleton<AnsNotification>::GetInstance()->GetNotificationSlot(slotType, slot);
52 }
53
GetNotificationSlots(std::vector<sptr<NotificationSlot>> & slots)54 ErrCode NotificationHelper::GetNotificationSlots(std::vector<sptr<NotificationSlot>> &slots)
55 {
56 return DelayedSingleton<AnsNotification>::GetInstance()->GetNotificationSlots(slots);
57 }
58
GetNotificationSlotNumAsBundle(const NotificationBundleOption & bundleOption,uint64_t & num)59 ErrCode NotificationHelper::GetNotificationSlotNumAsBundle(const NotificationBundleOption &bundleOption, uint64_t &num)
60 {
61 return DelayedSingleton<AnsNotification>::GetInstance()->GetNotificationSlotNumAsBundle(bundleOption, num);
62 }
63
GetNotificationSlotFlagsAsBundle(const NotificationBundleOption & bundleOption,uint32_t & slotFlags)64 ErrCode NotificationHelper::GetNotificationSlotFlagsAsBundle(const NotificationBundleOption &bundleOption,
65 uint32_t &slotFlags)
66 {
67 return DelayedSingleton<AnsNotification>::GetInstance()->GetNotificationSlotFlagsAsBundle(bundleOption, slotFlags);
68 }
69
GetNotificationSettings(uint32_t & slotFlags)70 ErrCode NotificationHelper::GetNotificationSettings(uint32_t &slotFlags)
71 {
72 return DelayedSingleton<AnsNotification>::GetInstance()->GetNotificationSettings(slotFlags);
73 }
74
SetNotificationSlotFlagsAsBundle(const NotificationBundleOption & bundleOption,uint32_t slotFlags)75 ErrCode NotificationHelper::SetNotificationSlotFlagsAsBundle(const NotificationBundleOption &bundleOption,
76 uint32_t slotFlags)
77 {
78 return DelayedSingleton<AnsNotification>::GetInstance()->SetNotificationSlotFlagsAsBundle(bundleOption, slotFlags);
79 }
80
PublishNotification(const NotificationRequest & request,const std::string & instanceKey)81 ErrCode NotificationHelper::PublishNotification(const NotificationRequest &request,
82 const std::string &instanceKey)
83 {
84 return DelayedSingleton<AnsNotification>::GetInstance()->PublishNotification(
85 request, instanceKey);
86 }
87
PublishNotification(const std::string & label,const NotificationRequest & request,const std::string & instanceKey)88 ErrCode NotificationHelper::PublishNotification(const std::string &label,
89 const NotificationRequest &request, const std::string &instanceKey)
90 {
91 return DelayedSingleton<AnsNotification>::GetInstance()->PublishNotification(
92 label, request, instanceKey);
93 }
94
PublishNotificationForIndirectProxy(const NotificationRequest & request)95 ErrCode NotificationHelper::PublishNotificationForIndirectProxy(const NotificationRequest &request)
96 {
97 return DelayedSingleton<AnsNotification>::GetInstance()->PublishNotificationForIndirectProxy(request);
98 }
99
CancelNotification(int32_t notificationId,const std::string & instanceKey)100 ErrCode NotificationHelper::CancelNotification(int32_t notificationId, const std::string &instanceKey)
101 {
102 return DelayedSingleton<AnsNotification>::GetInstance()->CancelNotification(
103 notificationId, instanceKey);
104 }
105
CancelNotification(const std::string & label,int32_t notificationId,const std::string & instanceKey)106 ErrCode NotificationHelper::CancelNotification(const std::string &label, int32_t notificationId,
107 const std::string &instanceKey)
108 {
109 return DelayedSingleton<AnsNotification>::GetInstance()->CancelNotification(
110 label, notificationId, instanceKey);
111 }
112
CancelAllNotifications(const std::string & instanceKey)113 ErrCode NotificationHelper::CancelAllNotifications(const std::string &instanceKey)
114 {
115 return DelayedSingleton<AnsNotification>::GetInstance()->CancelAllNotifications(instanceKey);
116 }
117
CancelAsBundle(int32_t notificationId,const std::string & representativeBundle,int32_t userId)118 ErrCode NotificationHelper::CancelAsBundle(
119 int32_t notificationId, const std::string &representativeBundle, int32_t userId)
120 {
121 return DelayedSingleton<AnsNotification>::GetInstance()->CancelAsBundle(
122 notificationId, representativeBundle, userId);
123 }
124
CancelAsBundle(const NotificationBundleOption & bundleOption,int32_t notificationId)125 ErrCode NotificationHelper::CancelAsBundle(
126 const NotificationBundleOption &bundleOption, int32_t notificationId)
127 {
128 return DelayedSingleton<AnsNotification>::GetInstance()->CancelAsBundle(
129 bundleOption, notificationId);
130 }
131
GetActiveNotificationNums(uint64_t & num)132 ErrCode NotificationHelper::GetActiveNotificationNums(uint64_t &num)
133 {
134 return DelayedSingleton<AnsNotification>::GetInstance()->GetActiveNotificationNums(num);
135 }
136
GetActiveNotifications(std::vector<sptr<NotificationRequest>> & request,const std::string & instanceKey)137 ErrCode NotificationHelper::GetActiveNotifications(
138 std::vector<sptr<NotificationRequest>> &request, const std::string &instanceKey)
139 {
140 return DelayedSingleton<AnsNotification>::GetInstance()->GetActiveNotifications(
141 request, instanceKey);
142 }
143
CanPublishNotificationAsBundle(const std::string & representativeBundle,bool & canPublish)144 ErrCode NotificationHelper::CanPublishNotificationAsBundle(const std::string &representativeBundle, bool &canPublish)
145 {
146 return DelayedSingleton<AnsNotification>::GetInstance()->CanPublishNotificationAsBundle(
147 representativeBundle, canPublish);
148 }
149
PublishNotificationAsBundle(const std::string & representativeBundle,const NotificationRequest & request)150 ErrCode NotificationHelper::PublishNotificationAsBundle(
151 const std::string &representativeBundle, const NotificationRequest &request)
152 {
153 return DelayedSingleton<AnsNotification>::GetInstance()->PublishNotificationAsBundle(representativeBundle, request);
154 }
155
SetNotificationBadgeNum()156 ErrCode NotificationHelper::SetNotificationBadgeNum()
157 {
158 return DelayedSingleton<AnsNotification>::GetInstance()->SetNotificationBadgeNum();
159 }
160
SetNotificationBadgeNum(int32_t num)161 ErrCode NotificationHelper::SetNotificationBadgeNum(int32_t num)
162 {
163 return DelayedSingleton<AnsNotification>::GetInstance()->SetNotificationBadgeNum(num);
164 }
165
IsAllowedNotify(bool & allowed)166 ErrCode NotificationHelper::IsAllowedNotify(bool &allowed)
167 {
168 return DelayedSingleton<AnsNotification>::GetInstance()->IsAllowedNotify(allowed);
169 }
170
IsAllowedNotifySelf(bool & allowed)171 ErrCode NotificationHelper::IsAllowedNotifySelf(bool &allowed)
172 {
173 return DelayedSingleton<AnsNotification>::GetInstance()->IsAllowedNotifySelf(allowed);
174 }
175
CanPopEnableNotificationDialog(sptr<AnsDialogHostClient> & hostClient,bool & canPop,std::string & bundleName)176 ErrCode NotificationHelper::CanPopEnableNotificationDialog(sptr<AnsDialogHostClient> &hostClient,
177 bool &canPop, std::string &bundleName)
178 {
179 return DelayedSingleton<AnsNotification>::GetInstance()->CanPopEnableNotificationDialog(
180 hostClient, canPop, bundleName);
181 }
182
RemoveEnableNotificationDialog()183 ErrCode NotificationHelper::RemoveEnableNotificationDialog()
184 {
185 return DelayedSingleton<AnsNotification>::GetInstance()->RemoveEnableNotificationDialog();
186 }
187
RequestEnableNotification(std::string & deviceId,sptr<AnsDialogHostClient> & hostClient,sptr<IRemoteObject> & callerToken)188 ErrCode NotificationHelper::RequestEnableNotification(std::string &deviceId,
189 sptr<AnsDialogHostClient> &hostClient,
190 sptr<IRemoteObject> &callerToken)
191 {
192 return DelayedSingleton<AnsNotification>::GetInstance()->RequestEnableNotification(
193 deviceId, hostClient, callerToken);
194 }
195
RequestEnableNotification(const std::string bundleName,const int32_t uid)196 ErrCode NotificationHelper::RequestEnableNotification(const std::string bundleName, const int32_t uid)
197 {
198 return DelayedSingleton<AnsNotification>::GetInstance()->RequestEnableNotification(
199 bundleName, uid);
200 }
201
HasNotificationPolicyAccessPermission(bool & hasPermission)202 ErrCode NotificationHelper::HasNotificationPolicyAccessPermission(bool &hasPermission)
203 {
204 return DelayedSingleton<AnsNotification>::GetInstance()->HasNotificationPolicyAccessPermission(hasPermission);
205 }
206
GetBundleImportance(NotificationSlot::NotificationLevel & importance)207 ErrCode NotificationHelper::GetBundleImportance(NotificationSlot::NotificationLevel &importance)
208 {
209 return DelayedSingleton<AnsNotification>::GetInstance()->GetBundleImportance(importance);
210 }
211
SubscribeNotification(const NotificationSubscriber & subscriber)212 ErrCode NotificationHelper::SubscribeNotification(const NotificationSubscriber &subscriber)
213 {
214 return DelayedSingleton<AnsNotification>::GetInstance()->SubscribeNotification(subscriber);
215 }
216
SubscribeNotification(const std::shared_ptr<NotificationSubscriber> & subscriber)217 ErrCode NotificationHelper::SubscribeNotification(const std::shared_ptr<NotificationSubscriber> &subscriber)
218 {
219 return DelayedSingleton<AnsNotification>::GetInstance()->SubscribeNotification(subscriber, nullptr);
220 }
221
SubscribeNotificationSelf(const NotificationSubscriber & subscriber)222 ErrCode NotificationHelper::SubscribeNotificationSelf(const NotificationSubscriber &subscriber)
223 {
224 return DelayedSingleton<AnsNotification>::GetInstance()->SubscribeNotificationSelf(subscriber);
225 }
226
SubscribeNotificationSelf(const std::shared_ptr<NotificationSubscriber> & subscriber)227 ErrCode NotificationHelper::SubscribeNotificationSelf(const std::shared_ptr<NotificationSubscriber> &subscriber)
228 {
229 return DelayedSingleton<AnsNotification>::GetInstance()->SubscribeNotificationSelf(subscriber);
230 }
231
SubscribeLocalLiveViewNotification(const NotificationLocalLiveViewSubscriber & subscriber,const bool isNative)232 ErrCode NotificationHelper::SubscribeLocalLiveViewNotification(const NotificationLocalLiveViewSubscriber &subscriber,
233 const bool isNative)
234 {
235 return DelayedSingleton<AnsNotification>::GetInstance()->SubscribeLocalLiveViewNotification(subscriber, isNative);
236 }
237
SubscribeNotification(const NotificationSubscriber & subscriber,const NotificationSubscribeInfo & subscribeInfo)238 ErrCode NotificationHelper::SubscribeNotification(
239 const NotificationSubscriber &subscriber, const NotificationSubscribeInfo &subscribeInfo)
240 {
241 return DelayedSingleton<AnsNotification>::GetInstance()->SubscribeNotification(subscriber, subscribeInfo);
242 }
243
SubscribeNotification(const std::shared_ptr<NotificationSubscriber> & subscriber,const sptr<NotificationSubscribeInfo> & subscribeInfo)244 ErrCode NotificationHelper::SubscribeNotification(const std::shared_ptr<NotificationSubscriber> &subscriber,
245 const sptr<NotificationSubscribeInfo> &subscribeInfo)
246 {
247 return DelayedSingleton<AnsNotification>::GetInstance()->SubscribeNotification(subscriber, subscribeInfo);
248 }
249
UnSubscribeNotification(NotificationSubscriber & subscriber)250 ErrCode NotificationHelper::UnSubscribeNotification(NotificationSubscriber &subscriber)
251 {
252 return DelayedSingleton<AnsNotification>::GetInstance()->UnSubscribeNotification(subscriber);
253 }
254
UnSubscribeNotification(const std::shared_ptr<NotificationSubscriber> & subscriber)255 ErrCode NotificationHelper::UnSubscribeNotification(const std::shared_ptr<NotificationSubscriber> &subscriber)
256 {
257 return DelayedSingleton<AnsNotification>::GetInstance()->UnSubscribeNotification(subscriber);
258 }
259
UnSubscribeNotification(NotificationSubscriber & subscriber,NotificationSubscribeInfo subscribeInfo)260 ErrCode NotificationHelper::UnSubscribeNotification(
261 NotificationSubscriber &subscriber, NotificationSubscribeInfo subscribeInfo)
262 {
263 return DelayedSingleton<AnsNotification>::GetInstance()->UnSubscribeNotification(subscriber, subscribeInfo);
264 }
265
UnSubscribeNotification(const std::shared_ptr<NotificationSubscriber> & subscriber,const sptr<NotificationSubscribeInfo> & subscribeInfo)266 ErrCode NotificationHelper::UnSubscribeNotification(const std::shared_ptr<NotificationSubscriber> &subscriber,
267 const sptr<NotificationSubscribeInfo> &subscribeInfo)
268 {
269 return DelayedSingleton<AnsNotification>::GetInstance()->UnSubscribeNotification(subscriber, subscribeInfo);
270 }
271
TriggerLocalLiveView(const NotificationBundleOption & bundleOption,const int32_t notificationId,const NotificationButtonOption & buttonOption)272 ErrCode NotificationHelper::TriggerLocalLiveView(const NotificationBundleOption &bundleOption,
273 const int32_t notificationId, const NotificationButtonOption &buttonOption)
274 {
275 return DelayedSingleton<AnsNotification>::GetInstance()->TriggerLocalLiveView(
276 bundleOption, notificationId, buttonOption);
277 }
278
RemoveNotification(const std::string & key,int32_t removeReason)279 ErrCode NotificationHelper::RemoveNotification(const std::string &key, int32_t removeReason)
280 {
281 return DelayedSingleton<AnsNotification>::GetInstance()->RemoveNotification(key, removeReason);
282 }
283
RemoveNotification(const NotificationBundleOption & bundleOption,const int32_t notificationId,const std::string & label,int32_t removeReason)284 ErrCode NotificationHelper::RemoveNotification(const NotificationBundleOption &bundleOption,
285 const int32_t notificationId, const std::string &label, int32_t removeReason)
286 {
287 return DelayedSingleton<AnsNotification>::GetInstance()->RemoveNotification(bundleOption,
288 notificationId, label, removeReason);
289 }
290
RemoveAllNotifications(const NotificationBundleOption & bundleOption)291 ErrCode NotificationHelper::RemoveAllNotifications(const NotificationBundleOption &bundleOption)
292 {
293 return DelayedSingleton<AnsNotification>::GetInstance()->RemoveAllNotifications(bundleOption);
294 }
295
RemoveNotifications(const std::vector<std::string> hashcodes,int32_t removeReason)296 ErrCode NotificationHelper::RemoveNotifications(const std::vector<std::string> hashcodes, int32_t removeReason)
297 {
298 return DelayedSingleton<AnsNotification>::GetInstance()->RemoveNotifications(hashcodes, removeReason);
299 }
300
RemoveNotificationsByBundle(const NotificationBundleOption & bundleOption)301 ErrCode NotificationHelper::RemoveNotificationsByBundle(const NotificationBundleOption &bundleOption)
302 {
303 return DelayedSingleton<AnsNotification>::GetInstance()->RemoveNotificationsByBundle(bundleOption);
304 }
305
RemoveNotifications()306 ErrCode NotificationHelper::RemoveNotifications()
307 {
308 return DelayedSingleton<AnsNotification>::GetInstance()->RemoveNotifications();
309 }
310
RemoveDistributedNotifications(const std::vector<std::string> & hashcodes,const NotificationConstant::SlotType & slotType,const NotificationConstant::DistributedDeleteType & deleteType,const int32_t removeReason,const std::string & deviceId)311 ErrCode NotificationHelper::RemoveDistributedNotifications(const std::vector<std::string>& hashcodes,
312 const NotificationConstant::SlotType& slotType,
313 const NotificationConstant::DistributedDeleteType& deleteType,
314 const int32_t removeReason, const std::string& deviceId)
315 {
316 return DelayedSingleton<AnsNotification>::GetInstance()->RemoveDistributedNotifications(
317 hashcodes, slotType, deleteType, removeReason, deviceId);
318 }
319
GetNotificationSlotsForBundle(const NotificationBundleOption & bundleOption,std::vector<sptr<NotificationSlot>> & slots)320 ErrCode NotificationHelper::GetNotificationSlotsForBundle(
321 const NotificationBundleOption &bundleOption, std::vector<sptr<NotificationSlot>> &slots)
322 {
323 return DelayedSingleton<AnsNotification>::GetInstance()->GetNotificationSlotsForBundle(bundleOption, slots);
324 }
325
GetNotificationSlotForBundle(const NotificationBundleOption & bundleOption,const NotificationConstant::SlotType & slotType,sptr<NotificationSlot> & slot)326 ErrCode NotificationHelper::GetNotificationSlotForBundle(
327 const NotificationBundleOption &bundleOption, const NotificationConstant::SlotType &slotType,
328 sptr<NotificationSlot> &slot)
329 {
330 return DelayedSingleton<AnsNotification>::GetInstance()->GetNotificationSlotForBundle(bundleOption, slotType, slot);
331 }
332
UpdateNotificationSlots(const NotificationBundleOption & bundleOption,const std::vector<sptr<NotificationSlot>> & slots)333 ErrCode NotificationHelper::UpdateNotificationSlots(
334 const NotificationBundleOption &bundleOption, const std::vector<sptr<NotificationSlot>> &slots)
335 {
336 return DelayedSingleton<AnsNotification>::GetInstance()->UpdateNotificationSlots(bundleOption, slots);
337 }
338
GetAllActiveNotifications(std::vector<sptr<Notification>> & notification)339 ErrCode NotificationHelper::GetAllActiveNotifications(std::vector<sptr<Notification>> ¬ification)
340 {
341 return DelayedSingleton<AnsNotification>::GetInstance()->GetAllActiveNotifications(notification);
342 }
343
GetAllNotificationsBySlotType(std::vector<sptr<Notification>> & notifications,const NotificationConstant::SlotType slotType)344 ErrCode NotificationHelper::GetAllNotificationsBySlotType(std::vector<sptr<Notification>> ¬ifications,
345 const NotificationConstant::SlotType slotType)
346 {
347 return DelayedSingleton<AnsNotification>::GetInstance()->GetAllNotificationsBySlotType(notifications, slotType);
348 }
349
GetAllActiveNotifications(const std::vector<std::string> key,std::vector<sptr<Notification>> & notification)350 ErrCode NotificationHelper::GetAllActiveNotifications(
351 const std::vector<std::string> key, std::vector<sptr<Notification>> ¬ification)
352 {
353 return DelayedSingleton<AnsNotification>::GetInstance()->GetAllActiveNotifications(key, notification);
354 }
355
GetActiveNotificationByFilter(const LiveViewFilter & filter,sptr<NotificationRequest> & request)356 ErrCode NotificationHelper::GetActiveNotificationByFilter(
357 const LiveViewFilter &filter, sptr<NotificationRequest> &request)
358 {
359 return DelayedSingleton<AnsNotification>::GetInstance()->GetActiveNotificationByFilter(filter, request);
360 }
361
IsAllowedNotify(const NotificationBundleOption & bundleOption,bool & allowed)362 ErrCode NotificationHelper::IsAllowedNotify(const NotificationBundleOption &bundleOption, bool &allowed)
363 {
364 return DelayedSingleton<AnsNotification>::GetInstance()->IsAllowedNotify(bundleOption, allowed);
365 }
366
SetNotificationsEnabledForAllBundles(const std::string & deviceId,bool enabled)367 ErrCode NotificationHelper::SetNotificationsEnabledForAllBundles(const std::string &deviceId, bool enabled)
368 {
369 return DelayedSingleton<AnsNotification>::GetInstance()->SetNotificationsEnabledForAllBundles(deviceId, enabled);
370 }
371
SetNotificationsEnabledForDefaultBundle(const std::string & deviceId,bool enabled)372 ErrCode NotificationHelper::SetNotificationsEnabledForDefaultBundle(const std::string &deviceId, bool enabled)
373 {
374 return DelayedSingleton<AnsNotification>::GetInstance()->SetNotificationsEnabledForDefaultBundle(deviceId, enabled);
375 }
376
SetNotificationsEnabledForSpecifiedBundle(const NotificationBundleOption & bundleOption,std::string & deviceId,bool enabled)377 ErrCode NotificationHelper::SetNotificationsEnabledForSpecifiedBundle(
378 const NotificationBundleOption &bundleOption, std::string &deviceId, bool enabled)
379 {
380 return DelayedSingleton<AnsNotification>::GetInstance()->SetNotificationsEnabledForSpecifiedBundle(
381 bundleOption, deviceId, enabled);
382 }
383
SetShowBadgeEnabledForBundle(const NotificationBundleOption & bundleOption,bool enabled)384 ErrCode NotificationHelper::SetShowBadgeEnabledForBundle(const NotificationBundleOption &bundleOption, bool enabled)
385 {
386 return DelayedSingleton<AnsNotification>::GetInstance()->SetShowBadgeEnabledForBundle(bundleOption, enabled);
387 }
388
GetShowBadgeEnabledForBundle(const NotificationBundleOption & bundleOption,bool & enabled)389 ErrCode NotificationHelper::GetShowBadgeEnabledForBundle(const NotificationBundleOption &bundleOption, bool &enabled)
390 {
391 return DelayedSingleton<AnsNotification>::GetInstance()->GetShowBadgeEnabledForBundle(bundleOption, enabled);
392 }
393
GetShowBadgeEnabled(bool & enabled)394 ErrCode NotificationHelper::GetShowBadgeEnabled(bool &enabled)
395 {
396 return DelayedSingleton<AnsNotification>::GetInstance()->GetShowBadgeEnabled(enabled);
397 }
398
CancelGroup(const std::string & groupName,const std::string & instanceKey)399 ErrCode NotificationHelper::CancelGroup(const std::string &groupName, const std::string &instanceKey)
400 {
401 return DelayedSingleton<AnsNotification>::GetInstance()->CancelGroup(
402 groupName, instanceKey);
403 }
404
RemoveGroupByBundle(const NotificationBundleOption & bundleOption,const std::string & groupName)405 ErrCode NotificationHelper::RemoveGroupByBundle(
406 const NotificationBundleOption &bundleOption, const std::string &groupName)
407 {
408 return DelayedSingleton<AnsNotification>::GetInstance()->RemoveGroupByBundle(bundleOption, groupName);
409 }
410
SetDoNotDisturbDate(const NotificationDoNotDisturbDate & doNotDisturbDate)411 ErrCode NotificationHelper::SetDoNotDisturbDate(const NotificationDoNotDisturbDate &doNotDisturbDate)
412 {
413 return DelayedSingleton<AnsNotification>::GetInstance()->SetDoNotDisturbDate(doNotDisturbDate);
414 }
415
GetDoNotDisturbDate(NotificationDoNotDisturbDate & doNotDisturbDate)416 ErrCode NotificationHelper::GetDoNotDisturbDate(NotificationDoNotDisturbDate &doNotDisturbDate)
417 {
418 return DelayedSingleton<AnsNotification>::GetInstance()->GetDoNotDisturbDate(doNotDisturbDate);
419 }
420
AddDoNotDisturbProfiles(const std::vector<sptr<NotificationDoNotDisturbProfile>> & profiles)421 ErrCode NotificationHelper::AddDoNotDisturbProfiles(const std::vector<sptr<NotificationDoNotDisturbProfile>> &profiles)
422 {
423 return DelayedSingleton<AnsNotification>::GetInstance()->AddDoNotDisturbProfiles(profiles);
424 }
425
RemoveDoNotDisturbProfiles(const std::vector<sptr<NotificationDoNotDisturbProfile>> & profiles)426 ErrCode NotificationHelper::RemoveDoNotDisturbProfiles(
427 const std::vector<sptr<NotificationDoNotDisturbProfile>> &profiles)
428 {
429 return DelayedSingleton<AnsNotification>::GetInstance()->RemoveDoNotDisturbProfiles(profiles);
430 }
431
DoesSupportDoNotDisturbMode(bool & doesSupport)432 ErrCode NotificationHelper::DoesSupportDoNotDisturbMode(bool &doesSupport)
433 {
434 return DelayedSingleton<AnsNotification>::GetInstance()->DoesSupportDoNotDisturbMode(doesSupport);
435 }
436
IsNeedSilentInDoNotDisturbMode(const std::string & phoneNumber,int32_t callerType)437 ErrCode NotificationHelper::IsNeedSilentInDoNotDisturbMode(const std::string &phoneNumber, int32_t callerType)
438 {
439 return DelayedSingleton<AnsNotification>::GetInstance()->IsNeedSilentInDoNotDisturbMode(phoneNumber, callerType);
440 }
441
IsDistributedEnabled(bool & enabled)442 ErrCode NotificationHelper::IsDistributedEnabled(bool &enabled)
443 {
444 return DelayedSingleton<AnsNotification>::GetInstance()->IsDistributedEnabled(enabled);
445 }
446
EnableDistributed(const bool enabled)447 ErrCode NotificationHelper::EnableDistributed(const bool enabled)
448 {
449 return DelayedSingleton<AnsNotification>::GetInstance()->EnableDistributed(enabled);
450 }
451
EnableDistributedByBundle(const NotificationBundleOption & bundleOption,const bool enabled)452 ErrCode NotificationHelper::EnableDistributedByBundle(const NotificationBundleOption &bundleOption, const bool enabled)
453 {
454 return DelayedSingleton<AnsNotification>::GetInstance()->EnableDistributedByBundle(bundleOption, enabled);
455 }
456
EnableDistributedSelf(const bool enabled)457 ErrCode NotificationHelper::EnableDistributedSelf(const bool enabled)
458 {
459 return DelayedSingleton<AnsNotification>::GetInstance()->EnableDistributedSelf(enabled);
460 }
461
IsDistributedEnableByBundle(const NotificationBundleOption & bundleOption,bool & enabled)462 ErrCode NotificationHelper::IsDistributedEnableByBundle(const NotificationBundleOption &bundleOption, bool &enabled)
463 {
464 return DelayedSingleton<AnsNotification>::GetInstance()->IsDistributedEnableByBundle(bundleOption, enabled);
465 }
466
GetDeviceRemindType(NotificationConstant::RemindType & remindType)467 ErrCode NotificationHelper::GetDeviceRemindType(NotificationConstant::RemindType &remindType)
468 {
469 return DelayedSingleton<AnsNotification>::GetInstance()->GetDeviceRemindType(remindType);
470 }
471
PublishContinuousTaskNotification(const NotificationRequest & request)472 ErrCode NotificationHelper::PublishContinuousTaskNotification(const NotificationRequest &request)
473 {
474 return DelayedSingleton<AnsNotification>::GetInstance()->PublishContinuousTaskNotification(request);
475 }
476
CancelContinuousTaskNotification(const std::string & label,int32_t notificationId)477 ErrCode NotificationHelper::CancelContinuousTaskNotification(const std::string &label, int32_t notificationId)
478 {
479 return DelayedSingleton<AnsNotification>::GetInstance()->CancelContinuousTaskNotification(label, notificationId);
480 }
481
IsSupportTemplate(const std::string & templateName,bool & support)482 ErrCode NotificationHelper::IsSupportTemplate(const std::string &templateName, bool &support)
483 {
484 return DelayedSingleton<AnsNotification>::GetInstance()->IsSupportTemplate(templateName, support);
485 }
486
IsAllowedNotify(const int32_t & userId,bool & allowed)487 ErrCode NotificationHelper::IsAllowedNotify(const int32_t &userId, bool &allowed)
488 {
489 return DelayedSingleton<AnsNotification>::GetInstance()->IsAllowedNotify(userId, allowed);
490 }
491
SetNotificationsEnabledForAllBundles(const int32_t & userId,bool enabled)492 ErrCode NotificationHelper::SetNotificationsEnabledForAllBundles(const int32_t &userId, bool enabled)
493 {
494 return DelayedSingleton<AnsNotification>::GetInstance()->SetNotificationsEnabledForAllBundles(
495 userId, enabled);
496 }
497
RemoveNotifications(const int32_t & userId)498 ErrCode NotificationHelper::RemoveNotifications(const int32_t &userId)
499 {
500 return DelayedSingleton<AnsNotification>::GetInstance()->RemoveNotifications(userId);
501 }
502
SetDoNotDisturbDate(const int32_t & userId,const NotificationDoNotDisturbDate & doNotDisturbDate)503 ErrCode NotificationHelper::SetDoNotDisturbDate(const int32_t &userId,
504 const NotificationDoNotDisturbDate &doNotDisturbDate)
505 {
506 return DelayedSingleton<AnsNotification>::GetInstance()->SetDoNotDisturbDate(userId, doNotDisturbDate);
507 }
508
GetDoNotDisturbDate(const int32_t & userId,NotificationDoNotDisturbDate & doNotDisturbDate)509 ErrCode NotificationHelper::GetDoNotDisturbDate(const int32_t &userId, NotificationDoNotDisturbDate &doNotDisturbDate)
510 {
511 return DelayedSingleton<AnsNotification>::GetInstance()->GetDoNotDisturbDate(userId, doNotDisturbDate);
512 }
513
SetEnabledForBundleSlot(const NotificationBundleOption & bundleOption,const NotificationConstant::SlotType & slotType,bool enabled,bool isForceControl)514 ErrCode NotificationHelper::SetEnabledForBundleSlot(const NotificationBundleOption &bundleOption,
515 const NotificationConstant::SlotType &slotType, bool enabled, bool isForceControl)
516 {
517 return DelayedSingleton<AnsNotification>::GetInstance()->SetEnabledForBundleSlot(bundleOption,
518 slotType, enabled, isForceControl);
519 }
520
GetEnabledForBundleSlot(const NotificationBundleOption & bundleOption,const NotificationConstant::SlotType & slotType,bool & enabled)521 ErrCode NotificationHelper::GetEnabledForBundleSlot(
522 const NotificationBundleOption &bundleOption, const NotificationConstant::SlotType &slotType, bool &enabled)
523 {
524 return DelayedSingleton<AnsNotification>::GetInstance()->GetEnabledForBundleSlot(bundleOption, slotType, enabled);
525 }
526
GetEnabledForBundleSlotSelf(const NotificationConstant::SlotType & slotType,bool & enabled)527 ErrCode NotificationHelper::GetEnabledForBundleSlotSelf(const NotificationConstant::SlotType &slotType, bool &enabled)
528 {
529 return DelayedSingleton<AnsNotification>::GetInstance()->GetEnabledForBundleSlotSelf(slotType, enabled);
530 }
531
SetSyncNotificationEnabledWithoutApp(const int32_t userId,const bool enabled)532 ErrCode NotificationHelper::SetSyncNotificationEnabledWithoutApp(const int32_t userId, const bool enabled)
533 {
534 return DelayedSingleton<AnsNotification>::GetInstance()->SetSyncNotificationEnabledWithoutApp(
535 userId, enabled);
536 }
537
GetSyncNotificationEnabledWithoutApp(const int32_t userId,bool & enabled)538 ErrCode NotificationHelper::GetSyncNotificationEnabledWithoutApp(const int32_t userId, bool &enabled)
539 {
540 return DelayedSingleton<AnsNotification>::GetInstance()->GetSyncNotificationEnabledWithoutApp(
541 userId, enabled);
542 }
543
SetBadgeNumber(int32_t badgeNumber,const std::string & instanceKey)544 ErrCode NotificationHelper::SetBadgeNumber(int32_t badgeNumber, const std::string &instanceKey)
545 {
546 return DelayedSingleton<AnsNotification>::GetInstance()->SetBadgeNumber(badgeNumber, instanceKey);
547 }
548
SetBadgeNumberByBundle(const NotificationBundleOption & bundleOption,int32_t badgeNumber)549 ErrCode NotificationHelper::SetBadgeNumberByBundle(const NotificationBundleOption &bundleOption, int32_t badgeNumber)
550 {
551 return DelayedSingleton<AnsNotification>::GetInstance()->SetBadgeNumberByBundle(bundleOption, badgeNumber);
552 }
553
SetBadgeNumberForDhByBundle(const NotificationBundleOption & bundleOption,int32_t badgeNumber)554 ErrCode NotificationHelper::SetBadgeNumberForDhByBundle(
555 const NotificationBundleOption &bundleOption, int32_t badgeNumber)
556 {
557 return DelayedSingleton<AnsNotification>::GetInstance()->SetBadgeNumberForDhByBundle(bundleOption, badgeNumber);
558 }
559
GetAllNotificationEnabledBundles(std::vector<NotificationBundleOption> & bundleOption)560 ErrCode NotificationHelper::GetAllNotificationEnabledBundles(std::vector<NotificationBundleOption> &bundleOption)
561 {
562 return DelayedSingleton<AnsNotification>::GetInstance()->GetAllNotificationEnabledBundles(bundleOption);
563 }
564
GetAllLiveViewEnabledBundles(std::vector<NotificationBundleOption> & bundleOption)565 ErrCode NotificationHelper::GetAllLiveViewEnabledBundles(std::vector<NotificationBundleOption> &bundleOption)
566 {
567 return DelayedSingleton<AnsNotification>::GetInstance()->GetAllLiveViewEnabledBundles(bundleOption);
568 }
569
GetAllDistribuedEnabledBundles(const std::string & deviceType,std::vector<NotificationBundleOption> & bundleOption)570 ErrCode NotificationHelper::GetAllDistribuedEnabledBundles(const std::string& deviceType,
571 std::vector<NotificationBundleOption> &bundleOption)
572 {
573 return DelayedSingleton<AnsNotification>::GetInstance()->GetAllDistribuedEnabledBundles(deviceType, bundleOption);
574 }
575
RegisterPushCallback(const sptr<IRemoteObject> & pushCallback,const sptr<NotificationCheckRequest> & notificationCheckRequest)576 ErrCode NotificationHelper::RegisterPushCallback(const sptr<IRemoteObject> &pushCallback,
577 const sptr<NotificationCheckRequest> ¬ificationCheckRequest)
578 {
579 return DelayedSingleton<AnsNotification>::GetInstance()->RegisterPushCallback(pushCallback,
580 notificationCheckRequest);
581 }
582
UnregisterPushCallback()583 ErrCode NotificationHelper::UnregisterPushCallback()
584 {
585 return DelayedSingleton<AnsNotification>::GetInstance()->UnregisterPushCallback();
586 }
587
SetDistributedEnabledByBundle(const NotificationBundleOption & bundleOption,const std::string & deviceType,const bool enabled)588 ErrCode NotificationHelper::SetDistributedEnabledByBundle(const NotificationBundleOption &bundleOption,
589 const std::string &deviceType, const bool enabled)
590 {
591 return DelayedSingleton<AnsNotification>::GetInstance()->SetDistributedEnabledByBundle(bundleOption,
592 deviceType, enabled);
593 }
594
SetDistributedBundleOption(const std::vector<DistributedBundleOption> & bundles,const std::string & deviceType)595 ErrCode NotificationHelper::SetDistributedBundleOption(const std::vector<DistributedBundleOption> &bundles,
596 const std::string &deviceType)
597 {
598 return DelayedSingleton<AnsNotification>::GetInstance()->SetDistributedBundleOption(bundles, deviceType);
599 }
600
IsDistributedEnabledByBundle(const NotificationBundleOption & bundleOption,const std::string & deviceType,bool & enabled)601 ErrCode NotificationHelper::IsDistributedEnabledByBundle(const NotificationBundleOption &bundleOption,
602 const std::string &deviceType, bool &enabled)
603 {
604 return DelayedSingleton<AnsNotification>::GetInstance()->IsDistributedEnabledByBundle(bundleOption,
605 deviceType, enabled);
606 }
607
SetDistributedEnabled(const std::string & deviceType,const bool & enabled)608 ErrCode NotificationHelper::SetDistributedEnabled(const std::string &deviceType, const bool &enabled)
609 {
610 return DelayedSingleton<AnsNotification>::GetInstance()->SetDistributedEnabled(deviceType, enabled);
611 }
612
IsDistributedEnabled(const std::string & deviceType,bool & enabled)613 ErrCode NotificationHelper::IsDistributedEnabled(const std::string &deviceType, bool &enabled)
614 {
615 return DelayedSingleton<AnsNotification>::GetInstance()->IsDistributedEnabled(deviceType, enabled);
616 }
617
GetDistributedAbility(int32_t & abilityId)618 ErrCode NotificationHelper::GetDistributedAbility(int32_t &abilityId)
619 {
620 return DelayedSingleton<AnsNotification>::GetInstance()->GetDistributedAbility(abilityId);
621 }
622
GetDistributedAuthStatus(const std::string & deviceType,const std::string & deviceId,int32_t userId,bool & isAuth)623 ErrCode NotificationHelper::GetDistributedAuthStatus(
624 const std::string &deviceType, const std::string &deviceId, int32_t userId, bool &isAuth)
625 {
626 return DelayedSingleton<AnsNotification>::GetInstance()->GetDistributedAuthStatus(
627 deviceType, deviceId, userId, isAuth);
628 }
629
SetDistributedAuthStatus(const std::string & deviceType,const std::string & deviceId,int32_t userId,bool isAuth)630 ErrCode NotificationHelper::SetDistributedAuthStatus(
631 const std::string &deviceType, const std::string &deviceId, int32_t userId, bool isAuth)
632 {
633 return DelayedSingleton<AnsNotification>::GetInstance()->SetDistributedAuthStatus(
634 deviceType, deviceId, userId, isAuth);
635 }
636
SetSmartReminderEnabled(const std::string & deviceType,const bool enabled)637 ErrCode NotificationHelper::SetSmartReminderEnabled(const std::string &deviceType, const bool enabled)
638 {
639 return DelayedSingleton<AnsNotification>::GetInstance()->SetSmartReminderEnabled(deviceType, enabled);
640 }
641
IsSmartReminderEnabled(const std::string & deviceType,bool & enabled)642 ErrCode NotificationHelper::IsSmartReminderEnabled(const std::string &deviceType, bool &enabled)
643 {
644 return DelayedSingleton<AnsNotification>::GetInstance()->IsSmartReminderEnabled(deviceType, enabled);
645 }
646
SetSilentReminderEnabled(const NotificationBundleOption & bundleOption,const bool enabled)647 ErrCode NotificationHelper::SetSilentReminderEnabled(const NotificationBundleOption &bundleOption, const bool enabled)
648 {
649 return DelayedSingleton<AnsNotification>::GetInstance()->SetSilentReminderEnabled(bundleOption, enabled);
650 }
651
IsSilentReminderEnabled(const NotificationBundleOption & bundleOption,int32_t & enableStatus)652 ErrCode NotificationHelper::IsSilentReminderEnabled(const NotificationBundleOption &bundleOption, int32_t &enableStatus)
653 {
654 return DelayedSingleton<AnsNotification>::GetInstance()->IsSilentReminderEnabled(bundleOption, enableStatus);
655 }
656
SetDistributedEnabledBySlot(const NotificationConstant::SlotType & slotType,const std::string & deviceType,const bool enabled)657 ErrCode NotificationHelper::SetDistributedEnabledBySlot(
658 const NotificationConstant::SlotType &slotType, const std::string &deviceType, const bool enabled)
659 {
660 return DelayedSingleton<AnsNotification>::GetInstance()->SetDistributedEnabledBySlot(slotType, deviceType, enabled);
661 }
662
IsDistributedEnabledBySlot(const NotificationConstant::SlotType & slotType,const std::string & deviceType,bool & enabled)663 ErrCode NotificationHelper::IsDistributedEnabledBySlot(
664 const NotificationConstant::SlotType &slotType, const std::string &deviceType, bool &enabled)
665 {
666 return DelayedSingleton<AnsNotification>::GetInstance()->IsDistributedEnabledBySlot(slotType, deviceType, enabled);
667 }
668
CancelAsBundleWithAgent(const NotificationBundleOption & bundleOption,const int32_t id)669 ErrCode NotificationHelper::CancelAsBundleWithAgent(const NotificationBundleOption &bundleOption, const int32_t id)
670 {
671 return DelayedSingleton<AnsNotification>::GetInstance()->CancelAsBundleWithAgent(bundleOption, id);
672 }
673
SetAdditionConfig(const std::string & key,const std::string & value)674 ErrCode NotificationHelper::SetAdditionConfig(const std::string &key, const std::string &value)
675 {
676 return DelayedSingleton<AnsNotification>::GetInstance()->SetAdditionConfig(key, value);
677 }
678
SetTargetDeviceStatus(const std::string & deviceType,const uint32_t status,const std::string deviceId)679 ErrCode NotificationHelper::SetTargetDeviceStatus(const std::string &deviceType, const uint32_t status,
680 const std::string deviceId)
681 {
682 return DelayedSingleton<AnsNotification>::GetInstance()->SetTargetDeviceStatus(deviceType, status, deviceId);
683 }
684
SetTargetDeviceStatus(const std::string & deviceType,const uint32_t status,const uint32_t controlFlag,const std::string deviceId,int32_t userId)685 ErrCode NotificationHelper::SetTargetDeviceStatus(const std::string &deviceType, const uint32_t status,
686 const uint32_t controlFlag, const std::string deviceId, int32_t userId)
687 {
688 return DelayedSingleton<AnsNotification>::GetInstance()->SetTargetDeviceStatus(deviceType, status, controlFlag,
689 deviceId, userId);
690 }
691
SetTargetDeviceBundleList(const std::string & deviceType,const std::string & deviceId,int operatorType,const std::vector<std::string> & bundleList,const std::vector<std::string> & labelList)692 ErrCode NotificationHelper::SetTargetDeviceBundleList(const std::string& deviceType, const std::string& deviceId,
693 int operatorType, const std::vector<std::string>& bundleList, const std::vector<std::string>& labelList)
694 {
695 return DelayedSingleton<AnsNotification>::GetInstance()->SetTargetDeviceBundleList(deviceType, deviceId,
696 operatorType, bundleList, labelList);
697 }
698
SetTargetDeviceSwitch(const std::string & deviceType,const std::string & deviceId,bool notificaitonEnable,bool liveViewEnable)699 ErrCode NotificationHelper::SetTargetDeviceSwitch(const std::string& deviceType, const std::string& deviceId,
700 bool notificaitonEnable, bool liveViewEnable)
701 {
702 return DelayedSingleton<AnsNotification>::GetInstance()->SetTargetDeviceSwitch(deviceType, deviceId,
703 notificaitonEnable, liveViewEnable);
704 }
705
RegisterSwingCallback(const std::function<void (bool,int)> swingCbFunc)706 ErrCode NotificationHelper::RegisterSwingCallback(const std::function<void(bool, int)> swingCbFunc)
707 {
708 #ifdef NOTIFICATION_SMART_REMINDER_SUPPORTED
709 return DelayedSingleton<AnsNotification>::GetInstance()->RegisterSwingCallback(swingCbFunc);
710 #else
711 return ERR_OK;
712 #endif
713 }
GetDoNotDisturbProfile(int64_t id,sptr<NotificationDoNotDisturbProfile> & profile)714 ErrCode NotificationHelper::GetDoNotDisturbProfile(int64_t id, sptr<NotificationDoNotDisturbProfile> &profile)
715 {
716 return DelayedSingleton<AnsNotification>::GetInstance()->GetDoNotDisturbProfile(id, profile);
717 }
718
DistributeOperation(sptr<NotificationOperationInfo> & operationInfo,const sptr<IAnsOperationCallback> & callback)719 ErrCode NotificationHelper::DistributeOperation(sptr<NotificationOperationInfo>& operationInfo,
720 const sptr<IAnsOperationCallback> &callback)
721 {
722 return DelayedSingleton<AnsNotification>::GetInstance()->DistributeOperation(operationInfo, callback);
723 }
724
GetNotificationRequestByHashCode(const std::string & hashCode,sptr<NotificationRequest> & notificationRequest)725 ErrCode NotificationHelper::GetNotificationRequestByHashCode(
726 const std::string& hashCode, sptr<NotificationRequest>& notificationRequest)
727 {
728 return DelayedSingleton<AnsNotification>::GetInstance()->GetNotificationRequestByHashCode(
729 hashCode, notificationRequest);
730 }
731
ReplyDistributeOperation(const std::string & hashCode,const int32_t result)732 ErrCode NotificationHelper::ReplyDistributeOperation(const std::string& hashCode, const int32_t result)
733 {
734 return DelayedSingleton<AnsNotification>::GetInstance()->ReplyDistributeOperation(hashCode, result);
735 }
736
UpdateNotificationTimerByUid(const int32_t uid,const bool isPaused)737 ErrCode NotificationHelper::UpdateNotificationTimerByUid(const int32_t uid, const bool isPaused)
738 {
739 return DelayedSingleton<AnsNotification>::GetInstance()->UpdateNotificationTimerByUid(uid, isPaused);
740 }
741
AllowUseReminder(const std::string & bundleName,bool & isAllowUseReminder)742 ErrCode NotificationHelper::AllowUseReminder(const std::string& bundleName, bool& isAllowUseReminder)
743 {
744 return DelayedSingleton<AnsNotification>::GetInstance()->AllowUseReminder(bundleName, isAllowUseReminder);
745 }
746
DisableNotificationFeature(const NotificationDisable & notificationDisable)747 ErrCode NotificationHelper::DisableNotificationFeature(const NotificationDisable ¬ificationDisable)
748 {
749 return DelayedSingleton<AnsNotification>::GetInstance()->DisableNotificationFeature(notificationDisable);
750 }
751
SetHashCodeRule(const uint32_t type)752 ErrCode NotificationHelper::SetHashCodeRule(const uint32_t type)
753 {
754 return DelayedSingleton<AnsNotification>::GetInstance()->SetHashCodeRule(type);
755 }
756
GetDistributedDevicelist(std::vector<std::string> & deviceTypes)757 ErrCode NotificationHelper::GetDistributedDevicelist(std::vector<std::string> &deviceTypes)
758 {
759 return DelayedSingleton<AnsNotification>::GetInstance()->GetDistributedDevicelist(deviceTypes);
760 }
761
GetMutilDeviceStatus(const std::string & deviceType,const uint32_t status,std::string & deviceId,int32_t & userId)762 ErrCode NotificationHelper::GetMutilDeviceStatus(const std::string &deviceType, const uint32_t status,
763 std::string& deviceId, int32_t& userId)
764 {
765 return DelayedSingleton<AnsNotification>::GetInstance()->GetMutilDeviceStatus(deviceType, status, deviceId, userId);
766 }
767
GetTargetDeviceBundleList(const std::string & deviceType,const std::string & deviceId,std::vector<std::string> & bundleList,std::vector<std::string> & labelList)768 ErrCode NotificationHelper::GetTargetDeviceBundleList(const std::string& deviceType, const std::string& deviceId,
769 std::vector<std::string>& bundleList, std::vector<std::string>& labelList)
770 {
771 return DelayedSingleton<AnsNotification>::GetInstance()->GetTargetDeviceBundleList(deviceType, deviceId,
772 bundleList, labelList);
773 }
774 } // namespace Notification
775 } // namespace OHOS
776