diff --git a/frameworks/ans/src/notification_subscribe_info.cpp b/frameworks/ans/src/notification_subscribe_info.cpp index 5bfec140055f2475e0daad7385a0bbdaff8fa830..ddbe455ae495d1aa8a275976596d38b941fb70e6 100644 --- a/frameworks/ans/src/notification_subscribe_info.cpp +++ b/frameworks/ans/src/notification_subscribe_info.cpp @@ -224,6 +224,16 @@ int32_t NotificationSubscribeInfo::GetSubscriberUid() const return subscriberUid_; } +void NotificationSubscribeInfo::SetSubscriberBundleName(const std::string &bundleName) +{ + subscriberBundleName_ = bundleName; +} + +std::string NotificationSubscribeInfo::GetSubscriberBundleName() const +{ + return subscriberBundleName_; +} + void NotificationSubscribeInfo::SetSlotTypes(const std::vector slotTypes) { slotTypes_ = slotTypes; diff --git a/interfaces/inner_api/notification_subscribe_info.h b/interfaces/inner_api/notification_subscribe_info.h index a853a9982bc19f6710c2beb3e01560f3c9d0e3f8..e592e3685bc2855bd54449fc8283eafa0409c3d8 100644 --- a/interfaces/inner_api/notification_subscribe_info.h +++ b/interfaces/inner_api/notification_subscribe_info.h @@ -110,20 +110,6 @@ public: */ std::string Dump(); - /** - * @brief Adds subscriber uid. - * - * @param appNames Indicates the uid of subscriber. - **/ - void SetSubscriberUid(const int32_t uid); - - /** - * @brief Obtains the uid of subscriber. - * - * @return Returns the uid of subscriber. - **/ - int32_t GetSubscriberUid() const; - /** * @brief Adds subscriber slotTypes. * @@ -196,17 +182,34 @@ public: private: bool ReadFromParcel(Parcel &parcel); + void SetSubscriberBundleName(const std::string &bundleName); + std::string GetSubscriberBundleName() const; + /** + * @brief Adds subscriber uid. + * + * @param appNames Indicates the uid of subscriber. + **/ + void SetSubscriberUid(const int32_t uid); + + /** + * @brief Obtains the uid of subscriber. + * + * @return Returns the uid of subscriber. + **/ + int32_t GetSubscriberUid() const; private: std::vector appNames_ {}; int32_t userId_ {-1}; std::string deviceType_; int32_t subscriberUid_ {-1}; + std::string subscriberBundleName_; uint32_t filterType_ {0}; std::vector slotTypes_ {}; bool needNotifyApplicationChanged_ = false; bool needNotifyResponse_ = false; bool isSubscribeSelf_ = false; + friend class NotificationSubscriberManager; }; } // namespace Notification } // namespace OHOS diff --git a/services/ans/include/notification_extension_wrapper.h b/services/ans/include/notification_extension_wrapper.h index c6acd9f3de78b99ea71bcc218db4aec3ae4b86d6..b1cb951a543e23169fa94693899a5cb8020ac410 100644 --- a/services/ans/include/notification_extension_wrapper.h +++ b/services/ans/include/notification_extension_wrapper.h @@ -44,6 +44,7 @@ public: typedef int32_t (*BANNER_CONTROL)(const std::string &bundleName); typedef int32_t (*VERIFY_CLOUD_CAPABILITY)(const int32_t &uid, const std::string &permission); typedef bool (*NOTIFICATIONDIALOGCONTROL)(); + typedef bool (*SUBSCRIBE_CONTROL)(const std::string &bundleName, NotificationConstant::SlotType slotType); #ifdef ENABLE_ANS_PRIVILEGED_MESSAGE_EXT_WRAPPER typedef bool (*IS_PRIVILEGE_MESSAGE)(const sptr &request); @@ -69,6 +70,7 @@ public: int32_t BannerControl(const std::string &bundleName); int32_t VerifyCloudCapability(const int32_t &uid, const std::string &capability); bool NotificationDialogControl(); + bool IsSubscribeControl(const std::string &bundleName, NotificationConstant::SlotType slotType); #ifdef ENABLE_ANS_PRIVILEGED_MESSAGE_EXT_WRAPPER bool IsPrivilegeMessage(const sptr &request); @@ -94,6 +96,7 @@ private: BANNER_CONTROL bannerControl_ = nullptr; VERIFY_CLOUD_CAPABILITY verifyCloudCapability_ = nullptr; NOTIFICATIONDIALOGCONTROL notificationDialogControl_ = nullptr; + SUBSCRIBE_CONTROL subscribeControl_ = nullptr; bool isRegisterDataSettingObserver = false; #ifdef ENABLE_ANS_PRIVILEGED_MESSAGE_EXT_WRAPPER diff --git a/services/ans/src/advanced_notification_service_ability.cpp b/services/ans/src/advanced_notification_service_ability.cpp index a379b215d81455639e02439bb7e899ea63ed47b1..f1398064b355ece3731b53be7b91bfee940ad43a 100644 --- a/services/ans/src/advanced_notification_service_ability.cpp +++ b/services/ans/src/advanced_notification_service_ability.cpp @@ -22,6 +22,9 @@ #include "distributed_device_manager.h" #include "distributed_extension_service.h" #endif +#ifdef ENABLE_ANS_TELEPHONY_CUST_WRAPPER +#include "telephony_extension_wrapper.h" +#endif #include "advanced_datashare_helper.h" namespace OHOS { diff --git a/services/ans/src/advanced_notification_subscriber_service.cpp b/services/ans/src/advanced_notification_subscriber_service.cpp index 3053f3e4b369318bb194cc47e031ab0afb79e447..e80c07d996b4db66f51eaf488d2b8324eab7c526 100644 --- a/services/ans/src/advanced_notification_subscriber_service.cpp +++ b/services/ans/src/advanced_notification_subscriber_service.cpp @@ -90,6 +90,7 @@ ErrCode AdvancedNotificationService::SubscribeSelf(const sptr &s { NOTIFICATION_HITRACE(HITRACE_TAG_NOTIFICATION); ANS_LOGD("%{public}s", __FUNCTION__); + int32_t callingUid = IPCSkeleton().GetCallingUid(); sptr sptrInfo = new (std::nothrow) NotificationSubscribeInfo(); if (sptrInfo == nullptr) { ANS_LOGE("Failed to create sptrInfo"); @@ -108,17 +109,9 @@ ErrCode AdvancedNotificationService::SubscribeSelf(const sptr &s errCode = ERR_ANS_NON_SYSTEM_APP; break; } - - int32_t uid = IPCSkeleton().GetCallingUid(); // subscribeSelf doesn't need OHOS_PERMISSION_NOTIFICATION_CONTROLLER permission - std::string bundle; - std::shared_ptr bundleManager = BundleManagerHelper::GetInstance(); - if (bundleManager != nullptr) { - bundle = bundleManager->GetBundleNameByUid(uid); - } - + std::string bundle = GetClientBundleName(); sptrInfo->AddAppName(bundle); - sptrInfo->SetSubscriberUid(uid); sptrInfo->SetIsSubscribeSelf(true); errCode = NotificationSubscriberManager::GetInstance()->AddSubscriber(subscriber, sptrInfo); @@ -128,7 +121,6 @@ ErrCode AdvancedNotificationService::SubscribeSelf(const sptr &s } while (0); if (errCode == ERR_OK) { - int32_t callingUid = IPCSkeleton::GetCallingUid(); ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { LivePublishProcess::GetInstance()->AddLiveViewSubscriber(callingUid); })); diff --git a/services/ans/src/advanced_notification_utils.cpp b/services/ans/src/advanced_notification_utils.cpp index 5f542f964f78c9f2fd36345eb6c524f5d75b922b..32ff419d7db82da4f7fc0709da84b1775a1ea627 100644 --- a/services/ans/src/advanced_notification_utils.cpp +++ b/services/ans/src/advanced_notification_utils.cpp @@ -1851,9 +1851,8 @@ bool AdvancedNotificationService::AllowUseReminder(const std::string& bundleName if (ctrlResult != ERR_OK) { return ctrlResult; } -#else - return true; #endif + return true; } ErrCode AdvancedNotificationService::AllowUseReminder(const std::string& bundleName, bool& isAllowUseReminder) diff --git a/services/ans/src/notification_extension_wrapper.cpp b/services/ans/src/notification_extension_wrapper.cpp index e7f120e17b5328e3ecd93504680c6526abec0f21..38f33adb4c3a56cfe9c490f8f1d3cc4592614780 100644 --- a/services/ans/src/notification_extension_wrapper.cpp +++ b/services/ans/src/notification_extension_wrapper.cpp @@ -106,6 +106,7 @@ void ExtensionWrapper::InitExtentionWrapper() if (!ctrlConfig.empty()) { syncAdditionConfig_("NOTIFICATION_CTL_LIST_PKG", ctrlConfig); } + subscribeControl_ = (SUBSCRIBE_CONTROL)dlsym(extensionWrapperHandle_, "SubscribeControl"); #endif #ifdef ENABLE_ANS_PRIVILEGED_MESSAGE_EXT_WRAPPER isPrivilegeMessage_ = (IS_PRIVILEGE_MESSAGE)dlsym(extensionWrapperHandle_, "IsPrivilegeMessage"); @@ -243,6 +244,15 @@ int32_t ExtensionWrapper::BannerControl(const std::string &bundleName) return bannerControl_(bundleName); } +bool ExtensionWrapper::IsSubscribeControl(const std::string &bundleName, NotificationConstant::SlotType slotType) +{ + if (subscribeControl_ == nullptr) { + ANS_LOGE("SubscribeControl wrapper symbol failed"); + return false; + } + return subscribeControl_(bundleName, slotType); +} + int32_t ExtensionWrapper::VerifyCloudCapability(const int32_t &uid, const std::string &capability) { if (verifyCloudCapability_ == nullptr) { diff --git a/services/ans/src/notification_subscriber_manager.cpp b/services/ans/src/notification_subscriber_manager.cpp index b5a09e5337da8a00e56d58f1950e42ce1bbbc596..72a61d8c27bad6399c51da6a71f40a000576f258 100644 --- a/services/ans/src/notification_subscriber_manager.cpp +++ b/services/ans/src/notification_subscriber_manager.cpp @@ -49,6 +49,7 @@ struct NotificationSubscriberManager::SubscriberRecord { int32_t userId {SUBSCRIBE_USER_INIT}; std::string deviceType {CURRENT_DEVICE_TYPE}; int32_t subscriberUid {DEFAULT_UID}; + std::string subscriberBundleName_; bool needNotifyApplicationChanged = false; bool needNotifyResponse = false; uint32_t filterType {0}; @@ -102,9 +103,13 @@ ErrCode NotificationSubscriberManager::AddSubscriber( return ERR_ANS_NO_MEMORY; } } + int32_t callingUid = IPCSkeleton().GetCallingUid(); + std::string callingBuneldName = GetClientBundleName(); + subInfo->SetSubscriberBundleName(callingBuneldName); + subInfo->SetSubscriberUid(callingUid); HaMetaMessage message = HaMetaMessage(EventSceneId::SCENE_9, EventBranchId::BRANCH_2); - message.Message(GetClientBundleName() + "_" + + message.Message(callingBuneldName + "_" + " user:" + std::to_string(subInfo->GetAppUserId())); if (subInfo->GetAppUserId() == SUBSCRIBE_USER_INIT) { int32_t userId = SUBSCRIBE_USER_INIT; @@ -140,7 +145,7 @@ ErrCode NotificationSubscriberManager::AddSubscriber( slotTypes += " "; } ANS_LOGI("%{public}s_, user: %{public}s, bundleNames: %{public}s, deviceType: %{public}s, slotTypes: %{public}s, " - "Add subscriber result: %{public}d", GetClientBundleName().c_str(), + "Add subscriber result: %{public}d", callingBuneldName.c_str(), std::to_string(subInfo->GetAppUserId()).c_str(), bundleNames.c_str(), subInfo->GetDeviceType().c_str(), slotTypes.c_str(), result); message.ErrorCode(result).Append(bundleNames + "," + subInfo->GetDeviceType() + "," + slotTypes); @@ -396,32 +401,27 @@ std::shared_ptr NotificationSub void NotificationSubscriberManager::AddRecordInfo( std::shared_ptr &record, const sptr &subscribeInfo) { - if (subscribeInfo != nullptr) { - record->bundleList_.clear(); - record->subscribedAll = true; - for (auto bundle : subscribeInfo->GetAppNames()) { - record->bundleList_.insert(bundle); - record->subscribedAll = false; - } - record->slotTypes.clear(); - for (auto slotType : subscribeInfo->GetSlotTypes()) { - record->slotTypes.insert(slotType); - } - record->userId = subscribeInfo->GetAppUserId(); - // deviceType is empty, use default - if (!subscribeInfo->GetDeviceType().empty()) { - record->deviceType = subscribeInfo->GetDeviceType(); - } - record->subscriberUid = subscribeInfo->GetSubscriberUid(); - record->filterType = subscribeInfo->GetFilterType(); - record->needNotifyApplicationChanged = subscribeInfo->GetNeedNotifyApplication(); - record->needNotifyResponse = subscribeInfo->GetNeedNotifyResponse(); - record->isSubscribeSelf = subscribeInfo->GetIsSubscribeSelf(); - } else { - record->bundleList_.clear(); - record->subscribedAll = true; - record->slotTypes.clear(); + record->bundleList_.clear(); + record->subscribedAll = true; + for (auto bundle : subscribeInfo->GetAppNames()) { + record->bundleList_.insert(bundle); + record->subscribedAll = false; + } + record->slotTypes.clear(); + for (auto slotType : subscribeInfo->GetSlotTypes()) { + record->slotTypes.insert(slotType); } + record->userId = subscribeInfo->GetAppUserId(); + // deviceType is empty, use default + if (!subscribeInfo->GetDeviceType().empty()) { + record->deviceType = subscribeInfo->GetDeviceType(); + } + record->subscriberUid = subscribeInfo->GetSubscriberUid(); + record->subscriberBundleName_ = subscribeInfo->GetSubscriberBundleName(); + record->filterType = subscribeInfo->GetFilterType(); + record->needNotifyApplicationChanged = subscribeInfo->GetNeedNotifyApplication(); + record->needNotifyResponse = subscribeInfo->GetNeedNotifyResponse(); + record->isSubscribeSelf = subscribeInfo->GetIsSubscribeSelf(); } void NotificationSubscriberManager::RemoveRecordInfo( @@ -663,14 +663,20 @@ void NotificationSubscriberManager::NotifyCanceledInner( bool NotificationSubscriberManager::IsSubscribedBysubscriber( const std::shared_ptr &record, const sptr ¬ification) { - auto BundleNames = notification->GetBundleName(); - auto iter = std::find(record->bundleList_.begin(), record->bundleList_.end(), BundleNames); + auto soltType = notification->GetNotificationRequestPoint()->GetSlotType(); + auto bundleNames = notification->GetBundleName(); +#ifdef ENABLE_ANS_ADDITIONAL_CONTROL + if (EXTENTION_WRAPPER->IsSubscribeControl(record->subscriberBundleName_, soltType)) { + ANS_LOGD("%{public}s cannot receive %{public}d notification", record->subscriberBundleName_.c_str(), soltType); + return false; + } +#endif + auto iter = std::find(record->bundleList_.begin(), record->bundleList_.end(), bundleNames); bool isSubscribedTheNotification = record->subscribedAll || (iter != record->bundleList_.end()) || (notification->GetNotificationRequestPoint()->GetCreatorUid() == record->subscriberUid); if (!isSubscribedTheNotification) { return false; } - auto soltType = notification->GetNotificationRequestPoint()->GetSlotType(); auto slotIter = std::find(record->slotTypes.begin(), record->slotTypes.end(), soltType); bool isSubscribedSlotType = (record->slotTypes.size() == 0) || (slotIter != record->slotTypes.end()); if (!isSubscribedSlotType) { diff --git a/services/ans/test/unittest/BUILD.gn b/services/ans/test/unittest/BUILD.gn index 9cac8cc4e2a4a3851f1da00be6676f1972c2acdf..9f3f1a30dc8e743e5a64ece753892c4ce802f455 100644 --- a/services/ans/test/unittest/BUILD.gn +++ b/services/ans/test/unittest/BUILD.gn @@ -258,6 +258,7 @@ ohos_unittest("notification_subscriber_manager_test") { "ability_base:zuri", "ability_runtime:abilitykit_native", "ability_runtime:app_manager", + "ability_runtime:dataobs_manager", "ability_runtime:wantagent_innerkits", "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_base", diff --git a/services/ans/test/unittest/notification_extension_wrapper_test.cpp b/services/ans/test/unittest/notification_extension_wrapper_test.cpp index 1280c01109c13516efd483c40430b897d743a1fc..1517355abbaf9de9dc7af45bb096c83cd3297062 100644 --- a/services/ans/test/unittest/notification_extension_wrapper_test.cpp +++ b/services/ans/test/unittest/notification_extension_wrapper_test.cpp @@ -74,6 +74,7 @@ HWTEST_F(NotificationExtensionWrapperTest, InitExtentionWrapper_Test, TestSize.L EXPECT_NE(extensionWrapper.localControl_, nullptr); EXPECT_NE(extensionWrapper.reminderControl_, nullptr); EXPECT_NE(extensionWrapper.bannerControl_, nullptr); + EXPECT_NE(extensionWrapper.subscribeControl_, nullptr); #endif // 验证initSummary_是否被正确初始化 @@ -361,5 +362,36 @@ HWTEST_F(NotificationExtensionWrapperTest, NotificationDialogControl_Test, TestS result = wrapper.NotificationDialogControl(); EXPECT_EQ(true, result); } + +HWTEST_F(NotificationExtensionWrapperTest, SubscribeControl_NullSubscribeControl, TestSize.Level0) +{ + // Arrange + ExtensionWrapper wrapper; + std::string bundleName = "testBundle"; + wrapper.subscribeControl_ = nullptr; + + // Act + bool result = wrapper.IsSubscribeControl(bundleName, NotificationConstant::SlotType::LIVE_VIEW); + + // Assert + EXPECT_FALSE(result); +} + +HWTEST_F(NotificationExtensionWrapperTest, SubscribeControl_ValidSubscribeControl, TestSize.Level0) +{ + // Arrange + ExtensionWrapper wrapper; + std::string bundleName = "testBundle"; + auto mockSubscribeControl = [](const std::string &bundleName, NotificationConstant::SlotType slotType) { + return true; + }; + wrapper.subscribeControl_ = mockSubscribeControl; + + // Act + bool result = wrapper.IsSubscribeControl(bundleName, NotificationConstant::SlotType::LIVE_VIEW); + + // Assert + EXPECT_TRUE(result); +} } //namespace Notification } //namespace OHOS \ No newline at end of file diff --git a/services/ans/test/unittest/notification_subscriber_manager_branch_test/notification_subscriber_manager_branch_test.cpp b/services/ans/test/unittest/notification_subscriber_manager_branch_test/notification_subscriber_manager_branch_test.cpp index 2a85a65037f4139112d70969cf5aca54000bc67c..b43fa9e4890fffed7e3c6ee3f59d153fd6a57a4c 100644 --- a/services/ans/test/unittest/notification_subscriber_manager_branch_test/notification_subscriber_manager_branch_test.cpp +++ b/services/ans/test/unittest/notification_subscriber_manager_branch_test/notification_subscriber_manager_branch_test.cpp @@ -141,22 +141,6 @@ HWTEST_F(NotificationSubscriberManagerBranchTest, NotificationSubscriberManager_ notificationSubscriberManager->OnRemoteDied(object); } -/** - * @tc.number : NotificationSubscriberManager_00700 - * @tc.name : NotificationSubscriberManager_00700 - * @tc.desc : test AddRecordInfo function and subscribeInfo == nullptr - */ -HWTEST_F(NotificationSubscriberManagerBranchTest, NotificationSubscriberManager_00700, Function | SmallTest | Level1) -{ - std::shared_ptr notificationSubscriberManager = - std::make_shared(); - ASSERT_NE(nullptr, notificationSubscriberManager); - std::shared_ptr record = - notificationSubscriberManager->CreateSubscriberRecord(nullptr); - sptr subscribeInfo = nullptr; - notificationSubscriberManager->AddRecordInfo(record, subscribeInfo); -} - /** * @tc.number : NotificationSubscriberManager_00800 * @tc.name : NotificationSubscriberManager_00800 diff --git a/services/ans/test/unittest/notification_subscriber_manager_test.cpp b/services/ans/test/unittest/notification_subscriber_manager_test.cpp index ec975480f9b52cf5cc78364b11e91b7b7aa8c396..ec26d2effff453a79416898294e5eddf533fef9a 100644 --- a/services/ans/test/unittest/notification_subscriber_manager_test.cpp +++ b/services/ans/test/unittest/notification_subscriber_manager_test.cpp @@ -23,7 +23,7 @@ #include "mock_ans_subscriber.h" #include "ans_const_define.h" #include "notification_preferences.h" - +#include "notification_extension_wrapper.h" #include "ans_inner_errors.h" #include "ans_subscriber_listener.h" #include "mock_i_remote_object.h" @@ -1113,5 +1113,60 @@ HWTEST_F(NotificationSubscriberManagerTest, IsDeviceTypeAffordConsume_001, Funct ASSERT_TRUE(result); } #endif +#ifdef ENABLE_ANS_ADDITIONAL_CONTROL +HWTEST_F(NotificationSubscriberManagerTest, IsSubscribedBysubscriber_004, Function | SmallTest | Level1) +{ + EXTENTION_WRAPPER->subscribeControl_ = nullptr; + + sptr request(new NotificationRequest()); + request->SetSlotType(NotificationConstant::SlotType::SOCIAL_COMMUNICATION); + request->SetCreatorUserId(101); + request->SetCreatorUid(101); + sptr notification(new Notification(request)); + + std::shared_ptr testAnsSubscriber = std::make_shared(); + sptr subscriber(new (std::nothrow) SubscriberListener(testAnsSubscriber)); + NotificationSubscriberManager notificationSubscriberManager; + std::shared_ptr record = + notificationSubscriberManager.CreateSubscriberRecord(subscriber); + + sptr subscribeInfo(new NotificationSubscribeInfo()); + subscribeInfo->SetSubscriberUid(101); + subscribeInfo->AddAppUserId(101); + notificationSubscriberManager.AddRecordInfo(record, subscribeInfo); + auto res = notificationSubscriberManager.IsSubscribedBysubscriber(record, notification); + ASSERT_TRUE(res); +} + +HWTEST_F(NotificationSubscriberManagerTest, IsSubscribedBysubscriber_005, Function | SmallTest | Level1) +{ + EXTENTION_WRAPPER->subscribeControl_ = [](const std::string &bundleName, NotificationConstant::SlotType slotType) { + if (bundleName == "subscriberManagerTestBundleName") { + return true; + } + return false; + }; + + sptr request(new NotificationRequest()); + request->SetSlotType(NotificationConstant::SlotType::SOCIAL_COMMUNICATION); + request->SetCreatorUserId(101); + request->SetCreatorUid(101); + sptr notification(new Notification(request)); + + std::shared_ptr testAnsSubscriber = std::make_shared(); + sptr subscriber(new (std::nothrow) SubscriberListener(testAnsSubscriber)); + NotificationSubscriberManager notificationSubscriberManager; + std::shared_ptr record = + notificationSubscriberManager.CreateSubscriberRecord(subscriber); + record->subscriberBundleName_ = "subscriberManagerTestBundleName"; + + sptr subscribeInfo(new NotificationSubscribeInfo()); + subscribeInfo->SetSubscriberUid(101); + subscribeInfo->AddAppUserId(101); + notificationSubscriberManager.AddRecordInfo(record, subscribeInfo); + auto res = notificationSubscriberManager.IsSubscribedBysubscriber(record, notification); + ASSERT_FALSE(res); +} +#endif // DEBUG } // namespace Notification } // namespace OHOS diff --git a/test/fuzztest/fuzz_common_base/mock/mock_notification_subscribe_info.h b/test/fuzztest/fuzz_common_base/mock/mock_notification_subscribe_info.h index f7181b100f62515a57d2e516a731131b835c1e96..fe0c24de6003dc04c021f5a92e0515bbdfa6b2f2 100644 --- a/test/fuzztest/fuzz_common_base/mock/mock_notification_subscribe_info.h +++ b/test/fuzztest/fuzz_common_base/mock/mock_notification_subscribe_info.h @@ -31,7 +31,6 @@ NotificationSubscribeInfo* ObjectBuilder::Build(Fuzze subscribeInfo->AddAppName(fdp->ConsumeRandomLengthString()); subscribeInfo->AddAppUserId(fdp->ConsumeIntegral()); subscribeInfo->AddDeviceType(fdp->ConsumeRandomLengthString()); - subscribeInfo->SetSubscriberUid(fdp->ConsumeIntegral()); subscribeInfo->SetFilterType(fdp->ConsumeIntegral()); subscribeInfo->SetNeedNotifyResponse(fdp->ConsumeBool());