From fdb4703c1cc8f125a96f47df602a2836eddd9f42 Mon Sep 17 00:00:00 2001 From: wangzhen Date: Fri, 26 Jan 2024 03:31:03 +0000 Subject: [PATCH] Replace token with id Signed-off-by: wangzhen Change-Id: Ied8a36c7b2f1f8d353ddf68a508e4dac06d2fe63 --- services/common/include/bundle_active_app_state_observer.h | 2 +- services/common/src/bundle_active_app_state_obsever.cpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/services/common/include/bundle_active_app_state_observer.h b/services/common/include/bundle_active_app_state_observer.h index ae985ea..29ab05b 100644 --- a/services/common/include/bundle_active_app_state_observer.h +++ b/services/common/include/bundle_active_app_state_observer.h @@ -46,7 +46,7 @@ private: return abilityStateData.uid > 0 && abilityStateData.pid >= 0 && abilityStateData.bundleName.size() > 0 && abilityStateData.abilityName.size() > 0 - && abilityStateData.token != nullptr; + && abilityStateData.abilityRecordId >= 0; } inline bool ValidateProcessData(const ProcessData &processData) const diff --git a/services/common/src/bundle_active_app_state_obsever.cpp b/services/common/src/bundle_active_app_state_obsever.cpp index 84d8613..3f66666 100644 --- a/services/common/src/bundle_active_app_state_obsever.cpp +++ b/services/common/src/bundle_active_app_state_obsever.cpp @@ -42,8 +42,6 @@ void BundleActiveAppStateObserver::OnAbilityStateChanged(const AbilityStateData int32_t userId = -1; OHOS::ErrCode ret = BundleActiveAccountHelper::GetUserId(abilityStateData.uid, userId); if (ret == ERR_OK && userId != -1) { - std::stringstream stream; - stream << abilityStateData.token.GetRefPtr(); BundleActiveReportHandlerObject tmpHandlerObject(userId, ""); BundleActiveEvent event(abilityStateData.bundleName, abilityStateData.abilityName, abilityStateData.abilityName, abilityStateData.moduleName); -- Gitee