diff --git a/services/ans/include/notification_analytics_util.h b/services/ans/include/notification_analytics_util.h index c1f26517065279c22a7f57db73889ab7f33c4847..bf48d8bee88b1cf247203bb67484968d3d6e02e1 100644 --- a/services/ans/include/notification_analytics_util.h +++ b/services/ans/include/notification_analytics_util.h @@ -67,12 +67,13 @@ public: HaMetaMessage& TypeCode(int32_t typeCode); HaMetaMessage& NotificationId(int32_t notificationId); HaMetaMessage& SlotType(int32_t slotType); - HaMetaMessage& syncWatch(bool isLiveView); - HaMetaMessage& syncHeadSet(bool isLiveView); - HaMetaMessage& syncWatchHeadSet(bool isLiveView); - HaMetaMessage& keyNode(bool isKeyNode); - HaMetaMessage& delByWatch(bool isLiveView); - HaMetaMessage& deleteReason(int32_t deleteReason); + HaMetaMessage& SyncWatch(bool isLiveView); + HaMetaMessage& SyncHeadSet(bool isLiveView); + HaMetaMessage& SyncWatchHeadSet(bool isLiveView); + HaMetaMessage& KeyNode(bool isKeyNode); + HaMetaMessage& DelByWatch(bool isLiveView); + HaMetaMessage& DeleteReason(int32_t deleteReason); + HaMetaMessage& ClickByWatch(); std::string GetMessage() const; HaMetaMessage& Checkfailed(bool checkfailed); bool NeedReport() const; @@ -94,6 +95,7 @@ public: static int32_t syncHeadSet_; static int32_t syncWatchHeadSet_; static int32_t delByWatch_; + static int32_t clickByWatch_; static int32_t keyNode_; static int64_t time_; static int32_t syncLiveViewWatch_; @@ -134,6 +136,8 @@ public: static void ReportPublishFailedEvent(const HaMetaMessage& message); + static void ReportSkipFailedEvent(const HaMetaMessage& message); + private: static void ReportNotificationEvent(const sptr& request, EventFwk::Want want, int32_t eventCode, const std::string& reason); diff --git a/services/ans/src/common/notification_analytics_util.cpp b/services/ans/src/common/notification_analytics_util.cpp index 0468b6b32977309406ee1c1cd244b9b0a2f50891..ea1027fe22e6ee8e8b96f7e4b6f99e54e5e8674f 100644 --- a/services/ans/src/common/notification_analytics_util.cpp +++ b/services/ans/src/common/notification_analytics_util.cpp @@ -77,6 +77,7 @@ int32_t HaMetaMessage::syncLiveViewWatchHeadSet_ = 0; int64_t HaMetaMessage::liveViewTime_ = NotificationAnalyticsUtil::GetCurrentTime(); int32_t HaMetaMessage::delByWatch_ = 0; int32_t HaMetaMessage::liveViewDelByWatch_ = 0; +int32_t HaMetaMessage::clickByWatch_ = 0; static std::mutex reportCacheMutex_; static uint64_t reportTimerId = 0; static std::list reportCacheList; @@ -175,13 +176,13 @@ HaMetaMessage& HaMetaMessage::SlotType(int32_t slotType) return *this; } -HaMetaMessage& HaMetaMessage::deleteReason(int32_t deleteReason) +HaMetaMessage& HaMetaMessage::DeleteReason(int32_t deleteReason) { deleteReason_ = deleteReason; return *this; } -HaMetaMessage& HaMetaMessage::syncWatch(bool isLiveView) +HaMetaMessage& HaMetaMessage::SyncWatch(bool isLiveView) { if (isLiveView) { HaMetaMessage::syncLiveViewWatch_++; @@ -191,7 +192,7 @@ HaMetaMessage& HaMetaMessage::syncWatch(bool isLiveView) return *this; } -HaMetaMessage& HaMetaMessage::syncHeadSet(bool isLiveView) +HaMetaMessage& HaMetaMessage::SyncHeadSet(bool isLiveView) { if (isLiveView) { HaMetaMessage::syncLiveViewHeadSet_++; @@ -201,7 +202,7 @@ HaMetaMessage& HaMetaMessage::syncHeadSet(bool isLiveView) return *this; } -HaMetaMessage& HaMetaMessage::syncWatchHeadSet(bool isLiveView) +HaMetaMessage& HaMetaMessage::SyncWatchHeadSet(bool isLiveView) { if (isLiveView) { HaMetaMessage::syncLiveViewWatchHeadSet_++; @@ -211,7 +212,7 @@ HaMetaMessage& HaMetaMessage::syncWatchHeadSet(bool isLiveView) return *this; } -HaMetaMessage& HaMetaMessage::keyNode(bool isKeyNode) +HaMetaMessage& HaMetaMessage::KeyNode(bool isKeyNode) { if (isKeyNode) { HaMetaMessage::keyNode_++; @@ -219,7 +220,7 @@ HaMetaMessage& HaMetaMessage::keyNode(bool isKeyNode) return *this; } -HaMetaMessage& HaMetaMessage::delByWatch(bool isLiveView) +HaMetaMessage& HaMetaMessage::DelByWatch(bool isLiveView) { if (isLiveView) { HaMetaMessage::liveViewDelByWatch_++; @@ -229,6 +230,12 @@ HaMetaMessage& HaMetaMessage::delByWatch(bool isLiveView) return *this; } +HaMetaMessage& HaMetaMessage::ClickByWatch() +{ + HaMetaMessage::clickByWatch_++; + return *this; +} + std::string HaMetaMessage::Build() const { return std::to_string(sceneId_) + MESSAGE_DELIMITER + @@ -880,7 +887,8 @@ bool NotificationAnalyticsUtil::DetermineWhetherToSend(uint32_t slotType) if ((NotificationAnalyticsUtil::GetCurrentTime() - HaMetaMessage::liveViewTime_) >= MAX_TIME) { return true; } else if (HaMetaMessage::syncLiveViewWatch_ + HaMetaMessage::syncLiveViewHeadSet_ + - HaMetaMessage::syncLiveViewWatchHeadSet_ + HaMetaMessage::liveViewDelByWatch_ >= + HaMetaMessage::syncLiveViewWatchHeadSet_ + HaMetaMessage::liveViewDelByWatch_ + + HaMetaMessage::clickByWatch_ >= NOTIFICATION_MAX_DATA) { return true; } @@ -908,11 +916,13 @@ std::string NotificationAnalyticsUtil::BuildAnsData(const HaMetaMessage& message data["syncWatchHeadSet"] = std::to_string(HaMetaMessage::syncLiveViewWatchHeadSet_); data["keyNode"] = std::to_string(HaMetaMessage::keyNode_); data["delByWatch"] = std::to_string(HaMetaMessage::liveViewDelByWatch_); + data["clickByWatch"] = std::to_string(HaMetaMessage::clickByWatch_); HaMetaMessage::syncLiveViewWatch_ = 0; HaMetaMessage::syncLiveViewHeadSet_ = 0; HaMetaMessage::syncLiveViewWatchHeadSet_ = 0; HaMetaMessage::keyNode_ = 0; HaMetaMessage::liveViewDelByWatch_ = 0; + HaMetaMessage::clickByWatch_ = 0; HaMetaMessage::liveViewTime_ = NotificationAnalyticsUtil::GetCurrentTime(); } else { data["syncWatch"] = std::to_string(HaMetaMessage::syncWatch_); @@ -929,5 +939,17 @@ std::string NotificationAnalyticsUtil::BuildAnsData(const HaMetaMessage& message return ansData.dump(-1, ' ', false, nlohmann::json::error_handler_t::replace); } +void NotificationAnalyticsUtil::ReportSkipFailedEvent(const HaMetaMessage& message) +{ + if (!ReportFlowControl(MODIFY_ERROR_EVENT_CODE)) { + ANS_LOGI("Publish event failed, reason:%{public}s", message.Build().c_str()); + return; + } + EventFwk::Want want; + std::string extraInfo = NotificationAnalyticsUtil::BuildExtraInfo(message); + NotificationAnalyticsUtil::SetCommonWant(want, message, extraInfo); + + IN_PROCESS_CALL_WITHOUT_RET(AddListCache(want, MODIFY_ERROR_EVENT_CODE)); +} } // namespace Notification } // namespace OHOS diff --git a/services/ans/src/notification_extension/distributed_extension_service.cpp b/services/ans/src/notification_extension/distributed_extension_service.cpp index c7d3af7ad1c38d755faf5fc0b256ec6bc985fa84..2593b7edbe7a5f5d89c4dc28e74737e632cc6c7b 100644 --- a/services/ans/src/notification_extension/distributed_extension_service.cpp +++ b/services/ans/src/notification_extension/distributed_extension_service.cpp @@ -52,6 +52,7 @@ constexpr const char* CFG_KEY_TITLE_LENGTH = "maxTitleLength"; constexpr const char* CFG_KEY_CONTENT_LENGTH = "maxContentLength"; constexpr const int32_t PUBLISH_ERROR_EVENT_CODE = 0; constexpr const int32_t DELETE_ERROR_EVENT_CODE = 5; +constexpr const int32_t MODIFY_ERROR_EVENT_CODE = 6; constexpr const int32_t ANS_CUSTOMIZE_CODE = 7; } @@ -246,7 +247,7 @@ void DistributedExtensionService::OnDeviceOnline(const DmDeviceInfo &deviceInfo) std::lock_guard lock(mapLock_); handler(deviceInfo.deviceId, deviceInfo.deviceTypeId, deviceInfo.networkId); std::string reason = "deviceType: " + std::to_string(deviceInfo.deviceTypeId) + - "deviceId: " + AnonymousProcessing(deviceInfo.deviceId) + "networkId: " + + " ; deviceId: " + AnonymousProcessing(deviceInfo.deviceId) + " ; networkId: " + AnonymousProcessing(deviceInfo.networkId); HADotCallback(PUBLISH_ERROR_EVENT_CODE, 0, EventSceneId::SCENE_1, reason); DistributedDeviceInfo device = DistributedDeviceInfo(deviceInfo.deviceId, deviceInfo.deviceName, @@ -272,19 +273,31 @@ void DistributedExtensionService::HADotCallback(int32_t code, int32_t ErrCode, u } } else if (code == DELETE_ERROR_EVENT_CODE) { HaMetaMessage message = HaMetaMessage(EventSceneId::SCENE_20, branchId) - .deleteReason(NotificationConstant::DISTRIBUTED_COLLABORATIVE_DELETE) + .DeleteReason(NotificationConstant::DISTRIBUTED_COLLABORATIVE_DELETE) .ErrorCode(ErrCode) .Message(reason); NotificationAnalyticsUtil::ReportDeleteFailedEvent(message); } else if (code == ANS_CUSTOMIZE_CODE) { - bool isLiveView = false; - if (ErrCode == NotificationConstant::SlotType::LIVE_VIEW) { - isLiveView = true; + if (branchId == BRANCH_3) { + HaMetaMessage message = HaMetaMessage(EventSceneId::SCENE_1, branchId) + .ClickByWatch() + .SlotType(ErrCode); + NotificationAnalyticsUtil::ReportOperationsDotEvent(message); + } else { + bool isLiveView = false; + if (ErrCode == NotificationConstant::SlotType::LIVE_VIEW) { + isLiveView = true; + } + HaMetaMessage message = HaMetaMessage(EventSceneId::SCENE_1, branchId) + .DelByWatch(isLiveView) + .SlotType(ErrCode); + NotificationAnalyticsUtil::ReportOperationsDotEvent(message); } - HaMetaMessage message = HaMetaMessage(EventSceneId::SCENE_1, branchId) - .delByWatch(isLiveView) - .SlotType(ErrCode); - NotificationAnalyticsUtil::ReportOperationsDotEvent(message); + } else if (code == MODIFY_ERROR_EVENT_CODE) { + HaMetaMessage message = HaMetaMessage(EventSceneId::SCENE_20, branchId) + .ErrorCode(ErrCode) + .Message(reason); + NotificationAnalyticsUtil::ReportSkipFailedEvent(message); } } @@ -320,7 +333,7 @@ void DistributedExtensionService::OnDeviceOffline(const DmDeviceInfo &deviceInfo } handler(deviceInfo.deviceId, deviceInfo.deviceTypeId); std::string reason = "deviceType: " + std::to_string(deviceInfo.deviceTypeId) + - "deviceId: " + AnonymousProcessing(deviceInfo.deviceId); + " ; deviceId: " + AnonymousProcessing(deviceInfo.deviceId); HADotCallback(PUBLISH_ERROR_EVENT_CODE, 0, EventSceneId::SCENE_2, reason); deviceMap_.erase(deviceInfo.deviceId); }); diff --git a/services/ans/src/notification_subscriber_manager.cpp b/services/ans/src/notification_subscriber_manager.cpp index d1a171638023ee89e2f5f61a5b5988ef53e96f2d..2bb0f72cfbdf44c57a6b432b8a4666c3bf8c58b8 100644 --- a/services/ans/src/notification_subscriber_manager.cpp +++ b/services/ans/src/notification_subscriber_manager.cpp @@ -857,21 +857,21 @@ void NotificationSubscriberManager::TrackCodeLog( bool isLiveViewType = (slotType == NotificationConstant::SlotType::LIVE_VIEW); if (wearableFlag && headsetFlag) { HaMetaMessage message = HaMetaMessage(EventSceneId::SCENE_1, EventBranchId::BRANCH_1) - .syncWatchHeadSet(isLiveViewType) - .keyNode(keyNodeFlag) + .SyncWatchHeadSet(isLiveViewType) + .KeyNode(keyNodeFlag) .SlotType(slotType); NotificationAnalyticsUtil::ReportOperationsDotEvent(message); } else { if (headsetFlag) { HaMetaMessage message = HaMetaMessage(EventSceneId::SCENE_1, EventBranchId::BRANCH_1) - .syncHeadSet(isLiveViewType) - .keyNode(keyNodeFlag) + .SyncHeadSet(isLiveViewType) + .KeyNode(keyNodeFlag) .SlotType(slotType); NotificationAnalyticsUtil::ReportOperationsDotEvent(message); } else if (wearableFlag) { HaMetaMessage message = HaMetaMessage(EventSceneId::SCENE_1, EventBranchId::BRANCH_1) - .syncWatch(isLiveViewType) - .keyNode(keyNodeFlag) + .SyncWatch(isLiveViewType) + .KeyNode(keyNodeFlag) .SlotType(slotType); NotificationAnalyticsUtil::ReportOperationsDotEvent(message); } diff --git a/services/distributed/include/soft_bus/distributed_service.h b/services/distributed/include/soft_bus/distributed_service.h index bf4a5221c7333c4c1420d1700dbea7613a358d48..e3eec707ab42364ed2831581031413dd5f379028 100644 --- a/services/distributed/include/soft_bus/distributed_service.h +++ b/services/distributed/include/soft_bus/distributed_service.h @@ -61,7 +61,7 @@ public: void SendEventReport(int32_t messageType, int32_t errCode, const std::string& errorReason); void InitHACallBack(std::function callback); void InitSendReportCallBack(std::function callback); - void SendHaReport(int32_t errorCode, uint32_t branchId, const std::string& errorReason); + void SendHaReport(int32_t errorCode, uint32_t branchId, const std::string& errorReason, int32_t code = -1); ErrCode OnResponse(const std::shared_ptr ¬ification, const DistributedDeviceInfo& device); private: diff --git a/services/distributed/src/soft_bus/distributed_client.cpp b/services/distributed/src/soft_bus/distributed_client.cpp index b9df443d74e1bbc761768fcd05e016876f449a23..23bcd656fd0715ed57d34f52315f8dbade2d2328 100644 --- a/services/distributed/src/soft_bus/distributed_client.cpp +++ b/services/distributed/src/soft_bus/distributed_client.cpp @@ -50,9 +50,9 @@ void DistributedClient::OnShutdown(int32_t socket, ShutdownReason reason) for (auto& socketItem : socketsId_) { if (socketItem.second == socket) { socketItem.second = -1; - std::string message = "socketID: " + std::to_string(socket) + "ShutdownReason: " + + std::string message = "socketID: " + std::to_string(socket) + " ; ShutdownReason: " + ShutdownReasonToString(reason); - DistributedService::GetInstance().SendHaReport(0, BRANCH4_ID, message); + DistributedService::GetInstance().SendHaReport(0, BRANCH4_ID, message, PUBLISH_ERROR_EVENT_CODE); } } } diff --git a/services/distributed/src/soft_bus/distributed_publish_service.cpp b/services/distributed/src/soft_bus/distributed_publish_service.cpp index f9b40f191779ee2d283448d126e48657e19b2304..0ee28676f7ef48e793307ce2a04ac58281484af2 100644 --- a/services/distributed/src/soft_bus/distributed_publish_service.cpp +++ b/services/distributed/src/soft_bus/distributed_publish_service.cpp @@ -39,10 +39,15 @@ namespace Notification { namespace { constexpr char const DISTRIBUTED_LABEL[] = "ans_distributed"; constexpr const int32_t ANS_CUSTOMIZE_CODE = 7; +constexpr const int32_t MODIFY_ERROR_EVENT_CODE = 6; constexpr const int32_t DELETE_ERROR_EVENT_CODE = 5; constexpr const int32_t OPERATION_DELETE_BRANCH = 2; constexpr const int32_t BRANCH3_ID = 3; constexpr const int32_t BRANCH4_ID = 4; +constexpr const int32_t BRANCH6_ID = 6; +constexpr const int32_t BRANCH7_ID = 7; +constexpr const int32_t BRANCH8_ID = 8; +constexpr const int32_t BRANCH9_ID = 9; } class UnlockScreenCallback : public ScreenLock::ScreenLockCallbackStub { @@ -67,6 +72,16 @@ void UnlockScreenCallback::OnCallBack(const int32_t screenLockResult) ANS_LOGI("Unlock Screen result: %{public}d, isTimeout: %{public}d", screenLockResult, isTimeout_); if (!isTimeout_) { auto ret = IN_PROCESS_CALL(AAFwk::AbilityManagerClient::GetInstance()->StartAbility(want_)); + std::string errorReason = "pull up success"; + if (ret == ERR_OK) { + DistributedService::GetInstance().SendHaReport( + NotificationConstant::SlotType::LIVE_VIEW, BRANCH3_ID, errorReason, ANS_CUSTOMIZE_CODE); + } else { + errorReason = "pull up failed"; + int32_t messageType = 0; + DistributedService::GetInstance().SendEventReport(messageType, ret, errorReason); + } + DistributedService::GetInstance().SendHaReport(ret, BRANCH8_ID, errorReason); ANS_LOGI("StartAbility result:%{public}d", ret); } } @@ -79,6 +94,10 @@ void UnlockScreenCallback::SetWant(AAFwk::Want want) void UnlockScreenCallback::OnTriggerTimeout() { ANS_LOGI("User unlock screen timeout."); + std::string errorReason = "User unlock screen timeout"; + int32_t messageType = 0; + DistributedService::GetInstance().SendEventReport(messageType, -1, errorReason); + DistributedService::GetInstance().SendHaReport(-1, BRANCH7_ID, errorReason); isTimeout_ = true; } @@ -336,6 +355,9 @@ void DistributedService::RemoveNotifications(const std::shared_ptr& boxM void DistributedService::AbnormalReporting(int result, uint32_t branchId, const std::string &errorReason) { + if (localDevice_.deviceType_ != DistributedHardware::DmDeviceType::DEVICE_TYPE_PHONE) { + return; + } if (result != 0) { SendEventReport(0, result, errorReason); } @@ -393,6 +415,7 @@ void DistributedService::HandleResponseSync(const std::shared_ptr& boxMe PowerMgr::PowerMgrClient::GetInstance().WakeupDevice(); } + code_ = MODIFY_ERROR_EVENT_CODE; bool isScreenLocked = ScreenLock::ScreenLockManager::GetInstance()->IsScreenLocked(); ANS_LOGI("Screen locked status, isScreenLocked: %{public}d.", isScreenLocked); if (isScreenLocked) { @@ -401,6 +424,10 @@ void DistributedService::HandleResponseSync(const std::shared_ptr& boxMe int32_t unlockResult = IN_PROCESS_CALL( ScreenLock::ScreenLockManager::GetInstance()->Unlock(ScreenLock::Action::UNLOCKSCREEN, listener)); ANS_LOGI("unlock result:%{public}d", unlockResult); + if (unlockResult != ERR_OK) { + std::string errorReason = "unlock failed"; + AbnormalReporting(unlockResult, BRANCH6_ID, errorReason); + } std::shared_ptr timerInfo = std::make_shared(); timerInfo->SetListener(listener); auto timeout = DistributedLocalConfig::GetInstance().GetStartAbilityTimeout(); @@ -408,6 +435,15 @@ void DistributedService::HandleResponseSync(const std::shared_ptr& boxMe } else { auto ret = IN_PROCESS_CALL(AAFwk::AbilityManagerClient::GetInstance()->StartAbility(*wantPtr)); ANS_LOGI("StartAbility result:%{public}d", ret); + std::string errorReason = "pull up success"; + if (ret == ERR_OK) { + OperationalReporting(BRANCH3_ID, NotificationConstant::SlotType::LIVE_VIEW); + } else { + errorReason = "pull up failed"; + int32_t messageType = 0; + AbnormalReporting(messageType, ret, errorReason); + } + AbnormalReporting(ret, BRANCH9_ID, errorReason); } } } diff --git a/services/distributed/src/soft_bus/distributed_service.cpp b/services/distributed/src/soft_bus/distributed_service.cpp index f49621e9d6cb50fc0787ed9ceb351684fd872d27..4a23aae988ac8822694aff59f0f59fc5c7d2894a 100644 --- a/services/distributed/src/soft_bus/distributed_service.cpp +++ b/services/distributed/src/soft_bus/distributed_service.cpp @@ -188,7 +188,8 @@ int64_t DistributedService::GetCurrentTime() void DistributedService::SendEventReport( int32_t messageType, int32_t errCode, const std::string& errorReason) { - if (sendReportCallback_ != nullptr) { + if (sendReportCallback_ != nullptr || + localDevice_.deviceType_ != DistributedHardware::DmDeviceType::DEVICE_TYPE_PHONE) { sendReportCallback_(messageType, errCode, errorReason); } } @@ -218,10 +219,16 @@ std::string DistributedService::AnonymousProcessing(std::string data) return data; } -void DistributedService::SendHaReport(int32_t errorCode, uint32_t branchId, const std::string& errorReason) +void DistributedService::SendHaReport( + int32_t errorCode, uint32_t branchId, const std::string& errorReason, int32_t code) { - if (haCallback_ != nullptr) { + if (haCallback_ == nullptr || localDevice_.deviceType_ != DistributedHardware::DmDeviceType::DEVICE_TYPE_PHONE) { + return; + } + if (code == -1) { haCallback_(code_, errorCode, branchId, errorReason); + } else { + haCallback_(code, errorCode, branchId, errorReason); } } diff --git a/services/distributed/src/soft_bus/distributed_subscribe_service.cpp b/services/distributed/src/soft_bus/distributed_subscribe_service.cpp index 4e0199dbc92ec66be5600853e3678769f330ccf0..2e2ac641a6a0947642228875f50e9709c18d32cf 100644 --- a/services/distributed/src/soft_bus/distributed_subscribe_service.cpp +++ b/services/distributed/src/soft_bus/distributed_subscribe_service.cpp @@ -39,6 +39,7 @@ const std::string DISTRIBUTED_LABEL = "ans_distributed"; const int32_t DEFAULT_FILTER_TYPE = 1; constexpr const int32_t PUBLISH_ERROR_EVENT_CODE = 0; constexpr const int32_t DELETE_ERROR_EVENT_CODE = 5; +constexpr const int32_t MODIFY_ERROR_EVENT_CODE = 6; constexpr const int32_t BRANCH3_ID = 3; std::string SubscribeTransDeviceType(uint16_t deviceType) @@ -80,10 +81,10 @@ void DistributedService::SubscribeNotifictaion(const DistributedDeviceInfo peerD if (result == 0) { subscriberMap_.insert(std::make_pair(peerDevice.deviceId_, subscriber)); peerDevice_[peerDevice.deviceId_].peerState_ = DeviceState::STATE_ONLINE; - if (DistributedService::GetInstance().haCallback_ != nullptr) { + if (haCallback_ != nullptr) { std::string reason = "deviceType: " + std::to_string(localDevice_.deviceType_) + - "deviceId: " + AnonymousProcessing(localDevice_.deviceId_); - DistributedService::GetInstance().haCallback_(PUBLISH_ERROR_EVENT_CODE, 0, BRANCH3_ID, reason); + " ; deviceId: " + AnonymousProcessing(localDevice_.deviceId_); + haCallback_(PUBLISH_ERROR_EVENT_CODE, 0, BRANCH3_ID, reason); } } ANS_LOGI("Subscribe notification %{public}s %{public}d %{public}d %{public}d.", @@ -286,6 +287,7 @@ std::string DistributedService::GetNotificationKey(const std::shared_ptr& notification, const DistributedDeviceInfo& device) { + this->code_ = MODIFY_ERROR_EVENT_CODE; NotificationResponseBox responseBox; ANS_LOGI("dans OnResponse %{public}s", notification->Dump().c_str()); if (notification == nullptr) {