From 82c19abd43a4e04f3a1c40b42d690d990ef18afa Mon Sep 17 00:00:00 2001 From: kehongxu Date: Sat, 26 Oct 2024 20:26:18 +0800 Subject: [PATCH] Big data dotting modification Signed-off-by: kehongxu --- services/device_auth.c | 2 -- .../inc/hiview_adapter/hisysevent_adapter.h | 2 -- .../session_manager/src/session/dev_session_fwk.c | 14 ++++++++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/services/device_auth.c b/services/device_auth.c index 22bb2441..cc303486 100644 --- a/services/device_auth.c +++ b/services/device_auth.c @@ -1208,7 +1208,6 @@ static void CancelRequest(int64_t requestId, const char *appId) static int32_t GetRealInfo(int32_t osAccountId, const char *pseudonymId, char **realInfo) { - DEV_AUTH_REPORT_UE_CALL_EVENT_BY_PARAMS(osAccountId, NULL, NULL, GET_REAL_INFO_EVENT); if (pseudonymId == NULL || realInfo == NULL) { LOGE("Invalid params!"); return HC_ERR_INVALID_PARAMS; @@ -1223,7 +1222,6 @@ static int32_t GetRealInfo(int32_t osAccountId, const char *pseudonymId, char ** static int32_t GetPseudonymId(int32_t osAccountId, const char *indexKey, char **pseudonymId) { - DEV_AUTH_REPORT_UE_CALL_EVENT_BY_PARAMS(osAccountId, NULL, NULL, GET_PSEUDONYM_ID_EVENT); if (indexKey == NULL || pseudonymId == NULL) { LOGE("Invalid params!"); return HC_ERR_INVALID_PARAMS; diff --git a/services/frameworks/inc/hiview_adapter/hisysevent_adapter.h b/services/frameworks/inc/hiview_adapter/hisysevent_adapter.h index 9ca316ad..48b7c755 100644 --- a/services/frameworks/inc/hiview_adapter/hisysevent_adapter.h +++ b/services/frameworks/inc/hiview_adapter/hisysevent_adapter.h @@ -27,8 +27,6 @@ #define AUTH_DEV_EVENT "AuthDevice" #define CANCEL_REQUEST_EVENT "CancelRequest" -#define GET_REAL_INFO_EVENT "GetRealInfo" -#define GET_PSEUDONYM_ID_EVENT "GetPseudonymId" #define GET_REGISTER_INFO_EVENT "GetRegisterInfo" #define GET_PK_INFO_LIST_EVENT "GetPkInfoList" diff --git a/services/session_manager/src/session/dev_session_fwk.c b/services/session_manager/src/session/dev_session_fwk.c index 93534c15..2edcaac2 100644 --- a/services/session_manager/src/session/dev_session_fwk.c +++ b/services/session_manager/src/session/dev_session_fwk.c @@ -226,23 +226,23 @@ static bool IsMetaNode(const CJson *context) return GetStringFromJson(context, FIELD_META_NODE_TYPE) != NULL; } -static void ReportBindAndAuthCallEvent(const SessionImpl *impl) +static void ReportBindAndAuthCallEvent(const SessionImpl *impl, int32_t callResult, bool isV1Session) { #ifdef DEV_AUTH_HIVIEW_ENABLE DevAuthCallEvent eventData; eventData.appId = impl->base.appId; (void)GetIntFromJson(impl->context, FIELD_OS_ACCOUNT_ID, &eventData.osAccountId); - eventData.callResult = DEFAULT_CALL_RESULT; + eventData.callResult = callResult; eventData.credType = DEFAULT_CRED_TYPE; bool isBind = true; (void)GetBoolFromJson(impl->context, FIELD_IS_BIND, &isBind); if (isBind) { eventData.funcName = ADD_MEMBER_EVENT; - eventData.processCode = PROCESS_BIND_V2; + eventData.processCode = isV1Session ? PROCESS_BIND_V1 : PROCESS_BIND_V2; eventData.groupType = PEER_TO_PEER_GROUP; } else { eventData.funcName = AUTH_DEV_EVENT; - eventData.processCode = PROCESS_AUTH_V2; + eventData.processCode = isV1Session ? PROCESS_AUTH_V1 : PROCESS_AUTH_V2; eventData.groupType = (impl->base.opCode == AUTH_FORM_ACCOUNT_UNRELATED) ? PEER_TO_PEER_GROUP : IDENTICAL_ACCOUNT_GROUP; @@ -253,6 +253,8 @@ static void ReportBindAndAuthCallEvent(const SessionImpl *impl) return; #endif (void)impl; + (void)callResult; + (void)isV1Session; return; } @@ -287,7 +289,7 @@ static void OnDevSessionError(const SessionImpl *impl, int32_t errorCode, const ProcessErrorCallback(impl->base.id, impl->base.opCode, errorCode, errorReturn, &impl->base.callback); CloseChannel(impl->channelType, impl->channelId); ReportBindAndAuthFaultEvent(impl, errorCode, isV1Session); - ReportBindAndAuthCallEvent(impl); + ReportBindAndAuthCallEvent(impl, errorCode, isV1Session); } static int32_t StartSession(DevSession *self) @@ -613,7 +615,7 @@ static void OnDevSessionFinish(const SessionImpl *impl) if (isBind) { NotifyBindResult(impl->channelType, impl->channelId); } - ReportBindAndAuthCallEvent(impl); + ReportBindAndAuthCallEvent(impl, HC_SUCCESS, false); CloseChannel(impl->channelType, impl->channelId); }