diff --git a/frameworks/js/napi/inner/napi_ability_common/js_napi_common.cpp b/frameworks/js/napi/inner/napi_ability_common/js_napi_common.cpp index 210e386c2b..f6ae78edcd 100644 --- a/frameworks/js/napi/inner/napi_ability_common/js_napi_common.cpp +++ b/frameworks/js/napi/inner/napi_ability_common/js_napi_common.cpp @@ -234,7 +234,8 @@ bool JsNapiCommon::CreateConnectionAndConnectAbilityLocked( sptr JsNapiCommon::FindConnectionLocked(const Want &want, int64_t &id) { - TAG_LOGD(AAFwkTag::JSNAPI, "uri:%{public}s", want.GetElement().GetURI().c_str()); + TAG_LOGD(AAFwkTag::JSNAPI, "bundle/ability:%{public}s/%{public}s", want.GetElement().GetBundleName().c_str(), + want.GetElement().GetAbilityName().c_str()); std::string deviceId = want.GetElement().GetDeviceID(); std::string bundleName = want.GetBundle(); std::string abilityName = want.GetElement().GetAbilityName(); diff --git a/frameworks/native/ability/native/ui_extension_ability/js_ui_extension.cpp b/frameworks/native/ability/native/ui_extension_ability/js_ui_extension.cpp index 92e4913a82..1a83aaedd7 100755 --- a/frameworks/native/ability/native/ui_extension_ability/js_ui_extension.cpp +++ b/frameworks/native/ability/native/ui_extension_ability/js_ui_extension.cpp @@ -663,8 +663,9 @@ bool JsUIExtension::HandleSessionCreate(const AAFwk::Want &want, const sptr lock(uiWindowMutex_); - TAG_LOGD(AAFwkTag::UI_EXT, "UIExtension component id: %{public}" PRId64 ", element: %{public}s", - sessionInfo->uiExtensionComponentId, want.GetElement().GetURI().c_str()); + TAG_LOGD(AAFwkTag::UI_EXT, "UIExtension component id: %{public}" PRId64 ", bundle/ability: %{public}s/%{public}s", + sessionInfo->uiExtensionComponentId, want.GetElement().GetBundleName().c_str(), + want.GetElement().GetAbilityName().c_str()); std::shared_ptr sharedWant = std::make_shared(want); auto compId = sessionInfo->uiExtensionComponentId; if (uiWindowMap_.find(compId) == uiWindowMap_.end()) { diff --git a/frameworks/native/ability/native/ui_extension_base/js_ui_extension_base.cpp b/frameworks/native/ability/native/ui_extension_base/js_ui_extension_base.cpp index f8f67de6ff..25fe284c41 100644 --- a/frameworks/native/ability/native/ui_extension_base/js_ui_extension_base.cpp +++ b/frameworks/native/ability/native/ui_extension_base/js_ui_extension_base.cpp @@ -770,8 +770,9 @@ bool JsUIExtensionBase::HandleSessionCreate(const AAFwk::Want &want, const sptr< TAG_LOGE(AAFwkTag::UI_EXT, "Invalid sessionInfo"); return false; } - TAG_LOGD(AAFwkTag::UI_EXT, "UIExtension component id: %{public}" PRId64 ", element: %{public}s", - sessionInfo->uiExtensionComponentId, want.GetElement().GetURI().c_str()); + TAG_LOGD(AAFwkTag::UI_EXT, "UIExtension component id: %{public}" PRId64 ", bundle/ability:%{public}s/%{public}s", + sessionInfo->uiExtensionComponentId, want.GetElement().GetBundleName().c_str(), + want.GetElement().GetAbilityName().c_str()); if (sessionInfo == nullptr || sessionInfo->uiExtensionComponentId == 0) { TAG_LOGE(AAFwkTag::UI_EXT, "Invalid sessionInfo"); return false; diff --git a/frameworks/native/ability/native/ui_extension_base/ui_extension_context.cpp b/frameworks/native/ability/native/ui_extension_base/ui_extension_context.cpp index d8f1a0a551..ed7a33356c 100755 --- a/frameworks/native/ability/native/ui_extension_base/ui_extension_context.cpp +++ b/frameworks/native/ability/native/ui_extension_base/ui_extension_context.cpp @@ -126,8 +126,8 @@ ErrCode UIExtensionContext::DisconnectAbility( ErrCode UIExtensionContext::StartServiceExtensionAbility(const AAFwk::Want& want, int32_t accountId) { - TAG_LOGI(AAFwkTag::UI_EXT, "Start service extension %{public}s, accountId: %{public}d", - want.GetElement().GetURI().c_str(), accountId); + TAG_LOGI(AAFwkTag::UI_EXT, "Start service extension %{public}s/%{public}s, accountId: %{public}d", + want.GetElement().GetBundleName().c_str(), want.GetElement().GetAbilityName().c_str(), accountId); auto ret = AAFwk::AbilityManagerClient::GetInstance()->StartExtensionAbility( want, token_, accountId, AppExecFwk::ExtensionAbilityType::SERVICE); if (ret != ERR_OK) { diff --git a/frameworks/native/appkit/ability_runtime/service_extension_context.cpp b/frameworks/native/appkit/ability_runtime/service_extension_context.cpp index ac3fff62cf..1d9d1e0114 100644 --- a/frameworks/native/appkit/ability_runtime/service_extension_context.cpp +++ b/frameworks/native/appkit/ability_runtime/service_extension_context.cpp @@ -128,8 +128,9 @@ ErrCode ServiceExtensionContext::StartAbilityWithAccount(const AAFwk::Want &want if (GetAbilityInfo() != nullptr) { callerName = GetAbilityInfo()->name; } - TAG_LOGI(AAFwkTag::APPKIT, "accountId: %{public}d, ability: %{public}s, caller: %{public}s", - accountId, want.GetElement().GetURI().c_str(), callerName.c_str()); + TAG_LOGI(AAFwkTag::APPKIT, "accountId: %{public}d, ability: %{public}s/%{public}s, caller: %{public}s", + accountId, want.GetElement().GetBundleName().c_str(), want.GetElement().GetAbilityName().c_str(), + callerName.c_str()); (const_cast(want)).SetParam(START_ABILITY_TYPE, true); ErrCode err = AAFwk::AbilityManagerClient::GetInstance()->StartAbility( want, token_, ILLEGAL_REQUEST_CODE, accountId); diff --git a/services/abilitymgr/src/ability_connect_manager.cpp b/services/abilitymgr/src/ability_connect_manager.cpp index 6085e0b6c2..0a20e5c6f9 100644 --- a/services/abilitymgr/src/ability_connect_manager.cpp +++ b/services/abilitymgr/src/ability_connect_manager.cpp @@ -170,7 +170,9 @@ int AbilityConnectManager::StartAbilityLocked(const AbilityRequest &abilityReque return INNER_ERR; } HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); - TAG_LOGD(AAFwkTag::EXT, "ability_name:%{public}s", abilityRequest.want.GetElement().GetURI().c_str()); + TAG_LOGD(AAFwkTag::EXT, "bundle/ability:%{public}s/%{public}s", + abilityRequest.want.GetElement().GetBundleName().c_str(), + abilityRequest.want.GetElement().GetAbilityName().c_str()); int32_t ret = AbilityPermissionUtil::GetInstance().CheckMultiInstanceKeyForExtension(abilityRequest); if (ret != ERR_OK) { diff --git a/services/abilitymgr/src/ability_manager_client.cpp b/services/abilitymgr/src/ability_manager_client.cpp index e4149b294d..8eddca2b57 100644 --- a/services/abilitymgr/src/ability_manager_client.cpp +++ b/services/abilitymgr/src/ability_manager_client.cpp @@ -144,8 +144,9 @@ ErrCode AbilityManagerClient::StartAbility(const Want &want, int requestCode, in HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); auto abms = GetAbilityManager(); CHECK_POINTER_RETURN_NOT_CONNECTED(abms); - TAG_LOGI(AAFwkTag::ABILITYMGR, "StartAbility ability:%{public}s, userId:%{public}d, appCloneIndex:%{public}d", - want.GetElement().GetURI().c_str(), userId, want.GetIntParam(Want::PARAM_APP_CLONE_INDEX_KEY, -1)); + TAG_LOGI(AAFwkTag::ABILITYMGR, "StartAbility ability:%{public}s/%{public}s, userId:%{public}d, " + "appCloneIndex:%{public}d", want.GetElement().GetBundleName().c_str(), + want.GetElement().GetAbilityName().c_str(), userId, want.GetIntParam(Want::PARAM_APP_CLONE_INDEX_KEY, -1)); HandleDlpApp(const_cast(want)); return abms->StartAbility(want, userId, requestCode); @@ -169,8 +170,9 @@ ErrCode AbilityManagerClient::StartAbility( HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); auto abms = GetAbilityManager(); CHECK_POINTER_RETURN_NOT_CONNECTED(abms); - TAG_LOGI(AAFwkTag::ABILITYMGR, "StartAbility ability:%{public}s, userId:%{public}d, appCloneIndex:%{public}d", - want.GetElement().GetURI().c_str(), userId, want.GetIntParam(Want::PARAM_APP_CLONE_INDEX_KEY, -1)); + TAG_LOGI(AAFwkTag::ABILITYMGR, "StartAbility ability:%{public}s/%{public}s, userId:%{public}d, " + "appCloneIndex:%{public}d", want.GetElement().GetBundleName().c_str(), + want.GetElement().GetAbilityName().c_str(), userId, want.GetIntParam(Want::PARAM_APP_CLONE_INDEX_KEY, -1)); HandleDlpApp(const_cast(want)); return abms->StartAbility(want, callerToken, userId, requestCode); } @@ -193,8 +195,9 @@ ErrCode AbilityManagerClient::StartAbility(const Want &want, const AbilityStartS HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); auto abms = GetAbilityManager(); CHECK_POINTER_RETURN_NOT_CONNECTED(abms); - TAG_LOGI(AAFwkTag::ABILITYMGR, "StartAbility ability:%{public}s, userId:%{public}d, appCloneIndex:%{public}d", - want.GetElement().GetURI().c_str(), userId, want.GetIntParam(Want::PARAM_APP_CLONE_INDEX_KEY, -1)); + TAG_LOGI(AAFwkTag::ABILITYMGR, "StartAbility ability:%{public}s/%{public}s, userId:%{public}d, " + "appCloneIndex:%{public}d", want.GetElement().GetBundleName().c_str(), + want.GetElement().GetAbilityName().c_str(), userId, want.GetIntParam(Want::PARAM_APP_CLONE_INDEX_KEY, -1)); HandleDlpApp(const_cast(want)); return abms->StartAbility(want, abilityStartSetting, callerToken, userId, requestCode); } @@ -205,8 +208,9 @@ ErrCode AbilityManagerClient::StartAbility(const Want &want, const StartOptions HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); auto abms = GetAbilityManager(); CHECK_POINTER_RETURN_NOT_CONNECTED(abms); - TAG_LOGI(AAFwkTag::ABILITYMGR, "start ability, ability:%{public}s, userId:%{public}d,appCloneIndex:%{public}d", - want.GetElement().GetURI().c_str(), userId, want.GetIntParam(Want::PARAM_APP_CLONE_INDEX_KEY, -1)); + TAG_LOGI(AAFwkTag::ABILITYMGR, "StartAbility ability:%{public}s/%{public}s, userId:%{public}d, " + "appCloneIndex:%{public}d", want.GetElement().GetBundleName().c_str(), + want.GetElement().GetAbilityName().c_str(), userId, want.GetIntParam(Want::PARAM_APP_CLONE_INDEX_KEY, -1)); HandleDlpApp(const_cast(want)); return abms->StartAbility(want, startOptions, callerToken, userId, requestCode); } @@ -218,8 +222,8 @@ ErrCode AbilityManagerClient::StartAbilityAsCaller( HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); auto abms = GetAbilityManager(); CHECK_POINTER_RETURN_NOT_CONNECTED(abms); - TAG_LOGI(AAFwkTag::ABILITYMGR, "StartAbilityAsCaller ability:%{public}s, userId:%{public}d.", - want.GetElement().GetURI().c_str(), userId); + TAG_LOGI(AAFwkTag::ABILITYMGR, "StartAbilityAsCaller ability:%{public}s/%{public}s, userId:%{public}d", + want.GetElement().GetBundleName().c_str(), want.GetElement().GetAbilityName().c_str(), userId); HandleDlpApp(const_cast(want)); return abms->StartAbilityAsCaller(want, callerToken, asCallerSourceToken, userId, requestCode); } @@ -231,8 +235,8 @@ ErrCode AbilityManagerClient::StartAbilityAsCaller(const Want &want, const Start HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); auto abms = GetAbilityManager(); CHECK_POINTER_RETURN_NOT_CONNECTED(abms); - TAG_LOGI(AAFwkTag::ABILITYMGR, "abilityName:%{public}s, userId:%{public}d", - want.GetElement().GetURI().c_str(), userId); + TAG_LOGI(AAFwkTag::ABILITYMGR, "StartAbilityAsCaller ability:%{public}s/%{public}s, userId:%{public}d", + want.GetElement().GetBundleName().c_str(), want.GetElement().GetAbilityName().c_str(), userId); HandleDlpApp(const_cast(want)); return abms->StartAbilityAsCaller(want, startOptions, callerToken, asCallerSourceToken, userId, requestCode); } @@ -243,8 +247,8 @@ ErrCode AbilityManagerClient::StartAbilityForResultAsCaller( HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); auto abms = GetAbilityManager(); CHECK_POINTER_RETURN_NOT_CONNECTED(abms); - TAG_LOGI(AAFwkTag::ABILITYMGR, "StartAbilityForResultAsCaller, The abilityName:%{public}s, userId:%{public}d", - want.GetElement().GetURI().c_str(), userId); + TAG_LOGI(AAFwkTag::ABILITYMGR, "StartAbilityForResultAsCaller ability:%{public}s/%{public}s, userId:%{public}d", + want.GetElement().GetBundleName().c_str(), want.GetElement().GetAbilityName().c_str(), userId); HandleDlpApp(const_cast(want)); return abms->StartAbilityForResultAsCaller(want, callerToken, requestCode, userId); } @@ -255,8 +259,8 @@ ErrCode AbilityManagerClient::StartAbilityForResultAsCaller(const Want &want, co HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); auto abms = GetAbilityManager(); CHECK_POINTER_RETURN_NOT_CONNECTED(abms); - TAG_LOGI(AAFwkTag::ABILITYMGR, "The abilityName:%{public}s, userId:%{public}d", - want.GetElement().GetURI().c_str(), userId); + TAG_LOGI(AAFwkTag::ABILITYMGR, "StartAbilityForResultAsCaller ability:%{public}s/%{public}s, userId:%{public}d", + want.GetElement().GetBundleName().c_str(), want.GetElement().GetAbilityName().c_str(), userId); HandleDlpApp(const_cast(want)); return abms->StartAbilityForResultAsCaller(want, startOptions, callerToken, requestCode, userId); } @@ -342,8 +346,8 @@ ErrCode AbilityManagerClient::PreloadUIExtensionAbility(const Want &want, std::s { auto abms = GetAbilityManager(); CHECK_POINTER_RETURN_NOT_CONNECTED(abms); - TAG_LOGD(AAFwkTag::ABILITYMGR, "elementName:%{public}s, hostBundleName:%{public}s.", - want.GetElement().GetURI().c_str(), hostBundleName.c_str()); + TAG_LOGI(AAFwkTag::ABILITYMGR, "elementName:%{public}s/%{public}s, hostBundleName:%{public}s", + want.GetElement().GetBundleName().c_str(), want.GetElement().GetAbilityName().c_str(), hostBundleName.c_str()); return abms->PreloadUIExtensionAbility(want, hostBundleName, userId, hostPid); } @@ -390,8 +394,9 @@ ErrCode AbilityManagerClient::StartUIAbilityBySCB(sptr sessionInfo, } auto abms = GetAbilityManager(); CHECK_POINTER_RETURN_NOT_CONNECTED(abms); - TAG_LOGI(AAFwkTag::ABILITYMGR, "scb call, StartUIAbilityBySCB target: %{public}s, persistentId: %{public}d.", - sessionInfo->want.GetElement().GetURI().c_str(), sessionInfo->persistentId); + TAG_LOGI(AAFwkTag::ABILITYMGR, "scb call, StartUIAbilityBySCB target: %{public}s/%{public}s, " + "persistentId: %{public}d", sessionInfo->want.GetElement().GetBundleName().c_str(), + sessionInfo->want.GetElement().GetAbilityName().c_str(), sessionInfo->persistentId); return abms->StartUIAbilityBySCB(sessionInfo, isColdStart, sceneFlag); } @@ -540,8 +545,9 @@ ErrCode AbilityManagerClient::MinimizeUIAbilityBySCB(sptr sessionIn } auto abms = GetAbilityManager(); CHECK_POINTER_RETURN_NOT_CONNECTED(abms); - TAG_LOGI(AAFwkTag::ABILITYMGR, "scb call, MinimizeUIAbilityBySCB target: %{public}s, persistentId: %{public}d", - sessionInfo->want.GetElement().GetURI().c_str(), sessionInfo->persistentId); + TAG_LOGI(AAFwkTag::ABILITYMGR, "scb call, MinimizeUIAbilityBySCB target: %{public}s/%{public}s, " + "persistentId: %{public}d", sessionInfo->want.GetElement().GetBundleName().c_str(), + sessionInfo->want.GetElement().GetAbilityName().c_str(), sessionInfo->persistentId); return abms->MinimizeUIAbilityBySCB(sessionInfo, fromUser, sceneFlag); } @@ -1119,8 +1125,8 @@ ErrCode AbilityManagerClient::StartAbilityByCall(const Want &want, sptrStartAbilityByCall(want, connect, nullptr, DEFAULT_INVAL_VALUE, isSilent); } @@ -1129,8 +1135,8 @@ ErrCode AbilityManagerClient::StartAbilityByCall(const Want &want, sptrStartAbilityByCall(want, connect, callToken, accountId, isSilent); } @@ -1139,8 +1145,8 @@ ErrCode AbilityManagerClient::StartAbilityByCallWithErrMsg(const Want &want, spt { auto abms = GetAbilityManager(); CHECK_POINTER_RETURN_NOT_CONNECTED(abms); - TAG_LOGI(AAFwkTag::ABILITYMGR, "ByCall, ability:%{public}s, userId:%{public}d, isSilent::%{public}d", - want.GetElement().GetURI().c_str(), accountId, isSilent); + TAG_LOGI(AAFwkTag::ABILITYMGR, "ByCall, ability:%{public}s/%{public}s, userId:%{public}d, isSilent:%{public}d", + want.GetElement().GetBundleName().c_str(), want.GetElement().GetAbilityName().c_str(), accountId, isSilent); return abms->StartAbilityByCallWithErrMsg(want, connect, callToken, accountId, errMsg, isSilent); } @@ -1202,7 +1208,8 @@ ErrCode AbilityManagerClient::RequestDialogService( HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); auto abms = GetAbilityManager(); CHECK_POINTER_RETURN_NOT_CONNECTED(abms); - TAG_LOGI(AAFwkTag::ABILITYMGR, "request:%{public}s", want.GetElement().GetURI().c_str()); + TAG_LOGI(AAFwkTag::ABILITYMGR, "request:%{public}s/%{public}s", want.GetElement().GetBundleName().c_str(), + want.GetElement().GetAbilityName().c_str()); HandleDlpApp(const_cast(want)); return abms->RequestDialogService(want, callerToken); } @@ -1744,8 +1751,9 @@ void AbilityManagerClient::CallUIAbilityBySCB(sptr sessionInfo, boo { auto abms = GetAbilityManager(); CHECK_POINTER_RETURN(abms); - TAG_LOGI(AAFwkTag::ABILITYMGR, "scb call, CallUIAbilityBySCB target: %{public}s", - sessionInfo->want.GetElement().GetURI().c_str()); + TAG_LOGI(AAFwkTag::ABILITYMGR, "scb call, CallUIAbilityBySCB target: %{public}s/%{public}s", + sessionInfo->want.GetElement().GetBundleName().c_str(), + sessionInfo->want.GetElement().GetAbilityName().c_str()); abms->CallUIAbilityBySCB(sessionInfo, isColdStart); TAG_LOGD(AAFwkTag::ABILITYMGR, "scb call, CallUIAbilityBySCB, isColdStart: %{public}d", isColdStart); } @@ -1754,8 +1762,8 @@ int32_t AbilityManagerClient::StartSpecifiedAbilityBySCB(const Want &want) { auto abms = GetAbilityManager(); CHECK_POINTER_RETURN_NOT_CONNECTED(abms); - TAG_LOGI(AAFwkTag::ABILITYMGR, "scb call, StartSpecifiedAbilityBySCB, target: %{public}s", - want.GetElement().GetURI().c_str()); + TAG_LOGI(AAFwkTag::ABILITYMGR, "scb call, StartSpecifiedAbilityBySCB, target: %{public}s/%{public}s", + want.GetElement().GetBundleName().c_str(), want.GetElement().GetAbilityName().c_str()); return abms->StartSpecifiedAbilityBySCB(want); } diff --git a/services/abilitymgr/src/ability_manager_service.cpp b/services/abilitymgr/src/ability_manager_service.cpp index 02c2ccd30f..ac52e8b874 100644 --- a/services/abilitymgr/src/ability_manager_service.cpp +++ b/services/abilitymgr/src/ability_manager_service.cpp @@ -2535,7 +2535,8 @@ int32_t AbilityManagerService::RequestDialogService(const Want &want, const sptr return ERR_INVALID_CONTINUATION_FLAG; } - TAG_LOGI(AAFwkTag::ABILITYMGR, "request dialog service, target:%{public}s", want.GetElement().GetURI().c_str()); + TAG_LOGI(AAFwkTag::ABILITYMGR, "request dialog service, target:%{public}s/%{public}s", + want.GetElement().GetBundleName().c_str(), want.GetElement().GetAbilityName().c_str()); return RequestDialogServiceInner(want, callerToken, -1, -1); } @@ -3435,8 +3436,8 @@ int AbilityManagerService::PreloadUIExtensionAbility(const Want &want, std::stri int AbilityManagerService::PreloadUIExtensionAbilityInner(const Want &want, std::string &hostBundleName, int32_t userId, int32_t hostPid) { - TAG_LOGD(AAFwkTag::UI_EXT, "PreloadUIExtension called, elementName: %{public}s.", - want.GetElement().GetURI().c_str()); + TAG_LOGD(AAFwkTag::UI_EXT, "PreloadUIExtension called, elementName: %{public}s/%{public}s", + want.GetElement().GetBundleName().c_str(), want.GetElement().GetAbilityName().c_str()); int32_t validUserId = GetValidUserId(userId); AbilityRequest abilityRequest; ErrCode result = ERR_OK; @@ -4035,8 +4036,9 @@ int AbilityManagerService::StartUIExtensionAbility(const sptr &exte abilityRequest.sessionInfo->uiExtensionComponentId = ( static_cast(callerRecord->GetRecordId()) << OFFSET) | static_cast(abilityRequest.sessionInfo->persistentId); - TAG_LOGI(AAFwkTag::UI_EXT, "StartUIExtension: persistentId: %{public}d, element: %{public}s.", - abilityRequest.sessionInfo->persistentId, extensionSessionInfo->want.GetElement().GetURI().c_str()); + TAG_LOGI(AAFwkTag::UI_EXT, "StartUIExtension: persistentId: %{public}d, element: %{public}s/%{public}s", + abilityRequest.sessionInfo->persistentId, extensionSessionInfo->want.GetElement().GetBundleName().c_str(), + extensionSessionInfo->want.GetElement().GetAbilityName().c_str()); if (result != ERR_OK) { TAG_LOGE(AAFwkTag::UI_EXT, "generate ability request local error"); eventInfo.errReason = "generate ability request local error"; @@ -4491,8 +4493,9 @@ int AbilityManagerService::TerminateUIExtensionAbility(const sptr & return ERR_WRONG_INTERFACE_CALL; } - TAG_LOGD(AAFwkTag::ABILITYMGR, "UIExtension persistentId: %{public}d, element: %{public}s.", - extensionSessionInfo->persistentId, extensionSessionInfo->want.GetElement().GetURI().c_str()); + TAG_LOGD(AAFwkTag::ABILITYMGR, "UIExtension persistentId: %{public}d, element: %{public}s/%{public}s", + extensionSessionInfo->persistentId, extensionSessionInfo->want.GetElement().GetBundleName().c_str(), + extensionSessionInfo->want.GetElement().GetAbilityName().c_str()); connectManager->TerminateAbilityWindowLocked(targetRecord, extensionSessionInfo); return ERR_OK; } @@ -4805,8 +4808,9 @@ int AbilityManagerService::MinimizeUIExtensionAbility(const sptr &e extensionSessionInfo->uiExtensionComponentId = ( static_cast(abilityRecord->GetRecordId()) << OFFSET) | static_cast(extensionSessionInfo->persistentId); - TAG_LOGD(AAFwkTag::ABILITYMGR, "UIExtension component id: %{public}" PRId64 ", element: %{public}s.", - extensionSessionInfo->uiExtensionComponentId, extensionSessionInfo->want.GetElement().GetURI().c_str()); + TAG_LOGD(AAFwkTag::ABILITYMGR, "UIExtension component id: %{public}" PRId64 ", element: %{public}s/%{public}s", + extensionSessionInfo->uiExtensionComponentId, extensionSessionInfo->want.GetElement().GetBundleName().c_str(), + extensionSessionInfo->want.GetElement().GetAbilityName().c_str()); connectManager->BackgroundAbilityWindowLocked(targetRecord, extensionSessionInfo); return ERR_OK; } @@ -4900,8 +4904,8 @@ int32_t AbilityManagerService::ConnectAbilityCommon( } HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); XCOLLIE_TIMER_LESS_IGNORE(__PRETTY_FUNCTION__, !want.GetElement().GetDeviceID().empty()); - TAG_LOGI(AAFwkTag::SERVICE_EXT, - "elementUri:%{public}s", want.GetElement().GetURI().c_str()); + TAG_LOGI(AAFwkTag::SERVICE_EXT, "element: %{public}s/%{public}s", + want.GetElement().GetBundleName().c_str(), want.GetElement().GetAbilityName().c_str()); CheckExtensionRateLimit(); CHECK_POINTER_AND_RETURN(connect, ERR_INVALID_VALUE); CHECK_POINTER_AND_RETURN(connect->AsObject(), ERR_INVALID_VALUE); @@ -11064,8 +11068,9 @@ bool AbilityManagerService::CheckUIExtensionCallerIsForeground(const AbilityRequ return true; } - TAG_LOGE(AAFwkTag::ABILITYMGR, "caller app not foreground, can't start %{public}s", - abilityRequest.want.GetElement().GetURI().c_str()); + TAG_LOGE(AAFwkTag::ABILITYMGR, "caller app not foreground, can't start %{public}s/%{public}s", + abilityRequest.want.GetElement().GetBundleName().c_str(), + abilityRequest.want.GetElement().GetAbilityName().c_str()); return false; } @@ -11559,8 +11564,9 @@ int AbilityManagerService::CheckUIExtensionIsFocused(uint32_t uiExtensionTokenId auto topAbility = Token::GetAbilityRecordByToken(token); if (topAbility != nullptr) { - TAG_LOGD(AAFwkTag::ABILITYMGR, "top ability: %{public}s, pid: %{public}d, tokenId: %{public}d", - topAbility->GetWant().GetElement().GetURI().c_str(), topAbility->GetPid(), + TAG_LOGD(AAFwkTag::ABILITYMGR, "top ability: %{public}s/%{public}s, pid: %{public}d, tokenId: %{public}d", + topAbility->GetWant().GetElement().GetBundleName().c_str(), + topAbility->GetWant().GetElement().GetAbilityName().c_str(), topAbility->GetPid(), topAbility->GetApplicationInfo().accessTokenId); } diff --git a/services/abilitymgr/src/extension_record/extension_record_manager.cpp b/services/abilitymgr/src/extension_record/extension_record_manager.cpp index f8a4e4d537..d99d6b819b 100644 --- a/services/abilitymgr/src/extension_record/extension_record_manager.cpp +++ b/services/abilitymgr/src/extension_record/extension_record_manager.cpp @@ -316,8 +316,9 @@ int32_t ExtensionRecordManager::AddPreloadUIExtensionRecord(const std::shared_pt auto preLoadUIExtensionInfo = std::make_tuple(abilityRecord->GetWant().GetElement().GetAbilityName(), abilityRecord->GetWant().GetElement().GetBundleName(), abilityRecord->GetWant().GetElement().GetModuleName(), hostBundleName); - TAG_LOGD(AAFwkTag::ABILITYMGR, "hostBundleName: %{public}s, elementName:%{public}s ", - hostBundleName.c_str(), abilityRecord->GetWant().GetElement().GetURI().c_str()); + TAG_LOGD(AAFwkTag::ABILITYMGR, "hostBundleName: %{public}s, elementName:%{public}s/%{public}s", + hostBundleName.c_str(), abilityRecord->GetWant().GetElement().GetBundleName().c_str(), + abilityRecord->GetWant().GetElement().GetAbilityName().c_str()); std::lock_guard lock(preloadUIExtensionMapMutex_); preloadUIExtensionMap_[preLoadUIExtensionInfo].push_back(extensionRecord); return ERR_OK; @@ -740,8 +741,9 @@ void ExtensionRecordManager::GetCallerTokenList( return; } - TAG_LOGD(AAFwkTag::ABILITYMGR, "ability: %{public}s, pid: %{public}d, tokenId: %{public}d", - callerAbilityRecord->GetWant().GetElement().GetURI().c_str(), callerAbilityRecord->GetPid(), + TAG_LOGD(AAFwkTag::ABILITYMGR, "ability:%{public}s/%{public}s, pid: %{public}d, tokenId: %{public}d", + callerAbilityRecord->GetWant().GetElement().GetBundleName().c_str(), + callerAbilityRecord->GetWant().GetElement().GetAbilityName().c_str(), callerAbilityRecord->GetPid(), callerAbilityRecord->GetApplicationInfo().accessTokenId); auto callerExtensionRecordId = callerAbilityRecord->GetUIExtensionAbilityId(); @@ -777,8 +779,9 @@ bool ExtensionRecordManager::IsFocused( return false; } - TAG_LOGD(AAFwkTag::ABILITYMGR, "ability: %{public}s, pid: %{public}d, tokenId: %{public}d", - abilityRecord->GetWant().GetElement().GetURI().c_str(), abilityRecord->GetPid(), + TAG_LOGD(AAFwkTag::ABILITYMGR, "ability:%{public}s/%{public}s, pid: %{public}d, tokenId: %{public}d", + abilityRecord->GetWant().GetElement().GetBundleName().c_str(), + abilityRecord->GetWant().GetElement().GetAbilityName().c_str(), abilityRecord->GetPid(), abilityRecord->GetApplicationInfo().accessTokenId); if (!AAFwk::UIExtensionUtils::IsUIExtension(abilityRecord->GetAbilityInfo().extensionAbilityType)) { diff --git a/services/abilitymgr/src/interceptor/screen_unlock_interceptor.cpp b/services/abilitymgr/src/interceptor/screen_unlock_interceptor.cpp index 6cc2b1aff8..7c27ff30bb 100644 --- a/services/abilitymgr/src/interceptor/screen_unlock_interceptor.cpp +++ b/services/abilitymgr/src/interceptor/screen_unlock_interceptor.cpp @@ -39,8 +39,8 @@ ErrCode ScreenUnlockInterceptor::DoProcess(AbilityInterceptorParam param) QueryTargetAbilityInfo(param, targetAbilityInfo); if (targetAbilityInfo.applicationInfo.name.empty() || targetAbilityInfo.applicationInfo.bundleName.empty()) { - TAG_LOGD(AAFwkTag::ABILITYMGR, "Cannot find targetAbilityInfo, element uri: %{public}s", - param.want.GetElement().GetURI().c_str()); + TAG_LOGD(AAFwkTag::ABILITYMGR, "Cannot find targetAbilityInfo, element uri: %{public}s/%{public}s", + param.want.GetElement().GetBundleName().c_str(), param.want.GetElement().GetAbilityName().c_str()); return ERR_OK; } } diff --git a/services/abilitymgr/src/mission/mission_list_manager.cpp b/services/abilitymgr/src/mission/mission_list_manager.cpp index 5613e33ca6..583ef9eb56 100644 --- a/services/abilitymgr/src/mission/mission_list_manager.cpp +++ b/services/abilitymgr/src/mission/mission_list_manager.cpp @@ -3319,7 +3319,9 @@ void MissionListManager::DumpMission(int missionId, std::vector &in int MissionListManager::ResolveLocked(const AbilityRequest &abilityRequest) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "ability_name:%{public}s", abilityRequest.want.GetElement().GetURI().c_str()); + TAG_LOGI(AAFwkTag::ABILITYMGR, "ability_name:%{public}s/%{public}s", + abilityRequest.want.GetElement().GetBundleName().c_str(), + abilityRequest.want.GetElement().GetAbilityName().c_str()); if (!abilityRequest.IsCallType(AbilityCallType::CALL_REQUEST_TYPE)) { TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s, resolve ability_name:", __func__); diff --git a/services/abilitymgr/src/scene_board/ui_ability_lifecycle_manager.cpp b/services/abilitymgr/src/scene_board/ui_ability_lifecycle_manager.cpp index 54688a316e..42173a9c81 100644 --- a/services/abilitymgr/src/scene_board/ui_ability_lifecycle_manager.cpp +++ b/services/abilitymgr/src/scene_board/ui_ability_lifecycle_manager.cpp @@ -1321,7 +1321,9 @@ void UIAbilityLifecycleManager::MoveToBackground(const std::shared_ptrabilityRequest; - TAG_LOGI(AAFwkTag::ABILITYMGR, "AddSpecifiedRequest: %{public}d, %{public}s", request->requestId, - abilityRequest.want.GetElement().GetURI().c_str()); + TAG_LOGI(AAFwkTag::ABILITYMGR, "AddSpecifiedRequest: %{public}d, %{public}s/%{public}s", request->requestId, + abilityRequest.want.GetElement().GetBundleName().c_str(), + abilityRequest.want.GetElement().GetAbilityName().c_str()); auto instanceKey = abilityRequest.want.GetStringParam(Want::APP_INSTANCE_KEY); auto accessTokenIdStr = std::to_string(abilityRequest.abilityInfo.applicationInfo.accessTokenId); auto &list = specifiedRequestList_[accessTokenIdStr + instanceKey];