From 56a4720a4022a3bc4382c93da92d88f2cc498b35 Mon Sep 17 00:00:00 2001 From: zhuhan Date: Thu, 15 Jun 2023 14:50:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?ipc=20code=20=E6=A0=87=E5=87=86=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhuhan Change-Id: I9c0696b2598d85f44cb6ff0a0e682bee01c048be --- .gitee/CODEOWNDERS | 1 + .../core/include/ans_manager_interface.h | 84 ----- frameworks/core/include/ans_manager_proxy.h | 3 +- frameworks/core/include/ans_manager_stub.h | 3 +- .../core/include/ans_subscriber_interface.h | 13 - .../core/include/ans_subscriber_proxy.h | 3 +- frameworks/core/include/ans_subscriber_stub.h | 3 +- ..._notification_service_ipc_interface_code.h | 122 +++++++ frameworks/core/src/ans_manager_proxy.cpp | 151 ++++----- frameworks/core/src/ans_manager_stub.cpp | 152 ++++----- frameworks/core/src/ans_subscriber_proxy.cpp | 20 +- frameworks/core/src/ans_subscriber_stub.cpp | 24 +- .../ans_manager_proxy_unit_test.cpp | 8 +- .../ans_manager_stub_test.cpp | 306 +++++++++--------- .../ans_subscriber_proxy_unit_test.cpp | 8 +- .../ans_subscriber_stub_unit_test.cpp | 10 +- .../inner_api/push_callback_interface.h | 5 - interfaces/inner_api/push_callback_stub.h | 1 + services/ans/BUILD.gn | 5 +- services/ans/src/push_callback_stub.cpp | 5 +- .../test/unittest/push_callback_stub_test.cpp | 4 +- .../anssubscriberproxy_fuzzer.cpp | 2 +- 22 files changed, 483 insertions(+), 450 deletions(-) create mode 100644 .gitee/CODEOWNDERS create mode 100644 frameworks/core/include/distributed_notification_service_ipc_interface_code.h diff --git a/.gitee/CODEOWNDERS b/.gitee/CODEOWNDERS new file mode 100644 index 000000000..9430fa9d3 --- /dev/null +++ b/.gitee/CODEOWNDERS @@ -0,0 +1 @@ +../frameworks/core/include/distributed_notification_service_ipc_interface_code.h @leonchan5 \ No newline at end of file diff --git a/frameworks/core/include/ans_manager_interface.h b/frameworks/core/include/ans_manager_interface.h index 342082b15..6041aae15 100644 --- a/frameworks/core/include/ans_manager_interface.h +++ b/frameworks/core/include/ans_manager_interface.h @@ -670,90 +670,6 @@ public: * @return Returns unregister push Callback result. */ virtual ErrCode UnregisterPushCallback() = 0; - -protected: - enum TransactId : uint32_t { - PUBLISH_NOTIFICATION = FIRST_CALL_TRANSACTION, - PUBLISH_NOTIFICATION_TO_DEVICE, // Obsolete - CANCEL_NOTIFICATION, - CANCEL_ALL_NOTIFICATIONS, - CANCEL_AS_BUNDLE, - ADD_SLOT_BY_TYPE, - ADD_SLOTS, - REMOVE_SLOT_BY_TYPE, - REMOVE_ALL_SLOTS, - ADD_SLOT_GROUPS, - GET_SLOT_BY_TYPE, - GET_SLOTS, - GET_SLOT_GROUP, - GET_SLOT_GROUPS, - GET_SLOT_NUM_AS_BUNDLE, - REMOVE_SLOT_GROUPS, - GET_ACTIVE_NOTIFICATIONS, - GET_ACTIVE_NOTIFICATION_NUMS, - GET_ALL_ACTIVE_NOTIFICATIONS, - GET_SPECIAL_ACTIVE_NOTIFICATIONS, - SET_NOTIFICATION_AGENT, - GET_NOTIFICATION_AGENT, - CAN_PUBLISH_AS_BUNDLE, - PUBLISH_AS_BUNDLE, - SET_NOTIFICATION_BADGE_NUM, - GET_BUNDLE_IMPORTANCE, - IS_NOTIFICATION_POLICY_ACCESS_GRANTED, - REMOVE_NOTIFICATION, - REMOVE_ALL_NOTIFICATIONS, - DELETE_NOTIFICATION, - DELETE_NOTIFICATION_BY_BUNDLE, - DELETE_ALL_NOTIFICATIONS, - GET_SLOTS_BY_BUNDLE, - UPDATE_SLOTS, - UPDATE_SLOT_GROUPS, - REQUEST_ENABLE_NOTIFICATION, - SET_NOTIFICATION_ENABLED_FOR_BUNDLE, - SET_NOTIFICATION_ENABLED_FOR_ALL_BUNDLE, - SET_NOTIFICATION_ENABLED_FOR_SPECIAL_BUNDLE, - SET_SHOW_BADGE_ENABLED_FOR_BUNDLE, - GET_SHOW_BADGE_ENABLED_FOR_BUNDLE, - GET_SHOW_BADGE_ENABLED, - SUBSCRIBE_NOTIFICATION, - UNSUBSCRIBE_NOTIFICATION, - ARE_NOTIFICATION_SUSPENDED, // Obsolete - GET_CURRENT_APP_SORTING, // Obsolete - IS_ALLOWED_NOTIFY, - IS_ALLOWED_NOTIFY_SELF, - IS_SPECIAL_BUNDLE_ALLOWED_NOTIFY, - SET_DO_NOT_DISTURB_DATE, - GET_DO_NOT_DISTURB_DATE, - DOES_SUPPORT_DO_NOT_DISTURB_MODE, - CANCEL_GROUP, - REMOVE_GROUP_BY_BUNDLE, - IS_DISTRIBUTED_ENABLED, - ENABLE_DISTRIBUTED, - ENABLE_DISTRIBUTED_BY_BUNDLE, - ENABLE_DISTRIBUTED_SELF, - IS_DISTRIBUTED_ENABLED_BY_BUNDLE, - GET_DEVICE_REMIND_TYPE, - SHELL_DUMP, - PUBLISH_CONTINUOUS_TASK_NOTIFICATION, - CANCEL_CONTINUOUS_TASK_NOTIFICATION, - PUBLISH_REMINDER, - CANCEL_REMINDER, - CANCEL_ALL_REMINDERS, - GET_ALL_VALID_REMINDERS, - IS_SUPPORT_TEMPLATE, - IS_SPECIAL_USER_ALLOWED_NOTIFY, - SET_NOTIFICATION_ENABLED_BY_USER, - DELETE_ALL_NOTIFICATIONS_BY_USER, - SET_DO_NOT_DISTURB_DATE_BY_USER, - GET_DO_NOT_DISTURB_DATE_BY_USER, - SET_ENABLED_FOR_BUNDLE_SLOT, - GET_ENABLED_FOR_BUNDLE_SLOT, - SET_SYNC_NOTIFICATION_ENABLED_WITHOUT_APP, - GET_SYNC_NOTIFICATION_ENABLED_WITHOUT_APP, - SET_BADGE_NUMBER, - REGISTER_PUSH_CALLBACK, - UNREGISTER_PUSH_CALLBACK, - }; }; } // namespace Notification } // namespace OHOS diff --git a/frameworks/core/include/ans_manager_proxy.h b/frameworks/core/include/ans_manager_proxy.h index 2010a412c..73eb6b88c 100644 --- a/frameworks/core/include/ans_manager_proxy.h +++ b/frameworks/core/include/ans_manager_proxy.h @@ -17,6 +17,7 @@ #define BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_ANS_MANAGER_PROXY_H #include "ans_manager_interface.h" +#include "distributed_notification_service_ipc_interface_code.h" #include "iremote_proxy.h" namespace OHOS { @@ -660,7 +661,7 @@ public: ErrCode UnregisterPushCallback() override; private: - ErrCode InnerTransact(uint32_t code, MessageOption &flags, MessageParcel &data, MessageParcel &reply); + ErrCode InnerTransact(NotificationInterfaceCode code, MessageOption &flags, MessageParcel &data, MessageParcel &reply); template bool WriteParcelableVector(const std::vector> &parcelableVector, MessageParcel &data); diff --git a/frameworks/core/include/ans_manager_stub.h b/frameworks/core/include/ans_manager_stub.h index d4f4cc190..dcd90008d 100644 --- a/frameworks/core/include/ans_manager_stub.h +++ b/frameworks/core/include/ans_manager_stub.h @@ -20,6 +20,7 @@ #include #include "ans_manager_interface.h" +#include "distributed_notification_service_ipc_interface_code.h" #include "iremote_stub.h" namespace OHOS { @@ -681,7 +682,7 @@ public: ErrCode UnregisterPushCallback() override; private: - static const std::map> + static const std::map> interfaces_; ErrCode HandlePublish(MessageParcel &data, MessageParcel &reply); diff --git a/frameworks/core/include/ans_subscriber_interface.h b/frameworks/core/include/ans_subscriber_interface.h index d21049641..3d3fba0c0 100644 --- a/frameworks/core/include/ans_subscriber_interface.h +++ b/frameworks/core/include/ans_subscriber_interface.h @@ -93,19 +93,6 @@ public: * @param badgeData Indicates the BadgeNumberCallbackData object. */ virtual void OnBadgeChanged(const sptr &badgeData) = 0; - -protected: - enum TransactId : uint32_t { - ON_CONNECTED = FIRST_CALL_TRANSACTION, - ON_DISCONNECTED, - ON_CONSUMED, // Obsolete - ON_CONSUMED_MAP, - ON_CANCELED_MAP, - ON_UPDATED, - ON_DND_DATE_CHANGED, - ON_ENABLED_NOTIFICATION_CHANGED, - ON_BADGE_CHANGED, - }; }; } // namespace Notification } // namespace OHOS diff --git a/frameworks/core/include/ans_subscriber_proxy.h b/frameworks/core/include/ans_subscriber_proxy.h index 4de07f0e0..18ff83ee6 100644 --- a/frameworks/core/include/ans_subscriber_proxy.h +++ b/frameworks/core/include/ans_subscriber_proxy.h @@ -17,6 +17,7 @@ #define BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_ANS_SUBSCRIBER_PROXY_H #include "ans_subscriber_interface.h" +#include "distributed_notification_service_ipc_interface_code.h" #include "iremote_proxy.h" namespace OHOS { @@ -86,7 +87,7 @@ public: void OnBadgeChanged(const sptr &badgeData) override; private: - ErrCode InnerTransact(uint32_t code, MessageOption &flags, MessageParcel &data, MessageParcel &reply); + ErrCode InnerTransact(NotificationInterfaceCode code, MessageOption &flags, MessageParcel &data, MessageParcel &reply); static inline BrokerDelegator delegator_; }; } // namespace Notification diff --git a/frameworks/core/include/ans_subscriber_stub.h b/frameworks/core/include/ans_subscriber_stub.h index 0b10118a7..a04b2773c 100644 --- a/frameworks/core/include/ans_subscriber_stub.h +++ b/frameworks/core/include/ans_subscriber_stub.h @@ -17,6 +17,7 @@ #define BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_ANS_SUBSCRIBER_STUB_H #include "ans_subscriber_interface.h" +#include "distributed_notification_service_ipc_interface_code.h" #include "iremote_stub.h" namespace OHOS { @@ -96,7 +97,7 @@ public: void OnBadgeChanged(const sptr &badgeData) override; private: - std::map> interfaces_; + std::map> interfaces_; ErrCode HandleOnConnected(MessageParcel &data, MessageParcel &reply); ErrCode HandleOnDisconnected(MessageParcel &data, MessageParcel &reply); diff --git a/frameworks/core/include/distributed_notification_service_ipc_interface_code.h b/frameworks/core/include/distributed_notification_service_ipc_interface_code.h new file mode 100644 index 000000000..fbd1d6d5f --- /dev/null +++ b/frameworks/core/include/distributed_notification_service_ipc_interface_code.h @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_DISTRIBUTED_NOTIFICATION_SERVICE_IPC_INTERFACE_CODE_H +#define BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_DISTRIBUTED_NOTIFICATION_SERVICE_IPC_INTERFACE_CODE_H + +#include "iremote_broker.h" + +/* SAID: 3203 */ +namespace OHOS { +namespace Notification { + enum class NotificationInterfaceCode { + // ans_manager_interface + PUBLISH_NOTIFICATION = FIRST_CALL_TRANSACTION, + PUBLISH_NOTIFICATION_TO_DEVICE, // Obsolete + CANCEL_NOTIFICATION, + CANCEL_ALL_NOTIFICATIONS, + CANCEL_AS_BUNDLE, + ADD_SLOT_BY_TYPE, + ADD_SLOTS, + REMOVE_SLOT_BY_TYPE, + REMOVE_ALL_SLOTS, + ADD_SLOT_GROUPS, + GET_SLOT_BY_TYPE, + GET_SLOTS, + GET_SLOT_GROUP, + GET_SLOT_GROUPS, + GET_SLOT_NUM_AS_BUNDLE, + REMOVE_SLOT_GROUPS, + GET_ACTIVE_NOTIFICATIONS, + GET_ACTIVE_NOTIFICATION_NUMS, + GET_ALL_ACTIVE_NOTIFICATIONS, + GET_SPECIAL_ACTIVE_NOTIFICATIONS, + SET_NOTIFICATION_AGENT, + GET_NOTIFICATION_AGENT, + CAN_PUBLISH_AS_BUNDLE, + PUBLISH_AS_BUNDLE, + SET_NOTIFICATION_BADGE_NUM, + GET_BUNDLE_IMPORTANCE, + IS_NOTIFICATION_POLICY_ACCESS_GRANTED, + REMOVE_NOTIFICATION, + REMOVE_ALL_NOTIFICATIONS, + DELETE_NOTIFICATION, + DELETE_NOTIFICATION_BY_BUNDLE, + DELETE_ALL_NOTIFICATIONS, + GET_SLOTS_BY_BUNDLE, + UPDATE_SLOTS, + UPDATE_SLOT_GROUPS, + REQUEST_ENABLE_NOTIFICATION, + SET_NOTIFICATION_ENABLED_FOR_BUNDLE, + SET_NOTIFICATION_ENABLED_FOR_ALL_BUNDLE, + SET_NOTIFICATION_ENABLED_FOR_SPECIAL_BUNDLE, + SET_SHOW_BADGE_ENABLED_FOR_BUNDLE, + GET_SHOW_BADGE_ENABLED_FOR_BUNDLE, + GET_SHOW_BADGE_ENABLED, + SUBSCRIBE_NOTIFICATION, + UNSUBSCRIBE_NOTIFICATION, + ARE_NOTIFICATION_SUSPENDED, // Obsolete + GET_CURRENT_APP_SORTING, // Obsolete + IS_ALLOWED_NOTIFY, + IS_ALLOWED_NOTIFY_SELF, + IS_SPECIAL_BUNDLE_ALLOWED_NOTIFY, + SET_DO_NOT_DISTURB_DATE, + GET_DO_NOT_DISTURB_DATE, + DOES_SUPPORT_DO_NOT_DISTURB_MODE, + CANCEL_GROUP, + REMOVE_GROUP_BY_BUNDLE, + IS_DISTRIBUTED_ENABLED, + ENABLE_DISTRIBUTED, + ENABLE_DISTRIBUTED_BY_BUNDLE, + ENABLE_DISTRIBUTED_SELF, + IS_DISTRIBUTED_ENABLED_BY_BUNDLE, + GET_DEVICE_REMIND_TYPE, + SHELL_DUMP, + PUBLISH_CONTINUOUS_TASK_NOTIFICATION, + CANCEL_CONTINUOUS_TASK_NOTIFICATION, + PUBLISH_REMINDER, + CANCEL_REMINDER, + CANCEL_ALL_REMINDERS, + GET_ALL_VALID_REMINDERS, + IS_SUPPORT_TEMPLATE, + IS_SPECIAL_USER_ALLOWED_NOTIFY, + SET_NOTIFICATION_ENABLED_BY_USER, + DELETE_ALL_NOTIFICATIONS_BY_USER, + SET_DO_NOT_DISTURB_DATE_BY_USER, + GET_DO_NOT_DISTURB_DATE_BY_USER, + SET_ENABLED_FOR_BUNDLE_SLOT, + GET_ENABLED_FOR_BUNDLE_SLOT, + SET_SYNC_NOTIFICATION_ENABLED_WITHOUT_APP, + GET_SYNC_NOTIFICATION_ENABLED_WITHOUT_APP, + SET_BADGE_NUMBER, + REGISTER_PUSH_CALLBACK, + UNREGISTER_PUSH_CALLBACK, + // ans_subscriber_interface + ON_CONNECTED, + ON_DISCONNECTED, + ON_CONSUMED, // Obsolete + ON_CONSUMED_MAP, + ON_CANCELED_MAP, + ON_UPDATED, + ON_DND_DATE_CHANGED, + ON_ENABLED_NOTIFICATION_CHANGED, + ON_BADGE_CHANGED, + // push_callback_interface + ON_CHECK_NOTIFICATION, + }; +} +} + +#endif \ No newline at end of file diff --git a/frameworks/core/src/ans_manager_proxy.cpp b/frameworks/core/src/ans_manager_proxy.cpp index fc607eb36..5bad741bf 100644 --- a/frameworks/core/src/ans_manager_proxy.cpp +++ b/frameworks/core/src/ans_manager_proxy.cpp @@ -18,6 +18,7 @@ #include "ans_const_define.h" #include "ans_inner_errors.h" #include "ans_log_wrapper.h" +#include "distributed_notification_service_ipc_interface_code.h" #include "message_option.h" #include "message_parcel.h" #include "parcel.h" @@ -59,7 +60,7 @@ ErrCode AnsManagerProxy::Publish(const std::string &label, const sptr> &slo MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(ADD_SLOTS, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::ADD_SLOTS, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[AddSlots] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -255,7 +256,7 @@ ErrCode AnsManagerProxy::RemoveSlotByType(const NotificationConstant::SlotType & MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(REMOVE_SLOT_BY_TYPE, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::REMOVE_SLOT_BY_TYPE, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[RemoveSlotByType] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -279,7 +280,7 @@ ErrCode AnsManagerProxy::RemoveAllSlots() MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(REMOVE_ALL_SLOTS, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::REMOVE_ALL_SLOTS, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[RemoveAllSlots] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -308,7 +309,7 @@ ErrCode AnsManagerProxy::GetSlotByType(const NotificationConstant::SlotType &slo MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(GET_SLOT_BY_TYPE, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::GET_SLOT_BY_TYPE, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[GetSlotByType] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -339,7 +340,7 @@ ErrCode AnsManagerProxy::GetSlots(std::vector> &slots) MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(GET_SLOTS, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::GET_SLOTS, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[GetSlots] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -373,7 +374,7 @@ ErrCode AnsManagerProxy::GetSlotNumAsBundle(const sptr MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(GET_SLOT_NUM_AS_BUNDLE, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::GET_SLOT_NUM_AS_BUNDLE, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[GetShowBadgeEnabledForBundle] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -402,7 +403,7 @@ ErrCode AnsManagerProxy::GetActiveNotifications(std::vector MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(REMOVE_NOTIFICATION, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::REMOVE_NOTIFICATION, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[RemoveNotification] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -808,7 +809,7 @@ ErrCode AnsManagerProxy::RemoveAllNotifications(const sptr &bu MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(DELETE_NOTIFICATION_BY_BUNDLE, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::DELETE_NOTIFICATION_BY_BUNDLE, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[DeleteByBundle] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -905,7 +906,7 @@ ErrCode AnsManagerProxy::DeleteAll() MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(DELETE_ALL_NOTIFICATIONS, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::DELETE_ALL_NOTIFICATIONS, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[DeleteAll] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -940,7 +941,7 @@ ErrCode AnsManagerProxy::GetSlotsByBundle( MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(GET_SLOTS_BY_BUNDLE, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::GET_SLOTS_BY_BUNDLE, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[GetSlotsByBundle] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -991,7 +992,7 @@ ErrCode AnsManagerProxy::UpdateSlots( MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(UPDATE_SLOTS, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::UPDATE_SLOTS, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[UpdateSlots] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -1021,7 +1022,7 @@ ErrCode AnsManagerProxy::RequestEnableNotification(const std::string &deviceId) MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(REQUEST_ENABLE_NOTIFICATION, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::REQUEST_ENABLE_NOTIFICATION, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[RequestEnableNotification] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -1054,7 +1055,7 @@ ErrCode AnsManagerProxy::SetNotificationsEnabledForBundle(const std::string &dev MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(SET_NOTIFICATION_ENABLED_FOR_BUNDLE, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::SET_NOTIFICATION_ENABLED_FOR_BUNDLE, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[SetNotificationsEnabledForBundle] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -1088,7 +1089,7 @@ ErrCode AnsManagerProxy::SetNotificationsEnabledForAllBundles(const std::string MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(SET_NOTIFICATION_ENABLED_FOR_ALL_BUNDLE, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::SET_NOTIFICATION_ENABLED_FOR_ALL_BUNDLE, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[SetNotificationsEnabledForAllBundles] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -1133,7 +1134,7 @@ ErrCode AnsManagerProxy::SetNotificationsEnabledForSpecialBundle( MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(SET_NOTIFICATION_ENABLED_FOR_SPECIAL_BUNDLE, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::SET_NOTIFICATION_ENABLED_FOR_SPECIAL_BUNDLE, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[SetNotificationsEnabledForSpecialBundle] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -1172,7 +1173,7 @@ ErrCode AnsManagerProxy::SetShowBadgeEnabledForBundle(const sptr &subscribe MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(SUBSCRIBE_NOTIFICATION, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::SUBSCRIBE_NOTIFICATION, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[Subscribe] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -1336,7 +1337,7 @@ ErrCode AnsManagerProxy::Unsubscribe( MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(UNSUBSCRIBE_NOTIFICATION, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::UNSUBSCRIBE_NOTIFICATION, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[Unsubscribe] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -1360,7 +1361,7 @@ ErrCode AnsManagerProxy::IsAllowedNotify(bool &allowed) MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(IS_ALLOWED_NOTIFY, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::IS_ALLOWED_NOTIFY, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[IsAllowedNotify] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -1389,7 +1390,7 @@ ErrCode AnsManagerProxy::IsAllowedNotifySelf(bool &allowed) MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(IS_ALLOWED_NOTIFY_SELF, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::IS_ALLOWED_NOTIFY_SELF, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[IsAllowedNotifySelf] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -1428,7 +1429,7 @@ ErrCode AnsManagerProxy::IsSpecialBundleAllowedNotify(const sptr MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(GET_DO_NOT_DISTURB_DATE, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::GET_DO_NOT_DISTURB_DATE, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[GetDoNotDisturbDate] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -1587,7 +1588,7 @@ ErrCode AnsManagerProxy::DoesSupportDoNotDisturbMode(bool &doesSupport) MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(DOES_SUPPORT_DO_NOT_DISTURB_MODE, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::DOES_SUPPORT_DO_NOT_DISTURB_MODE, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[DoesSupportDoNotDisturbMode] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -1616,7 +1617,7 @@ ErrCode AnsManagerProxy::IsDistributedEnabled(bool &enabled) MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(IS_DISTRIBUTED_ENABLED, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::IS_DISTRIBUTED_ENABLED, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[IsDistributedEnabled] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -1650,7 +1651,7 @@ ErrCode AnsManagerProxy::EnableDistributed(bool enabled) MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(ENABLE_DISTRIBUTED, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::ENABLE_DISTRIBUTED, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[EnableDistributed] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -1689,7 +1690,7 @@ ErrCode AnsManagerProxy::EnableDistributedByBundle(const sptr &reminder) MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(PUBLISH_REMINDER, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::PUBLISH_REMINDER, option, data, reply); if (result != ERR_OK) { ANSR_LOGE("[PublishReminder] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -1929,7 +1930,7 @@ ErrCode AnsManagerProxy::CancelReminder(const int32_t reminderId) MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(CANCEL_REMINDER, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::CANCEL_REMINDER, option, data, reply); if (result != ERR_OK) { ANSR_LOGE("[CancelReminder] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -1952,7 +1953,7 @@ ErrCode AnsManagerProxy::CancelAllReminders() MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(CANCEL_ALL_REMINDERS, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::CANCEL_ALL_REMINDERS, option, data, reply); if (result != ERR_OK) { ANSR_LOGE("[CancelAllReminders] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -1975,7 +1976,7 @@ ErrCode AnsManagerProxy::GetValidReminders(std::vector> &r MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(GET_ALL_VALID_REMINDERS, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::GET_ALL_VALID_REMINDERS, option, data, reply); if (result != ERR_OK) { ANSR_LOGE("[GetValidReminders] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -2034,14 +2035,14 @@ ErrCode AnsManagerProxy::ReadReminders( return ERR_OK; } -ErrCode AnsManagerProxy::InnerTransact(uint32_t code, MessageOption &flags, MessageParcel &data, MessageParcel &reply) +ErrCode AnsManagerProxy::InnerTransact(NotificationInterfaceCode code, MessageOption &flags, MessageParcel &data, MessageParcel &reply) { auto remote = Remote(); if (remote == nullptr) { ANS_LOGE("[InnerTransact] fail: get Remote fail code %{public}u", code); return ERR_DEAD_OBJECT; } - int32_t err = remote->SendRequest(code, data, reply, flags); + int32_t err = remote->SendRequest(static_cast(code), data, reply, flags); switch (err) { case NO_ERROR: { return ERR_OK; @@ -2117,7 +2118,7 @@ ErrCode AnsManagerProxy::IsSupportTemplate(const std::string &templateName, bool MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(IS_SUPPORT_TEMPLATE, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::IS_SUPPORT_TEMPLATE, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[IsSupportTemplate] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -2151,7 +2152,7 @@ ErrCode AnsManagerProxy::IsSpecialUserAllowedNotify(const int32_t &userId, bool MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(IS_SPECIAL_USER_ALLOWED_NOTIFY, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::IS_SPECIAL_USER_ALLOWED_NOTIFY, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[IsSpecialBundleAllowedNotify] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -2190,7 +2191,7 @@ ErrCode AnsManagerProxy::SetNotificationsEnabledByUser(const int32_t &userId, bo MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(SET_NOTIFICATION_ENABLED_BY_USER, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::SET_NOTIFICATION_ENABLED_BY_USER, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[SetNotificationsEnabledByUser] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -2219,7 +2220,7 @@ ErrCode AnsManagerProxy::DeleteAllByUser(const int32_t &userId) MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - ErrCode result = InnerTransact(DELETE_ALL_NOTIFICATIONS_BY_USER, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::DELETE_ALL_NOTIFICATIONS_BY_USER, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[DeleteAllByUser] fail: transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -2258,7 +2259,7 @@ ErrCode AnsManagerProxy::SetDoNotDisturbDate(const int32_t &userId, const sptr &pushCal MessageParcel reply; MessageOption option = { MessageOption::TF_SYNC }; - ErrCode result = InnerTransact(REGISTER_PUSH_CALLBACK, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::REGISTER_PUSH_CALLBACK, option, data, reply); if (result != ERR_OK) { ANS_LOGE("transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; @@ -2573,7 +2576,7 @@ ErrCode AnsManagerProxy::UnregisterPushCallback() MessageParcel reply; MessageOption option = { MessageOption::TF_SYNC }; - ErrCode result = InnerTransact(UNREGISTER_PUSH_CALLBACK, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::UNREGISTER_PUSH_CALLBACK, option, data, reply); if (result != ERR_OK) { ANS_LOGE("transact ErrCode=%{public}d", result); return ERR_ANS_TRANSACT_FAILED; diff --git a/frameworks/core/src/ans_manager_stub.cpp b/frameworks/core/src/ans_manager_stub.cpp index 495364610..526531b8e 100644 --- a/frameworks/core/src/ans_manager_stub.cpp +++ b/frameworks/core/src/ans_manager_stub.cpp @@ -26,226 +26,226 @@ namespace OHOS { namespace Notification { -const std::map> +const std::map> AnsManagerStub::interfaces_ = { - {AnsManagerStub::PUBLISH_NOTIFICATION, + {NotificationInterfaceCode::PUBLISH_NOTIFICATION, std::bind( &AnsManagerStub::HandlePublish, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::CANCEL_NOTIFICATION, + {NotificationInterfaceCode::CANCEL_NOTIFICATION, std::bind( &AnsManagerStub::HandleCancel, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::CANCEL_ALL_NOTIFICATIONS, + {NotificationInterfaceCode::CANCEL_ALL_NOTIFICATIONS, std::bind( &AnsManagerStub::HandleCancelAll, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::CANCEL_AS_BUNDLE, + {NotificationInterfaceCode::CANCEL_AS_BUNDLE, std::bind(&AnsManagerStub::HandleCancelAsBundle, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::ADD_SLOT_BY_TYPE, + {NotificationInterfaceCode::ADD_SLOT_BY_TYPE, std::bind(&AnsManagerStub::HandleAddSlotByType, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::ADD_SLOTS, + {NotificationInterfaceCode::ADD_SLOTS, std::bind( &AnsManagerStub::HandleAddSlots, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::REMOVE_SLOT_BY_TYPE, + {NotificationInterfaceCode::REMOVE_SLOT_BY_TYPE, std::bind(&AnsManagerStub::HandleRemoveSlotByType, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::REMOVE_ALL_SLOTS, + {NotificationInterfaceCode::REMOVE_ALL_SLOTS, std::bind(&AnsManagerStub::HandleRemoveAllSlots, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::GET_SLOT_BY_TYPE, + {NotificationInterfaceCode::GET_SLOT_BY_TYPE, std::bind(&AnsManagerStub::HandleGetSlotByType, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::GET_SLOTS, + {NotificationInterfaceCode::GET_SLOTS, std::bind( &AnsManagerStub::HandleGetSlots, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::GET_SLOT_NUM_AS_BUNDLE, + {NotificationInterfaceCode::GET_SLOT_NUM_AS_BUNDLE, std::bind(&AnsManagerStub::HandleGetSlotNumAsBundle, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::GET_ACTIVE_NOTIFICATIONS, + {NotificationInterfaceCode::GET_ACTIVE_NOTIFICATIONS, std::bind(&AnsManagerStub::HandleGetActiveNotifications, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::GET_ACTIVE_NOTIFICATION_NUMS, + {NotificationInterfaceCode::GET_ACTIVE_NOTIFICATION_NUMS, std::bind(&AnsManagerStub::HandleGetActiveNotificationNums, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::GET_ALL_ACTIVE_NOTIFICATIONS, + {NotificationInterfaceCode::GET_ALL_ACTIVE_NOTIFICATIONS, std::bind(&AnsManagerStub::HandleGetAllActiveNotifications, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::GET_SPECIAL_ACTIVE_NOTIFICATIONS, + {NotificationInterfaceCode::GET_SPECIAL_ACTIVE_NOTIFICATIONS, std::bind(&AnsManagerStub::HandleGetSpecialActiveNotifications, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::SET_NOTIFICATION_AGENT, + {NotificationInterfaceCode::SET_NOTIFICATION_AGENT, std::bind(&AnsManagerStub::HandleSetNotificationAgent, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::GET_NOTIFICATION_AGENT, + {NotificationInterfaceCode::GET_NOTIFICATION_AGENT, std::bind(&AnsManagerStub::HandleGetNotificationAgent, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::CAN_PUBLISH_AS_BUNDLE, + {NotificationInterfaceCode::CAN_PUBLISH_AS_BUNDLE, std::bind(&AnsManagerStub::HandleCanPublishAsBundle, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::PUBLISH_AS_BUNDLE, + {NotificationInterfaceCode::PUBLISH_AS_BUNDLE, std::bind(&AnsManagerStub::HandlePublishAsBundle, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::SET_NOTIFICATION_BADGE_NUM, + {NotificationInterfaceCode::SET_NOTIFICATION_BADGE_NUM, std::bind(&AnsManagerStub::HandleSetNotificationBadgeNum, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::GET_BUNDLE_IMPORTANCE, + {NotificationInterfaceCode::GET_BUNDLE_IMPORTANCE, std::bind(&AnsManagerStub::HandleGetBundleImportance, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::IS_NOTIFICATION_POLICY_ACCESS_GRANTED, + {NotificationInterfaceCode::IS_NOTIFICATION_POLICY_ACCESS_GRANTED, std::bind(&AnsManagerStub::HandleIsNotificationPolicyAccessGranted, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::REMOVE_NOTIFICATION, + {NotificationInterfaceCode::REMOVE_NOTIFICATION, std::bind(&AnsManagerStub::HandleRemoveNotification, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::REMOVE_ALL_NOTIFICATIONS, + {NotificationInterfaceCode::REMOVE_ALL_NOTIFICATIONS, std::bind(&AnsManagerStub::HandleRemoveAllNotifications, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::DELETE_NOTIFICATION, + {NotificationInterfaceCode::DELETE_NOTIFICATION, std::bind( &AnsManagerStub::HandleDelete, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::DELETE_NOTIFICATION_BY_BUNDLE, + {NotificationInterfaceCode::DELETE_NOTIFICATION_BY_BUNDLE, std::bind(&AnsManagerStub::HandleDeleteByBundle, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::DELETE_ALL_NOTIFICATIONS, + {NotificationInterfaceCode::DELETE_ALL_NOTIFICATIONS, std::bind( &AnsManagerStub::HandleDeleteAll, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::GET_SLOTS_BY_BUNDLE, + {NotificationInterfaceCode::GET_SLOTS_BY_BUNDLE, std::bind(&AnsManagerStub::HandleGetSlotsByBundle, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::UPDATE_SLOTS, + {NotificationInterfaceCode::UPDATE_SLOTS, std::bind(&AnsManagerStub::HandleUpdateSlots, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::REQUEST_ENABLE_NOTIFICATION, + {NotificationInterfaceCode::REQUEST_ENABLE_NOTIFICATION, std::bind(&AnsManagerStub::HandleRequestEnableNotification, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::SET_NOTIFICATION_ENABLED_FOR_BUNDLE, + {NotificationInterfaceCode::SET_NOTIFICATION_ENABLED_FOR_BUNDLE, std::bind(&AnsManagerStub::HandleSetNotificationsEnabledForBundle, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::SET_NOTIFICATION_ENABLED_FOR_ALL_BUNDLE, + {NotificationInterfaceCode::SET_NOTIFICATION_ENABLED_FOR_ALL_BUNDLE, std::bind(&AnsManagerStub::HandleSetNotificationsEnabledForAllBundles, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::SET_NOTIFICATION_ENABLED_FOR_SPECIAL_BUNDLE, + {NotificationInterfaceCode::SET_NOTIFICATION_ENABLED_FOR_SPECIAL_BUNDLE, std::bind(&AnsManagerStub::HandleSetNotificationsEnabledForSpecialBundle, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::SET_SHOW_BADGE_ENABLED_FOR_BUNDLE, + {NotificationInterfaceCode::SET_SHOW_BADGE_ENABLED_FOR_BUNDLE, std::bind(&AnsManagerStub::HandleSetShowBadgeEnabledForBundle, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::GET_SHOW_BADGE_ENABLED_FOR_BUNDLE, + {NotificationInterfaceCode::GET_SHOW_BADGE_ENABLED_FOR_BUNDLE, std::bind(&AnsManagerStub::HandleGetShowBadgeEnabledForBundle, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::GET_SHOW_BADGE_ENABLED, + {NotificationInterfaceCode::GET_SHOW_BADGE_ENABLED, std::bind(&AnsManagerStub::HandleGetShowBadgeEnabled, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::SUBSCRIBE_NOTIFICATION, + {NotificationInterfaceCode::SUBSCRIBE_NOTIFICATION, std::bind( &AnsManagerStub::HandleSubscribe, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::UNSUBSCRIBE_NOTIFICATION, + {NotificationInterfaceCode::UNSUBSCRIBE_NOTIFICATION, std::bind(&AnsManagerStub::HandleUnsubscribe, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::IS_ALLOWED_NOTIFY, + {NotificationInterfaceCode::IS_ALLOWED_NOTIFY, std::bind(&AnsManagerStub::HandleIsAllowedNotify, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::IS_ALLOWED_NOTIFY_SELF, + {NotificationInterfaceCode::IS_ALLOWED_NOTIFY_SELF, std::bind(&AnsManagerStub::HandleIsAllowedNotifySelf, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::IS_SPECIAL_BUNDLE_ALLOWED_NOTIFY, + {NotificationInterfaceCode::IS_SPECIAL_BUNDLE_ALLOWED_NOTIFY, std::bind(&AnsManagerStub::HandleIsSpecialBundleAllowedNotify, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::SET_DO_NOT_DISTURB_DATE, + {NotificationInterfaceCode::SET_DO_NOT_DISTURB_DATE, std::bind(&AnsManagerStub::HandleSetDoNotDisturbDate, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::GET_DO_NOT_DISTURB_DATE, + {NotificationInterfaceCode::GET_DO_NOT_DISTURB_DATE, std::bind(&AnsManagerStub::HandleGetDoNotDisturbDate, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::DOES_SUPPORT_DO_NOT_DISTURB_MODE, + {NotificationInterfaceCode::DOES_SUPPORT_DO_NOT_DISTURB_MODE, std::bind(&AnsManagerStub::HandleDoesSupportDoNotDisturbMode, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::CANCEL_GROUP, + {NotificationInterfaceCode::CANCEL_GROUP, std::bind(&AnsManagerStub::HandleCancelGroup, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::REMOVE_GROUP_BY_BUNDLE, + {NotificationInterfaceCode::REMOVE_GROUP_BY_BUNDLE, std::bind(&AnsManagerStub::HandleRemoveGroupByBundle, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::IS_DISTRIBUTED_ENABLED, + {NotificationInterfaceCode::IS_DISTRIBUTED_ENABLED, std::bind(&AnsManagerStub::HandleIsDistributedEnabled, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::ENABLE_DISTRIBUTED, + {NotificationInterfaceCode::ENABLE_DISTRIBUTED, std::bind(&AnsManagerStub::HandleEnableDistributed, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::ENABLE_DISTRIBUTED_BY_BUNDLE, + {NotificationInterfaceCode::ENABLE_DISTRIBUTED_BY_BUNDLE, std::bind(&AnsManagerStub::HandleEnableDistributedByBundle, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::ENABLE_DISTRIBUTED_SELF, + {NotificationInterfaceCode::ENABLE_DISTRIBUTED_SELF, std::bind(&AnsManagerStub::HandleEnableDistributedSelf, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::IS_DISTRIBUTED_ENABLED_BY_BUNDLE, + {NotificationInterfaceCode::IS_DISTRIBUTED_ENABLED_BY_BUNDLE, std::bind(&AnsManagerStub::HandleIsDistributedEnableByBundle, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::GET_DEVICE_REMIND_TYPE, + {NotificationInterfaceCode::GET_DEVICE_REMIND_TYPE, std::bind(&AnsManagerStub::HandleGetDeviceRemindType, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::SHELL_DUMP, + {NotificationInterfaceCode::SHELL_DUMP, std::bind( &AnsManagerStub::HandleShellDump, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::PUBLISH_CONTINUOUS_TASK_NOTIFICATION, + {NotificationInterfaceCode::PUBLISH_CONTINUOUS_TASK_NOTIFICATION, std::bind( &AnsManagerStub::HandlePublishContinuousTaskNotification, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::CANCEL_CONTINUOUS_TASK_NOTIFICATION, + {NotificationInterfaceCode::CANCEL_CONTINUOUS_TASK_NOTIFICATION, std::bind( &AnsManagerStub::HandleCancelContinuousTaskNotification, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::PUBLISH_REMINDER, + {NotificationInterfaceCode::PUBLISH_REMINDER, std::bind(&AnsManagerStub::HandlePublishReminder, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::CANCEL_REMINDER, + {NotificationInterfaceCode::CANCEL_REMINDER, std::bind(&AnsManagerStub::HandleCancelReminder, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::CANCEL_ALL_REMINDERS, + {NotificationInterfaceCode::CANCEL_ALL_REMINDERS, std::bind( &AnsManagerStub::HandleCancelAllReminders, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::GET_ALL_VALID_REMINDERS, + {NotificationInterfaceCode::GET_ALL_VALID_REMINDERS, std::bind(&AnsManagerStub::HandleGetValidReminders, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::IS_SUPPORT_TEMPLATE, + {NotificationInterfaceCode::IS_SUPPORT_TEMPLATE, std::bind( &AnsManagerStub::HandleIsSupportTemplate, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::IS_SPECIAL_USER_ALLOWED_NOTIFY, + {NotificationInterfaceCode::IS_SPECIAL_USER_ALLOWED_NOTIFY, std::bind(&AnsManagerStub::HandleIsSpecialUserAllowedNotifyByUser, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::SET_NOTIFICATION_ENABLED_BY_USER, + {NotificationInterfaceCode::SET_NOTIFICATION_ENABLED_BY_USER, std::bind(&AnsManagerStub::HandleSetNotificationsEnabledByUser, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::DELETE_ALL_NOTIFICATIONS_BY_USER, + {NotificationInterfaceCode::DELETE_ALL_NOTIFICATIONS_BY_USER, std::bind(&AnsManagerStub::HandleDeleteAllByUser, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::SET_DO_NOT_DISTURB_DATE_BY_USER, + {NotificationInterfaceCode::SET_DO_NOT_DISTURB_DATE_BY_USER, std::bind(&AnsManagerStub::HandleSetDoNotDisturbDateByUser, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::GET_DO_NOT_DISTURB_DATE_BY_USER, + {NotificationInterfaceCode::GET_DO_NOT_DISTURB_DATE_BY_USER, std::bind(&AnsManagerStub::HandleGetDoNotDisturbDateByUser, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::SET_ENABLED_FOR_BUNDLE_SLOT, + {NotificationInterfaceCode::SET_ENABLED_FOR_BUNDLE_SLOT, std::bind(&AnsManagerStub::HandleSetEnabledForBundleSlot, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::GET_ENABLED_FOR_BUNDLE_SLOT, + {NotificationInterfaceCode::GET_ENABLED_FOR_BUNDLE_SLOT, std::bind(&AnsManagerStub::HandleGetEnabledForBundleSlot, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::SET_SYNC_NOTIFICATION_ENABLED_WITHOUT_APP, + {NotificationInterfaceCode::SET_SYNC_NOTIFICATION_ENABLED_WITHOUT_APP, std::bind(&AnsManagerStub::HandleDistributedSetEnabledWithoutApp, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::GET_SYNC_NOTIFICATION_ENABLED_WITHOUT_APP, + {NotificationInterfaceCode::GET_SYNC_NOTIFICATION_ENABLED_WITHOUT_APP, std::bind(&AnsManagerStub::HandleDistributedGetEnabledWithoutApp, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::SET_BADGE_NUMBER, + {NotificationInterfaceCode::SET_BADGE_NUMBER, std::bind(&AnsManagerStub::HandleSetBadgeNumber, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::REGISTER_PUSH_CALLBACK, + {NotificationInterfaceCode::REGISTER_PUSH_CALLBACK, std::bind(&AnsManagerStub::HandleRegisterPushCallback, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, - {AnsManagerStub::UNREGISTER_PUSH_CALLBACK, + {NotificationInterfaceCode::UNREGISTER_PUSH_CALLBACK, std::bind(&AnsManagerStub::HandleUnregisterPushCallback, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)}, }; @@ -265,16 +265,16 @@ int32_t AnsManagerStub::OnRemoteRequest(uint32_t code, MessageParcel &data, Mess return OBJECT_NULL; } - auto it = interfaces_.find(code); + auto it = interfaces_.find(static_cast(code)); if (it == interfaces_.end()) { ANS_LOGE("[OnRemoteRequest] fail: unknown code!"); - return IRemoteStub::OnRemoteRequest(code, data, reply, flags); + return IPCObjectStub::OnRemoteRequest(code, data, reply, flags); } auto fun = it->second; if (fun == nullptr) { ANS_LOGE("[OnRemoteRequest] fail: not find function!"); - return IRemoteStub::OnRemoteRequest(code, data, reply, flags); + return IPCObjectStub::OnRemoteRequest(code, data, reply, flags); } ErrCode result = fun(this, data, reply); diff --git a/frameworks/core/src/ans_subscriber_proxy.cpp b/frameworks/core/src/ans_subscriber_proxy.cpp index 037f586fb..834dd66b6 100644 --- a/frameworks/core/src/ans_subscriber_proxy.cpp +++ b/frameworks/core/src/ans_subscriber_proxy.cpp @@ -29,7 +29,7 @@ AnsSubscriberProxy::~AnsSubscriberProxy() {} ErrCode AnsSubscriberProxy::InnerTransact( - uint32_t code, MessageOption &flags, MessageParcel &data, MessageParcel &reply) + NotificationInterfaceCode code, MessageOption &flags, MessageParcel &data, MessageParcel &reply) { auto remote = Remote(); if (remote == nullptr) { @@ -37,7 +37,7 @@ ErrCode AnsSubscriberProxy::InnerTransact( return ERR_DEAD_OBJECT; } - int32_t err = remote->SendRequest(code, data, reply, flags); + int32_t err = remote->SendRequest(static_cast(code), data, reply, flags); switch (err) { case NO_ERROR: { return ERR_OK; @@ -63,7 +63,7 @@ void AnsSubscriberProxy::OnConnected() MessageParcel reply; MessageOption option = {MessageOption::TF_ASYNC}; - ErrCode result = InnerTransact(ON_CONNECTED, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::ON_CONNECTED, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[OnConnected] fail: transact ErrCode=ERR_ANS_TRANSACT_FAILED"); return; @@ -80,7 +80,7 @@ void AnsSubscriberProxy::OnDisconnected() MessageParcel reply; MessageOption option = {MessageOption::TF_ASYNC}; - ErrCode result = InnerTransact(ON_DISCONNECTED, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::ON_DISCONNECTED, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[OnDisconnected] fail: transact ErrCode=ERR_ANS_TRANSACT_FAILED"); return; @@ -120,7 +120,7 @@ void AnsSubscriberProxy::OnConsumed( MessageParcel reply; MessageOption option = {MessageOption::TF_ASYNC}; - ErrCode result = InnerTransact(ON_CONSUMED_MAP, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::ON_CONSUMED_MAP, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[OnConsumed] fail: transact ErrCode=ERR_ANS_TRANSACT_FAILED"); return; @@ -165,7 +165,7 @@ void AnsSubscriberProxy::OnCanceled( MessageParcel reply; MessageOption option = {MessageOption::TF_ASYNC}; - ErrCode result = InnerTransact(ON_CANCELED_MAP, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::ON_CANCELED_MAP, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[OnCanceled] fail: transact ErrCode=ERR_ANS_TRANSACT_FAILED"); return; @@ -192,7 +192,7 @@ void AnsSubscriberProxy::OnUpdated(const sptr ¬ificat MessageParcel reply; MessageOption option = {MessageOption::TF_ASYNC}; - ErrCode result = InnerTransact(ON_UPDATED, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::ON_UPDATED, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[OnUpdated] fail: transact ErrCode=ERR_ANS_TRANSACT_FAILED"); return; @@ -214,7 +214,7 @@ void AnsSubscriberProxy::OnDoNotDisturbDateChange(const sptr &bad MessageParcel reply; MessageOption option = {MessageOption::TF_ASYNC}; - ErrCode result = InnerTransact(ON_BADGE_CHANGED, option, data, reply); + ErrCode result = InnerTransact(NotificationInterfaceCode::ON_BADGE_CHANGED, option, data, reply); if (result != ERR_OK) { ANS_LOGE("[OnBadgeChanged] fail: transact ErrCode=ERR_ANS_TRANSACT_FAILED"); return; diff --git a/frameworks/core/src/ans_subscriber_stub.cpp b/frameworks/core/src/ans_subscriber_stub.cpp index 22f03532d..b8dff16b3 100644 --- a/frameworks/core/src/ans_subscriber_stub.cpp +++ b/frameworks/core/src/ans_subscriber_stub.cpp @@ -26,23 +26,23 @@ namespace OHOS { namespace Notification { AnsSubscriberStub::AnsSubscriberStub() { - interfaces_.emplace(ON_CONNECTED, + interfaces_.emplace(NotificationInterfaceCode::ON_CONNECTED, std::bind(&AnsSubscriberStub::HandleOnConnected, this, std::placeholders::_1, std::placeholders::_2)); - interfaces_.emplace(ON_DISCONNECTED, + interfaces_.emplace(NotificationInterfaceCode::ON_DISCONNECTED, std::bind(&AnsSubscriberStub::HandleOnDisconnected, this, std::placeholders::_1, std::placeholders::_2)); - interfaces_.emplace(ON_CONSUMED_MAP, + interfaces_.emplace(NotificationInterfaceCode::ON_CONSUMED_MAP, std::bind(&AnsSubscriberStub::HandleOnConsumedMap, this, std::placeholders::_1, std::placeholders::_2)); - interfaces_.emplace(ON_CANCELED_MAP, + interfaces_.emplace(NotificationInterfaceCode::ON_CANCELED_MAP, std::bind(&AnsSubscriberStub::HandleOnCanceledMap, this, std::placeholders::_1, std::placeholders::_2)); - interfaces_.emplace( - ON_UPDATED, std::bind(&AnsSubscriberStub::HandleOnUpdated, this, std::placeholders::_1, std::placeholders::_2)); - interfaces_.emplace(ON_DND_DATE_CHANGED, + interfaces_.emplace(NotificationInterfaceCode::ON_UPDATED, + std::bind(&AnsSubscriberStub::HandleOnUpdated, this, std::placeholders::_1, std::placeholders::_2)); + interfaces_.emplace(NotificationInterfaceCode::ON_DND_DATE_CHANGED, std::bind( &AnsSubscriberStub::HandleOnDoNotDisturbDateChange, this, std::placeholders::_1, std::placeholders::_2)); - interfaces_.emplace(ON_ENABLED_NOTIFICATION_CHANGED, + interfaces_.emplace(NotificationInterfaceCode::ON_ENABLED_NOTIFICATION_CHANGED, std::bind(&AnsSubscriberStub::HandleOnEnabledNotificationChanged, this, std::placeholders::_1, std::placeholders::_2)); - interfaces_.emplace(ON_BADGE_CHANGED, + interfaces_.emplace(NotificationInterfaceCode::ON_BADGE_CHANGED, std::bind(&AnsSubscriberStub::HandleOnBadgeChanged, this, std::placeholders::_1, std::placeholders::_2)); } @@ -59,16 +59,16 @@ int32_t AnsSubscriberStub::OnRemoteRequest( return OBJECT_NULL; } - auto it = interfaces_.find(code); + auto it = interfaces_.find(static_cast(code)); if (it == interfaces_.end()) { ANS_LOGW("[OnRemoteRequest] fail: unknown code!"); - return IRemoteStub::OnRemoteRequest(code, data, reply, flags); + return IPCObjectStub::OnRemoteRequest(code, data, reply, flags); } auto fun = it->second; if (fun == nullptr) { ANS_LOGW("[OnRemoteRequest] fail: not find function!"); - return IRemoteStub::OnRemoteRequest(code, data, reply, flags); + return IPCObjectStub::OnRemoteRequest(code, data, reply, flags); } fun(data, reply); diff --git a/frameworks/core/test/unittest/ans_manager_proxy_test/ans_manager_proxy_unit_test.cpp b/frameworks/core/test/unittest/ans_manager_proxy_test/ans_manager_proxy_unit_test.cpp index 3d8a37490..193e37a6a 100644 --- a/frameworks/core/test/unittest/ans_manager_proxy_test/ans_manager_proxy_unit_test.cpp +++ b/frameworks/core/test/unittest/ans_manager_proxy_test/ans_manager_proxy_unit_test.cpp @@ -145,7 +145,7 @@ HWTEST_F(AnsManagerProxyUnitTest, InnerTransactTest_0100, Function | MediumTest MessageOption flags; MessageParcel data; MessageParcel reply; - ErrCode res = proxy->InnerTransact(code, flags, data, reply); + ErrCode res = proxy->InnerTransact(static_cast(code), flags, data, reply); EXPECT_EQ(ERR_OK, res); } @@ -168,7 +168,7 @@ HWTEST_F(AnsManagerProxyUnitTest, InnerTransactTest_0200, Function | MediumTest MessageOption flags; MessageParcel data; MessageParcel reply; - ErrCode res = proxy->InnerTransact(code, flags, data, reply); + ErrCode res = proxy->InnerTransact(static_cast(code), flags, data, reply); EXPECT_EQ(ERR_DEAD_OBJECT, res); } @@ -191,7 +191,7 @@ HWTEST_F(AnsManagerProxyUnitTest, InnerTransactTest_0300, Function | MediumTest MessageOption flags; MessageParcel data; MessageParcel reply; - ErrCode res = proxy->InnerTransact(code, flags, data, reply); + ErrCode res = proxy->InnerTransact(static_cast(code), flags, data, reply); EXPECT_EQ(ERR_ANS_TRANSACT_FAILED, res); } @@ -211,7 +211,7 @@ HWTEST_F(AnsManagerProxyUnitTest, InnerTransactTest_0400, Function | MediumTest MessageOption flags; MessageParcel data; MessageParcel reply; - ErrCode res = proxy->InnerTransact(code, flags, data, reply); + ErrCode res = proxy->InnerTransact(static_cast(code), flags, data, reply); EXPECT_EQ(ERR_DEAD_OBJECT, res); } diff --git a/frameworks/core/test/unittest/ans_manager_stub_test/ans_manager_stub_test.cpp b/frameworks/core/test/unittest/ans_manager_stub_test/ans_manager_stub_test.cpp index ea63a1172..710b7f0f0 100644 --- a/frameworks/core/test/unittest/ans_manager_stub_test/ans_manager_stub_test.cpp +++ b/frameworks/core/test/unittest/ans_manager_stub_test/ans_manager_stub_test.cpp @@ -50,7 +50,7 @@ public: */ HWTEST_F(AnsManagerStubTest, OnRemoteRequest0001, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::PUBLISH_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::PUBLISH_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -88,7 +88,7 @@ HWTEST_F(AnsManagerStubTest, OnRemoteRequest0002, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandlePublish01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::PUBLISH_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::PUBLISH_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -111,7 +111,7 @@ HWTEST_F(AnsManagerStubTest, HandlePublish01, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandlePublish02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::PUBLISH_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::PUBLISH_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -132,7 +132,7 @@ HWTEST_F(AnsManagerStubTest, HandlePublish02, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandlePublish03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::PUBLISH_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::PUBLISH_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -153,7 +153,7 @@ HWTEST_F(AnsManagerStubTest, HandlePublish03, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleCancel01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::CANCEL_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::CANCEL_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -176,7 +176,7 @@ HWTEST_F(AnsManagerStubTest, HandleCancel01, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleCancel02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::CANCEL_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::CANCEL_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -197,7 +197,7 @@ HWTEST_F(AnsManagerStubTest, HandleCancel02, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleCancel03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::CANCEL_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::CANCEL_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -218,7 +218,7 @@ HWTEST_F(AnsManagerStubTest, HandleCancel03, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleCancelAll01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::CANCEL_ALL_NOTIFICATIONS); + uint32_t code = static_cast(NotificationInterfaceCode::CANCEL_ALL_NOTIFICATIONS); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -237,7 +237,7 @@ HWTEST_F(AnsManagerStubTest, HandleCancelAll01, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleCancelAsBundle01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::CANCEL_AS_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::CANCEL_AS_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -263,7 +263,7 @@ HWTEST_F(AnsManagerStubTest, HandleCancelAsBundle01, Function | SmallTest | Leve */ HWTEST_F(AnsManagerStubTest, HandleCancelAsBundle02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::CANCEL_AS_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::CANCEL_AS_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -287,7 +287,7 @@ HWTEST_F(AnsManagerStubTest, HandleCancelAsBundle02, Function | SmallTest | Leve */ HWTEST_F(AnsManagerStubTest, HandleCancelAsBundle03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::CANCEL_AS_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::CANCEL_AS_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -311,7 +311,7 @@ HWTEST_F(AnsManagerStubTest, HandleCancelAsBundle03, Function | SmallTest | Leve */ HWTEST_F(AnsManagerStubTest, HandleCancelAsBundle04, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::CANCEL_AS_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::CANCEL_AS_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -335,7 +335,7 @@ HWTEST_F(AnsManagerStubTest, HandleCancelAsBundle04, Function | SmallTest | Leve */ HWTEST_F(AnsManagerStubTest, HandleAddSlotByType01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::ADD_SLOT_BY_TYPE); + uint32_t code = static_cast(NotificationInterfaceCode::ADD_SLOT_BY_TYPE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -354,7 +354,7 @@ HWTEST_F(AnsManagerStubTest, HandleAddSlotByType01, Function | SmallTest | Level */ HWTEST_F(AnsManagerStubTest, HandleRemoveSlotByType01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::REMOVE_SLOT_BY_TYPE); + uint32_t code = static_cast(NotificationInterfaceCode::REMOVE_SLOT_BY_TYPE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -373,7 +373,7 @@ HWTEST_F(AnsManagerStubTest, HandleRemoveSlotByType01, Function | SmallTest | Le */ HWTEST_F(AnsManagerStubTest, HandleRemoveAllSlots01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::REMOVE_ALL_SLOTS); + uint32_t code = static_cast(NotificationInterfaceCode::REMOVE_ALL_SLOTS); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -392,7 +392,7 @@ HWTEST_F(AnsManagerStubTest, HandleRemoveAllSlots01, Function | SmallTest | Leve */ HWTEST_F(AnsManagerStubTest, HandleGetSlotByType01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_SLOT_BY_TYPE); + uint32_t code = static_cast(NotificationInterfaceCode::GET_SLOT_BY_TYPE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -411,7 +411,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetSlotByType01, Function | SmallTest | Level */ HWTEST_F(AnsManagerStubTest, HandleGetSlotNumAsBundle01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_SLOT_NUM_AS_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::GET_SLOT_NUM_AS_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -433,7 +433,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetSlotNumAsBundle01, Function | SmallTest | */ HWTEST_F(AnsManagerStubTest, HandleGetSlotNumAsBundle02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_SLOT_NUM_AS_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::GET_SLOT_NUM_AS_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -452,7 +452,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetSlotNumAsBundle02, Function | SmallTest | */ HWTEST_F(AnsManagerStubTest, HandleGetActiveNotifications01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_ACTIVE_NOTIFICATIONS); + uint32_t code = static_cast(NotificationInterfaceCode::GET_ACTIVE_NOTIFICATIONS); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -471,7 +471,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetActiveNotifications01, Function | SmallTes */ HWTEST_F(AnsManagerStubTest, HandleGetActiveNotificationNums01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_ACTIVE_NOTIFICATION_NUMS); + uint32_t code = static_cast(NotificationInterfaceCode::GET_ACTIVE_NOTIFICATION_NUMS); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -490,7 +490,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetActiveNotificationNums01, Function | Small */ HWTEST_F(AnsManagerStubTest, HandleGetAllActiveNotifications01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_ALL_ACTIVE_NOTIFICATIONS); + uint32_t code = static_cast(NotificationInterfaceCode::GET_ALL_ACTIVE_NOTIFICATIONS); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -509,7 +509,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetAllActiveNotifications01, Function | Small */ HWTEST_F(AnsManagerStubTest, HandleSetNotificationAgent01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_NOTIFICATION_AGENT); + uint32_t code = static_cast(NotificationInterfaceCode::SET_NOTIFICATION_AGENT); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -531,7 +531,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetNotificationAgent01, Function | SmallTest */ HWTEST_F(AnsManagerStubTest, HandleSetNotificationAgent02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_NOTIFICATION_AGENT); + uint32_t code = static_cast(NotificationInterfaceCode::SET_NOTIFICATION_AGENT); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -550,7 +550,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetNotificationAgent02, Function | SmallTest */ HWTEST_F(AnsManagerStubTest, HandleGetNotificationAgent01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_NOTIFICATION_AGENT); + uint32_t code = static_cast(NotificationInterfaceCode::GET_NOTIFICATION_AGENT); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -569,7 +569,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetNotificationAgent01, Function | SmallTest */ HWTEST_F(AnsManagerStubTest, HandleCanPublishAsBundle01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::CAN_PUBLISH_AS_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::CAN_PUBLISH_AS_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -591,7 +591,7 @@ HWTEST_F(AnsManagerStubTest, HandleCanPublishAsBundle01, Function | SmallTest | */ HWTEST_F(AnsManagerStubTest, HandleCanPublishAsBundle02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::CAN_PUBLISH_AS_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::CAN_PUBLISH_AS_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -610,7 +610,7 @@ HWTEST_F(AnsManagerStubTest, HandleCanPublishAsBundle02, Function | SmallTest | */ HWTEST_F(AnsManagerStubTest, HandlePublishAsBundle01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::PUBLISH_AS_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::PUBLISH_AS_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -635,7 +635,7 @@ HWTEST_F(AnsManagerStubTest, HandlePublishAsBundle01, Function | SmallTest | Lev */ HWTEST_F(AnsManagerStubTest, HandlePublishAsBundle02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::PUBLISH_AS_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::PUBLISH_AS_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -657,7 +657,7 @@ HWTEST_F(AnsManagerStubTest, HandlePublishAsBundle02, Function | SmallTest | Lev */ HWTEST_F(AnsManagerStubTest, HandlePublishAsBundle03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::PUBLISH_AS_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::PUBLISH_AS_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -679,7 +679,7 @@ HWTEST_F(AnsManagerStubTest, HandlePublishAsBundle03, Function | SmallTest | Lev */ HWTEST_F(AnsManagerStubTest, HandleSetNotificationBadgeNum01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_NOTIFICATION_BADGE_NUM); + uint32_t code = static_cast(NotificationInterfaceCode::SET_NOTIFICATION_BADGE_NUM); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -701,7 +701,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetNotificationBadgeNum01, Function | SmallTe */ HWTEST_F(AnsManagerStubTest, HandleSetNotificationBadgeNum02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_NOTIFICATION_BADGE_NUM); + uint32_t code = static_cast(NotificationInterfaceCode::SET_NOTIFICATION_BADGE_NUM); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -720,7 +720,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetNotificationBadgeNum02, Function | SmallTe */ HWTEST_F(AnsManagerStubTest, HandleGetBundleImportance01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_BUNDLE_IMPORTANCE); + uint32_t code = static_cast(NotificationInterfaceCode::GET_BUNDLE_IMPORTANCE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -739,7 +739,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetBundleImportance01, Function | SmallTest | */ HWTEST_F(AnsManagerStubTest, HandleSetDoNotDisturbDate01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_DO_NOT_DISTURB_DATE); + uint32_t code = static_cast(NotificationInterfaceCode::SET_DO_NOT_DISTURB_DATE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -761,7 +761,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetDoNotDisturbDate01, Function | SmallTest | */ HWTEST_F(AnsManagerStubTest, HandleSetDoNotDisturbDate02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_DO_NOT_DISTURB_DATE); + uint32_t code = static_cast(NotificationInterfaceCode::SET_DO_NOT_DISTURB_DATE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -780,7 +780,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetDoNotDisturbDate02, Function | SmallTest | */ HWTEST_F(AnsManagerStubTest, HandleGetDoNotDisturbDate01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_DO_NOT_DISTURB_DATE); + uint32_t code = static_cast(NotificationInterfaceCode::GET_DO_NOT_DISTURB_DATE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -799,7 +799,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetDoNotDisturbDate01, Function | SmallTest | */ HWTEST_F(AnsManagerStubTest, HandleDoesSupportDoNotDisturbMode01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::DOES_SUPPORT_DO_NOT_DISTURB_MODE); + uint32_t code = static_cast(NotificationInterfaceCode::DOES_SUPPORT_DO_NOT_DISTURB_MODE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -818,7 +818,7 @@ HWTEST_F(AnsManagerStubTest, HandleDoesSupportDoNotDisturbMode01, Function | Sma */ HWTEST_F(AnsManagerStubTest, HandlePublishContinuousTaskNotification01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::PUBLISH_CONTINUOUS_TASK_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::PUBLISH_CONTINUOUS_TASK_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -840,7 +840,7 @@ HWTEST_F(AnsManagerStubTest, HandlePublishContinuousTaskNotification01, Function */ HWTEST_F(AnsManagerStubTest, HandlePublishContinuousTaskNotification02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::PUBLISH_CONTINUOUS_TASK_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::PUBLISH_CONTINUOUS_TASK_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -859,7 +859,7 @@ HWTEST_F(AnsManagerStubTest, HandlePublishContinuousTaskNotification02, Function */ HWTEST_F(AnsManagerStubTest, HandleCancelContinuousTaskNotification01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::CANCEL_CONTINUOUS_TASK_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::CANCEL_CONTINUOUS_TASK_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -883,7 +883,7 @@ HWTEST_F(AnsManagerStubTest, HandleCancelContinuousTaskNotification01, Function */ HWTEST_F(AnsManagerStubTest, HandleCancelContinuousTaskNotification02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::CANCEL_CONTINUOUS_TASK_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::CANCEL_CONTINUOUS_TASK_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -905,7 +905,7 @@ HWTEST_F(AnsManagerStubTest, HandleCancelContinuousTaskNotification02, Function */ HWTEST_F(AnsManagerStubTest, HandleCancelContinuousTaskNotification03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::CANCEL_CONTINUOUS_TASK_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::CANCEL_CONTINUOUS_TASK_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -927,7 +927,7 @@ HWTEST_F(AnsManagerStubTest, HandleCancelContinuousTaskNotification03, Function */ HWTEST_F(AnsManagerStubTest, HandleIsNotificationPolicyAccessGranted01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::IS_NOTIFICATION_POLICY_ACCESS_GRANTED); + uint32_t code = static_cast(NotificationInterfaceCode::IS_NOTIFICATION_POLICY_ACCESS_GRANTED); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -946,7 +946,7 @@ HWTEST_F(AnsManagerStubTest, HandleIsNotificationPolicyAccessGranted01, Function */ HWTEST_F(AnsManagerStubTest, HandleRemoveNotification01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::REMOVE_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::REMOVE_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -974,7 +974,7 @@ HWTEST_F(AnsManagerStubTest, HandleRemoveNotification01, Function | SmallTest | */ HWTEST_F(AnsManagerStubTest, HandleRemoveNotification02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::REMOVE_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::REMOVE_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1000,7 +1000,7 @@ HWTEST_F(AnsManagerStubTest, HandleRemoveNotification02, Function | SmallTest | */ HWTEST_F(AnsManagerStubTest, HandleRemoveNotification03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::REMOVE_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::REMOVE_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1026,7 +1026,7 @@ HWTEST_F(AnsManagerStubTest, HandleRemoveNotification03, Function | SmallTest | */ HWTEST_F(AnsManagerStubTest, HandleRemoveNotification04, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::REMOVE_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::REMOVE_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1052,7 +1052,7 @@ HWTEST_F(AnsManagerStubTest, HandleRemoveNotification04, Function | SmallTest | */ HWTEST_F(AnsManagerStubTest, HandleRemoveNotification05, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::REMOVE_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::REMOVE_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1078,7 +1078,7 @@ HWTEST_F(AnsManagerStubTest, HandleRemoveNotification05, Function | SmallTest | */ HWTEST_F(AnsManagerStubTest, HandleRemoveAllNotifications01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::REMOVE_ALL_NOTIFICATIONS); + uint32_t code = static_cast(NotificationInterfaceCode::REMOVE_ALL_NOTIFICATIONS); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1100,7 +1100,7 @@ HWTEST_F(AnsManagerStubTest, HandleRemoveAllNotifications01, Function | SmallTes */ HWTEST_F(AnsManagerStubTest, HandleRemoveAllNotifications02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::REMOVE_ALL_NOTIFICATIONS); + uint32_t code = static_cast(NotificationInterfaceCode::REMOVE_ALL_NOTIFICATIONS); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1119,7 +1119,7 @@ HWTEST_F(AnsManagerStubTest, HandleRemoveAllNotifications02, Function | SmallTes */ HWTEST_F(AnsManagerStubTest, HandleDelete01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::DELETE_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::DELETE_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1143,7 +1143,7 @@ HWTEST_F(AnsManagerStubTest, HandleDelete01, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleDelete02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::DELETE_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::DELETE_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1165,7 +1165,7 @@ HWTEST_F(AnsManagerStubTest, HandleDelete02, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleDelete03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::DELETE_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::DELETE_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1187,7 +1187,7 @@ HWTEST_F(AnsManagerStubTest, HandleDelete03, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleDeleteByBundle01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::DELETE_NOTIFICATION_BY_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::DELETE_NOTIFICATION_BY_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1209,7 +1209,7 @@ HWTEST_F(AnsManagerStubTest, HandleDeleteByBundle01, Function | SmallTest | Leve */ HWTEST_F(AnsManagerStubTest, HandleDeleteByBundle02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::DELETE_NOTIFICATION_BY_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::DELETE_NOTIFICATION_BY_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1228,7 +1228,7 @@ HWTEST_F(AnsManagerStubTest, HandleDeleteByBundle02, Function | SmallTest | Leve */ HWTEST_F(AnsManagerStubTest, HandleDeleteAll01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::DELETE_ALL_NOTIFICATIONS); + uint32_t code = static_cast(NotificationInterfaceCode::DELETE_ALL_NOTIFICATIONS); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1247,7 +1247,7 @@ HWTEST_F(AnsManagerStubTest, HandleDeleteAll01, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleGetSlotsByBundle01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_SLOTS_BY_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::GET_SLOTS_BY_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1269,7 +1269,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetSlotsByBundle01, Function | SmallTest | Le */ HWTEST_F(AnsManagerStubTest, HandleGetSlotsByBundle02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_SLOTS_BY_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::GET_SLOTS_BY_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1288,7 +1288,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetSlotsByBundle02, Function | SmallTest | Le */ HWTEST_F(AnsManagerStubTest, HandleUpdateSlots01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::UPDATE_SLOTS); + uint32_t code = static_cast(NotificationInterfaceCode::UPDATE_SLOTS); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1317,7 +1317,7 @@ HWTEST_F(AnsManagerStubTest, HandleUpdateSlots01, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleUpdateSlots02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::UPDATE_SLOTS); + uint32_t code = static_cast(NotificationInterfaceCode::UPDATE_SLOTS); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1340,7 +1340,7 @@ HWTEST_F(AnsManagerStubTest, HandleUpdateSlots02, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleUpdateSlots03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::UPDATE_SLOTS); + uint32_t code = static_cast(NotificationInterfaceCode::UPDATE_SLOTS); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1359,7 +1359,7 @@ HWTEST_F(AnsManagerStubTest, HandleUpdateSlots03, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleRequestEnableNotification01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::REQUEST_ENABLE_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::REQUEST_ENABLE_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1381,7 +1381,7 @@ HWTEST_F(AnsManagerStubTest, HandleRequestEnableNotification01, Function | Small */ HWTEST_F(AnsManagerStubTest, HandleRequestEnableNotification02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::REQUEST_ENABLE_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::REQUEST_ENABLE_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1400,7 +1400,7 @@ HWTEST_F(AnsManagerStubTest, HandleRequestEnableNotification02, Function | Small */ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledForBundle01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_NOTIFICATION_ENABLED_FOR_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::SET_NOTIFICATION_ENABLED_FOR_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1424,7 +1424,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledForBundle01, Function */ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledForBundle02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_NOTIFICATION_ENABLED_FOR_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::SET_NOTIFICATION_ENABLED_FOR_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1446,7 +1446,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledForBundle02, Function */ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledForBundle03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_NOTIFICATION_ENABLED_FOR_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::SET_NOTIFICATION_ENABLED_FOR_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1468,7 +1468,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledForBundle03, Function */ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledForAllBundles01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_NOTIFICATION_ENABLED_FOR_ALL_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::SET_NOTIFICATION_ENABLED_FOR_ALL_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1492,7 +1492,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledForAllBundles01, Funct */ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledForAllBundles02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_NOTIFICATION_ENABLED_FOR_ALL_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::SET_NOTIFICATION_ENABLED_FOR_ALL_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1514,7 +1514,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledForAllBundles02, Funct */ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledForAllBundles03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_NOTIFICATION_ENABLED_FOR_ALL_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::SET_NOTIFICATION_ENABLED_FOR_ALL_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1536,7 +1536,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledForAllBundles03, Funct */ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledForSpecialBundle01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_NOTIFICATION_ENABLED_FOR_SPECIAL_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::SET_NOTIFICATION_ENABLED_FOR_SPECIAL_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1562,7 +1562,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledForSpecialBundle01, Fu */ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledForSpecialBundle02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_NOTIFICATION_ENABLED_FOR_SPECIAL_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::SET_NOTIFICATION_ENABLED_FOR_SPECIAL_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1586,7 +1586,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledForSpecialBundle02, Fu */ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledForSpecialBundle03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_NOTIFICATION_ENABLED_FOR_SPECIAL_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::SET_NOTIFICATION_ENABLED_FOR_SPECIAL_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1610,7 +1610,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledForSpecialBundle03, Fu */ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledForSpecialBundle04, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_NOTIFICATION_ENABLED_FOR_SPECIAL_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::SET_NOTIFICATION_ENABLED_FOR_SPECIAL_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1634,7 +1634,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledForSpecialBundle04, Fu */ HWTEST_F(AnsManagerStubTest, HandleSetShowBadgeEnabledForBundle01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_SHOW_BADGE_ENABLED_FOR_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::SET_SHOW_BADGE_ENABLED_FOR_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1658,7 +1658,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetShowBadgeEnabledForBundle01, Function | Sm */ HWTEST_F(AnsManagerStubTest, HandleSetShowBadgeEnabledForBundle02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_SHOW_BADGE_ENABLED_FOR_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::SET_SHOW_BADGE_ENABLED_FOR_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1680,7 +1680,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetShowBadgeEnabledForBundle02, Function | Sm */ HWTEST_F(AnsManagerStubTest, HandleSetShowBadgeEnabledForBundle03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_SHOW_BADGE_ENABLED_FOR_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::SET_SHOW_BADGE_ENABLED_FOR_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1702,7 +1702,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetShowBadgeEnabledForBundle03, Function | Sm */ HWTEST_F(AnsManagerStubTest, HandleAddSlots01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::ADD_SLOTS); + uint32_t code = static_cast(NotificationInterfaceCode::ADD_SLOTS); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1721,7 +1721,7 @@ HWTEST_F(AnsManagerStubTest, HandleAddSlots01, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleAddSlots02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::ADD_SLOTS); + uint32_t code = static_cast(NotificationInterfaceCode::ADD_SLOTS); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1746,7 +1746,7 @@ HWTEST_F(AnsManagerStubTest, HandleAddSlots02, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleGetSlots01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_SLOTS); + uint32_t code = static_cast(NotificationInterfaceCode::GET_SLOTS); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1765,7 +1765,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetSlots01, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleGetSpecialActiveNotifications01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_SPECIAL_ACTIVE_NOTIFICATIONS); + uint32_t code = static_cast(NotificationInterfaceCode::GET_SPECIAL_ACTIVE_NOTIFICATIONS); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1787,7 +1787,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetSpecialActiveNotifications01, Function | S */ HWTEST_F(AnsManagerStubTest, HandleGetShowBadgeEnabledForBundle01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_SHOW_BADGE_ENABLED_FOR_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::GET_SHOW_BADGE_ENABLED_FOR_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1811,7 +1811,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetShowBadgeEnabledForBundle01, Function | Sm */ HWTEST_F(AnsManagerStubTest, HandleGetShowBadgeEnabledForBundle02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_SHOW_BADGE_ENABLED_FOR_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::GET_SHOW_BADGE_ENABLED_FOR_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1833,7 +1833,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetShowBadgeEnabledForBundle02, Function | Sm */ HWTEST_F(AnsManagerStubTest, HandleGetShowBadgeEnabledForBundle03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_SHOW_BADGE_ENABLED_FOR_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::GET_SHOW_BADGE_ENABLED_FOR_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1852,7 +1852,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetShowBadgeEnabledForBundle03, Function | Sm */ HWTEST_F(AnsManagerStubTest, HandleGetShowBadgeEnabled01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_SHOW_BADGE_ENABLED); + uint32_t code = static_cast(NotificationInterfaceCode::GET_SHOW_BADGE_ENABLED); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1874,7 +1874,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetShowBadgeEnabled01, Function | SmallTest | */ HWTEST_F(AnsManagerStubTest, HandleSubscribe01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SUBSCRIBE_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::SUBSCRIBE_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1900,7 +1900,7 @@ HWTEST_F(AnsManagerStubTest, HandleSubscribe01, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleSubscribe02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SUBSCRIBE_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::SUBSCRIBE_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1924,7 +1924,7 @@ HWTEST_F(AnsManagerStubTest, HandleSubscribe02, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleSubscribe03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SUBSCRIBE_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::SUBSCRIBE_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1948,7 +1948,7 @@ HWTEST_F(AnsManagerStubTest, HandleSubscribe03, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleSubscribe04, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SUBSCRIBE_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::SUBSCRIBE_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1972,7 +1972,7 @@ HWTEST_F(AnsManagerStubTest, HandleSubscribe04, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleUnsubscribe01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::UNSUBSCRIBE_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::UNSUBSCRIBE_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -1998,7 +1998,7 @@ HWTEST_F(AnsManagerStubTest, HandleUnsubscribe01, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleUnsubscribe02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::UNSUBSCRIBE_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::UNSUBSCRIBE_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2022,7 +2022,7 @@ HWTEST_F(AnsManagerStubTest, HandleUnsubscribe02, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleUnsubscribe03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::UNSUBSCRIBE_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::UNSUBSCRIBE_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2046,7 +2046,7 @@ HWTEST_F(AnsManagerStubTest, HandleUnsubscribe03, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleUnsubscribe04, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::UNSUBSCRIBE_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::UNSUBSCRIBE_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2070,7 +2070,7 @@ HWTEST_F(AnsManagerStubTest, HandleUnsubscribe04, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleIsAllowedNotify01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::IS_ALLOWED_NOTIFY); + uint32_t code = static_cast(NotificationInterfaceCode::IS_ALLOWED_NOTIFY); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2089,7 +2089,7 @@ HWTEST_F(AnsManagerStubTest, HandleIsAllowedNotify01, Function | SmallTest | Lev */ HWTEST_F(AnsManagerStubTest, HandleIsAllowedNotifySelf01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::IS_ALLOWED_NOTIFY_SELF); + uint32_t code = static_cast(NotificationInterfaceCode::IS_ALLOWED_NOTIFY_SELF); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2108,7 +2108,7 @@ HWTEST_F(AnsManagerStubTest, HandleIsAllowedNotifySelf01, Function | SmallTest | */ HWTEST_F(AnsManagerStubTest, HandleIsSpecialBundleAllowedNotify01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::IS_SPECIAL_BUNDLE_ALLOWED_NOTIFY); + uint32_t code = static_cast(NotificationInterfaceCode::IS_SPECIAL_BUNDLE_ALLOWED_NOTIFY); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2130,7 +2130,7 @@ HWTEST_F(AnsManagerStubTest, HandleIsSpecialBundleAllowedNotify01, Function | Sm */ HWTEST_F(AnsManagerStubTest, HandleIsSpecialBundleAllowedNotify02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::IS_SPECIAL_BUNDLE_ALLOWED_NOTIFY); + uint32_t code = static_cast(NotificationInterfaceCode::IS_SPECIAL_BUNDLE_ALLOWED_NOTIFY); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2149,7 +2149,7 @@ HWTEST_F(AnsManagerStubTest, HandleIsSpecialBundleAllowedNotify02, Function | Sm */ HWTEST_F(AnsManagerStubTest, HandleCancelGroup01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::CANCEL_GROUP); + uint32_t code = static_cast(NotificationInterfaceCode::CANCEL_GROUP); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2171,7 +2171,7 @@ HWTEST_F(AnsManagerStubTest, HandleCancelGroup01, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleCancelGroup02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::CANCEL_GROUP); + uint32_t code = static_cast(NotificationInterfaceCode::CANCEL_GROUP); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2190,7 +2190,7 @@ HWTEST_F(AnsManagerStubTest, HandleCancelGroup02, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleRemoveGroupByBundle01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::REMOVE_GROUP_BY_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::REMOVE_GROUP_BY_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2214,7 +2214,7 @@ HWTEST_F(AnsManagerStubTest, HandleRemoveGroupByBundle01, Function | SmallTest | */ HWTEST_F(AnsManagerStubTest, HandleRemoveGroupByBundle02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::REMOVE_GROUP_BY_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::REMOVE_GROUP_BY_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2236,7 +2236,7 @@ HWTEST_F(AnsManagerStubTest, HandleRemoveGroupByBundle02, Function | SmallTest | */ HWTEST_F(AnsManagerStubTest, HandleRemoveGroupByBundle03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::REMOVE_GROUP_BY_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::REMOVE_GROUP_BY_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2258,7 +2258,7 @@ HWTEST_F(AnsManagerStubTest, HandleRemoveGroupByBundle03, Function | SmallTest | */ HWTEST_F(AnsManagerStubTest, HandleIsDistributedEnabled01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::IS_DISTRIBUTED_ENABLED); + uint32_t code = static_cast(NotificationInterfaceCode::IS_DISTRIBUTED_ENABLED); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2277,7 +2277,7 @@ HWTEST_F(AnsManagerStubTest, HandleIsDistributedEnabled01, Function | SmallTest */ HWTEST_F(AnsManagerStubTest, HandleEnableDistributed01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::ENABLE_DISTRIBUTED); + uint32_t code = static_cast(NotificationInterfaceCode::ENABLE_DISTRIBUTED); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2299,7 +2299,7 @@ HWTEST_F(AnsManagerStubTest, HandleEnableDistributed01, Function | SmallTest | L */ HWTEST_F(AnsManagerStubTest, HandleEnableDistributed02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::ENABLE_DISTRIBUTED); + uint32_t code = static_cast(NotificationInterfaceCode::ENABLE_DISTRIBUTED); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2318,7 +2318,7 @@ HWTEST_F(AnsManagerStubTest, HandleEnableDistributed02, Function | SmallTest | L */ HWTEST_F(AnsManagerStubTest, HandleEnableDistributedByBundle01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::ENABLE_DISTRIBUTED_BY_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::ENABLE_DISTRIBUTED_BY_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2342,7 +2342,7 @@ HWTEST_F(AnsManagerStubTest, HandleEnableDistributedByBundle01, Function | Small */ HWTEST_F(AnsManagerStubTest, HandleEnableDistributedByBundle02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::ENABLE_DISTRIBUTED_BY_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::ENABLE_DISTRIBUTED_BY_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2364,7 +2364,7 @@ HWTEST_F(AnsManagerStubTest, HandleEnableDistributedByBundle02, Function | Small */ HWTEST_F(AnsManagerStubTest, HandleEnableDistributedByBundle03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::ENABLE_DISTRIBUTED_BY_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::ENABLE_DISTRIBUTED_BY_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2386,7 +2386,7 @@ HWTEST_F(AnsManagerStubTest, HandleEnableDistributedByBundle03, Function | Small */ HWTEST_F(AnsManagerStubTest, HandleEnableDistributedSelf01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::ENABLE_DISTRIBUTED_SELF); + uint32_t code = static_cast(NotificationInterfaceCode::ENABLE_DISTRIBUTED_SELF); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2408,7 +2408,7 @@ HWTEST_F(AnsManagerStubTest, HandleEnableDistributedSelf01, Function | SmallTest */ HWTEST_F(AnsManagerStubTest, HandleEnableDistributedSelf02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::ENABLE_DISTRIBUTED_SELF); + uint32_t code = static_cast(NotificationInterfaceCode::ENABLE_DISTRIBUTED_SELF); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2427,7 +2427,7 @@ HWTEST_F(AnsManagerStubTest, HandleEnableDistributedSelf02, Function | SmallTest */ HWTEST_F(AnsManagerStubTest, HandleIsDistributedEnableByBundle01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::IS_DISTRIBUTED_ENABLED_BY_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::IS_DISTRIBUTED_ENABLED_BY_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2449,7 +2449,7 @@ HWTEST_F(AnsManagerStubTest, HandleIsDistributedEnableByBundle01, Function | Sma */ HWTEST_F(AnsManagerStubTest, HandleIsDistributedEnableByBundle02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::IS_DISTRIBUTED_ENABLED_BY_BUNDLE); + uint32_t code = static_cast(NotificationInterfaceCode::IS_DISTRIBUTED_ENABLED_BY_BUNDLE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2468,7 +2468,7 @@ HWTEST_F(AnsManagerStubTest, HandleIsDistributedEnableByBundle02, Function | Sma */ HWTEST_F(AnsManagerStubTest, HandleGetDeviceRemindType01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_DEVICE_REMIND_TYPE); + uint32_t code = static_cast(NotificationInterfaceCode::GET_DEVICE_REMIND_TYPE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2487,7 +2487,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetDeviceRemindType01, Function | SmallTest | */ HWTEST_F(AnsManagerStubTest, HandleShellDump01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SHELL_DUMP); + uint32_t code = static_cast(NotificationInterfaceCode::SHELL_DUMP); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2513,7 +2513,7 @@ HWTEST_F(AnsManagerStubTest, HandleShellDump01, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleShellDump02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SHELL_DUMP); + uint32_t code = static_cast(NotificationInterfaceCode::SHELL_DUMP); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2536,7 +2536,7 @@ HWTEST_F(AnsManagerStubTest, HandleShellDump02, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleShellDump03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SHELL_DUMP); + uint32_t code = static_cast(NotificationInterfaceCode::SHELL_DUMP); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2559,7 +2559,7 @@ HWTEST_F(AnsManagerStubTest, HandleShellDump03, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleShellDump04, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SHELL_DUMP); + uint32_t code = static_cast(NotificationInterfaceCode::SHELL_DUMP); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2583,7 +2583,7 @@ HWTEST_F(AnsManagerStubTest, HandleShellDump04, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandlePublishReminder01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::PUBLISH_REMINDER); + uint32_t code = static_cast(NotificationInterfaceCode::PUBLISH_REMINDER); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2610,7 +2610,7 @@ HWTEST_F(AnsManagerStubTest, HandlePublishReminder01, Function | SmallTest | Lev */ HWTEST_F(AnsManagerStubTest, HandlePublishReminder02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::PUBLISH_REMINDER); + uint32_t code = static_cast(NotificationInterfaceCode::PUBLISH_REMINDER); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2634,7 +2634,7 @@ HWTEST_F(AnsManagerStubTest, HandlePublishReminder02, Function | SmallTest | Lev */ HWTEST_F(AnsManagerStubTest, HandlePublishReminder03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::PUBLISH_REMINDER); + uint32_t code = static_cast(NotificationInterfaceCode::PUBLISH_REMINDER); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2653,7 +2653,7 @@ HWTEST_F(AnsManagerStubTest, HandlePublishReminder03, Function | SmallTest | Lev */ HWTEST_F(AnsManagerStubTest, HandlePublishReminder04, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::PUBLISH_REMINDER); + uint32_t code = static_cast(NotificationInterfaceCode::PUBLISH_REMINDER); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2680,7 +2680,7 @@ HWTEST_F(AnsManagerStubTest, HandlePublishReminder04, Function | SmallTest | Lev */ HWTEST_F(AnsManagerStubTest, HandlePublishReminder05, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::PUBLISH_REMINDER); + uint32_t code = static_cast(NotificationInterfaceCode::PUBLISH_REMINDER); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2707,7 +2707,7 @@ HWTEST_F(AnsManagerStubTest, HandlePublishReminder05, Function | SmallTest | Lev */ HWTEST_F(AnsManagerStubTest, HandlePublishReminder06, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::PUBLISH_REMINDER); + uint32_t code = static_cast(NotificationInterfaceCode::PUBLISH_REMINDER); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2732,7 +2732,7 @@ HWTEST_F(AnsManagerStubTest, HandlePublishReminder06, Function | SmallTest | Lev */ HWTEST_F(AnsManagerStubTest, HandleCancelReminder01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::CANCEL_REMINDER); + uint32_t code = static_cast(NotificationInterfaceCode::CANCEL_REMINDER); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2754,7 +2754,7 @@ HWTEST_F(AnsManagerStubTest, HandleCancelReminder01, Function | SmallTest | Leve */ HWTEST_F(AnsManagerStubTest, HandleCancelReminder02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::CANCEL_REMINDER); + uint32_t code = static_cast(NotificationInterfaceCode::CANCEL_REMINDER); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2773,7 +2773,7 @@ HWTEST_F(AnsManagerStubTest, HandleCancelReminder02, Function | SmallTest | Leve */ HWTEST_F(AnsManagerStubTest, HandleCancelAllReminders01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::CANCEL_ALL_REMINDERS); + uint32_t code = static_cast(NotificationInterfaceCode::CANCEL_ALL_REMINDERS); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2792,7 +2792,7 @@ HWTEST_F(AnsManagerStubTest, HandleCancelAllReminders01, Function | SmallTest | */ HWTEST_F(AnsManagerStubTest, HandleGetValidReminders01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_ALL_VALID_REMINDERS); + uint32_t code = static_cast(NotificationInterfaceCode::GET_ALL_VALID_REMINDERS); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2847,7 +2847,7 @@ HWTEST_F(AnsManagerStubTest, ReadParcelableVector02, Function | SmallTest | Leve */ HWTEST_F(AnsManagerStubTest, HandleIsSupportTemplate01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::IS_SUPPORT_TEMPLATE); + uint32_t code = static_cast(NotificationInterfaceCode::IS_SUPPORT_TEMPLATE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2869,7 +2869,7 @@ HWTEST_F(AnsManagerStubTest, HandleIsSupportTemplate01, Function | SmallTest | L */ HWTEST_F(AnsManagerStubTest, HandleIsSupportTemplate02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::IS_SUPPORT_TEMPLATE); + uint32_t code = static_cast(NotificationInterfaceCode::IS_SUPPORT_TEMPLATE); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2888,7 +2888,7 @@ HWTEST_F(AnsManagerStubTest, HandleIsSupportTemplate02, Function | SmallTest | L */ HWTEST_F(AnsManagerStubTest, HandleIsSpecialUserAllowedNotifyByUser01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::IS_SPECIAL_USER_ALLOWED_NOTIFY); + uint32_t code = static_cast(NotificationInterfaceCode::IS_SPECIAL_USER_ALLOWED_NOTIFY); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2910,7 +2910,7 @@ HWTEST_F(AnsManagerStubTest, HandleIsSpecialUserAllowedNotifyByUser01, Function */ HWTEST_F(AnsManagerStubTest, HandleIsSpecialUserAllowedNotifyByUser02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::IS_SPECIAL_USER_ALLOWED_NOTIFY); + uint32_t code = static_cast(NotificationInterfaceCode::IS_SPECIAL_USER_ALLOWED_NOTIFY); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2929,7 +2929,7 @@ HWTEST_F(AnsManagerStubTest, HandleIsSpecialUserAllowedNotifyByUser02, Function */ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledByUser01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_NOTIFICATION_ENABLED_BY_USER); + uint32_t code = static_cast(NotificationInterfaceCode::SET_NOTIFICATION_ENABLED_BY_USER); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2953,7 +2953,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledByUser01, Function | S */ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledByUser02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_NOTIFICATION_ENABLED_BY_USER); + uint32_t code = static_cast(NotificationInterfaceCode::SET_NOTIFICATION_ENABLED_BY_USER); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2975,7 +2975,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledByUser02, Function | S */ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledByUser03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_NOTIFICATION_ENABLED_BY_USER); + uint32_t code = static_cast(NotificationInterfaceCode::SET_NOTIFICATION_ENABLED_BY_USER); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -2997,7 +2997,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetNotificationsEnabledByUser03, Function | S */ HWTEST_F(AnsManagerStubTest, HandleDeleteAllByUser01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::DELETE_ALL_NOTIFICATIONS_BY_USER); + uint32_t code = static_cast(NotificationInterfaceCode::DELETE_ALL_NOTIFICATIONS_BY_USER); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -3019,7 +3019,7 @@ HWTEST_F(AnsManagerStubTest, HandleDeleteAllByUser01, Function | SmallTest | Lev */ HWTEST_F(AnsManagerStubTest, HandleDeleteAllByUser02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::DELETE_ALL_NOTIFICATIONS_BY_USER); + uint32_t code = static_cast(NotificationInterfaceCode::DELETE_ALL_NOTIFICATIONS_BY_USER); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -3038,7 +3038,7 @@ HWTEST_F(AnsManagerStubTest, HandleDeleteAllByUser02, Function | SmallTest | Lev */ HWTEST_F(AnsManagerStubTest, HandleSetDoNotDisturbDateByUser01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_DO_NOT_DISTURB_DATE_BY_USER); + uint32_t code = static_cast(NotificationInterfaceCode::SET_DO_NOT_DISTURB_DATE_BY_USER); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -3062,7 +3062,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetDoNotDisturbDateByUser01, Function | Small */ HWTEST_F(AnsManagerStubTest, HandleSetDoNotDisturbDateByUser02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_DO_NOT_DISTURB_DATE_BY_USER); + uint32_t code = static_cast(NotificationInterfaceCode::SET_DO_NOT_DISTURB_DATE_BY_USER); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -3084,7 +3084,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetDoNotDisturbDateByUser02, Function | Small */ HWTEST_F(AnsManagerStubTest, HandleSetDoNotDisturbDateByUser03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_DO_NOT_DISTURB_DATE_BY_USER); + uint32_t code = static_cast(NotificationInterfaceCode::SET_DO_NOT_DISTURB_DATE_BY_USER); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -3106,7 +3106,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetDoNotDisturbDateByUser03, Function | Small */ HWTEST_F(AnsManagerStubTest, HandleGetDoNotDisturbDateByUser01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_DO_NOT_DISTURB_DATE_BY_USER); + uint32_t code = static_cast(NotificationInterfaceCode::GET_DO_NOT_DISTURB_DATE_BY_USER); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -3130,7 +3130,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetDoNotDisturbDateByUser01, Function | Small */ HWTEST_F(AnsManagerStubTest, HandleGetDoNotDisturbDateByUser02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_DO_NOT_DISTURB_DATE_BY_USER); + uint32_t code = static_cast(NotificationInterfaceCode::GET_DO_NOT_DISTURB_DATE_BY_USER); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -3149,7 +3149,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetDoNotDisturbDateByUser02, Function | Small */ HWTEST_F(AnsManagerStubTest, HandleSetEnabledForBundleSlot01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_ENABLED_FOR_BUNDLE_SLOT); + uint32_t code = static_cast(NotificationInterfaceCode::SET_ENABLED_FOR_BUNDLE_SLOT); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -3175,7 +3175,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetEnabledForBundleSlot01, Function | SmallTe */ HWTEST_F(AnsManagerStubTest, HandleSetEnabledForBundleSlot02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_ENABLED_FOR_BUNDLE_SLOT); + uint32_t code = static_cast(NotificationInterfaceCode::SET_ENABLED_FOR_BUNDLE_SLOT); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -3199,7 +3199,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetEnabledForBundleSlot02, Function | SmallTe */ HWTEST_F(AnsManagerStubTest, HandleSetEnabledForBundleSlot03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_ENABLED_FOR_BUNDLE_SLOT); + uint32_t code = static_cast(NotificationInterfaceCode::SET_ENABLED_FOR_BUNDLE_SLOT); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -3223,7 +3223,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetEnabledForBundleSlot03, Function | SmallTe */ HWTEST_F(AnsManagerStubTest, HandleSetEnabledForBundleSlot04, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_ENABLED_FOR_BUNDLE_SLOT); + uint32_t code = static_cast(NotificationInterfaceCode::SET_ENABLED_FOR_BUNDLE_SLOT); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -3247,7 +3247,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetEnabledForBundleSlot04, Function | SmallTe */ HWTEST_F(AnsManagerStubTest, HandleGetEnabledForBundleSlot01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_ENABLED_FOR_BUNDLE_SLOT); + uint32_t code = static_cast(NotificationInterfaceCode::GET_ENABLED_FOR_BUNDLE_SLOT); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -3271,7 +3271,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetEnabledForBundleSlot01, Function | SmallTe */ HWTEST_F(AnsManagerStubTest, HandleGetEnabledForBundleSlot02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_ENABLED_FOR_BUNDLE_SLOT); + uint32_t code = static_cast(NotificationInterfaceCode::GET_ENABLED_FOR_BUNDLE_SLOT); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -3293,7 +3293,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetEnabledForBundleSlot02, Function | SmallTe */ HWTEST_F(AnsManagerStubTest, HandleGetEnabledForBundleSlot03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_ENABLED_FOR_BUNDLE_SLOT); + uint32_t code = static_cast(NotificationInterfaceCode::GET_ENABLED_FOR_BUNDLE_SLOT); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -3315,7 +3315,7 @@ HWTEST_F(AnsManagerStubTest, HandleGetEnabledForBundleSlot03, Function | SmallTe */ HWTEST_F(AnsManagerStubTest, HandleDistributedSetEnabledWithoutApp01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_SYNC_NOTIFICATION_ENABLED_WITHOUT_APP); + uint32_t code = static_cast(NotificationInterfaceCode::SET_SYNC_NOTIFICATION_ENABLED_WITHOUT_APP); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -3339,7 +3339,7 @@ HWTEST_F(AnsManagerStubTest, HandleDistributedSetEnabledWithoutApp01, Function | */ HWTEST_F(AnsManagerStubTest, HandleDistributedSetEnabledWithoutApp02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_SYNC_NOTIFICATION_ENABLED_WITHOUT_APP); + uint32_t code = static_cast(NotificationInterfaceCode::SET_SYNC_NOTIFICATION_ENABLED_WITHOUT_APP); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -3361,7 +3361,7 @@ HWTEST_F(AnsManagerStubTest, HandleDistributedSetEnabledWithoutApp02, Function | */ HWTEST_F(AnsManagerStubTest, HandleDistributedSetEnabledWithoutApp03, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::SET_SYNC_NOTIFICATION_ENABLED_WITHOUT_APP); + uint32_t code = static_cast(NotificationInterfaceCode::SET_SYNC_NOTIFICATION_ENABLED_WITHOUT_APP); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -3383,7 +3383,7 @@ HWTEST_F(AnsManagerStubTest, HandleDistributedSetEnabledWithoutApp03, Function | */ HWTEST_F(AnsManagerStubTest, HandleDistributedGetEnabledWithoutApp01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_SYNC_NOTIFICATION_ENABLED_WITHOUT_APP); + uint32_t code = static_cast(NotificationInterfaceCode::GET_SYNC_NOTIFICATION_ENABLED_WITHOUT_APP); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -3405,7 +3405,7 @@ HWTEST_F(AnsManagerStubTest, HandleDistributedGetEnabledWithoutApp01, Function | */ HWTEST_F(AnsManagerStubTest, HandleDistributedGetEnabledWithoutApp02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::GET_SYNC_NOTIFICATION_ENABLED_WITHOUT_APP); + uint32_t code = static_cast(NotificationInterfaceCode::GET_SYNC_NOTIFICATION_ENABLED_WITHOUT_APP); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -4199,7 +4199,7 @@ HWTEST_F(AnsManagerStubTest, Unsubscribe01, Function | SmallTest | Level1) */ HWTEST_F(AnsManagerStubTest, HandleSetBadgeNumber01, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::DELETE_ALL_NOTIFICATIONS_BY_USER); + uint32_t code = static_cast(NotificationInterfaceCode::DELETE_ALL_NOTIFICATIONS_BY_USER); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -4221,7 +4221,7 @@ HWTEST_F(AnsManagerStubTest, HandleSetBadgeNumber01, Function | SmallTest | Leve */ HWTEST_F(AnsManagerStubTest, HandleSetBadgeNumber02, Function | SmallTest | Level1) { - uint32_t code = static_cast(AnsManagerInterface::TransactId::DELETE_ALL_NOTIFICATIONS_BY_USER); + uint32_t code = static_cast(NotificationInterfaceCode::DELETE_ALL_NOTIFICATIONS_BY_USER); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; diff --git a/frameworks/core/test/unittest/ans_subscriber_proxy_test/ans_subscriber_proxy_unit_test.cpp b/frameworks/core/test/unittest/ans_subscriber_proxy_test/ans_subscriber_proxy_unit_test.cpp index fca15d04f..3952ea93f 100644 --- a/frameworks/core/test/unittest/ans_subscriber_proxy_test/ans_subscriber_proxy_unit_test.cpp +++ b/frameworks/core/test/unittest/ans_subscriber_proxy_test/ans_subscriber_proxy_unit_test.cpp @@ -72,7 +72,7 @@ HWTEST_F(AnsSubscriberProxyUnitTest, InnerTransactTest_0100, Function | MediumTe MessageOption flags; MessageParcel data; MessageParcel reply; - ErrCode res = proxy->InnerTransact(code, flags, data, reply); + ErrCode res = proxy->InnerTransact(static_cast(code), flags, data, reply); EXPECT_EQ(ERR_OK, res); } @@ -95,7 +95,7 @@ HWTEST_F(AnsSubscriberProxyUnitTest, InnerTransactTest_0200, Function | MediumTe MessageOption flags; MessageParcel data; MessageParcel reply; - ErrCode res = proxy->InnerTransact(code, flags, data, reply); + ErrCode res = proxy->InnerTransact(static_cast(code), flags, data, reply); EXPECT_EQ(ERR_DEAD_OBJECT, res); } @@ -118,7 +118,7 @@ HWTEST_F(AnsSubscriberProxyUnitTest, InnerTransactTest_0300, Function | MediumTe MessageOption flags; MessageParcel data; MessageParcel reply; - ErrCode res = proxy->InnerTransact(code, flags, data, reply); + ErrCode res = proxy->InnerTransact(static_cast(code), flags, data, reply); EXPECT_EQ(ERR_ANS_TRANSACT_FAILED, res); } @@ -138,7 +138,7 @@ HWTEST_F(AnsSubscriberProxyUnitTest, InnerTransactTest_0400, Function | MediumTe MessageOption flags; MessageParcel data; MessageParcel reply; - ErrCode res = proxy->InnerTransact(code, flags, data, reply); + ErrCode res = proxy->InnerTransact(static_cast(code), flags, data, reply); EXPECT_EQ(ERR_DEAD_OBJECT, res); } diff --git a/frameworks/core/test/unittest/ans_subscriber_stub_test/ans_subscriber_stub_unit_test.cpp b/frameworks/core/test/unittest/ans_subscriber_stub_test/ans_subscriber_stub_unit_test.cpp index 8c2dc96f7..05692edf5 100644 --- a/frameworks/core/test/unittest/ans_subscriber_stub_test/ans_subscriber_stub_unit_test.cpp +++ b/frameworks/core/test/unittest/ans_subscriber_stub_test/ans_subscriber_stub_unit_test.cpp @@ -78,7 +78,7 @@ HWTEST_F(AnsSubscriberStubUnitTest, OnRemoteRequest01, Function | MediumTest | L bool bRet = data.WriteInterfaceToken(u"error descriptor"); EXPECT_TRUE(bRet) << "write token error"; - uint32_t code = static_cast(AnsSubscriberInterface::TransactId::ON_CONNECTED); + uint32_t code = static_cast(NotificationInterfaceCode::ON_CONNECTED); ErrCode res = stub_->OnRemoteRequest(code, data, reply, option); EXPECT_EQ(res, OBJECT_NULL) << "descriptor error"; @@ -98,7 +98,7 @@ HWTEST_F(AnsSubscriberStubUnitTest, OnRemoteRequest02, Function | SmallTest | Le data.WriteInterfaceToken(AnsSubscriberStub::GetDescriptor()); - uint32_t code = static_cast(AnsSubscriberInterface::TransactId::ON_BADGE_CHANGED + 1); + uint32_t code = static_cast(static_cast(NotificationInterfaceCode::ON_BADGE_CHANGED) + 1); ErrCode res = stub_->OnRemoteRequest(code, data, reply, option); EXPECT_TRUE(res != NO_ERROR); @@ -116,8 +116,8 @@ HWTEST_F(AnsSubscriberStubUnitTest, OnRemoteRequest03, Function | SmallTest | Le MessageOption option; data.WriteInterfaceToken(AnsSubscriberStub::GetDescriptor()); - uint32_t code = static_cast(AnsSubscriberInterface::TransactId::ON_ENABLED_NOTIFICATION_CHANGED); - stub_->interfaces_[AnsSubscriberInterface::TransactId::ON_ENABLED_NOTIFICATION_CHANGED] = nullptr; + uint32_t code = static_cast(NotificationInterfaceCode::ON_ENABLED_NOTIFICATION_CHANGED); + stub_->interfaces_[NotificationInterfaceCode::ON_ENABLED_NOTIFICATION_CHANGED] = nullptr; ErrCode res = stub_->OnRemoteRequest(code, data, reply, option); EXPECT_TRUE(res != NO_ERROR); } @@ -134,7 +134,7 @@ HWTEST_F(AnsSubscriberStubUnitTest, OnRemoteRequest04, Function | SmallTest | Le MessageOption option; data.WriteInterfaceToken(AnsSubscriberStub::GetDescriptor()); - uint32_t code = static_cast(AnsSubscriberInterface::TransactId::ON_CONNECTED); + uint32_t code = static_cast(NotificationInterfaceCode::ON_CONNECTED); ErrCode res = stub_->OnRemoteRequest(code, data, reply, option); EXPECT_EQ(res, NO_ERROR); } diff --git a/interfaces/inner_api/push_callback_interface.h b/interfaces/inner_api/push_callback_interface.h index f56cba629..259cb3fcf 100644 --- a/interfaces/inner_api/push_callback_interface.h +++ b/interfaces/inner_api/push_callback_interface.h @@ -34,11 +34,6 @@ public: * @return Returns push check result. */ virtual bool OnCheckNotification(const std::string ¬ificationData) = 0; - - enum { - // ipc id for OnCheckNotification - ON_CHECK_NOTIFICATION = 1, - }; }; } // namespace Notification } // namespace OHOS diff --git a/interfaces/inner_api/push_callback_stub.h b/interfaces/inner_api/push_callback_stub.h index 4d0de0690..18bf24869 100644 --- a/interfaces/inner_api/push_callback_stub.h +++ b/interfaces/inner_api/push_callback_stub.h @@ -19,6 +19,7 @@ #include #include +#include "distributed_notification_service_ipc_interface_code.h" #include "push_callback_interface.h" #include "nocopyable.h" diff --git a/services/ans/BUILD.gn b/services/ans/BUILD.gn index 7319dc848..8df7d8bd7 100644 --- a/services/ans/BUILD.gn +++ b/services/ans/BUILD.gn @@ -19,7 +19,10 @@ group("ans_targets") { } config("public_ans_config") { - include_dirs = [ "${services_path}/ans/include" ] + include_dirs = [ + "${services_path}/ans/include", + "${core_path}/include", + ] } ohos_shared_library("libans") { diff --git a/services/ans/src/push_callback_stub.cpp b/services/ans/src/push_callback_stub.cpp index 7dd795b05..04a14b6de 100644 --- a/services/ans/src/push_callback_stub.cpp +++ b/services/ans/src/push_callback_stub.cpp @@ -36,7 +36,7 @@ int PushCallBackStub::OnRemoteRequest(uint32_t code, MessageParcel &data, Messag return ERR_INVALID_STATE; } switch (code) { - case IPushCallBack::ON_CHECK_NOTIFICATION: { + case static_cast(NotificationInterfaceCode::ON_CHECK_NOTIFICATION): { auto notificationData = data.ReadString(); bool ret = OnCheckNotification(notificationData); ANS_LOGI("ret:%{public}d", ret); @@ -74,7 +74,8 @@ bool PushCallBackProxy::OnCheckNotification(const std::string ¬ificationData) return false; } - int error = remote->SendRequest(IPushCallBack::ON_CHECK_NOTIFICATION, data, reply, option); + int error = remote->SendRequest( + static_cast(NotificationInterfaceCode::ON_CHECK_NOTIFICATION), data, reply, option); if (error != NO_ERROR) { ANS_LOGE("Connect done fail, error: %{public}d", error); return false; diff --git a/services/ans/test/unittest/push_callback_stub_test.cpp b/services/ans/test/unittest/push_callback_stub_test.cpp index fd6c24332..2cd61e113 100644 --- a/services/ans/test/unittest/push_callback_stub_test.cpp +++ b/services/ans/test/unittest/push_callback_stub_test.cpp @@ -51,7 +51,7 @@ public: */ HWTEST_F(PushCallBackStubTest, PushCallBackStubTest_00100, Function | SmallTest | Level1) { - uint32_t code = static_cast(IPushCallBack::ON_CHECK_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::ON_CHECK_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; @@ -69,7 +69,7 @@ HWTEST_F(PushCallBackStubTest, PushCallBackStubTest_00100, Function | SmallTest */ HWTEST_F(PushCallBackStubTest, PushCallBackStubTest_00200, Function | SmallTest | Level1) { - uint32_t code = static_cast(IPushCallBack::ON_CHECK_NOTIFICATION); + uint32_t code = static_cast(NotificationInterfaceCode::ON_CHECK_NOTIFICATION); MessageParcel data; MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; diff --git a/test/fuzztest/anssubscriberproxy_fuzzer/anssubscriberproxy_fuzzer.cpp b/test/fuzztest/anssubscriberproxy_fuzzer/anssubscriberproxy_fuzzer.cpp index f754d9c4e..08f972791 100644 --- a/test/fuzztest/anssubscriberproxy_fuzzer/anssubscriberproxy_fuzzer.cpp +++ b/test/fuzztest/anssubscriberproxy_fuzzer/anssubscriberproxy_fuzzer.cpp @@ -32,7 +32,7 @@ namespace OHOS { MessageParcel reply; MessageOption flags; // test InnerTransact function - ansSubscriberProxy.InnerTransact(code, flags, datas, reply); + ansSubscriberProxy.InnerTransact(static_cast(code), flags, datas, reply); // test InnerTransact function ansSubscriberProxy.OnConnected(); // test InnerTransact function -- Gitee From 983bcab2ee82ff3714215058247470a143b7e3f3 Mon Sep 17 00:00:00 2001 From: zhuhan Date: Mon, 26 Jun 2023 10:52:58 +0800 Subject: [PATCH 2/2] code owners Signed-off-by: zhuhan Change-Id: Ifbc1a712990c6e36b687c2503ea836b92dafbb94 --- .gitee/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitee/CODEOWNERS diff --git a/.gitee/CODEOWNERS b/.gitee/CODEOWNERS new file mode 100644 index 000000000..9430fa9d3 --- /dev/null +++ b/.gitee/CODEOWNERS @@ -0,0 +1 @@ +../frameworks/core/include/distributed_notification_service_ipc_interface_code.h @leonchan5 \ No newline at end of file -- Gitee