1 /*
2 * Copyright (c) 2021-2024 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 "ans_manager_stub.h"
17 #include "ans_const_define.h"
18 #include "ans_inner_errors.h"
19 #include "ans_log_wrapper.h"
20 #include "message_option.h"
21 #include "message_parcel.h"
22 #include "parcel.h"
23 #include "reminder_request_alarm.h"
24 #include "reminder_request_calendar.h"
25 #include "reminder_request_timer.h"
26
27 namespace OHOS {
28 namespace Notification {
Publish(const std::string & label,const sptr<NotificationRequest> & notification)29 ErrCode AnsManagerStub::Publish(const std::string &label, const sptr<NotificationRequest> ¬ification)
30 {
31 ANS_LOGE("AnsManagerStub::Publish called!");
32 return ERR_INVALID_OPERATION;
33 }
34
GetNotificationRequestByHashCode(const std::string & hashCode,sptr<NotificationRequest> & notificationRequest)35 ErrCode AnsManagerStub::GetNotificationRequestByHashCode(
36 const std::string& hashCode, sptr<NotificationRequest>& notificationRequest)
37 {
38 ANS_LOGE("AnsManagerStub::Publish called!");
39 return ERR_INVALID_OPERATION;
40 }
41
PublishNotificationForIndirectProxy(const sptr<NotificationRequest> & notification)42 ErrCode AnsManagerStub::PublishNotificationForIndirectProxy(const sptr<NotificationRequest> ¬ification)
43 {
44 ANS_LOGE("AnsManagerStub::PublishNotificationForIndirectProxy called!");
45 return ERR_INVALID_OPERATION;
46 }
47
Cancel(int notificationId,const std::string & label,const std::string & instanceKey)48 ErrCode AnsManagerStub::Cancel(int notificationId, const std::string &label, const std::string &instanceKey)
49 {
50 ANS_LOGE("AnsManagerStub::Cancel called!");
51 return ERR_INVALID_OPERATION;
52 }
53
CancelAll(const std::string & instanceKey)54 ErrCode AnsManagerStub::CancelAll(const std::string &instanceKey)
55 {
56 ANS_LOGE("AnsManagerStub::CancelAll called!");
57 return ERR_INVALID_OPERATION;
58 }
59
CancelAsBundle(int32_t notificationId,const std::string & representativeBundle,int32_t userId)60 ErrCode AnsManagerStub::CancelAsBundle(int32_t notificationId, const std::string &representativeBundle, int32_t userId)
61 {
62 ANS_LOGE("AnsManagerStub::CancelAsBundle called!");
63 return ERR_INVALID_OPERATION;
64 }
65
CancelAsBundle(const sptr<NotificationBundleOption> & bundleOption,int32_t notificationId)66 ErrCode AnsManagerStub::CancelAsBundle(const sptr<NotificationBundleOption> &bundleOption, int32_t notificationId)
67 {
68 ANS_LOGE("AnsManagerStub::CancelAsBundle called!");
69 return ERR_INVALID_OPERATION;
70 }
71
CancelAsBundle(const sptr<NotificationBundleOption> & bundleOption,int32_t notificationId,int32_t userId)72 ErrCode AnsManagerStub::CancelAsBundle(
73 const sptr<NotificationBundleOption> &bundleOption, int32_t notificationId, int32_t userId)
74 {
75 ANS_LOGE("AnsManagerStub::CancelAsBundle called!");
76 return ERR_INVALID_OPERATION;
77 }
78
AddSlotByType(NotificationConstant::SlotType slotType)79 ErrCode AnsManagerStub::AddSlotByType(NotificationConstant::SlotType slotType)
80 {
81 ANS_LOGE("AnsManagerStub::AddSlotByType called!");
82 return ERR_INVALID_OPERATION;
83 }
84
AddSlots(const std::vector<sptr<NotificationSlot>> & slots)85 ErrCode AnsManagerStub::AddSlots(const std::vector<sptr<NotificationSlot>> &slots)
86 {
87 ANS_LOGE("AnsManagerStub::AddSlots called!");
88 return ERR_INVALID_OPERATION;
89 }
90
RemoveSlotByType(const NotificationConstant::SlotType & slotType)91 ErrCode AnsManagerStub::RemoveSlotByType(const NotificationConstant::SlotType &slotType)
92 {
93 ANS_LOGE("AnsManagerStub::RemoveSlotByType called!");
94 return ERR_INVALID_OPERATION;
95 }
96
RemoveAllSlots()97 ErrCode AnsManagerStub::RemoveAllSlots()
98 {
99 ANS_LOGE("AnsManagerStub::RemoveAllSlots called!");
100 return ERR_INVALID_OPERATION;
101 }
102
GetSlotByType(const NotificationConstant::SlotType & slotType,sptr<NotificationSlot> & slot)103 ErrCode AnsManagerStub::GetSlotByType(const NotificationConstant::SlotType &slotType, sptr<NotificationSlot> &slot)
104 {
105 ANS_LOGE("AnsManagerStub::GetSlotByType called!");
106 return ERR_INVALID_OPERATION;
107 }
108
GetSlots(std::vector<sptr<NotificationSlot>> & slots)109 ErrCode AnsManagerStub::GetSlots(std::vector<sptr<NotificationSlot>> &slots)
110 {
111 ANS_LOGE("AnsManagerStub::GetSlots called!");
112 return ERR_INVALID_OPERATION;
113 }
114
GetSlotNumAsBundle(const sptr<NotificationBundleOption> & bundleOption,uint64_t & num)115 ErrCode AnsManagerStub::GetSlotNumAsBundle(const sptr<NotificationBundleOption> &bundleOption, uint64_t &num)
116 {
117 ANS_LOGE("AnsManagerStub::GetSlotNumAsBundle called!");
118 return ERR_INVALID_OPERATION;
119 }
120
GetActiveNotifications(std::vector<sptr<NotificationRequest>> & notifications,const std::string & instanceKey)121 ErrCode AnsManagerStub::GetActiveNotifications(
122 std::vector<sptr<NotificationRequest>> ¬ifications, const std::string &instanceKey)
123 {
124 ANS_LOGE("AnsManagerStub::GetActiveNotifications called!");
125 return ERR_INVALID_OPERATION;
126 }
127
GetActiveNotificationNums(uint64_t & num)128 ErrCode AnsManagerStub::GetActiveNotificationNums(uint64_t &num)
129 {
130 ANS_LOGE("AnsManagerStub::GetActiveNotificationNums called!");
131 return ERR_INVALID_OPERATION;
132 }
133
GetAllActiveNotifications(std::vector<sptr<Notification>> & notifications)134 ErrCode AnsManagerStub::GetAllActiveNotifications(std::vector<sptr<Notification>> ¬ifications)
135 {
136 ANS_LOGE("AnsManagerStub::GetAllActiveNotifications called!");
137 return ERR_INVALID_OPERATION;
138 }
139
GetSpecialActiveNotifications(const std::vector<std::string> & key,std::vector<sptr<Notification>> & notifications)140 ErrCode AnsManagerStub::GetSpecialActiveNotifications(
141 const std::vector<std::string> &key, std::vector<sptr<Notification>> ¬ifications)
142 {
143 ANS_LOGE("AnsManagerStub::GetSpecialActiveNotifications called!");
144 return ERR_INVALID_OPERATION;
145 }
146
GetActiveNotificationByFilter(const sptr<NotificationBundleOption> & bundleOption,const int32_t notificationId,const std::string & label,std::vector<std::string> extraInfoKeys,sptr<NotificationRequest> & request)147 ErrCode AnsManagerStub::GetActiveNotificationByFilter(
148 const sptr<NotificationBundleOption> &bundleOption, const int32_t notificationId, const std::string &label,
149 std::vector<std::string> extraInfoKeys, sptr<NotificationRequest> &request)
150 {
151 ANS_LOGE("AnsManagerStub::GetActiveNotificationByFilter called!");
152 return ERR_INVALID_OPERATION;
153 }
154
CanPublishAsBundle(const std::string & representativeBundle,bool & canPublish)155 ErrCode AnsManagerStub::CanPublishAsBundle(const std::string &representativeBundle, bool &canPublish)
156 {
157 ANS_LOGE("AnsManagerStub::CanPublishAsBundle called!");
158 return ERR_INVALID_OPERATION;
159 }
160
PublishAsBundle(const sptr<NotificationRequest> notification,const std::string & representativeBundle)161 ErrCode AnsManagerStub::PublishAsBundle(
162 const sptr<NotificationRequest> notification, const std::string &representativeBundle)
163 {
164 ANS_LOGE("AnsManagerStub::PublishAsBundle called!");
165 return ERR_INVALID_OPERATION;
166 }
167
SetNotificationBadgeNum(int num)168 ErrCode AnsManagerStub::SetNotificationBadgeNum(int num)
169 {
170 ANS_LOGE("AnsManagerStub::SetNotificationBadgeNum called!");
171 return ERR_INVALID_OPERATION;
172 }
173
GetBundleImportance(int & importance)174 ErrCode AnsManagerStub::GetBundleImportance(int &importance)
175 {
176 ANS_LOGE("AnsManagerStub::GetBundleImportance called!");
177 return ERR_INVALID_OPERATION;
178 }
179
GetSlotFlagsAsBundle(const sptr<NotificationBundleOption> & bundleOption,uint32_t & slotFlags)180 ErrCode AnsManagerStub::GetSlotFlagsAsBundle(const sptr<NotificationBundleOption> &bundleOption, uint32_t &slotFlags)
181 {
182 ANS_LOGE("AnsManagerStub::GetSlotFlagsAsBundle called!");
183 return ERR_INVALID_OPERATION;
184 }
185
SetSlotFlagsAsBundle(const sptr<NotificationBundleOption> & bundleOption,uint32_t slotFlags)186 ErrCode AnsManagerStub::SetSlotFlagsAsBundle(const sptr<NotificationBundleOption> &bundleOption, uint32_t slotFlags)
187 {
188 ANS_LOGE("AnsManagerStub::SetSlotFlagsAsBundle called!");
189 return ERR_INVALID_OPERATION;
190 }
191
HasNotificationPolicyAccessPermission(bool & granted)192 ErrCode AnsManagerStub::HasNotificationPolicyAccessPermission(bool &granted)
193 {
194 ANS_LOGE("AnsManagerStub::HasNotificationPolicyAccessPermission called!");
195 return ERR_INVALID_OPERATION;
196 }
197
TriggerLocalLiveView(const sptr<NotificationBundleOption> & bundleOption,const int32_t notificationId,const sptr<NotificationButtonOption> & buttonOption)198 ErrCode AnsManagerStub::TriggerLocalLiveView(const sptr<NotificationBundleOption> &bundleOption,
199 const int32_t notificationId, const sptr<NotificationButtonOption> &buttonOption)
200 {
201 ANS_LOGE("AnsManagerStub::TriggerLocalLiveView called!");
202 return ERR_INVALID_OPERATION;
203 }
204
RemoveNotification(const sptr<NotificationBundleOption> & bundleOption,int notificationId,const std::string & label,int32_t removeReason)205 ErrCode AnsManagerStub::RemoveNotification(const sptr<NotificationBundleOption> &bundleOption,
206 int notificationId, const std::string &label, int32_t removeReason)
207 {
208 ANS_LOGE("AnsManagerStub::RemoveNotification called!");
209 return ERR_INVALID_OPERATION;
210 }
211
RemoveAllNotifications(const sptr<NotificationBundleOption> & bundleOption)212 ErrCode AnsManagerStub::RemoveAllNotifications(const sptr<NotificationBundleOption> &bundleOption)
213 {
214 ANS_LOGE("AnsManagerStub::RemoveAllNotifications called!");
215 return ERR_INVALID_OPERATION;
216 }
217
RemoveNotifications(const std::vector<std::string> & keys,int32_t removeReason)218 ErrCode AnsManagerStub::RemoveNotifications(const std::vector<std::string> &keys, int32_t removeReason)
219 {
220 ANS_LOGD("called!");
221 return ERR_INVALID_OPERATION;
222 }
223
Delete(const std::string & key,int32_t removeReason)224 ErrCode AnsManagerStub::Delete(const std::string &key, int32_t removeReason)
225 {
226 ANS_LOGE("AnsManagerStub::Delete called!");
227 return ERR_INVALID_OPERATION;
228 }
229
DeleteByBundle(const sptr<NotificationBundleOption> & bundleOption)230 ErrCode AnsManagerStub::DeleteByBundle(const sptr<NotificationBundleOption> &bundleOption)
231 {
232 ANS_LOGE("AnsManagerStub::DeleteByBundle called!");
233 return ERR_INVALID_OPERATION;
234 }
235
DeleteAll()236 ErrCode AnsManagerStub::DeleteAll()
237 {
238 ANS_LOGE("AnsManagerStub::DeleteAll called!");
239 return ERR_INVALID_OPERATION;
240 }
241
GetSlotsByBundle(const sptr<NotificationBundleOption> & bundleOption,std::vector<sptr<NotificationSlot>> & slots)242 ErrCode AnsManagerStub::GetSlotsByBundle(
243 const sptr<NotificationBundleOption> &bundleOption, std::vector<sptr<NotificationSlot>> &slots)
244 {
245 ANS_LOGE("AnsManagerStub::GetSlotsByBundle called!");
246 return ERR_INVALID_OPERATION;
247 }
248
GetSlotByBundle(const sptr<NotificationBundleOption> & bundleOption,const NotificationConstant::SlotType & slotType,sptr<NotificationSlot> & slot)249 ErrCode AnsManagerStub::GetSlotByBundle(
250 const sptr<NotificationBundleOption> &bundleOption, const NotificationConstant::SlotType &slotType,
251 sptr<NotificationSlot> &slot)
252 {
253 ANS_LOGE("AnsManagerStub::GetSlotByBundle called!");
254 return ERR_INVALID_OPERATION;
255 }
256
UpdateSlots(const sptr<NotificationBundleOption> & bundleOption,const std::vector<sptr<NotificationSlot>> & slots)257 ErrCode AnsManagerStub::UpdateSlots(
258 const sptr<NotificationBundleOption> &bundleOption, const std::vector<sptr<NotificationSlot>> &slots)
259 {
260 ANS_LOGE("AnsManagerStub::UpdateSlots called!");
261 return ERR_INVALID_OPERATION;
262 }
263
RequestEnableNotification(const std::string & deviceId,const sptr<AnsDialogCallback> & callback,const sptr<IRemoteObject> & callerToken)264 ErrCode AnsManagerStub::RequestEnableNotification(const std::string &deviceId,
265 const sptr<AnsDialogCallback> &callback,
266 const sptr<IRemoteObject> &callerToken)
267 {
268 ANS_LOGE("AnsManagerStub::RequestEnableNotification called!");
269 return ERR_INVALID_OPERATION;
270 }
271
RequestEnableNotification(const std::string bundleName,const int32_t uid)272 ErrCode AnsManagerStub::RequestEnableNotification(const std::string bundleName, const int32_t uid)
273 {
274 ANS_LOGE("AnsManagerStub::RequestEnableNotification called!");
275 return ERR_INVALID_OPERATION;
276 }
277
SetNotificationsEnabledForBundle(const std::string & bundle,bool enabled)278 ErrCode AnsManagerStub::SetNotificationsEnabledForBundle(const std::string &bundle, bool enabled)
279 {
280 ANS_LOGE("AnsManagerStub::SetNotificationsEnabledForBundle called!");
281 return ERR_INVALID_OPERATION;
282 }
283
SetNotificationsEnabledForAllBundles(const std::string & deviceId,bool enabled)284 ErrCode AnsManagerStub::SetNotificationsEnabledForAllBundles(const std::string &deviceId, bool enabled)
285 {
286 ANS_LOGE("AnsManagerStub::SetNotificationsEnabledForAllBundles called!");
287 return ERR_INVALID_OPERATION;
288 }
289
SetNotificationsEnabledForSpecialBundle(const std::string & deviceId,const sptr<NotificationBundleOption> & bundleOption,bool enabled)290 ErrCode AnsManagerStub::SetNotificationsEnabledForSpecialBundle(
291 const std::string &deviceId, const sptr<NotificationBundleOption> &bundleOption, bool enabled)
292 {
293 ANS_LOGE("AnsManagerStub::SetNotificationsEnabledForSpecialBundle called!");
294 return ERR_INVALID_OPERATION;
295 }
296
SetShowBadgeEnabledForBundle(const sptr<NotificationBundleOption> & bundleOption,bool enabled)297 ErrCode AnsManagerStub::SetShowBadgeEnabledForBundle(const sptr<NotificationBundleOption> &bundleOption, bool enabled)
298 {
299 ANS_LOGE("AnsManagerStub::SetShowBadgeEnabledForBundle called!");
300 return ERR_INVALID_OPERATION;
301 }
302
GetShowBadgeEnabledForBundle(const sptr<NotificationBundleOption> & bundleOption,bool & enabled)303 ErrCode AnsManagerStub::GetShowBadgeEnabledForBundle(const sptr<NotificationBundleOption> &bundleOption, bool &enabled)
304 {
305 ANS_LOGE("AnsManagerStub::GetShowBadgeEnabledForBundle called!");
306 return ERR_INVALID_OPERATION;
307 }
308
GetShowBadgeEnabled(bool & enabled)309 ErrCode AnsManagerStub::GetShowBadgeEnabled(bool &enabled)
310 {
311 ANS_LOGE("AnsManagerStub::GetShowBadgeEnabled called!");
312 return ERR_INVALID_OPERATION;
313 }
314
Subscribe(const sptr<AnsSubscriberInterface> & subscriber,const sptr<NotificationSubscribeInfo> & info)315 ErrCode AnsManagerStub::Subscribe(const sptr<AnsSubscriberInterface> &subscriber,
316 const sptr<NotificationSubscribeInfo> &info)
317 {
318 ANS_LOGE("AnsManagerStub::Subscribe called!");
319 return ERR_INVALID_OPERATION;
320 }
321
SubscribeSelf(const sptr<AnsSubscriberInterface> & subscriber)322 ErrCode AnsManagerStub::SubscribeSelf(const sptr<AnsSubscriberInterface> &subscriber)
323 {
324 ANS_LOGE("AnsManagerStub::SubscribeSelf called!");
325 return ERR_INVALID_OPERATION;
326 }
327
SubscribeLocalLiveView(const sptr<AnsSubscriberLocalLiveViewInterface> & subscriber,const sptr<NotificationSubscribeInfo> & info,const bool isNative)328 ErrCode AnsManagerStub::SubscribeLocalLiveView(const sptr<AnsSubscriberLocalLiveViewInterface> &subscriber,
329 const sptr<NotificationSubscribeInfo> &info, const bool isNative)
330 {
331 ANS_LOGE("AnsManagerStub::SubscribeLocalLiveView called!");
332 return ERR_INVALID_OPERATION;
333 }
334
Unsubscribe(const sptr<AnsSubscriberInterface> & subscriber,const sptr<NotificationSubscribeInfo> & info)335 ErrCode AnsManagerStub::Unsubscribe(const sptr<AnsSubscriberInterface> &subscriber,
336 const sptr<NotificationSubscribeInfo> &info)
337 {
338 ANS_LOGE("AnsManagerStub::Unsubscribe called!");
339 return ERR_INVALID_OPERATION;
340 }
341
IsAllowedNotify(bool & allowed)342 ErrCode AnsManagerStub::IsAllowedNotify(bool &allowed)
343 {
344 ANS_LOGE("AnsManagerStub::IsAllowedNotify called!");
345 return ERR_INVALID_OPERATION;
346 }
347
IsAllowedNotifySelf(bool & allowed)348 ErrCode AnsManagerStub::IsAllowedNotifySelf(bool &allowed)
349 {
350 ANS_LOGE("AnsManagerStub::IsAllowedNotifySelf called!");
351 return ERR_INVALID_OPERATION;
352 }
353
CanPopEnableNotificationDialog(const sptr<AnsDialogCallback> & callback,bool & canPop,std::string & bundleName)354 ErrCode AnsManagerStub::CanPopEnableNotificationDialog(const sptr<AnsDialogCallback> &callback,
355 bool &canPop, std::string &bundleName)
356 {
357 ANS_LOGE("AnsManagerStub::CanPopEnableNotificationDialog called!");
358 return ERR_INVALID_OPERATION;
359 }
360
RemoveEnableNotificationDialog()361 ErrCode AnsManagerStub::RemoveEnableNotificationDialog()
362 {
363 ANS_LOGE("AnsManagerStub::RemoveEnableNotificationDialog called!");
364 return ERR_INVALID_OPERATION;
365 }
366
IsSpecialBundleAllowedNotify(const sptr<NotificationBundleOption> & bundleOption,bool & allowed)367 ErrCode AnsManagerStub::IsSpecialBundleAllowedNotify(const sptr<NotificationBundleOption> &bundleOption, bool &allowed)
368 {
369 ANS_LOGE("AnsManagerStub::IsSpecialBundleAllowedNotify called!");
370 return ERR_INVALID_OPERATION;
371 }
372
CancelGroup(const std::string & groupName,const std::string & instanceKey)373 ErrCode AnsManagerStub::CancelGroup(const std::string &groupName, const std::string &instanceKey)
374 {
375 ANS_LOGE("AnsManagerStub::CancelGroup called!");
376 return ERR_INVALID_OPERATION;
377 }
378
RemoveGroupByBundle(const sptr<NotificationBundleOption> & bundleOption,const std::string & groupName)379 ErrCode AnsManagerStub::RemoveGroupByBundle(
380 const sptr<NotificationBundleOption> &bundleOption, const std::string &groupName)
381 {
382 ANS_LOGE("AnsManagerStub::RemoveGroupByBundle called!");
383 return ERR_INVALID_OPERATION;
384 }
385
SetDoNotDisturbDate(const sptr<NotificationDoNotDisturbDate> & date)386 ErrCode AnsManagerStub::SetDoNotDisturbDate(const sptr<NotificationDoNotDisturbDate> &date)
387 {
388 ANS_LOGE("AnsManagerStub::SetDoNotDisturbDate called!");
389 return ERR_INVALID_OPERATION;
390 }
391
GetDoNotDisturbDate(sptr<NotificationDoNotDisturbDate> & date)392 ErrCode AnsManagerStub::GetDoNotDisturbDate(sptr<NotificationDoNotDisturbDate> &date)
393 {
394 ANS_LOGE("AnsManagerStub::GetDoNotDisturbDate called!");
395 return ERR_INVALID_OPERATION;
396 }
397
AddDoNotDisturbProfiles(const std::vector<sptr<NotificationDoNotDisturbProfile>> & profiles)398 ErrCode AnsManagerStub::AddDoNotDisturbProfiles(const std::vector<sptr<NotificationDoNotDisturbProfile>> &profiles)
399 {
400 ANS_LOGD("Called.");
401 return ERR_INVALID_OPERATION;
402 }
403
RemoveDoNotDisturbProfiles(const std::vector<sptr<NotificationDoNotDisturbProfile>> & profiles)404 ErrCode AnsManagerStub::RemoveDoNotDisturbProfiles(const std::vector<sptr<NotificationDoNotDisturbProfile>> &profiles)
405 {
406 ANS_LOGD("Called.");
407 return ERR_INVALID_OPERATION;
408 }
409
DoesSupportDoNotDisturbMode(bool & doesSupport)410 ErrCode AnsManagerStub::DoesSupportDoNotDisturbMode(bool &doesSupport)
411 {
412 ANS_LOGE("AnsManagerStub::DoesSupportDoNotDisturbMode called!");
413 return ERR_INVALID_OPERATION;
414 }
415
IsNeedSilentInDoNotDisturbMode(const std::string & phoneNumber,int32_t callerType)416 ErrCode AnsManagerStub::IsNeedSilentInDoNotDisturbMode(const std::string &phoneNumber, int32_t callerType)
417 {
418 ANS_LOGE("AnsManagerStub::IsNeedSilentInDoNotDisturbMode called!");
419 return ERR_INVALID_OPERATION;
420 }
421
IsDistributedEnabled(bool & enabled)422 ErrCode AnsManagerStub::IsDistributedEnabled(bool &enabled)
423 {
424 ANS_LOGE("AnsManagerStub::IsDistributedEnabled called!");
425 return ERR_INVALID_OPERATION;
426 }
427
EnableDistributed(bool enabled)428 ErrCode AnsManagerStub::EnableDistributed(bool enabled)
429 {
430 ANS_LOGE("AnsManagerStub::EnableDistributed called!");
431 return ERR_INVALID_OPERATION;
432 }
433
EnableDistributedByBundle(const sptr<NotificationBundleOption> & bundleOption,bool enabled)434 ErrCode AnsManagerStub::EnableDistributedByBundle(const sptr<NotificationBundleOption> &bundleOption, bool enabled)
435 {
436 ANS_LOGE("AnsManagerStub::EnableDistributedByBundle called!");
437 return ERR_INVALID_OPERATION;
438 }
439
EnableDistributedSelf(bool enabled)440 ErrCode AnsManagerStub::EnableDistributedSelf(bool enabled)
441 {
442 ANS_LOGE("AnsManagerStub::EnableDistributedSelf called!");
443 return ERR_INVALID_OPERATION;
444 }
445
IsDistributedEnableByBundle(const sptr<NotificationBundleOption> & bundleOption,bool & enabled)446 ErrCode AnsManagerStub::IsDistributedEnableByBundle(const sptr<NotificationBundleOption> &bundleOption, bool &enabled)
447 {
448 ANS_LOGE("AnsManagerStub::IsDistributedEnableByBundle called!");
449 return ERR_INVALID_OPERATION;
450 }
451
GetDeviceRemindType(NotificationConstant::RemindType & remindType)452 ErrCode AnsManagerStub::GetDeviceRemindType(NotificationConstant::RemindType &remindType)
453 {
454 ANS_LOGE("AnsManagerStub::GetDeviceRemindType called!");
455 return ERR_INVALID_OPERATION;
456 }
457
PublishContinuousTaskNotification(const sptr<NotificationRequest> & request)458 ErrCode AnsManagerStub::PublishContinuousTaskNotification(const sptr<NotificationRequest> &request)
459 {
460 ANS_LOGE("AnsManagerStub::PublishContinuousTaskNotification called!");
461 return ERR_INVALID_OPERATION;
462 }
463
CancelContinuousTaskNotification(const std::string & label,int32_t notificationId)464 ErrCode AnsManagerStub::CancelContinuousTaskNotification(const std::string &label, int32_t notificationId)
465 {
466 ANS_LOGE("AnsManagerStub::CancelContinuousTaskNotification called!");
467 return ERR_INVALID_OPERATION;
468 }
469
IsSupportTemplate(const std::string & templateName,bool & support)470 ErrCode AnsManagerStub::IsSupportTemplate(const std::string &templateName, bool &support)
471 {
472 ANS_LOGE("AnsManagerStub::IsSupportTemplate called!");
473 return ERR_INVALID_OPERATION;
474 }
475
IsSpecialUserAllowedNotify(const int32_t & userId,bool & allowed)476 ErrCode AnsManagerStub::IsSpecialUserAllowedNotify(const int32_t &userId, bool &allowed)
477 {
478 ANS_LOGE("AnsManagerStub::IsSpecialUserAllowedNotify called!");
479 return ERR_INVALID_OPERATION;
480 }
481
SetNotificationsEnabledByUser(const int32_t & deviceId,bool enabled)482 ErrCode AnsManagerStub::SetNotificationsEnabledByUser(const int32_t &deviceId, bool enabled)
483 {
484 ANS_LOGE("AnsManagerStub::SetNotificationsEnabledByUser called!");
485 return ERR_INVALID_OPERATION;
486 }
487
DeleteAllByUser(const int32_t & userId)488 ErrCode AnsManagerStub::DeleteAllByUser(const int32_t &userId)
489 {
490 ANS_LOGE("AnsManagerStub::DeleteAllByUser called!");
491 return ERR_INVALID_OPERATION;
492 }
493
SetDoNotDisturbDate(const int32_t & userId,const sptr<NotificationDoNotDisturbDate> & date)494 ErrCode AnsManagerStub::SetDoNotDisturbDate(const int32_t &userId, const sptr<NotificationDoNotDisturbDate> &date)
495 {
496 ANS_LOGE("AnsManagerStub::SetDoNotDisturbDate called!");
497 return ERR_INVALID_OPERATION;
498 }
499
GetDoNotDisturbDate(const int32_t & userId,sptr<NotificationDoNotDisturbDate> & date)500 ErrCode AnsManagerStub::GetDoNotDisturbDate(const int32_t &userId, sptr<NotificationDoNotDisturbDate> &date)
501 {
502 ANS_LOGE("AnsManagerStub::GetDoNotDisturbDate called!");
503 return ERR_INVALID_OPERATION;
504 }
505
SetEnabledForBundleSlot(const sptr<NotificationBundleOption> & bundleOption,const NotificationConstant::SlotType & slotType,bool enabled,bool isForceControl)506 ErrCode AnsManagerStub::SetEnabledForBundleSlot(const sptr<NotificationBundleOption> &bundleOption,
507 const NotificationConstant::SlotType &slotType, bool enabled, bool isForceControl)
508 {
509 ANS_LOGE("AnsManagerStub::SetEnabledForBundleSlot called!");
510 return ERR_INVALID_OPERATION;
511 }
512
GetEnabledForBundleSlot(const sptr<NotificationBundleOption> & bundleOption,const NotificationConstant::SlotType & slotType,bool & enabled)513 ErrCode AnsManagerStub::GetEnabledForBundleSlot(
514 const sptr<NotificationBundleOption> &bundleOption, const NotificationConstant::SlotType &slotType, bool &enabled)
515 {
516 ANS_LOGE("AnsManagerStub::GetEnabledForBundleSlot called!");
517 return ERR_INVALID_OPERATION;
518 }
519
GetEnabledForBundleSlotSelf(const NotificationConstant::SlotType & slotType,bool & enabled)520 ErrCode AnsManagerStub::GetEnabledForBundleSlotSelf(const NotificationConstant::SlotType &slotType, bool &enabled)
521 {
522 ANS_LOGE("AnsManagerStub::GetEnabledForBundleSlotSelf called!");
523 return ERR_INVALID_OPERATION;
524 }
525
ShellDump(const std::string & cmd,const std::string & bundle,int32_t userId,int32_t recvUserId,std::vector<std::string> & dumpInfo)526 ErrCode AnsManagerStub::ShellDump(const std::string &cmd, const std::string &bundle, int32_t userId,
527 int32_t recvUserId, std::vector<std::string> &dumpInfo)
528 {
529 ANS_LOGE("AnsManagerStub::ShellDump called!");
530 return ERR_INVALID_OPERATION;
531 }
532
SetSyncNotificationEnabledWithoutApp(const int32_t userId,const bool enabled)533 ErrCode AnsManagerStub::SetSyncNotificationEnabledWithoutApp(const int32_t userId, const bool enabled)
534 {
535 ANS_LOGE("AnsManagerStub::SetSyncNotificationEnabledWithoutApp called!");
536 return ERR_INVALID_OPERATION;
537 }
538
GetSyncNotificationEnabledWithoutApp(const int32_t userId,bool & enabled)539 ErrCode AnsManagerStub::GetSyncNotificationEnabledWithoutApp(const int32_t userId, bool &enabled)
540 {
541 ANS_LOGE("AnsManagerStub::GetSyncNotificationEnabledWithoutApp called!");
542 return ERR_INVALID_OPERATION;
543 }
544
SetBadgeNumber(int32_t badgeNumber,const std::string & instanceKey)545 ErrCode AnsManagerStub::SetBadgeNumber(int32_t badgeNumber, const std::string &instanceKey)
546 {
547 ANS_LOGE("AnsManagerStub::SetBadgeNumber called!");
548 return ERR_INVALID_OPERATION;
549 }
550
SetBadgeNumberByBundle(const sptr<NotificationBundleOption> & bundleOption,int32_t badgeNumber)551 ErrCode AnsManagerStub::SetBadgeNumberByBundle(const sptr<NotificationBundleOption> &bundleOption, int32_t badgeNumber)
552 {
553 ANS_LOGD("Called.");
554 return ERR_INVALID_OPERATION;
555 }
556
SetBadgeNumberForDhByBundle(const sptr<NotificationBundleOption> & bundleOption,int32_t badgeNumber)557 ErrCode AnsManagerStub::SetBadgeNumberForDhByBundle(
558 const sptr<NotificationBundleOption> &bundleOption, int32_t badgeNumber)
559 {
560 ANS_LOGD("Called.");
561 return ERR_INVALID_OPERATION;
562 }
563
GetAllNotificationEnabledBundles(std::vector<NotificationBundleOption> & bundleOption)564 ErrCode AnsManagerStub::GetAllNotificationEnabledBundles(std::vector<NotificationBundleOption> &bundleOption)
565 {
566 ANS_LOGE("AnsManagerStub::GetAllNotificationEnabledBundles called!");
567 return ERR_INVALID_OPERATION;
568 }
569
RegisterPushCallback(const sptr<IRemoteObject> & pushCallback,const sptr<NotificationCheckRequest> & notificationCheckRequest)570 ErrCode AnsManagerStub::RegisterPushCallback(
571 const sptr<IRemoteObject>& pushCallback, const sptr<NotificationCheckRequest> ¬ificationCheckRequest)
572 {
573 ANS_LOGE("RegisterPushCallback called!");
574 return ERR_INVALID_OPERATION;
575 }
576
UnregisterPushCallback()577 ErrCode AnsManagerStub::UnregisterPushCallback()
578 {
579 ANS_LOGE("UnregisterPushCallback called!");
580 return ERR_INVALID_OPERATION;
581 }
582
SetDistributedEnabledByBundle(const sptr<NotificationBundleOption> & bundleOption,const std::string & deviceType,const bool enabled)583 ErrCode AnsManagerStub::SetDistributedEnabledByBundle(const sptr<NotificationBundleOption> &bundleOption,
584 const std::string &deviceType, const bool enabled)
585 {
586 ANS_LOGE("SetDistributedEnabledByBundle called!");
587 return ERR_INVALID_OPERATION;
588 }
589
GetTargetDeviceStatus(const std::string & deviceType,int32_t & status)590 ErrCode AnsManagerStub::GetTargetDeviceStatus(const std::string &deviceType, int32_t &status)
591 {
592 ANS_LOGE("GetTargetDeviceStatus called!");
593 return ERR_INVALID_OPERATION;
594 }
595
DistributeOperation(sptr<NotificationOperationInfo> & operationInfo,const sptr<OperationCallbackInterface> & callback)596 ErrCode AnsManagerStub::DistributeOperation(sptr<NotificationOperationInfo>& operationInfo,
597 const sptr<OperationCallbackInterface> &callback)
598 {
599 ANS_LOGE("DistributeOperation called!");
600 return ERR_INVALID_OPERATION;
601 }
602
ReplyDistributeOperation(const std::string & hashCode,const int32_t result)603 ErrCode AnsManagerStub::ReplyDistributeOperation(const std::string& hashCode, const int32_t result)
604 {
605 ANS_LOGE("ReplyDistributeOperation called!");
606 return ERR_INVALID_OPERATION;
607 }
608
GetAllLiveViewEnabledBundles(std::vector<NotificationBundleOption> & bundleOption)609 ErrCode AnsManagerStub::GetAllLiveViewEnabledBundles(std::vector<NotificationBundleOption> &bundleOption)
610 {
611 ANS_LOGE("AnsManagerStub::GetAllLiveViewEnabledBundles called!");
612 return ERR_INVALID_OPERATION;
613 }
614
GetAllDistribuedEnabledBundles(const std::string & deviceType,std::vector<NotificationBundleOption> & bundleOption)615 ErrCode AnsManagerStub::GetAllDistribuedEnabledBundles(const std::string& deviceType,
616 std::vector<NotificationBundleOption> &bundleOption)
617 {
618 ANS_LOGE("AnsManagerStub::GetAllDistribuedEnabledBundles called!");
619 return ERR_INVALID_OPERATION;
620 }
621
IsDistributedEnabledByBundle(const sptr<NotificationBundleOption> & bundleOption,const std::string & deviceType,bool & enabled)622 ErrCode AnsManagerStub::IsDistributedEnabledByBundle(const sptr<NotificationBundleOption> &bundleOption,
623 const std::string &deviceType, bool &enabled)
624 {
625 ANS_LOGE("IsDistributedEnabledByBundle called!");
626 return ERR_INVALID_OPERATION;
627 }
628
SetSmartReminderEnabled(const std::string & deviceType,const bool enabled)629 ErrCode AnsManagerStub::SetSmartReminderEnabled(const std::string &deviceType, const bool enabled)
630 {
631 ANS_LOGE("SetSmartReminderEnabled called!");
632 return ERR_INVALID_OPERATION;
633 }
634
IsSmartReminderEnabled(const std::string & deviceType,bool & enabled)635 ErrCode AnsManagerStub::IsSmartReminderEnabled(const std::string &deviceType, bool &enabled)
636 {
637 ANS_LOGE("IsSmartReminderEnabled called!");
638 return ERR_INVALID_OPERATION;
639 }
640
SetDistributedEnabledBySlot(const NotificationConstant::SlotType & slotType,const std::string & deviceType,const bool enabled)641 ErrCode AnsManagerStub::SetDistributedEnabledBySlot(
642 const NotificationConstant::SlotType &slotType, const std::string &deviceType, const bool enabled)
643 {
644 ANS_LOGE("SetDistributedEnabledBySlot called!");
645 return ERR_INVALID_OPERATION;
646 }
647
IsDistributedEnabledBySlot(const NotificationConstant::SlotType & slotType,const std::string & deviceType,bool & enabled)648 ErrCode AnsManagerStub::IsDistributedEnabledBySlot(
649 const NotificationConstant::SlotType &slotType, const std::string &deviceType, bool &enabled)
650 {
651 ANS_LOGE("IsDistributedEnabledBySlot called!");
652 return ERR_INVALID_OPERATION;
653 }
654
SetAdditionConfig(const std::string & key,const std::string & value)655 ErrCode AnsManagerStub::SetAdditionConfig(const std::string &key, const std::string &value)
656 {
657 ANS_LOGE("Called!");
658 return ERR_INVALID_OPERATION;
659 }
660
CancelAsBundleWithAgent(const sptr<NotificationBundleOption> & bundleOption,const int32_t id)661 ErrCode AnsManagerStub::CancelAsBundleWithAgent(const sptr<NotificationBundleOption> &bundleOption, const int32_t id)
662 {
663 ANS_LOGE("Called.");
664 return ERR_INVALID_OPERATION;
665 }
666
SetTargetDeviceStatus(const std::string & deviceType,const uint32_t status)667 ErrCode AnsManagerStub::SetTargetDeviceStatus(const std::string &deviceType, const uint32_t status)
668 {
669 ANS_LOGE("SetTargetDeviceStatus called!");
670 return ERR_INVALID_OPERATION;
671 }
672
SetTargetDeviceStatus(const std::string & deviceType,const uint32_t status,const uint32_t controlFlag)673 ErrCode AnsManagerStub::SetTargetDeviceStatus(const std::string &deviceType, const uint32_t status,
674 const uint32_t controlFlag)
675 {
676 ANS_LOGE("SetTargetDeviceStatus called!");
677 return ERR_INVALID_OPERATION;
678 }
679
GetDoNotDisturbProfile(int32_t id,sptr<NotificationDoNotDisturbProfile> & profile)680 ErrCode AnsManagerStub::GetDoNotDisturbProfile(int32_t id, sptr<NotificationDoNotDisturbProfile> &profile)
681 {
682 ANS_LOGE("GetDoNotDisturbProfile called!");
683 return ERR_INVALID_OPERATION;
684 }
685
AllowUseReminder(const std::string & bundleName,bool & isAllowUseReminder)686 ErrCode AnsManagerStub::AllowUseReminder(const std::string& bundleName, bool& isAllowUseReminder)
687 {
688 ANS_LOGE("AllowUseReminder called!");
689 return ERR_INVALID_OPERATION;
690 }
691
692 #ifdef NOTIFICATION_SMART_REMINDER_SUPPORTED
RegisterSwingCallback(const sptr<IRemoteObject> & swingCallback)693 ErrCode AnsManagerStub::RegisterSwingCallback(const sptr<IRemoteObject>& swingCallback)
694 {
695 ANS_LOGE("RegisterSwingCallback called!");
696 return ERR_INVALID_OPERATION;
697 }
698 #endif
699
UpdateNotificationTimerByUid(const int32_t uid,const bool isPaused)700 ErrCode AnsManagerStub::UpdateNotificationTimerByUid(const int32_t uid, const bool isPaused)
701 {
702 ANS_LOGE("UpdateNotificationTimerByUid called!");
703 return ERR_INVALID_OPERATION;
704 }
705
DisableNotificationFeature(const sptr<NotificationDisable> & notificationDisable)706 ErrCode AnsManagerStub::DisableNotificationFeature(const sptr<NotificationDisable> ¬ificationDisable)
707 {
708 ANS_LOGE("DisableNotificationFeature called!");
709 return ERR_INVALID_OPERATION;
710 }
711
SetHashCodeRule(const uint32_t type)712 ErrCode AnsManagerStub::SetHashCodeRule(const uint32_t type)
713 {
714 ANS_LOGE("SetHashCodeRule called!");
715 return ERR_INVALID_OPERATION;
716 }
717
GetAllNotificationsBySlotType(std::vector<sptr<Notification>> & notifications,const NotificationConstant::SlotType slotType)718 ErrCode AnsManagerStub::GetAllNotificationsBySlotType(std::vector<sptr<Notification>> ¬ifications,
719 const NotificationConstant::SlotType slotType)
720 {
721 ANS_LOGE("AnsManagerStub::GetAllNotificationsBySlotType called!");
722 return ERR_INVALID_OPERATION;
723 }
724 } // namespace Notification
725 } // namespace OHOS
726