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