diff --git a/services/abilitymgr/src/ability_manager_service.cpp b/services/abilitymgr/src/ability_manager_service.cpp index 14dbb2ae88..6395ec200c 100644 --- a/services/abilitymgr/src/ability_manager_service.cpp +++ b/services/abilitymgr/src/ability_manager_service.cpp @@ -98,7 +98,7 @@ namespace { #define CHECK_CALLER_IS_SYSTEM_APP \ if (!AAFwk::PermissionVerification::GetInstance()->JudgeCallerIsAllowedToUseSystemAPI()) { \ TAG_LOGE(AAFwkTag::ABILITYMGR, \ - "The caller is not system-app, can not use system-api"); \ + "caller no system-app, can not use system-api"); \ return ERR_NOT_SYSTEM_APP; \ } @@ -185,7 +185,7 @@ void SendAbilityEvent(const EventName &eventName, HiSysEventType type, const Eve { auto taskHandler = DelayedSingleton::GetInstance()->GetTaskHandler(); if (taskHandler == nullptr) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "task handler null."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "task handler null"); return; } taskHandler->SubmitTask([eventName, type, eventInfo]() { @@ -265,12 +265,12 @@ std::shared_ptr AbilityManagerService::GetPubInstance() void AbilityManagerService::OnStart() { if (state_ == ServiceRunningState::STATE_RUNNING) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "Ability manager service has already started."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "started"); return; } - TAG_LOGI(AAFwkTag::ABILITYMGR, "Ability manager service starting."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "starting"); if (!Init()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Failed to init ability manager service."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "failed init"); return; } state_ = ServiceRunningState::STATE_RUNNING; @@ -278,12 +278,12 @@ void AbilityManagerService::OnStart() * so it can't affect the TDD test program */ instance_ = DelayedSingleton::GetInstance().get(); if (instance_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Ability manager service enter OnStart, but instance_ is nullptr!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "instance_ null"); return; } bool ret = Publish(instance_); if (!ret) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Publish ability manager service failed!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "publish failed"); return; } @@ -294,7 +294,7 @@ void AbilityManagerService::OnStart() #ifdef SUPPORT_SCREEN AddSystemAbilityListener(MULTIMODAL_INPUT_SERVICE_ID); #endif - TAG_LOGI(AAFwkTag::ABILITYMGR, "Ability manager service start success."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "onStart success"); } bool AbilityManagerService::Init() @@ -309,7 +309,7 @@ bool AbilityManagerService::Init() userController_ = std::make_shared(); userController_->Init(); AmsConfigurationParameter::GetInstance().Parse(); - TAG_LOGI(AAFwkTag::ABILITYMGR, "Ability manager service config parse"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "config parse"); subManagersHelper_ = std::make_shared(taskHandler_, eventHandler_); subManagersHelper_->InitSubManagers(MAIN_USER_ID, true); SwitchManagers(U0_USER_ID, false); @@ -334,14 +334,14 @@ bool AbilityManagerService::Init() SubscribeScreenUnlockedEvent(); appExitReasonHelper_ = std::make_shared(subManagersHelper_); - TAG_LOGI(AAFwkTag::ABILITYMGR, "Init success."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "init success"); return true; } void AbilityManagerService::InitDeepLinkReserve() { if (!DeepLinkReserveConfig::GetInstance().LoadConfiguration()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "InitDeepLinkReserve failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "initDeepLinkReserve failed"); } } @@ -360,7 +360,7 @@ void AbilityManagerService::InitInterceptor() bool isAppJumpEnabled = OHOS::system::GetBoolParameter( OHOS::AppExecFwk::PARAMETER_APP_JUMP_INTERCEPTOR_ENABLE, false); if (isAppJumpEnabled) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "App jump intercetor enabled, add AbilityJumpInterceptor to Executer"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "app jump enabled, add abilityJumpInterceptor"); interceptorExecuter_->AddInterceptor("AbilityJump", std::make_shared()); } } @@ -375,7 +375,7 @@ void AbilityManagerService::InitInterceptorForScreenUnlock() void AbilityManagerService::InitPushTask() { if (taskHandler_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "taskHandler_ is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "taskHandler_ null"); return; } @@ -402,7 +402,7 @@ void AbilityManagerService::InitPushTask() } }; if (!ParseJsonFromBoot(SUSPEND_SERVICE_CONFIG_FILE)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Parse json from boot fail"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "parse json fail"); } isParamStartAbilityEnable_ = system::GetBoolParameter(PARAM_PREVENT_STARTABILITY, false); taskHandler_->SubmitTask(bootCompletedTask, "BootCompletedTask"); @@ -424,13 +424,13 @@ void AbilityManagerService::InitStartAbilityChain() void AbilityManagerService::OnStop() { - TAG_LOGI(AAFwkTag::ABILITYMGR, "Stop ability manager service."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "stop"); #ifdef BGTASKMGR_CONTINUOUS_TASK_ENABLE std::unique_lock lock(bgtaskObserverMutex_); if (bgtaskObserver_) { int ret = BackgroundTaskMgrHelper::UnsubscribeBackgroundTask(*bgtaskObserver_); if (ret != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "unsubscribe bgtask failed, err:%{public}d.", ret); + TAG_LOGE(AAFwkTag::ABILITYMGR, "unsubscribe bgtask failed, err:%{public}d", ret); } } #endif @@ -439,7 +439,7 @@ void AbilityManagerService::OnStop() if (bms) { bool ret = IN_PROCESS_CALL(bms->UnregisterBundleEventCallback(abilityBundleEventCallback_)); if (ret != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "unsubscribe bundle event callback failed, err:%{public}d.", ret); + TAG_LOGE(AAFwkTag::ABILITYMGR, "unsubscribe bundle event failed, err:%{public}d", ret); } } } @@ -465,11 +465,11 @@ int AbilityManagerService::StartAbility(const Want &want, int32_t userId, int re static_cast(isDebugApp), static_cast(hasWindowOptions)); bool checkDeveloperModeFlag = (isDebugApp || hasWindowOptions); if (checkDeveloperModeFlag && !system::GetBoolParameter(DEVELOPER_MODE_STATE, false)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Developer Mode is false."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "not developer Mode"); return ERR_NOT_DEVELOPER_MODE; } if (!UnlockScreenManager::GetInstance().UnlockScreen()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Screen need passord to unlock"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "need passord to unlock"); return ERR_UNLOCK_SCREEN_FAILED_IN_DEVELOPER_MODE; } TAG_LOGD(AAFwkTag::ABILITYMGR, "coldStart:%{public}d", want.GetBoolParam("coldStart", false)); @@ -480,7 +480,7 @@ int AbilityManagerService::StartAbility(const Want &want, int32_t userId, int re } if (hasWindowOptions) { if (!AppUtils::GetInstance().IsStartOptionsWithAnimation()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "window options are not supported in the current product type."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "window options not supported"); return ERR_NOT_SUPPORTED_PRODUCT_TYPE; } int32_t err = ERR_OK; @@ -488,7 +488,7 @@ int AbilityManagerService::StartAbility(const Want &want, int32_t userId, int re userId = GetValidUserId(userId); } if ((err = StartAbilityUtils::CheckAppProvisionMode(want, userId)) != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "CheckAppProvisionMode returns errcode=%{public}d", err); + TAG_LOGE(AAFwkTag::ABILITYMGR, "checkAppProvisionMode returns errcode=%{public}d", err); return err; } } @@ -526,7 +526,7 @@ int32_t AbilityManagerService::StartAbilityByFreeInstall(const Want &want, sptr< EventInfo eventInfo = BuildEventInfo(want, userId); SendAbilityEvent(EventName::START_ABILITY, HiSysEventType::BEHAVIOR, eventInfo); if ((flags & Want::FLAG_ABILITY_CONTINUATION) == Want::FLAG_ABILITY_CONTINUATION) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "StartAbility with continuation flags is not allowed!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "not allow startAbility with continuation flags"); eventInfo.errCode = ERR_INVALID_VALUE; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_INVALID_CONTINUATION_FLAG; @@ -547,7 +547,7 @@ int AbilityManagerService::StartAbilityWithSpecifyTokenId(const Want &want, cons uint32_t specifyTokenId, int32_t userId, int requestCode) { if (IPCSkeleton::GetCallingUid() != FOUNDATION_UID) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "StartAbility with specialId, the current process is not foundation process."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "startAbility with specialId, current process not foundation process"); return ERR_INVALID_CONTINUATION_FLAG; } return StartAbilityWithSpecifyTokenIdInner(want, callerToken, specifyTokenId, false, userId, requestCode); @@ -563,14 +563,14 @@ int AbilityManagerService::StartAbilityWithSpecifyTokenIdInner(const Want &want, EventInfo eventInfo = BuildEventInfo(want, userId); SendAbilityEvent(EventName::START_ABILITY, HiSysEventType::BEHAVIOR, eventInfo); if ((flags & Want::FLAG_ABILITY_CONTINUATION) == Want::FLAG_ABILITY_CONTINUATION) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "StartAbility with continuation flags is not allowed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "startAbility with continuation flags not allowed"); eventInfo.errCode = ERR_INVALID_VALUE; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_INVALID_CONTINUATION_FLAG; } TAG_LOGI(AAFwkTag::ABILITYMGR, - "Start ability come, ability is %{public}s, userId is %{public}d, specifyTokenId is %{public}u.", + "start ability come, ability:%{public}s, userId:%{public}d, specifyTokenId:%{public}u", want.GetElement().GetAbilityName().c_str(), userId, specifyTokenId); int32_t ret = StartAbilityWrap(want, callerToken, requestCode, isPendingWantCaller, userId, false, specifyTokenId); @@ -621,7 +621,7 @@ int AbilityManagerService::StartAbilityByUIContentSession(const Want &want, cons const sptr &sessionInfo, int32_t userId, int requestCode) { if (!callerToken || !sessionInfo) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken or sessionInfo is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken or sessionInfo null"); return ERR_INVALID_VALUE; } sptr token; @@ -632,19 +632,19 @@ int AbilityManagerService::StartAbilityByUIContentSession(const Want &want, cons token = focusChangeInfo.abilityToken_; } else { if (!wmsHandler_) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "wmsHandler_ is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "wmsHandler_ null"); return ERR_INVALID_VALUE; } wmsHandler_->GetFocusWindow(token); } #endif // SUPPORT_SCREEN if (!token) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "token is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "token null"); return ERR_INVALID_VALUE; } if (token != sessionInfo->callerToken) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken is not equal to top ablity token"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken unequal to top ablity token"); return NOT_TOP_ABILITY; } return StartAbility(want, callerToken, userId, requestCode); @@ -654,7 +654,7 @@ int AbilityManagerService::StartAbilityByUIContentSession(const Want &want, cons const sptr &callerToken, const sptr &sessionInfo, int32_t userId, int requestCode) { if (!callerToken || !sessionInfo) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken or sessionInfo is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken or sessionInfo null"); return ERR_INVALID_VALUE; } sptr token; @@ -665,7 +665,7 @@ int AbilityManagerService::StartAbilityByUIContentSession(const Want &want, cons token = focusChangeInfo.abilityToken_; } else { if (!wmsHandler_) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "wmsHandler_ is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "wmsHandler_ null"); return ERR_INVALID_VALUE; } wmsHandler_->GetFocusWindow(token); @@ -673,12 +673,12 @@ int AbilityManagerService::StartAbilityByUIContentSession(const Want &want, cons #endif // SUPPORT_SCREEN if (!token) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "token is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "token null"); return ERR_INVALID_VALUE; } if (token != sessionInfo->callerToken) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken is not equal to top ablity token"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken unequal to top ablity token"); return NOT_TOP_ABILITY; } return StartAbility(want, startOptions, callerToken, userId, requestCode); @@ -688,7 +688,7 @@ int AbilityManagerService::StartAbilityOnlyUIAbility(const Want &want, const spt uint32_t specifyTokenId) { if (IPCSkeleton::GetCallingUid() != FOUNDATION_UID) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "StartAbility with specialId, the current process is not foundation process."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "StartAbility with specialId, process not foundation process"); return ERR_INVALID_CONTINUATION_FLAG; } @@ -699,14 +699,14 @@ int AbilityManagerService::StartAbilityOnlyUIAbility(const Want &want, const spt EventInfo eventInfo = BuildEventInfo(want, DEFAULT_INVAL_VALUE); SendAbilityEvent(EventName::START_ABILITY, HiSysEventType::BEHAVIOR, eventInfo); if ((flags & Want::FLAG_ABILITY_CONTINUATION) == Want::FLAG_ABILITY_CONTINUATION) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "StartAbility with continuation flags is not allowed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "StartAbility not allowed"); eventInfo.errCode = ERR_INVALID_VALUE; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_INVALID_CONTINUATION_FLAG; } TAG_LOGI(AAFwkTag::ABILITYMGR, - "Start ability come, ability is %{public}s, userId is %{public}d, specifyTokenId is %{public}u.", + "start, ability: %{public}s, userId: %{public}d, specifyTokenId: %{public}u", want.GetElement().GetAbilityName().c_str(), DEFAULT_INVAL_VALUE, specifyTokenId); int32_t ret = StartAbilityWrap(want, callerToken, DEFAULT_INVAL_VALUE, false, DEFAULT_INVAL_VALUE, false, specifyTokenId, false, false, true); @@ -740,7 +740,7 @@ int AbilityManagerService::StartAbilityAsCallerDetails(const Want &want, const s EventInfo eventInfo = BuildEventInfo(want, userId); SendAbilityEvent(EventName::START_ABILITY, HiSysEventType::BEHAVIOR, eventInfo); if ((flags & Want::FLAG_ABILITY_CONTINUATION) == Want::FLAG_ABILITY_CONTINUATION) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "StartAbility with continuation flags is not allowed!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "startAbility with continuation flags not allowed"); eventInfo.errCode = ERR_INVALID_VALUE; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_INVALID_CONTINUATION_FLAG; @@ -748,13 +748,13 @@ int AbilityManagerService::StartAbilityAsCallerDetails(const Want &want, const s AAFwk::Want newWant = want; UpdateAsCallerSourceInfo(newWant, asCallerSourceToken, callerToken); - TAG_LOGI(AAFwkTag::ABILITYMGR, "Start ability come, ability is %{public}s, userId is %{public}d", + TAG_LOGI(AAFwkTag::ABILITYMGR, "start ability come, ability:%{public}s, userId:%{public}d", want.GetElement().GetAbilityName().c_str(), userId); std::string callerPkg; std::string targetPkg; if (AbilityUtil::CheckJumpInterceptorWant(newWant, callerPkg, targetPkg)) { TAG_LOGI(AAFwkTag::ABILITYMGR, - "the call is from interceptor dialog, callerPkg:%{public}s, targetPkg:%{public}s", + "call from interceptor dialog, callerPkg:%{public}s, targetPkg:%{public}s", callerPkg.c_str(), targetPkg.c_str()); AbilityUtil::AddAbilityJumpRuleToBms(callerPkg, targetPkg, GetUserId()); } @@ -775,15 +775,15 @@ int AbilityManagerService::StartAbilityPublicPrechainCheck(StartAbilityParams &p auto isSpecificSA = AAFwk::PermissionVerification::GetInstance()-> CheckSpecificSystemAbilityAccessPermission(DMS_PROCESS_NAME); if (!isSpecificSA) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s VerificationAllToken failed.", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s verificationAllToken failed", __func__); return ERR_INVALID_CALLER; } - TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s: Caller is specific system ability.", __func__); + TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s: caller specific system ability", __func__); } // 2. validUserId, multi-user if (!JudgeMultiUserConcurrency(params.GetValidUserId())) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Multi-user non-concurrent unsatisfied"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "multi-user non-concurrent unsatisfied"); return ERR_CROSS_USER; } @@ -798,7 +798,7 @@ int AbilityManagerService::StartAbilityPrechainInterceptor(StartAbilityParams &p auto interceptorResult = interceptorExecuter_ == nullptr ? ERR_INVALID_VALUE : interceptorExecuter_->DoProcess(interceptorParam); if (interceptorResult != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ is nullptr or DoProcess return error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ null or doProcess error"); return interceptorResult; } @@ -881,12 +881,12 @@ int AbilityManagerService::CheckExtensionCallPermission(const Want& want, const auto isToPermissionMgr = IsTargetPermission(want); if (!isSACall && !isSystemAppCall && !isShellCall && !isToPermissionMgr) { TAG_LOGE(AAFwkTag::ABILITYMGR, - "Cannot start extension by start ability, use startServiceExtensionAbility."); + "cannot start, use startServiceExtensionAbility"); return ERR_WRONG_INTERFACE_CALL; } int result = CheckCallServicePermission(abilityRequest); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Check permission failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "check permission failed"); } return result; } @@ -898,7 +898,7 @@ int AbilityManagerService::CheckServiceCallPermission(const AbilityRequest& abil "Check call service or extension permission, name is %{public}s.", abilityInfo.name.c_str()); int result = CheckCallServicePermission(abilityRequest); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Check permission failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "check permission failed"); } return result; } @@ -915,12 +915,12 @@ int AbilityManagerService::CheckBrokerCallPermission(const AbilityRequest& abili "Check call service or extension permission, name is %{public}s.", abilityInfo.name.c_str()); auto collaborator = GetCollaborator(CollaboratorType::RESERVE_TYPE); if (collaborator == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Collaborator is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "collaborator null"); return CHECK_PERMISSION_FAILED; } int result = collaborator->CheckCallAbilityPermission(abilityRequest.want); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Check permission failed from broker."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "check broker permission failed"); return CHECK_PERMISSION_FAILED; } return result; @@ -932,7 +932,7 @@ int AbilityManagerService::CheckAbilityCallPermission(const AbilityRequest& abil TAG_LOGD(AAFwkTag::ABILITYMGR, "Check call ability permission, name is %{public}s.", abilityInfo.name.c_str()); int result = CheckCallAbilityPermission(abilityRequest, specifyTokenId); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Check permission failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "check permission failed"); } return result; } @@ -944,7 +944,7 @@ int AbilityManagerService::CheckCallPermission(const Want& want, const AppExecFw { auto type = abilityInfo.type; if (type == AppExecFwk::AbilityType::DATA) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Cannot start data ability by start ability."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "cannot start data ability by start ability"); return ERR_WRONG_INTERFACE_CALL; } if (type == AppExecFwk::AbilityType::EXTENSION) { @@ -1023,13 +1023,13 @@ int AbilityManagerService::StartAbilityInner(const Want &want, const sptr::GetInstance()->IsAppKilling(callerToken)); if (isAppKilling) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "caller is killing."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "caller killing"); return ERR_INVALID_CALLER; } } @@ -1039,7 +1039,7 @@ int AbilityManagerService::StartAbilityInner(const Want &want, const sptr CheckSpecificSystemAbilityAccessPermission(DMS_PROCESS_NAME); if (!isSpecificSA) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s VerificationAllToken failed.", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s verificationAllToken failed", __func__); return ERR_INVALID_CALLER; } - TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s: Caller is specific system ability.", __func__); + TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s:caller specific system ability", __func__); } int32_t oriValidUserId = GetValidUserId(userId); @@ -1075,13 +1075,13 @@ int AbilityManagerService::StartAbilityInner(const Want &want, const sptrDoProcess(interceptorParam); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ is nullptr or DoProcess return error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ null or DoProcess error"); return result; } if ((want.GetFlags() & Want::FLAG_ABILITY_PREPARE_CONTINUATION) == Want::FLAG_ABILITY_PREPARE_CONTINUATION && IPCSkeleton::GetCallingUid() != DMS_UID) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "The flag only support for DMS, flag is %{public}d", want.GetFlags()); + TAG_LOGE(AAFwkTag::ABILITYMGR, "flag only support DMS, flag:%{public}d", want.GetFlags()); return ERR_INVALID_CONTINUATION_FLAG; } @@ -1091,7 +1091,7 @@ int AbilityManagerService::StartAbilityInner(const Want &want, const sptrCheckSpecificSystemAbilityAccessPermission(DMS_PROCESS_NAME)) { - TAG_LOGW(AAFwkTag::ABILITYMGR, "StartAbilityInner, Remove continueSessionId and persistentId"); + TAG_LOGW(AAFwkTag::ABILITYMGR, "startAbilityInner, remove continueSessionId and persistentId"); abilityRequest.want.RemoveParam(DMS_CONTINUED_SESSION_ID); abilityRequest.want.RemoveParam(DMS_PERSISTENT_ID); } @@ -1280,7 +1280,7 @@ int AbilityManagerService::StartAbilityInner(const Want &want, const sptr &callerToken, int32_t userId, int requestCode, bool isImplicit) { if (want.GetBoolParam(DEBUG_APP, false) && !system::GetBoolParameter(DEVELOPER_MODE_STATE, false)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Developer Mode is false."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "developer mode false"); return ERR_NOT_DEVELOPER_MODE; } if (!UnlockScreenManager::GetInstance().UnlockScreen()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Screen need passord to unlock"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "screen need passord unlock"); return ERR_UNLOCK_SCREEN_FAILED_IN_DEVELOPER_MODE; } AbilityUtil::RemoveWantKey(const_cast(want)); @@ -1373,7 +1373,7 @@ int AbilityManagerService::StartAbilityDetails(const Want &want, const AbilitySt if (!DlpUtils::OtherAppsAccessDlpCheck(callerToken, want) || VerifyAccountPermission(userId) == CHECK_PERMISSION_FAILED || !DlpUtils::DlpAccessOtherAppsCheck(callerToken, want)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s: permission verification failed", __func__); eventInfo.errCode = CHECK_PERMISSION_FAILED; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return CHECK_PERMISSION_FAILED; @@ -1406,7 +1406,7 @@ int AbilityManagerService::StartAbilityDetails(const Want &want, const AbilitySt result = interceptorExecuter_ == nullptr ? ERR_INVALID_VALUE : interceptorExecuter_->DoProcess(interceptorParam); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ is nullptr or DoProcess return error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ null or doProcess error"); eventInfo.errCode = result; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return result; @@ -1424,7 +1424,7 @@ int AbilityManagerService::StartAbilityDetails(const Want &want, const AbilitySt } if (!JudgeMultiUserConcurrency(validUserId)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Multi-user non-concurrent unsatisfied"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "multi-user non-concurrent unsatisfied"); eventInfo.errCode = ERR_INVALID_VALUE; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_CROSS_USER; @@ -1439,7 +1439,7 @@ int AbilityManagerService::StartAbilityDetails(const Want &want, const AbilitySt CHECK_POINTER_AND_RETURN(implicitStartProcessor_, ERR_IMPLICIT_START_ABILITY_FAIL); result = implicitStartProcessor_->ImplicitStartAbility(abilityRequest, validUserId); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "implicit start ability error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "implicit start ability error"); eventInfo.errCode = result; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); } @@ -1451,7 +1451,7 @@ int AbilityManagerService::StartAbilityDetails(const Want &want, const AbilitySt #endif result = GenerateAbilityRequest(want, requestCode, abilityRequest, callerToken, validUserId); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Generate ability request local error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "generate ability request local error"); eventInfo.errCode = result; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return result; @@ -1465,14 +1465,14 @@ int AbilityManagerService::StartAbilityDetails(const Want &want, const AbilitySt result = CheckStaticCfgPermission(abilityRequest, false, -1, false, false, isImplicit); if (result != AppExecFwk::Constants::PERMISSION_GRANTED) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "CheckStaticCfgPermission error, result is %{public}d.", result); + TAG_LOGE(AAFwkTag::ABILITYMGR, "checkStaticCfgPermission error, result:%{public}d", result); eventInfo.errCode = result; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_STATIC_CFG_PERMISSION; } result = CheckCallAbilityPermission(abilityRequest); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s CheckCallAbilityPermission error.", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s checkCallAbilityPermission error", __func__); eventInfo.errCode = result; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return result; @@ -1481,7 +1481,7 @@ int AbilityManagerService::StartAbilityDetails(const Want &want, const AbilitySt abilityRequest.startSetting = std::make_shared(abilityStartSetting); if (abilityInfo.type == AppExecFwk::AbilityType::DATA) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Cannot start data ability, use 'AcquireDataAbility()' instead."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "cannot start data ability, use 'AcquireDataAbility()'"); eventInfo.errCode = ERR_INVALID_VALUE; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_WRONG_INTERFACE_CALL; @@ -1492,14 +1492,14 @@ int AbilityManagerService::StartAbilityDetails(const Want &want, const AbilitySt result = afterCheckExecuter_ == nullptr ? ERR_INVALID_VALUE : afterCheckExecuter_->DoProcess(afterCheckParam); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "afterCheckExecuter_ is nullptr or DoProcess return error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "afterCheckExecuter_ null or doProcess error"); return result; } if (!AbilityUtil::IsSystemDialogAbility(abilityInfo.bundleName, abilityInfo.name)) { result = PreLoadAppDataAbilities(abilityInfo.bundleName, validUserId); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "StartAbility: App data ability preloading failed, '%{public}s', %{public}d", + TAG_LOGE(AAFwkTag::ABILITYMGR, "startAbility: app data ability preloading failed, '%{public}s', %{public}d", abilityInfo.bundleName.c_str(), result); eventInfo.errCode = result; @@ -1509,7 +1509,7 @@ int AbilityManagerService::StartAbilityDetails(const Want &want, const AbilitySt } #ifdef SUPPORT_GRAPHICS if (abilityInfo.type != AppExecFwk::AbilityType::PAGE) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Only support for page type ability."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "only support page type ability"); eventInfo.errCode = ERR_INVALID_VALUE; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_WRONG_INTERFACE_CALL; @@ -1530,7 +1530,7 @@ int AbilityManagerService::StartAbilityDetails(const Want &want, const AbilitySt } auto missionListManager = GetMissionListManagerByUserId(oriValidUserId); if (missionListManager == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "missionListManager is Null. userId=%{public}d", validUserId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "missionListManager null userId=%{public}d", validUserId); eventInfo.errCode = ERR_INVALID_VALUE; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_INVALID_VALUE; @@ -1648,7 +1648,7 @@ int AbilityManagerService::StartAbilityForOptionInner(const Want &want, const St if (system::GetBoolParameter(VERIFY_DOMINATE_SCREEN, true) && callerToken == nullptr && !IsCallerSceneBoard() && AbilityPermissionUtil::GetInstance().IsDominateScreen(want, isPendingWantCaller)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "caller is invalid."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "caller invalid"); return ERR_INVALID_CALLER; } @@ -1665,7 +1665,7 @@ int AbilityManagerService::StartAbilityForOptionInner(const Want &want, const St if (!DlpUtils::OtherAppsAccessDlpCheck(callerToken, want) || VerifyAccountPermission(userId) == CHECK_PERMISSION_FAILED || !DlpUtils::DlpAccessOtherAppsCheck(callerToken, want)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); eventInfo.errCode = CHECK_PERMISSION_FAILED; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return CHECK_PERMISSION_FAILED; @@ -1699,7 +1699,7 @@ int AbilityManagerService::StartAbilityForOptionInner(const Want &want, const St auto result = interceptorExecuter_ == nullptr ? ERR_INVALID_VALUE : interceptorExecuter_->DoProcess(interceptorParam); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ is nullptr or DoProcess return error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ null or doProcess error"); eventInfo.errCode = result; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return result; @@ -1720,7 +1720,7 @@ int AbilityManagerService::StartAbilityForOptionInner(const Want &want, const St callerToken, true, specifyTokenId); } if (!JudgeMultiUserConcurrency(validUserId)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Multi-user non-concurrent unsatisfied"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "multi-user non-concurrent unsatisfied"); eventInfo.errCode = ERR_INVALID_VALUE; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_CROSS_USER; @@ -1754,7 +1754,7 @@ int AbilityManagerService::StartAbilityForOptionInner(const Want &want, const St result = implicitStartProcessor_->ImplicitStartAbility(abilityRequest, validUserId, startOptions.GetWindowMode()); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "implicit start ability error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "implicit start ability error"); eventInfo.errCode = result; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); } @@ -1766,7 +1766,7 @@ int AbilityManagerService::StartAbilityForOptionInner(const Want &want, const St #endif result = GenerateAbilityRequest(want, requestCode, abilityRequest, callerToken, validUserId); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Generate ability request local error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "generate ability request local error"); eventInfo.errCode = result; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return result; @@ -1787,21 +1787,21 @@ int AbilityManagerService::StartAbilityForOptionInner(const Want &want, const St result = CheckStaticCfgPermission(abilityRequest, isStartAsCaller, abilityRequest.want.GetIntParam(Want::PARAM_RESV_CALLER_TOKEN, 0), false, false, isImplicit); if (result != AppExecFwk::Constants::PERMISSION_GRANTED) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "CheckStaticCfgPermission error, result is %{public}d.", result); + TAG_LOGE(AAFwkTag::ABILITYMGR, "checkStaticCfgPermission error, result=%{public}d", result); eventInfo.errCode = result; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_STATIC_CFG_PERMISSION; } result = CheckCallAbilityPermission(abilityRequest, 0, isCallByShortcut); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s CheckCallAbilityPermission error.", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s CheckCallAbilityPermission error", __func__); eventInfo.errCode = result; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return result; } if (abilityInfo.type != AppExecFwk::AbilityType::PAGE) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Only support for page type ability."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "only support page type ability"); eventInfo.errCode = ERR_INVALID_VALUE; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_INVALID_VALUE; @@ -1810,7 +1810,7 @@ int AbilityManagerService::StartAbilityForOptionInner(const Want &want, const St if (!AbilityUtil::IsSystemDialogAbility(abilityInfo.bundleName, abilityInfo.name)) { result = PreLoadAppDataAbilities(abilityInfo.bundleName, validUserId); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "StartAbility: App data ability preloading failed, '%{public}s', %{public}d", + TAG_LOGE(AAFwkTag::ABILITYMGR, "startAbility:app data ability preloading failed, '%{public}s', %{public}d", abilityInfo.bundleName.c_str(), result); eventInfo.errCode = result; @@ -1858,7 +1858,7 @@ int AbilityManagerService::StartAbilityForOptionInner(const Want &want, const St bool isReplaceWantExist = newWant.GetBoolParam("queryWantFromErms", false); newWant.RemoveParam("queryWantFromErms"); if (result != ERR_OK && isReplaceWantExist == false) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "DoProcess failed or replaceWant not exist"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "doProcess failed or replaceWant absent"); return result; } #ifdef SUPPORT_SCREEN @@ -1892,7 +1892,7 @@ int AbilityManagerService::StartAbilityForOptionInner(const Want &want, const St } auto missionListManager = GetMissionListManagerByUserId(oriValidUserId); if (missionListManager == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "missionListManager is Null. userId=%{public}d", oriValidUserId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "missionListManager null userId=%{public}d", oriValidUserId); eventInfo.errCode = ERR_INVALID_VALUE; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_INVALID_VALUE; @@ -1911,11 +1911,11 @@ int32_t AbilityManagerService::RequestDialogService(const Want &want, const sptr HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); auto flags = want.GetFlags(); if ((flags & Want::FLAG_ABILITY_CONTINUATION) == Want::FLAG_ABILITY_CONTINUATION) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "RequestDialogService with continuation flags is not allowed!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "requestDialogService with continuation flags not allowed"); return ERR_INVALID_CONTINUATION_FLAG; } - TAG_LOGI(AAFwkTag::ABILITYMGR, "request dialog service, target is %{public}s", want.GetElement().GetURI().c_str()); + TAG_LOGI(AAFwkTag::ABILITYMGR, "request dialog service, target:%{public}s", want.GetElement().GetURI().c_str()); return RequestDialogServiceInner(want, callerToken, -1, -1); } @@ -1923,13 +1923,13 @@ int32_t AbilityManagerService::ReportDrawnCompleted(const sptr &c { TAG_LOGD(AAFwkTag::ABILITYMGR, "called"); if (callerToken == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken null"); return INNER_ERR; } auto abilityRecord = Token::GetAbilityRecordByToken(callerToken); if (abilityRecord == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityRecord is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityRecord null"); return INNER_ERR; } auto abilityInfo = abilityRecord->GetAbilityInfo(); @@ -1949,7 +1949,7 @@ int32_t AbilityManagerService::RequestDialogServiceInner(const Want &want, const { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); if (callerToken == nullptr || !VerificationAllToken(callerToken)) { - TAG_LOGW(AAFwkTag::ABILITYMGR, "caller is invalid."); + TAG_LOGW(AAFwkTag::ABILITYMGR, "caller invalid"); return ERR_INVALID_CALLER; } @@ -1958,12 +1958,12 @@ int32_t AbilityManagerService::RequestDialogServiceInner(const Want &want, const HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, "CHECK_DLP"); if (!DlpUtils::OtherAppsAccessDlpCheck(callerToken, want) || !DlpUtils::DlpAccessOtherAppsCheck(callerToken, want)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s: Permission verification failed.", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s: permission verification failed", __func__); return CHECK_PERMISSION_FAILED; } if (AbilityUtil::HandleDlpApp(const_cast(want))) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Cannot handle dlp by RequestDialogService."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "cannot handle dlp by requestDialogService"); return ERR_WRONG_INTERFACE_CALL; } #endif // WITH_DLP @@ -1976,18 +1976,18 @@ int32_t AbilityManagerService::RequestDialogServiceInner(const Want &want, const auto result = interceptorExecuter_ == nullptr ? ERR_INVALID_VALUE : interceptorExecuter_->DoProcess(interceptorParam); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ is nullptr or DoProcess return error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ null or DoProcess error"); return result; } if (!JudgeMultiUserConcurrency(validUserId)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Multi-user non-concurrent unsatisfied"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "multi-user non-concurrent unsatisfied"); return ERR_CROSS_USER; } AbilityRequest abilityRequest; result = GenerateExtensionAbilityRequest(want, abilityRequest, callerToken, validUserId); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Generate ability request local error when RequestDialogService."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "generate ability request local error when requestDialogService"); return result; } UpdateCallerInfo(abilityRequest.want, callerToken); @@ -1999,7 +1999,7 @@ int32_t AbilityManagerService::RequestDialogServiceInner(const Want &want, const result = CheckStaticCfgPermission(abilityRequest, false, -1); if (result != AppExecFwk::Constants::PERMISSION_GRANTED) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "CheckStaticCfgPermission error, result is %{public}d.", result); + TAG_LOGE(AAFwkTag::ABILITYMGR, "checkStaticCfgPermission error, result:%{public}d", result); return ERR_STATIC_CFG_PERMISSION; } @@ -2009,11 +2009,11 @@ int32_t AbilityManagerService::RequestDialogServiceInner(const Want &want, const TAG_LOGD(AAFwkTag::ABILITYMGR, "Check call ability permission, name is %{public}s.", abilityInfo.name.c_str()); result = CheckCallServicePermission(abilityRequest); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Check permission failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "check permission failed"); return result; } } else { - TAG_LOGE(AAFwkTag::ABILITYMGR, "RequestDialogService do not support other component."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "requestDialogService no support other component"); return ERR_WRONG_INTERFACE_CALL; } @@ -2022,13 +2022,13 @@ int32_t AbilityManagerService::RequestDialogServiceInner(const Want &want, const result = afterCheckExecuter_ == nullptr ? ERR_INVALID_VALUE : afterCheckExecuter_->DoProcess(afterCheckParam); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "afterCheckExecuter_ is nullptr or DoProcess return error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "afterCheckExecuter_ null or DoProcess error"); return result; } auto connectManager = GetConnectManagerByUserId(validUserId); if (!connectManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager is nullptr. userId=%{public}d", validUserId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager null userId=%{public}d", validUserId); return ERR_INVALID_VALUE; } TAG_LOGD(AAFwkTag::ABILITYMGR, @@ -2043,7 +2043,7 @@ int32_t AbilityManagerService::OpenAtomicService(AAFwk::Want& want, const StartO auto accessTokenId = IPCSkeleton::GetCallingTokenID(); auto type = Security::AccessToken::AccessTokenKit::GetTokenTypeFlag(accessTokenId); if (type != Security::AccessToken::TypeATokenTypeEnum::TOKEN_HAP) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "The caller is not hap."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "caller not hap"); return CHECK_PERMISSION_FAILED; } want.SetParam(AAFwk::SCREEN_MODE_KEY, AAFwk::ScreenMode::JUMP_SCREEN_MODE); @@ -2053,14 +2053,14 @@ int32_t AbilityManagerService::OpenAtomicService(AAFwk::Want& want, const StartO int AbilityManagerService::StartUIAbilityBySCB(sptr sessionInfo, bool &isColdStart, uint32_t sceneFlag) { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); - TAG_LOGI(AAFwkTag::ABILITYMGR, "Call, sceneFlag: %{public}u", sceneFlag); + TAG_LOGI(AAFwkTag::ABILITYMGR, "call, sceneFlag:%{public}u", sceneFlag); if (sessionInfo == nullptr || sessionInfo->sessionToken == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "sessionInfo is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "sessionInfo null"); return ERR_INVALID_VALUE; } if (!IsCallerSceneBoard()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not sceneboard called, not allowed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "no sceneboard, no allowed"); return ERR_WRONG_INTERFACE_CALL; } @@ -2076,12 +2076,12 @@ int AbilityManagerService::StartUIAbilityBySCB(sptr sessionInfo, bo TAG_LOGI(AAFwkTag::ABILITYMGR, "sessionId=%{public}s", sessionId.c_str()); if (freeInstallManager_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "freeInstallManager_ is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "freeInstallManager_ null"); return ERR_INVALID_VALUE; } FreeInstallInfo taskInfo; if (!freeInstallManager_->GetFreeInstallTaskInfo(sessionId, taskInfo)) { - TAG_LOGW(AAFwkTag::ABILITYMGR, "failed to find free install task"); + TAG_LOGW(AAFwkTag::ABILITYMGR, "failed find free install task"); if ((sessionInfo->want).GetElement().GetAbilityName().empty() || (sessionInfo->want).GetElement().GetModuleName().empty()) { auto bundleMgrHelper = AbilityUtil::GetBundleManagerHelper(); @@ -2090,7 +2090,7 @@ int AbilityManagerService::StartUIAbilityBySCB(sptr sessionInfo, bo auto errCode = IN_PROCESS_CALL(bundleMgrHelper->GetLaunchWantForBundle( (sessionInfo->want).GetBundle(), launchWant, GetValidUserId(sessionInfo->userId))); if (errCode != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "GetLaunchWantForBundle returns %{public}d.", errCode); + TAG_LOGE(AAFwkTag::ABILITYMGR, "getLaunchWantForBundle returns %{public}d", errCode); return errCode; } (sessionInfo->want).SetElement(launchWant.GetElement()); @@ -2099,7 +2099,7 @@ int AbilityManagerService::StartUIAbilityBySCB(sptr sessionInfo, bo } if (taskInfo.isFreeInstallFinished) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "free install task is already finished"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "free install task finished"); if (!taskInfo.isInstalled) { TAG_LOGE(AAFwkTag::ABILITYMGR, "free install task failed,resultCode=%{public}d", taskInfo.resultCode); @@ -2108,7 +2108,7 @@ int AbilityManagerService::StartUIAbilityBySCB(sptr sessionInfo, bo TAG_LOGI(AAFwkTag::ABILITYMGR, "free install succeeds"); auto err = StartUIAbilityByPreInstallInner(sessionInfo, taskInfo.specifyTokenId, sceneFlag, isColdStart); if (err != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "StartUIAbilityByPreInstallInner failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "startUIAbilityByPreInstallInner failed"); } return err; } @@ -2118,7 +2118,7 @@ int AbilityManagerService::StartUIAbilityBySCB(sptr sessionInfo, bo preStartSessionMap_.insert(std::make_pair(sessionId, sessionInfo)); } - TAG_LOGI(AAFwkTag::ABILITYMGR, "free install task is still in progress"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "free install task in progress"); const Want& want = sessionInfo->want; freeInstallManager_->SetSCBCallStatus(want.GetElement().GetBundleName(), want.GetElement().GetAbilityName(), want.GetStringParam(Want::PARAM_RESV_START_TIME), true); @@ -2153,7 +2153,7 @@ int AbilityManagerService::StartUIAbilityBySCBDefault(sptr sessionI auto result = interceptorExecuter_ == nullptr ? ERR_INVALID_VALUE : interceptorExecuter_->DoProcess(interceptorParam); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ is nullptr or DoProcess return error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ null or DoProcess error"); eventInfo.errCode = result; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return result; @@ -2164,7 +2164,7 @@ int AbilityManagerService::StartUIAbilityBySCBDefault(sptr sessionI auto result = GenerateAbilityRequest(sessionInfo->want, requestCode, abilityRequest, sessionInfo->callerToken, currentUserId); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Generate ability request local error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "generate ability request local error"); return result; } @@ -2188,7 +2188,7 @@ int AbilityManagerService::StartUIAbilityBySCBDefault(sptr sessionI auto abilityInfo = abilityRequest.abilityInfo; if (!AAFwk::PermissionVerification::GetInstance()->IsSystemAppCall() && abilityInfo.type != AppExecFwk::AbilityType::PAGE) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Only support for page type ability."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "only support page type ability"); return ERR_INVALID_VALUE; } @@ -2207,7 +2207,7 @@ int AbilityManagerService::StartUIAbilityBySCBDefault(sptr sessionI newWant.RemoveParam("queryWantFromErms"); if (result != ERR_OK) { if (isReplaceWantExist == false) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "DoProcess failed or replaceWant not exist"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "doProcess failed or replaceWant absent"); return result; } return DialogSessionManager::GetInstance().HandleErmsResultBySCB(abilityRequest, newWant); @@ -2224,7 +2224,7 @@ int32_t AbilityManagerService::StartUIAbilityBySCBDefaultCommon(AbilityRequest & if (!AbilityUtil::IsSystemDialogAbility(abilityInfo.bundleName, abilityInfo.name)) { int32_t result = PreLoadAppDataAbilities(abilityInfo.bundleName, IPCSkeleton::GetCallingUid() / BASE_USER_RANGE); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "StartAbility: App data ability preloading failed, '%{public}s', %{public}d", + TAG_LOGE(AAFwkTag::ABILITYMGR, "startAbility: app data ability preloading failed, '%{public}s', %{public}d", abilityInfo.bundleName.c_str(), result); return result; } @@ -2257,7 +2257,7 @@ bool AbilityManagerService::CheckCallingTokenId(const std::string &bundleName, i appIndex, validUserId, appInfo)); auto accessTokenId = IPCSkeleton::GetCallingTokenID(); if (accessTokenId != appInfo.accessTokenId) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verification failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verification failed"); return false; } return true; @@ -2296,7 +2296,7 @@ bool AbilityManagerService::IsDmsAlive() const void AbilityManagerService::AppUpgradeCompleted(const std::string &bundleName, int32_t uid) { if (!AAFwk::PermissionVerification::GetInstance()->IsSACall()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not sa call"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "not sa call"); return; } @@ -2307,19 +2307,19 @@ void AbilityManagerService::AppUpgradeCompleted(const std::string &bundleName, i AppExecFwk::BundleInfo bundleInfo; if (!IN_PROCESS_CALL( bms->GetBundleInfo(bundleName, AppExecFwk::BundleFlag::GET_BUNDLE_WITH_ABILITIES, bundleInfo, userId))) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Failed to get bundle info."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "failed get bundle info"); return; } if (userId != U0_USER_ID) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Application upgrade for non U0 users."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "non U0 users application upgrade"); return; } bool keepAliveEnable = bundleInfo.isKeepAlive; AmsResidentProcessRdb::GetInstance().GetResidentProcessEnable(bundleInfo.name, keepAliveEnable); if (!keepAliveEnable) { - TAG_LOGW(AAFwkTag::ABILITYMGR, "Not a resident application."); + TAG_LOGW(AAFwkTag::ABILITYMGR, "not resident application"); return; } @@ -2333,7 +2333,7 @@ void AbilityManagerService::AppUpgradeCompleted(const std::string &bundleName, i int32_t AbilityManagerService::RecordAppExitReason(const ExitReason &exitReason) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "RecordAppExitReason reason:%{public}d, exitMsg: %{public}s", exitReason.reason, + TAG_LOGI(AAFwkTag::ABILITYMGR, "recordAppExitReason reason:%{public}d, exitMsg:%{public}s", exitReason.reason, exitReason.exitMsg.c_str()); CHECK_POINTER_AND_RETURN(appExitReasonHelper_, ERR_NULL_OBJECT); @@ -2342,12 +2342,12 @@ int32_t AbilityManagerService::RecordAppExitReason(const ExitReason &exitReason) int32_t AbilityManagerService::RecordProcessExitReason(const int32_t pid, const ExitReason &exitReason) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "RecordProcessExitReason pid:%{public}d, reason:%{public}d, exitMsg: %{public}s", + TAG_LOGI(AAFwkTag::ABILITYMGR, "recordProcessExitReason pid:%{public}d, reason:%{public}d, exitMsg:%{public}s", pid, exitReason.reason, exitReason.exitMsg.c_str()); if (!AAFwk::PermissionVerification::GetInstance()->IsSACall() && !AAFwk::PermissionVerification::GetInstance()->IsShellCall()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not sa call"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "not sa call"); return ERR_PERMISSION_DENIED; } @@ -2357,12 +2357,12 @@ int32_t AbilityManagerService::RecordProcessExitReason(const int32_t pid, const int32_t AbilityManagerService::ForceExitApp(const int32_t pid, const ExitReason &exitReason) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "ForceExitApp pid:%{public}d, reason:%{public}d, exitMsg: %{public}s", + TAG_LOGI(AAFwkTag::ABILITYMGR, "forceExitApp pid:%{public}d, reason:%{public}d, exitMsg:%{public}s", pid, exitReason.reason, exitReason.exitMsg.c_str()); if (!AAFwk::PermissionVerification::GetInstance()->IsSACall() && !AAFwk::PermissionVerification::GetInstance()->IsShellCall()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not sa or shell call"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "not sa or shell call"); return ERR_PERMISSION_DENIED; } @@ -2371,7 +2371,7 @@ int32_t AbilityManagerService::ForceExitApp(const int32_t pid, const ExitReason auto ret = IN_PROCESS_CALL(DelayedSingleton::GetInstance()->GetApplicationInfoByProcessID(pid, application, debug)); if (ret != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "GetApplicationInfoByProcessID failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "getApplicationInfoByProcessID failed"); return ret; } @@ -2389,7 +2389,7 @@ int32_t AbilityManagerService::GetConfiguration(AppExecFwk::Configuration& confi { auto appMgr = GetAppMgr(); if (appMgr == nullptr) { - TAG_LOGW(AAFwkTag::ABILITYMGR, "GetAppMgr failed"); + TAG_LOGW(AAFwkTag::ABILITYMGR, "getAppMgr failed"); return -1; } @@ -2418,19 +2418,19 @@ int AbilityManagerService::CheckOptExtensionAbility(const Want &want, AbilityReq auto abilityInfo = abilityRequest.abilityInfo; auto type = abilityInfo.type; if (type != AppExecFwk::AbilityType::EXTENSION) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not extension ability, not allowed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "not extension ability"); return ERR_WRONG_INTERFACE_CALL; } if (extensionType != AppExecFwk::ExtensionAbilityType::UNSPECIFIED && extensionType != abilityInfo.extensionAbilityType) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Extension ability type not match, set type: %{public}d, real type: %{public}d", + TAG_LOGE(AAFwkTag::ABILITYMGR, "extension ability type not match, set type:%{public}d, real type: %{public}d", static_cast(extensionType), static_cast(abilityInfo.extensionAbilityType)); return ERR_WRONG_INTERFACE_CALL; } auto result = CheckStaticCfgPermission(abilityRequest, false, -1, false, false, isImplicit); if (result != AppExecFwk::Constants::PERMISSION_GRANTED) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "CheckStaticCfgPermission error, result is %{public}d.", result); + TAG_LOGE(AAFwkTag::ABILITYMGR, "checkStaticCfgPermission error, result=%{public}d", result); return ERR_STATIC_CFG_PERMISSION; } @@ -2510,11 +2510,11 @@ void AbilityManagerService::SubscribeBackgroundTask() } int ret = BackgroundTaskMgrHelper::SubscribeBackgroundTask(*bgtaskObserver_); if (ret != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s failed, err:%{public}d.", __func__, ret); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s failed, err:%{public}d", __func__, ret); return; } bgtaskObserver_->GetContinuousTaskApps(); - TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s success.", __func__); + TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s success", __func__); #endif } @@ -2525,15 +2525,15 @@ void AbilityManagerService::UnSubscribeBackgroundTask() if (!bgtaskObserver_) { return; } - TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s success.", __func__); + TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s success", __func__); #endif } void AbilityManagerService::SubscribeBundleEventCallback() { - TAG_LOGI(AAFwkTag::ABILITYMGR, "SubscribeBundleEventCallback begin."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "subscribeBundleEventCallback begin"); if (taskHandler_) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "submit StartResidentApps task."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "submit startResidentApps task"); auto startResidentAppsTask = [aams = shared_from_this()]() { aams->StartResidentApps(); }; taskHandler_->SubmitTask(startResidentAppsTask, "StartResidentApps"); } @@ -2549,10 +2549,10 @@ void AbilityManagerService::SubscribeBundleEventCallback() if (bms) { bool ret = IN_PROCESS_CALL(bms->RegisterBundleEventCallback(abilityBundleEventCallback_)); if (!ret) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "RegisterBundleEventCallback failed!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "registerBundleEventCallback failed"); } } else { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get BundleManager failed!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "get bundleManager failed"); } TAG_LOGD(AAFwkTag::ABILITYMGR, "SubscribeBundleEventCallback success."); } @@ -2662,7 +2662,7 @@ int AbilityManagerService::PreloadUIExtensionAbility(const Want &want, std::stri CHECK_CALLER_IS_SYSTEM_APP; if (!PermissionVerification::GetInstance()->VerifyCallingPermission( PermissionConstants::PERMISSION_PRELOAD_UI_EXTENSION_ABILITY)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission %{public}s verification failed.", + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission %{public}s verification failed", PermissionConstants::PERMISSION_PRELOAD_UI_EXTENSION_ABILITY); return ERR_PERMISSION_DENIED; } @@ -2678,7 +2678,7 @@ int AbilityManagerService::PreloadUIExtensionAbilityInner(const Want &want, std: ErrCode result = ERR_OK; result = GenerateExtensionAbilityRequest(want, abilityRequest, nullptr, validUserId); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Generate abilityReq error"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "generate abilityReq error"); return result; } abilityRequest.extensionType = abilityRequest.abilityInfo.extensionAbilityType; @@ -2686,12 +2686,12 @@ int AbilityManagerService::PreloadUIExtensionAbilityInner(const Want &want, std: auto abilityInfo = abilityRequest.abilityInfo; auto res = JudgeAbilityVisibleControl(abilityInfo); if (res != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Target ability is invisible"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "target ability invisible"); return res; } auto connectManager = GetConnectManagerByUserId(validUserId); if (connectManager == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager is nullptr, userId: %{public}d", validUserId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager null, userId:%{public}d", validUserId); return ERR_INVALID_VALUE; } return connectManager->PreloadUIExtensionAbilityLocked(abilityRequest, hostBundleName); @@ -2700,10 +2700,10 @@ int AbilityManagerService::PreloadUIExtensionAbilityInner(const Want &want, std: int AbilityManagerService::UnloadUIExtensionAbility(const std::shared_ptr &abilityRecord, std::string &hostBundleName) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "Call."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "call"); auto connectManager = GetConnectManagerByToken(abilityRecord->GetToken()); if (connectManager == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager null"); return ERR_INVALID_VALUE; } return connectManager->UnloadUIExtensionAbility(abilityRecord, hostBundleName); @@ -2723,7 +2723,7 @@ int AbilityManagerService::RequestModalUIExtensionInner(Want want) // Gets the record corresponding to the current focus appliaction auto record = Token::GetAbilityRecordByToken(token); if (!record) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Record is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "record null"); return ERR_INVALID_VALUE; } @@ -2736,7 +2736,7 @@ int AbilityManagerService::RequestModalUIExtensionInner(Want want) std::string callerName = want.GetParams().GetStringParam("bundleName"); TAG_LOGI(AAFwkTag::ABILITYMGR, - "focusbundlename: %{public}s, callerbundlename: %{public}s.", + "focusbundlename: %{public}s, callerbundlename: %{public}s", focusName.c_str(), callerName.c_str()); // Compare @@ -2746,7 +2746,7 @@ int AbilityManagerService::RequestModalUIExtensionInner(Want want) return record->CreateModalUIExtension(want); } } else { - TAG_LOGW(AAFwkTag::ABILITYMGR, "token is nullptr."); + TAG_LOGW(AAFwkTag::ABILITYMGR, "token null"); } TAG_LOGD(AAFwkTag::ABILITYMGR, "Window Modal System Create UIExtension is called!"); @@ -2759,7 +2759,7 @@ int AbilityManagerService::ChangeAbilityVisibility(sptr token, bo { bool isEnable = AppUtils::GetInstance().IsStartOptionsWithProcessOptions(); if (!Rosen::SceneBoardJudgement::IsSceneBoardEnabled() || !isEnable) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Capability not support."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "capability not support"); return ERR_CAPABILITY_NOT_SUPPORT; } auto uiAbilityManager = GetUIAbilityManagerByUid(IPCSkeleton::GetCallingUid()); @@ -2770,7 +2770,7 @@ int AbilityManagerService::ChangeAbilityVisibility(sptr token, bo int AbilityManagerService::ChangeUIAbilityVisibilityBySCB(sptr sessionInfo, bool isShow) { if (!IsCallerSceneBoard()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not sceneboard called, not allowed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "no sceneboard, no allowed"); return ERR_WRONG_INTERFACE_CALL; } auto uiAbilityManager = GetUIAbilityManagerByUid(IPCSkeleton::GetCallingUid()); @@ -2796,13 +2796,13 @@ int AbilityManagerService::StartExtensionAbilityInner(const Want &want, const sp #ifdef WITH_DLP result = CheckDlpForExtension(want, callerToken, userId, eventInfo, EventName::START_EXTENSION_ERROR); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "CheckDlpForExtension error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "CheckDlpForExtension error"); return result; } #endif // WITH_DLP if (callerToken != nullptr && !VerificationAllToken(callerToken)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s VerificationAllToken failed.", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s verificationAllToken failed", __func__); eventInfo.errCode = ERR_INVALID_VALUE; EventReport::SendExtensionEvent(EventName::START_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_INVALID_CALLER; @@ -2818,14 +2818,14 @@ int AbilityManagerService::StartExtensionAbilityInner(const Want &want, const sp result = interceptorExecuter_ == nullptr ? ERR_INVALID_VALUE : interceptorExecuter_->DoProcess(interceptorParam); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ is nullptr or DoProcess return error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ null or doProcess error"); eventInfo.errCode = result; SendAbilityEvent(EventName::START_ABILITY_ERROR, HiSysEventType::FAULT, eventInfo); return result; } if (!JudgeMultiUserConcurrency(validUserId)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Multi-user non-concurrent unsatisfied"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "multi-user non-concurrent unsatisfied"); eventInfo.errCode = ERR_INVALID_VALUE; EventReport::SendExtensionEvent(EventName::START_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_CROSS_USER; @@ -2840,7 +2840,7 @@ int AbilityManagerService::StartExtensionAbilityInner(const Want &want, const sp CHECK_POINTER_AND_RETURN(implicitStartProcessor_, ERR_IMPLICIT_START_ABILITY_FAIL); result = implicitStartProcessor_->ImplicitStartAbility(abilityRequest, validUserId); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "implicit start ability error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "implicit start ability error"); eventInfo.errCode = result; EventReport::SendExtensionEvent(EventName::START_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); } @@ -2849,7 +2849,7 @@ int AbilityManagerService::StartExtensionAbilityInner(const Want &want, const sp #endif result = GenerateExtensionAbilityRequest(want, abilityRequest, callerToken, validUserId); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Generate ability request local error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "generate ability request local error"); eventInfo.errCode = result; EventReport::SendExtensionEvent(EventName::START_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return result; @@ -2868,7 +2868,7 @@ int AbilityManagerService::StartExtensionAbilityInner(const Want &want, const sp CheckOptExtensionAbility(want, abilityRequest, validUserId, extensionType, isImplicit)) : CheckOptExtensionAbility(want, abilityRequest, validUserId, extensionType, isImplicit); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "CheckOptExtensionAbility error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "checkOptExtensionAbility error"); eventInfo.errCode = result; EventReport::SendExtensionEvent(EventName::START_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return result; @@ -2880,13 +2880,13 @@ int AbilityManagerService::StartExtensionAbilityInner(const Want &want, const sp result = afterCheckExecuter_ == nullptr ? ERR_INVALID_VALUE : afterCheckExecuter_->DoProcess(afterCheckParam); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "afterCheckExecuter_ is nullptr or DoProcess return error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "afterCheckExecuter_ null or doProcess error"); return result; } auto connectManager = GetConnectManagerByUserId(validUserId); if (!connectManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager is nullptr. userId=%{public}d", validUserId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager null userId=%{public}d", validUserId); eventInfo.errCode = ERR_INVALID_VALUE; EventReport::SendExtensionEvent(EventName::START_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_INVALID_VALUE; @@ -2927,7 +2927,7 @@ void AbilityManagerService::SetPickerElementName(const sptr &extens auto pickerMap = AmsConfigurationParameter::GetInstance().GetPickerMap(); auto it = pickerMap.find(targetType); if (it == pickerMap.end()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "can not find the targetType: %{public}s", targetType.c_str()); + TAG_LOGE(AAFwkTag::ABILITYMGR, "can not find targetType:%{public}s", targetType.c_str()); return; } pickerType = it->second; @@ -2941,7 +2941,7 @@ void AbilityManagerService::SetPickerElementName(const sptr &extens validUserId, extensionInfos)); if (ret != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "QueryExtensionAbilityInfosOnlyWithTypeName failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "queryExtensionAbilityInfosOnlyWithTypeName failed"); return; } abilityName = extensionInfos[0].name; @@ -2970,7 +2970,7 @@ void AbilityManagerService::SetAutoFillElementName(const sptr &exte } if (argList.size() != ARGC_THREE) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Parse auto fill extension element name failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "parse extension element name failed"); return; } extensionSessionInfo->want.SetElementName(argList[INDEX_ZERO], argList[INDEX_TWO]); @@ -2987,7 +2987,7 @@ int AbilityManagerService::CheckUIExtensionUsage(AppExecFwk::UIExtensionUsage ui if (uiExtensionUsage == UIExtensionUsage::CONSTRAINED_EMBEDDED && !AAFwk::UIExtensionUtils::IsPublicForConstrainedEmbedded(extensionType)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "error extension type %u for SecureConstrainedEmbedded.", extensionType); + TAG_LOGE(AAFwkTag::ABILITYMGR, "secureConstrainedEmbedded extension type error:%u.", extensionType); return ERR_INVALID_VALUE; } return ERR_OK; @@ -3004,7 +3004,7 @@ int AbilityManagerService::StartUIExtensionAbility(const sptr &exte if (extensionSessionInfo->want.HasParameter(AAFwk::SCREEN_MODE_KEY)) { int32_t screenMode = extensionSessionInfo->want.GetIntParam(AAFwk::SCREEN_MODE_KEY, AAFwk::IDLE_SCREEN_MODE); if (screenMode != AAFwk::EMBEDDED_FULL_SCREEN_MODE) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Only support embedded pull-ups"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "only support embedded pull-ups"); return ERR_INVALID_VALUE; } auto bms = GetBundleManager(); @@ -3012,16 +3012,16 @@ int AbilityManagerService::StartUIExtensionAbility(const sptr &exte AppExecFwk::BundleInfo bundleInfo; if (!IN_PROCESS_CALL(bms->GetBundleInfo(extensionSessionInfo->want.GetBundle(), AppExecFwk::BundleFlag::GET_BUNDLE_WITH_ABILITIES, bundleInfo, GetValidUserId(userId)))) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "VerifyPermission failed to get application info"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "verifyPermission failed get application info"); return CHECK_PERMISSION_FAILED; } if (bundleInfo.applicationInfo.bundleType != AppExecFwk::BundleType::ATOMIC_SERVICE) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Only support atomicService"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "only support atomicService"); return ERR_INVALID_CALLER; } if (extensionSessionInfo->want.GetElement().GetAbilityName().empty()) { if (bundleInfo.abilityInfos.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "failed to get abilityInfos"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "failed get abilityInfos"); return ERR_INVALID_VALUE; } extensionSessionInfo->want.SetElementName(bundleInfo.name, bundleInfo.abilityInfos.begin()->name); @@ -3032,7 +3032,7 @@ int AbilityManagerService::StartUIExtensionAbility(const sptr &exte AppExecFwk::ExtensionAbilityType extensionType = extensionTypeStr.empty() ? AppExecFwk::ExtensionAbilityType::UI : AppExecFwk::ConvertToExtensionAbilityType(extensionTypeStr); if (extensionType == AppExecFwk::ExtensionAbilityType::UNSPECIFIED) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Input extension ability type is invalid."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "input extension ability type invalid"); return ERR_INVALID_VALUE; } EventInfo eventInfo = BuildEventInfo(extensionSessionInfo->want, userId); @@ -3040,7 +3040,7 @@ int AbilityManagerService::StartUIExtensionAbility(const sptr &exte auto ret = CheckUIExtensionUsage(extensionSessionInfo->uiExtensionUsage, extensionType); if (ret != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "check usage failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "check usage failed"); return ret; } @@ -3058,7 +3058,7 @@ int AbilityManagerService::StartUIExtensionAbility(const sptr &exte if (!DlpUtils::OtherAppsAccessDlpCheck(callerToken, extensionSessionInfo->want) || VerifyAccountPermission(userId) == CHECK_PERMISSION_FAILED || !DlpUtils::DlpAccessOtherAppsCheck(callerToken, extensionSessionInfo->want)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "StartUIExtensionAbility: Permission verification failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "startUIExtensionAbility: permission verification failed"); eventInfo.errCode = CHECK_PERMISSION_FAILED; EventReport::SendExtensionEvent(EventName::START_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return CHECK_PERMISSION_FAILED; @@ -3066,7 +3066,7 @@ int AbilityManagerService::StartUIExtensionAbility(const sptr &exte #endif // WITH_DLP if (callerToken != nullptr && !VerificationAllToken(callerToken)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "StartUIExtensionAbility VerificationAllToken failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "startUIExtensionAbility verificationAllToken failed"); eventInfo.errCode = ERR_INVALID_VALUE; EventReport::SendExtensionEvent(EventName::START_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_INVALID_CALLER; @@ -3074,7 +3074,7 @@ int AbilityManagerService::StartUIExtensionAbility(const sptr &exte auto callerRecord = Token::GetAbilityRecordByToken(callerToken); if (callerRecord == nullptr || !JudgeSelfCalled(callerRecord)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid callerToken."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid callerToken"); eventInfo.errCode = ERR_INVALID_VALUE; EventReport::SendExtensionEvent(EventName::START_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_INVALID_CALLER; @@ -3085,7 +3085,7 @@ int AbilityManagerService::StartUIExtensionAbility(const sptr &exte auto result = interceptorExecuter_ == nullptr ? ERR_INVALID_VALUE : interceptorExecuter_->DoProcess(interceptorParam); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ is nullptr or DoProcess return error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ null or doProcess error"); eventInfo.errCode = result; EventReport::SendExtensionEvent(EventName::START_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return result; @@ -3093,14 +3093,14 @@ int AbilityManagerService::StartUIExtensionAbility(const sptr &exte int32_t validUserId = GetValidUserId(userId); if (!JudgeMultiUserConcurrency(validUserId)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Multi-user non-concurrent unsatisfied"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "multi-user non-concurrent unsatisfied"); eventInfo.errCode = ERR_INVALID_VALUE; EventReport::SendExtensionEvent(EventName::START_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_INVALID_VALUE; } #ifdef SUPPORT_GRAPHICS if (ImplicitStartProcessor::IsImplicitStartAction(extensionSessionInfo->want)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "UI extension ability donot support implicit start."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "UI extension ability not support implicit start"); eventInfo.errCode = ERR_INVALID_VALUE; EventReport::SendExtensionEvent(EventName::START_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_INVALID_VALUE; @@ -3118,7 +3118,7 @@ int AbilityManagerService::StartUIExtensionAbility(const sptr &exte TAG_LOGD(AAFwkTag::ABILITYMGR, "UIExtension component id: %{public}" PRId64 ", element: %{public}s.", abilityRequest.sessionInfo->uiExtensionComponentId, extensionSessionInfo->want.GetElement().GetURI().c_str()); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Generate ability request local error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "generate ability request local error"); eventInfo.errCode = result; EventReport::SendExtensionEvent(EventName::START_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return result; @@ -3135,7 +3135,7 @@ int AbilityManagerService::StartUIExtensionAbility(const sptr &exte result = CheckOptExtensionAbility(extensionSessionInfo->want, abilityRequest, validUserId, extensionType); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "CheckOptExtensionAbility error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "checkOptExtensionAbility error"); eventInfo.errCode = result; EventReport::SendExtensionEvent(EventName::START_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return result; @@ -3148,7 +3148,7 @@ int AbilityManagerService::StartUIExtensionAbility(const sptr &exte result = JudgeAbilityVisibleControl(abilityInfo); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "JudgeAbilityVisibleControl error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "judgeAbilityVisibleControl error"); eventInfo.errCode = result; EventReport::SendExtensionEvent(EventName::START_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return result; @@ -3159,13 +3159,13 @@ int AbilityManagerService::StartUIExtensionAbility(const sptr &exte result = afterCheckExecuter_ == nullptr ? ERR_INVALID_VALUE : afterCheckExecuter_->DoProcess(afterCheckParam); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "afterCheckExecuter_ is nullptr or DoProcess return error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "afterCheckExecuter_ null or doProcess error"); return result; } auto connectManager = GetConnectManagerByUserId(validUserId); if (!connectManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager is nullptr. userId=%{public}d", validUserId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager null userId=%{public}d", validUserId); eventInfo.errCode = ERR_INVALID_VALUE; EventReport::SendExtensionEvent(EventName::START_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_INVALID_VALUE; @@ -3195,15 +3195,15 @@ int AbilityManagerService::StopExtensionAbility(const Want &want, const sptrCheckSpecificSystemAbilityAccessPermission(DMS_PROCESS_NAME)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "VerificationAllToken failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "verificationAllToken failed"); eventInfo.errCode = ERR_INVALID_VALUE; EventReport::SendExtensionEvent(EventName::STOP_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_INVALID_CALLER; @@ -3213,7 +3213,7 @@ int AbilityManagerService::StopExtensionAbility(const Want &want, const sptrGetFreezingNewUserId() == DEFAULT_INVAL_VALUE) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get last userId error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "get last userId error"); return; } #ifdef SUPPORT_GRAPHICS auto sysDialog = DelayedSingleton::GetInstance(); if (sysDialog == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "System dialog scheduler instance is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "system dialog scheduler instance null"); return; } Want stopWant = sysDialog->GetSwitchUserDialogWant(); @@ -3297,7 +3297,7 @@ void AbilityManagerService::StopSwitchUserDialogInner(const Want &want, const in auto result = GenerateExtensionAbilityRequest(want, abilityRequest, nullptr, lastUserId); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Generate ability request local error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "generate ability request local error"); eventInfo.errCode = result; EventReport::SendExtensionEvent(EventName::STOP_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return; @@ -3307,7 +3307,7 @@ void AbilityManagerService::StopSwitchUserDialogInner(const Want &want, const in auto stopUserId = abilityInfo.applicationInfo.singleton ? U0_USER_ID : lastUserId; result = CheckOptExtensionAbility(want, abilityRequest, stopUserId, AppExecFwk::ExtensionAbilityType::SERVICE); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Check extensionAbility type error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "check extensionAbility type error"); eventInfo.errCode = result; EventReport::SendExtensionEvent(EventName::STOP_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return; @@ -3315,7 +3315,7 @@ void AbilityManagerService::StopSwitchUserDialogInner(const Want &want, const in auto connectManager = GetConnectManagerByUserId(stopUserId); if (connectManager == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "ConnectManager is nullptr. userId:%{public}d", stopUserId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager null userId:%{public}d", stopUserId); eventInfo.errCode = ERR_INVALID_VALUE; EventReport::SendExtensionEvent(EventName::STOP_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return; @@ -3323,7 +3323,7 @@ void AbilityManagerService::StopSwitchUserDialogInner(const Want &want, const in eventInfo.errCode = connectManager->StopServiceAbility(abilityRequest); if (eventInfo.errCode != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "EventInfo errCode is %{public}d", eventInfo.errCode); + TAG_LOGE(AAFwkTag::ABILITYMGR, "eventInfo errCode=%{public}d", eventInfo.errCode); EventReport::SendExtensionEvent(EventName::STOP_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); } } @@ -3348,7 +3348,7 @@ int AbilityManagerService::MoveAbilityToBackground(const sptr &to auto ownerUserId = abilityRecord->GetOwnerMissionUserId(); auto missionListManager = GetMissionListManagerByUserId(ownerUserId); if (!missionListManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "missionListManager is Null. ownerUserId=%{public}d", ownerUserId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "missionListManager null ownerUserId=%{public}d", ownerUserId); return ERR_INVALID_VALUE; } return missionListManager->MoveAbilityToBackground(abilityRecord); @@ -3370,15 +3370,15 @@ int32_t AbilityManagerService::MoveUIAbilityToBackground(const sptrGetAbilityInfo().bundleName)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Can not move ability to background in Wukong mode."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "move ability background failed in wukong mode"); return ERR_WUKONG_MODE_CANT_MOVE_STATE; } if (!abilityRecord->IsAbilityState(FOREGROUND) && !abilityRecord->IsAbilityState(FOREGROUNDING)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Ability not in foregorund state."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "ability not foregorund state"); return ERR_ABILITY_NOT_FOREGROUND; } if (abilityRecord->GetAbilityInfo().type != AppExecFwk::AbilityType::PAGE) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Cannot background non UIAbility."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "cannot background non UIAbility"); return RESOLVE_CALL_ABILITY_TYPE_ERR; } auto ownerUserId = abilityRecord->GetOwnerMissionUserId(); @@ -3397,7 +3397,7 @@ int AbilityManagerService::TerminateAbility(const sptr &token, in { auto abilityRecord = Token::GetAbilityRecordByToken(token); if (!abilityRecord) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityRecord is Null."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityRecord null"); return ERR_INVALID_VALUE; } auto elementName = abilityRecord->GetWant().GetElement(); @@ -3414,7 +3414,7 @@ int AbilityManagerService::BackToCallerAbilityWithResult(const sptrGetOwnerMissionUserId(); @@ -3442,7 +3442,7 @@ int AbilityManagerService::TerminateAbilityWithFlag(const sptr &t HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); TAG_LOGD(AAFwkTag::ABILITYMGR, "Terminate ability begin, flag:%{public}d.", flag); if (!VerificationAllToken(token)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s VerificationAllToken failed.", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s verificationAllToken failed", __func__); return ERR_INVALID_VALUE; } @@ -3453,7 +3453,7 @@ int AbilityManagerService::TerminateAbilityWithFlag(const sptr &t } if (IsSystemUiApp(abilityRecord->GetAbilityInfo())) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "System ui not allow terminate."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "system ui not allow terminate"); return ERR_INVALID_VALUE; } @@ -3462,14 +3462,14 @@ int AbilityManagerService::TerminateAbilityWithFlag(const sptr &t if (type == AppExecFwk::AbilityType::SERVICE || type == AppExecFwk::AbilityType::EXTENSION) { auto connectManager = GetConnectManagerByUserId(userId); if (!connectManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager is nullptr. userId=%{public}d", userId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager null. userId=%{public}d", userId); return ERR_INVALID_VALUE; } return connectManager->TerminateAbility(token); } if (type == AppExecFwk::AbilityType::DATA) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Cannot terminate data ability, use 'ReleaseDataAbility()' instead."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "cannot terminate, use 'ReleaseDataAbility()'"); return ERR_WRONG_INTERFACE_CALL; } @@ -3482,7 +3482,7 @@ int AbilityManagerService::TerminateAbilityWithFlag(const sptr &t if (missionListManager) { return missionListManager->TerminateAbility(abilityRecord, resultCode, resultWant, flag); } - TAG_LOGW(AAFwkTag::ABILITYMGR, "missionListManager is Null. ownerUserId=%{public}d", ownerUserId); + TAG_LOGW(AAFwkTag::ABILITYMGR, "missionListManager null ownerUserId=%{public}d", ownerUserId); if (Rosen::SceneBoardJudgement::IsSceneBoardEnabled()) { auto uiAbilityManager = GetUIAbilityManagerByUserId(ownerUserId); CHECK_POINTER_AND_RETURN(uiAbilityManager, ERR_INVALID_VALUE); @@ -3511,12 +3511,12 @@ int AbilityManagerService::TerminateUIExtensionAbility(const sptr & auto result = JudgeAbilityVisibleControl(targetRecord->GetAbilityInfo()); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "JudgeAbilityVisibleControl error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "judgeAbilityVisibleControl error"); return result; } if (!UIExtensionUtils::IsUIExtension(targetRecord->GetAbilityInfo().extensionAbilityType)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Cannot terminate except ui extension ability."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "cannot terminate except ui extension ability"); return ERR_WRONG_INTERFACE_CALL; } @@ -3530,12 +3530,12 @@ int AbilityManagerService::CloseUIAbilityBySCB(const sptr &sessionI { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); if (sessionInfo == nullptr || sessionInfo->sessionToken == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "sessionInfo is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "sessionInfo null"); return ERR_INVALID_VALUE; } if (!IsCallerSceneBoard()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not sceneboard called, not allowed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "no sceneboard, no allowed"); return ERR_WRONG_INTERFACE_CALL; } @@ -3575,13 +3575,13 @@ int AbilityManagerService::SendResultToAbility(int32_t requestCode, int32_t resu { TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s", __func__); if (!CheckCallerIsDmsProcess()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Check processName failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "check processName failed"); return ERR_INVALID_VALUE; } int missionId = resultWant.GetIntParam(DMS_MISSION_ID, DEFAULT_DMS_MISSION_ID); resultWant.RemoveParam(DMS_MISSION_ID); if (missionId == DEFAULT_DMS_MISSION_ID) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "MissionId is empty"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "missionId empty"); return ERR_INVALID_VALUE; } std::shared_ptr abilityRecord = nullptr; @@ -3608,7 +3608,7 @@ int AbilityManagerService::StartRemoteAbility(const Want &want, int requestCode, TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s", __func__); Want remoteWant = want; if (AddStartControlParam(remoteWant, callerToken) != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s AddStartControlParam failed.", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s addStartControlParam failed", __func__); return ERR_INVALID_VALUE; } if (AbilityUtil::IsStartFreeInstall(remoteWant)) { @@ -3616,12 +3616,12 @@ int AbilityManagerService::StartRemoteAbility(const Want &want, int requestCode, freeInstallManager_->StartRemoteFreeInstall(remoteWant, requestCode, validUserId, callerToken); } if (remoteWant.GetBoolParam(Want::PARAM_RESV_FOR_RESULT, false)) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s: try to StartAbilityForResult", __func__); + TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s: try startAbilityForResult", __func__); int32_t missionId = -1; if (Rosen::SceneBoardJudgement::IsSceneBoardEnabled()) { missionId = GetMissionIdByAbilityTokenInner(callerToken); if (!missionId) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Invalid missionId id."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid missionId id"); return ERR_INVALID_VALUE; } } else { @@ -3639,7 +3639,7 @@ int AbilityManagerService::StartRemoteAbility(const Want &want, int requestCode, DistributedClient dmsClient; int result = dmsClient.StartRemoteAbility(remoteWant, callerUid, requestCode, accessToken); if (result != ERR_NONE) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "AbilityManagerService::StartRemoteAbility failed, result = %{public}d", result); + TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityManagerService::startRemoteAbility failed, result=%{public}d", result); } return result; } @@ -3648,16 +3648,16 @@ bool AbilityManagerService::CheckIsRemote(const std::string& deviceId) { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); if (deviceId.empty()) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "CheckIsRemote: deviceId is empty."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "checkIsRemote:deviceId empty"); return false; } std::string localDeviceId; if (!GetLocalDeviceId(localDeviceId)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "CheckIsRemote: get local deviceId failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "checkIsRemote:get local deviceId failed"); return false; } if (localDeviceId == deviceId) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "CheckIsRemote: deviceId is local."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "checkIsRemote:deviceId local"); return false; } TAG_LOGD(AAFwkTag::ABILITYMGR, "CheckIsRemote, deviceId = %{public}s", AnonymizeDeviceId(deviceId).c_str()); @@ -3681,7 +3681,7 @@ bool AbilityManagerService::GetLocalDeviceId(std::string& localDeviceId) auto localNode = std::make_unique(); int32_t errCode = GetLocalNodeDeviceInfo(DM_PKG_NAME, localNode.get()); if (errCode != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "AbilityManagerService::GetLocalNodeDeviceInfo errCode = %{public}d", errCode); + TAG_LOGE(AAFwkTag::ABILITYMGR, "err=%{public}d", errCode); return false; } if (localNode != nullptr) { @@ -3690,7 +3690,7 @@ bool AbilityManagerService::GetLocalDeviceId(std::string& localDeviceId) AnonymizeDeviceId(localDeviceId).c_str()); return true; } - TAG_LOGE(AAFwkTag::ABILITYMGR, "AbilityManagerService::GetLocalDeviceId localDeviceId null"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "localDeviceId null"); return false; } @@ -3707,7 +3707,7 @@ std::string AbilityManagerService::AnonymizeDeviceId(const std::string& deviceId int AbilityManagerService::MinimizeAbility(const sptr &token, bool fromUser) { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); - TAG_LOGI(AAFwkTag::ABILITYMGR, "Minimize ability, fromUser:%{public}d.", fromUser); + TAG_LOGI(AAFwkTag::ABILITYMGR, "minimize ability, fromUser:%{public}d", fromUser); if (!VerificationAllToken(token)) { return ERR_INVALID_VALUE; } @@ -3720,7 +3720,7 @@ int AbilityManagerService::MinimizeAbility(const sptr &token, boo auto type = abilityRecord->GetAbilityInfo().type; if (type != AppExecFwk::AbilityType::PAGE) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Cannot minimize except page ability."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "cannot minimize except page ability"); return ERR_WRONG_INTERFACE_CALL; } @@ -3730,7 +3730,7 @@ int AbilityManagerService::MinimizeAbility(const sptr &token, boo auto missionListManager = GetMissionListManagerByUserId(abilityRecord->GetOwnerMissionUserId()); if (!missionListManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "missionListManager is Null."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "missionListManager null"); return ERR_INVALID_VALUE; } return missionListManager->MinimizeAbility(token, fromUser); @@ -3756,12 +3756,12 @@ int AbilityManagerService::MinimizeUIExtensionAbility(const sptr &e auto result = JudgeAbilityVisibleControl(targetRecord->GetAbilityInfo()); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "JudgeAbilityVisibleControl error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "judgeAbilityVisibleControl error"); return result; } if (!UIExtensionUtils::IsUIExtension(targetRecord->GetAbilityInfo().extensionAbilityType)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Cannot minimize except ui extension ability."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "cannot minimize except ui extension ability"); return ERR_WRONG_INTERFACE_CALL; } extensionSessionInfo->uiExtensionComponentId = ( @@ -3777,14 +3777,14 @@ int AbilityManagerService::MinimizeUIAbilityBySCB(const sptr &sessi uint32_t sceneFlag) { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); - TAG_LOGI(AAFwkTag::ABILITYMGR, "Called, sceneFlag: %{public}u", sceneFlag); + TAG_LOGI(AAFwkTag::ABILITYMGR, "called, sceneFlag:%{public}u", sceneFlag); if (sessionInfo == nullptr || sessionInfo->sessionToken == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "sessionInfo is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "sessionInfo null"); return ERR_INVALID_VALUE; } if (!IsCallerSceneBoard()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not sceneboard called, not allowed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "no sceneboard, no allowed"); return ERR_WRONG_INTERFACE_CALL; } @@ -3826,7 +3826,7 @@ int AbilityManagerService::ConnectAbilityCommon( #ifdef WITH_DLP result = CheckDlpForExtension(want, callerToken, userId, eventInfo, EventName::CONNECT_SERVICE_ERROR); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "CheckDlpForExtension error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "checkDlpForExtension error"); eventInfo.errCode = result; EventReport::SendExtensionEvent(EventName::CONNECT_SERVICE_ERROR, HiSysEventType::FAULT, eventInfo); return result; @@ -3837,7 +3837,7 @@ int AbilityManagerService::ConnectAbilityCommon( result = interceptorExecuter_ == nullptr ? ERR_INVALID_VALUE : interceptorExecuter_->DoProcess(interceptorParam); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ is nullptr or DoProcess return error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ null or doProcess error"); eventInfo.errCode = result; EventReport::SendExtensionEvent(EventName::CONNECT_SERVICE_ERROR, HiSysEventType::FAULT, eventInfo); return result; @@ -3848,7 +3848,7 @@ int AbilityManagerService::ConnectAbilityCommon( if (AbilityUtil::IsStartFreeInstall(want) && freeInstallManager_ != nullptr) { std::string localDeviceId; if (!GetLocalDeviceId(localDeviceId)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s: Get Local DeviceId failed", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s:get Local deviceId failed", __func__); eventInfo.errCode = ERR_INVALID_VALUE; EventReport::SendExtensionEvent(EventName::CONNECT_SERVICE_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_INVALID_VALUE; @@ -3875,7 +3875,7 @@ int AbilityManagerService::ConnectAbilityCommon( bool queryResult = IN_PROCESS_CALL(bms->QueryExtensionAbilityInfoByUri(uri, validUserId, extensionInfo)); if (!queryResult || extensionInfo.name.empty() || extensionInfo.bundleName.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Invalid extension ability info."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid extension ability info"); eventInfo.errCode = ERR_INVALID_VALUE; EventReport::SendExtensionEvent(EventName::CONNECT_SERVICE_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_INVALID_VALUE; @@ -3928,7 +3928,7 @@ int AbilityManagerService::ConnectUIExtensionAbility(const Want &want, const spt sptr callerToken = sessionInfo->callerToken; if (callerToken != nullptr && !VerificationAllToken(callerToken)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "ConnectUIExtensionAbility VerificationAllToken failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "connectUIExtensionAbility verificationAllToken failed"); eventInfo.errCode = ERR_INVALID_VALUE; EventReport::SendExtensionEvent(EventName::CONNECT_SERVICE_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_INVALID_CALLER; @@ -3938,7 +3938,7 @@ int AbilityManagerService::ConnectUIExtensionAbility(const Want &want, const spt #ifdef WITH_DLP result = CheckDlpForExtension(want, callerToken, userId, eventInfo, EventName::CONNECT_SERVICE_ERROR); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "CheckDlpForExtension error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "checkDlpForExtension error"); eventInfo.errCode = result; EventReport::SendExtensionEvent(EventName::CONNECT_SERVICE_ERROR, HiSysEventType::FAULT, eventInfo); return result; @@ -3949,7 +3949,7 @@ int AbilityManagerService::ConnectUIExtensionAbility(const Want &want, const spt result = interceptorExecuter_ == nullptr ? ERR_INVALID_VALUE : interceptorExecuter_->DoProcess(interceptorParam); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ is nullptr or DoProcess return error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ null or doProcess error"); eventInfo.errCode = result; EventReport::SendExtensionEvent(EventName::CONNECT_SERVICE_ERROR, HiSysEventType::FAULT, eventInfo); return result; @@ -3970,7 +3970,7 @@ int AbilityManagerService::ConnectUIExtensionAbility(const Want &want, const spt bool queryResult = IN_PROCESS_CALL(bms->QueryExtensionAbilityInfoByUri(uri, validUserId, extensionInfo)); if (!queryResult || extensionInfo.name.empty() || extensionInfo.bundleName.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Invalid extension ability info."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid extension ability info"); eventInfo.errCode = ERR_INVALID_VALUE; EventReport::SendExtensionEvent(EventName::CONNECT_SERVICE_ERROR, HiSysEventType::FAULT, eventInfo); return ERR_INVALID_VALUE; @@ -3981,7 +3981,7 @@ int AbilityManagerService::ConnectUIExtensionAbility(const Want &want, const spt UpdateCallerInfo(abilityWant, callerToken); if (callerToken != nullptr && callerToken->GetObjectDescriptor() != u"ohos.aafwk.AbilityToken") { - TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s invalid Token.", __func__); + TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s invalid Token", __func__); eventInfo.errCode = ConnectLocalAbility(abilityWant, validUserId, connect, nullptr, AppExecFwk::ExtensionAbilityType::UI, sessionInfo, false, connectInfo); if (eventInfo.errCode != ERR_OK) { @@ -4043,7 +4043,7 @@ int AbilityManagerService::ConnectLocalAbility(const Want &want, const int32_t u AbilityUtil::RemoveShowModeKey(const_cast(want)); bool isEnterpriseAdmin = AAFwk::UIExtensionUtils::IsEnterpriseAdmin(extensionType); if (!isEnterpriseAdmin && !JudgeMultiUserConcurrency(userId)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Multi-user non-concurrent unsatisfied"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "multi-user non-concurrent unsatisfied"); return ERR_CROSS_USER; } @@ -4062,7 +4062,7 @@ int AbilityManagerService::ConnectLocalAbility(const Want &want, const int32_t u TAG_LOGD(AAFwkTag::ABILITYMGR, "requestWant SetParam success"); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Generate request error"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "generate request error"); return result; } if (!UriUtils::GetInstance().CheckNonImplicitShareFileUri(abilityRequest)) { @@ -4070,7 +4070,7 @@ int AbilityManagerService::ConnectLocalAbility(const Want &want, const int32_t u } result = CheckPermissionForUIService(extensionType, want, abilityRequest); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "CheckPermissionForUIService failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "checkPermissionForUIService failed"); return result; } @@ -4078,12 +4078,12 @@ int AbilityManagerService::ConnectLocalAbility(const Want &want, const int32_t u if (abilityInfo.isStageBasedModel) { bool isService = (abilityInfo.extensionAbilityType == AppExecFwk::ExtensionAbilityType::SERVICE); if (isService && extensionType != AppExecFwk::ExtensionAbilityType::SERVICE) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Service extension type, please use ConnectAbility."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "Service extension type, please use ConnectAbility"); return ERR_WRONG_INTERFACE_CALL; } // not allow app to connect other extension by using connectServiceExtensionAbility if (callerToken && extensionType == AppExecFwk::ExtensionAbilityType::SERVICE && !isService) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Connect service extension ability, but target type is not Service."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "ability, type not service"); return TARGET_ABILITY_NOT_SERVICE; } } @@ -4093,7 +4093,7 @@ int AbilityManagerService::ConnectLocalAbility(const Want &want, const int32_t u result = CheckStaticCfgPermission(abilityRequest, false, -1); if (result != AppExecFwk::Constants::PERMISSION_GRANTED) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "CheckStaticCfgPermission error, result is %{public}d.", result); + TAG_LOGE(AAFwkTag::ABILITYMGR, "checkStaticCfgPermission error, result=%{public}d", result); return ERR_STATIC_CFG_PERMISSION; } @@ -4102,7 +4102,7 @@ int AbilityManagerService::ConnectLocalAbility(const Want &want, const int32_t u if (AAFwk::UIExtensionUtils::IsUIExtension(extensionType)) { if (!AAFwk::UIExtensionUtils::IsUIExtension(targetExtensionType) && targetExtensionType != AppExecFwk::ExtensionAbilityType::WINDOW) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Try to connect UI extension, but target ability is not UI extension."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "UI extension, target ability not UI extension"); return ERR_WRONG_INTERFACE_CALL; } @@ -4110,7 +4110,7 @@ int AbilityManagerService::ConnectLocalAbility(const Want &want, const int32_t u if (targetExtensionType != AppExecFwk::ExtensionAbilityType::WINDOW && !PermissionVerification::GetInstance()->VerifyCallingPermission( PermissionConstants::PERMISSION_CONNECT_UI_EXTENSION_ABILITY)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission %{public}s verification failed.", + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission %{public}s verification failed", PermissionConstants::PERMISSION_CONNECT_UI_EXTENSION_ABILITY); return ERR_PERMISSION_DENIED; } @@ -4118,7 +4118,7 @@ int AbilityManagerService::ConnectLocalAbility(const Want &want, const int32_t u auto type = abilityInfo.type; if (type != AppExecFwk::AbilityType::SERVICE && type != AppExecFwk::AbilityType::EXTENSION) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Connect ability failed, target ability is not Service."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "ability failed, target ability not service"); return TARGET_ABILITY_NOT_SERVICE; } @@ -4127,24 +4127,24 @@ int AbilityManagerService::ConnectLocalAbility(const Want &want, const int32_t u result = afterCheckExecuter_ == nullptr ? ERR_INVALID_VALUE : afterCheckExecuter_->DoProcess(afterCheckParam); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "afterCheckExecuter_ is nullptr or DoProcess return error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "afterCheckExecuter_ null or doProcess error"); return result; } result = CheckCallServicePermission(abilityRequest); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s CheckCallServicePermission error.", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s checkCallServicePermission error", __func__); return result; } if (!ExtensionPermissionsUtil::CheckSAPermission(targetExtensionType)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "The SA doesn't have permission for target extension."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "SA doesn't have target extension permission"); return CHECK_PERMISSION_FAILED; } result = PreLoadAppDataAbilities(abilityInfo.bundleName, validUserId); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "ConnectAbility: App data ability preloading failed, '%{public}s', %{public}d", + TAG_LOGE(AAFwkTag::ABILITYMGR, "connectAbility: app data ability preloading failed, '%{public}s', %{public}d", abilityInfo.bundleName.c_str(), result); return result; @@ -4152,7 +4152,7 @@ int AbilityManagerService::ConnectLocalAbility(const Want &want, const int32_t u auto connectManager = GetConnectManagerByUserId(validUserId); if (connectManager == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager is nullptr. userId=%{public}d", validUserId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager null userId=%{public}d", validUserId); return ERR_INVALID_VALUE; } @@ -4164,9 +4164,9 @@ int AbilityManagerService::ConnectLocalAbility(const Want &want, const int32_t u int AbilityManagerService::ConnectRemoteAbility(Want &want, const sptr &callerToken, const sptr &connect) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s begin ConnectAbilityRemote", __func__); + TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s begin connectAbilityRemote", __func__); if (AddStartControlParam(want, callerToken) != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s AddStartControlParam failed.", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s addStartControlParam failed", __func__); return ERR_INVALID_VALUE; } DistributedClient dmsClient; @@ -4217,9 +4217,9 @@ int AbilityManagerService::ContinueMission(const std::string &srcDeviceId, const int32_t missionId, const sptr &callBack, AAFwk::WantParams &wantParams) { CHECK_CALLER_IS_SYSTEM_APP; - TAG_LOGI(AAFwkTag::ABILITYMGR, "ContinueMission missionId: %{public}d", missionId); + TAG_LOGI(AAFwkTag::ABILITYMGR, "continueMission missionId: %{public}d", missionId); if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } @@ -4234,7 +4234,7 @@ int AbilityManagerService::ContinueMission(AAFwk::ContinueMissionInfo continueMi TAG_LOGI(AAFwkTag::ABILITYMGR, "called"); AAFWK::ContinueRadar::GetInstance().ClickIconContinue("ContinueMission"); if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } @@ -4247,7 +4247,7 @@ int AbilityManagerService::ContinueAbility(const std::string &deviceId, int32_t TAG_LOGI(AAFwkTag::ABILITYMGR, "ContinueAbility missionId = %{public}d, version = %{public}u.", missionId, versionCode); if (!CheckCallerIsDmsProcess()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Check processName failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "check processName failed"); return ERR_INVALID_VALUE; } @@ -4269,9 +4269,9 @@ int AbilityManagerService::ContinueAbility(const std::string &deviceId, int32_t int AbilityManagerService::StartContinuation(const Want &want, const sptr &abilityToken, int32_t status) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "Start Continuation."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "start continuation"); if (!CheckIfOperateRemote(want)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "deviceId or bundle name or abilityName empty"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "deviceId or bundleName or abilityName empty"); return ERR_INVALID_VALUE; } CHECK_POINTER_AND_RETURN(abilityToken, ERR_INVALID_VALUE); @@ -4279,26 +4279,26 @@ int AbilityManagerService::StartContinuation(const Want &want, const sptr samgrProxy = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); if (samgrProxy == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "failed to get samgrProxy"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "failed get samgrProxy"); return; } sptr bmsProxy = samgrProxy->GetSystemAbility(BUNDLE_MGR_SERVICE_SYS_ABILITY_ID); if (bmsProxy == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "failed to get bms from samgr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "failed get bms from samgr"); return; } auto bundleMgr = iface_cast(bmsProxy); if (bundleMgr == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "failed to get bms"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "failed get bms"); return; } int32_t callerUid = IPCSkeleton::GetCallingUid(); @@ -4338,7 +4338,7 @@ void AbilityManagerService::NotifyCompleteContinuation(const std::string &device int AbilityManagerService::NotifyContinuationResult(int32_t missionId, int32_t result) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "Notify Continuation Result : %{public}d.", result); + TAG_LOGI(AAFwkTag::ABILITYMGR, "notify continuation result : %{public}d", result); std::shared_ptr abilityRecord = nullptr; if (Rosen::SceneBoardJudgement::IsSceneBoardEnabled()) { @@ -4353,7 +4353,7 @@ int AbilityManagerService::NotifyContinuationResult(int32_t missionId, int32_t r CHECK_POINTER_AND_RETURN(abilityRecord, ERR_INVALID_VALUE); if (!JudgeSelfCalled(abilityRecord) && !CheckCallerIsDmsProcess()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission deny."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission deny"); return ERR_INVALID_VALUE; } abilityRecord->NotifyContinuationResult(result); @@ -4364,7 +4364,7 @@ int AbilityManagerService::StartSyncRemoteMissions(const std::string& devId, boo { CHECK_CALLER_IS_SYSTEM_APP; if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } DistributedClient dmsClient; @@ -4375,7 +4375,7 @@ int AbilityManagerService::StopSyncRemoteMissions(const std::string& devId) { CHECK_CALLER_IS_SYSTEM_APP; if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } DistributedClient dmsClient; @@ -4385,7 +4385,7 @@ int AbilityManagerService::StopSyncRemoteMissions(const std::string& devId) int AbilityManagerService::RegisterObserver(const sptr &observer) { if (!PermissionVerification::GetInstance()->CheckObserverCallerPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verification failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verification failed"); return CHECK_PERMISSION_FAILED; } return DelayedSingleton::GetInstance()->RegisterObserver(observer); @@ -4394,7 +4394,7 @@ int AbilityManagerService::RegisterObserver(const sptr &observer) { if (!PermissionVerification::GetInstance()->CheckObserverCallerPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verification failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verification failed"); return CHECK_PERMISSION_FAILED; } return DelayedSingleton::GetInstance()->UnregisterObserver(observer); @@ -4404,7 +4404,7 @@ int AbilityManagerService::UnregisterObserver(const sptr &infos) { if (!AAFwk::PermissionVerification::GetInstance()->IsSACall()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "can not get dlp connection infos if caller is not sa."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "can't get dlp connection infos if caller not sa"); return CHECK_PERMISSION_FAILED; } DelayedSingleton::GetInstance()->GetDlpConnectionInfos(infos); @@ -4416,7 +4416,7 @@ int AbilityManagerService::GetDlpConnectionInfos(std::vector &connectionData) { if (!AAFwk::PermissionVerification::GetInstance()->IsSACall()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "can not get connection data if caller is not sa."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "caller no sa no connection data"); return CHECK_PERMISSION_FAILED; } DelayedSingleton::GetInstance()->GetConnectionData(connectionData); @@ -4430,12 +4430,12 @@ int AbilityManagerService::RegisterMissionListener(const std::string &deviceId, CHECK_CALLER_IS_SYSTEM_APP; std::string localDeviceId; if (!GetLocalDeviceId(localDeviceId) || localDeviceId == deviceId) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "RegisterMissionListener: Check DeviceId failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "registerMissionListener:check deviceId failed"); return REGISTER_REMOTE_MISSION_LISTENER_FAIL; } CHECK_POINTER_AND_RETURN(listener, ERR_INVALID_VALUE); if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } DistributedClient dmsClient; @@ -4448,7 +4448,7 @@ int AbilityManagerService::RegisterOnListener(const std::string &type, CHECK_CALLER_IS_SYSTEM_APP; CHECK_POINTER_AND_RETURN(listener, ERR_INVALID_VALUE); if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } DistributedClient dmsClient; @@ -4461,7 +4461,7 @@ int AbilityManagerService::RegisterOffListener(const std::string &type, CHECK_CALLER_IS_SYSTEM_APP; CHECK_POINTER_AND_RETURN(listener, ERR_INVALID_VALUE); if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } DistributedClient dmsClient; @@ -4474,12 +4474,12 @@ int AbilityManagerService::UnRegisterMissionListener(const std::string &deviceId CHECK_CALLER_IS_SYSTEM_APP; std::string localDeviceId; if (!GetLocalDeviceId(localDeviceId) || localDeviceId == deviceId) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "RegisterMissionListener: Check DeviceId failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "check deviceId failed"); return REGISTER_REMOTE_MISSION_LISTENER_FAIL; } CHECK_POINTER_AND_RETURN(listener, ERR_INVALID_VALUE); if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } DistributedClient dmsClient; @@ -4502,7 +4502,7 @@ sptr AbilityManagerService::GetWantSender( if (userId < 0) { if (DelayedSingleton::GetInstance()-> GetOsAccountLocalIdFromUid(callerUid, userId) != 0) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "GetOsAccountLocalIdFromUid failed. uid=%{public}d", callerUid); + TAG_LOGE(AAFwkTag::ABILITYMGR, "getOsAccountLocalIdFromUid failed uid=%{public}d", callerUid); return nullptr; } } @@ -4543,7 +4543,7 @@ sptr AbilityManagerService::GetWantSender( int AbilityManagerService::SendWantSender(sptr target, const SenderInfo &senderInfo) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "Send want sender."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "call"); auto pendingWantManager = GetCurrentPendingWantManager(); CHECK_POINTER_AND_RETURN(pendingWantManager, ERR_INVALID_VALUE); CHECK_POINTER_AND_RETURN(target, ERR_INVALID_VALUE); @@ -4559,7 +4559,7 @@ void AbilityManagerService::CancelWantSender(const sptr &sender) sptr obj = sender->AsObject(); if (!obj || obj->IsProxyObject()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "obj is nullptr or obj is a proxy obj."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "obj null or proxy obj"); return; } @@ -4572,7 +4572,7 @@ void AbilityManagerService::CancelWantSender(const sptr &sender) int userId = -1; if (DelayedSingleton::GetInstance()-> GetOsAccountLocalIdFromUid(callerUid, userId) != 0) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "GetOsAccountLocalIdFromUid failed. uid=%{public}d", callerUid); + TAG_LOGE(AAFwkTag::ABILITYMGR, "getOsAccountLocalIdFromUid failed uid=%{public}d", callerUid); return; } bool isSystemApp = false; @@ -4581,7 +4581,7 @@ void AbilityManagerService::CancelWantSender(const sptr &sender) bool bundleMgrResult = IN_PROCESS_CALL(bms->GetBundleInfo(record->GetKey()->GetBundleName(), AppExecFwk::BundleFlag::GET_BUNDLE_DEFAULT, bundleInfo, userId)); if (!bundleMgrResult) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "GetBundleInfo is fail."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "getBundleInfo fail"); return; } isSystemApp = bundleInfo.applicationInfo.isSystemApp; @@ -4592,11 +4592,11 @@ void AbilityManagerService::CancelWantSender(const sptr &sender) int AbilityManagerService::GetPendingWantUid(const sptr &target) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s:begin.", __func__); + TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s:begin", __func__); auto pendingWantManager = GetCurrentPendingWantManager(); CHECK_POINTER_AND_RETURN(pendingWantManager, -1); if (target == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%s, target is nullptr", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%s, target null", __func__); return -1; } return pendingWantManager->GetPendingWantUid(target); @@ -4604,11 +4604,11 @@ int AbilityManagerService::GetPendingWantUid(const sptr &target) int AbilityManagerService::GetPendingWantUserId(const sptr &target) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s:begin.", __func__); + TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s:begin", __func__); auto pendingWantManager = GetCurrentPendingWantManager(); CHECK_POINTER_AND_RETURN(pendingWantManager, -1); if (target == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%s, target is nullptr", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%s, target null", __func__); return -1; } return pendingWantManager->GetPendingWantUserId(target); @@ -4626,11 +4626,11 @@ std::string AbilityManagerService::GetPendingWantBundleName(const sptr &target) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s:begin.", __func__); + TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s:begin", __func__); auto pendingWantManager = GetCurrentPendingWantManager(); CHECK_POINTER_AND_RETURN(pendingWantManager, -1); if (target == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%s, target is nullptr", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%s, target null", __func__); return -1; } return pendingWantManager->GetPendingWantCode(target); @@ -4643,7 +4643,7 @@ int AbilityManagerService::GetPendingWantType(const sptr &target) auto pendingWantManager = GetCurrentPendingWantManager(); CHECK_POINTER_AND_RETURN(pendingWantManager, -1); if (target == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%s, target is nullptr", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%s, target null", __func__); return -1; } return pendingWantManager->GetPendingWantType(target); @@ -4652,7 +4652,7 @@ int AbilityManagerService::GetPendingWantType(const sptr &target) void AbilityManagerService::RegisterCancelListener(const sptr &sender, const sptr &receiver) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "Register cancel listener."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "register cancel listener"); auto pendingWantManager = GetCurrentPendingWantManager(); CHECK_POINTER(pendingWantManager); CHECK_POINTER(sender); @@ -4663,7 +4663,7 @@ void AbilityManagerService::RegisterCancelListener(const sptr &send void AbilityManagerService::UnregisterCancelListener( const sptr &sender, const sptr &receiver) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "Unregister cancel listener."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "unregister cancel listener"); auto pendingWantManager = GetCurrentPendingWantManager(); CHECK_POINTER(pendingWantManager); CHECK_POINTER(sender); @@ -4686,13 +4686,13 @@ int AbilityManagerService::GetPendingRequestWant(const sptr &target int AbilityManagerService::LockMissionForCleanup(int32_t missionId) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "request unlock mission for clean up all, id :%{public}d", missionId); + TAG_LOGI(AAFwkTag::ABILITYMGR, "request unlock for clean all, id=%{public}d", missionId); auto missionListManager = GetCurrentMissionListManager(); CHECK_POINTER_AND_RETURN(missionListManager, ERR_NO_INIT); CHECK_CALLER_IS_SYSTEM_APP; if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } return missionListManager->SetMissionLockedState(missionId, true); @@ -4701,13 +4701,13 @@ int AbilityManagerService::LockMissionForCleanup(int32_t missionId) int AbilityManagerService::UnlockMissionForCleanup(int32_t missionId) { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); - TAG_LOGI(AAFwkTag::ABILITYMGR, "request unlock mission for clean up all, id :%{public}d", missionId); + TAG_LOGI(AAFwkTag::ABILITYMGR, "request unlock for clean all, id=%{public}d", missionId); auto missionListManager = GetCurrentMissionListManager(); CHECK_POINTER_AND_RETURN(missionListManager, ERR_NO_INIT); CHECK_CALLER_IS_SYSTEM_APP; if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } return missionListManager->SetMissionLockedState(missionId, false); @@ -4717,14 +4717,14 @@ void AbilityManagerService::SetLockedState(int32_t sessionId, bool lockedState) { TAG_LOGI(AAFwkTag::ABILITYMGR, "request lock abilityRecord, sessionId :%{public}d", sessionId); if (!IsCallerSceneBoard()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not sceneboard called, not allowed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "no sceneboard, no allowed"); return; } auto uiAbilityManager = GetUIAbilityManagerByUid(IPCSkeleton::GetCallingUid()); CHECK_POINTER(uiAbilityManager); auto abilityRecord = uiAbilityManager->GetAbilityRecordsById(sessionId); if (!abilityRecord) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityRecord is null."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityRecord null"); return; } abilityRecord->SetLockedState(lockedState); @@ -4732,13 +4732,13 @@ void AbilityManagerService::SetLockedState(int32_t sessionId, bool lockedState) int AbilityManagerService::RegisterMissionListener(const sptr &listener) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "request RegisterMissionListener "); + TAG_LOGI(AAFwkTag::ABILITYMGR, "request registerMissionListener"); auto missionListManager = GetCurrentMissionListManager(); CHECK_POINTER_AND_RETURN(missionListManager, ERR_NO_INIT); CHECK_CALLER_IS_SYSTEM_APP; if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } return missionListManager->RegisterMissionListener(listener); @@ -4752,7 +4752,7 @@ int AbilityManagerService::UnRegisterMissionListener(const sptrVerifyMissionPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } return missionListManager->UnRegisterMissionListener(listener); @@ -4762,13 +4762,13 @@ int AbilityManagerService::GetMissionInfos(const std::string& deviceId, int32_t std::vector &missionInfos) { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); - TAG_LOGI(AAFwkTag::ABILITYMGR, "request GetMissionInfos."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "request getMissionInfos"); auto missionListManager = GetCurrentMissionListManager(); CHECK_POINTER_AND_RETURN(missionListManager, ERR_NO_INIT); CHECK_CALLER_IS_SYSTEM_APP; if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } @@ -4782,11 +4782,11 @@ int AbilityManagerService::GetMissionInfos(const std::string& deviceId, int32_t int AbilityManagerService::GetRemoteMissionInfos(const std::string& deviceId, int32_t numMax, std::vector &missionInfos) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "GetRemoteMissionInfos begin"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "getRemoteMissionInfos"); DistributedClient dmsClient; int result = dmsClient.GetMissionInfos(deviceId, numMax, missionInfos); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "GetRemoteMissionInfos failed, result = %{public}d", result); + TAG_LOGE(AAFwkTag::ABILITYMGR, "getRemoteMissionInfos failed, result=%{public}d", result); return result; } return ERR_OK; @@ -4796,13 +4796,13 @@ int AbilityManagerService::GetMissionInfo(const std::string& deviceId, int32_t m MissionInfo &missionInfo) { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); - TAG_LOGI(AAFwkTag::ABILITYMGR, "request GetMissionInfo, missionId:%{public}d", missionId); + TAG_LOGI(AAFwkTag::ABILITYMGR, "request getMissionInfo, missionId:%{public}d", missionId); auto missionListManager = GetCurrentMissionListManager(); CHECK_POINTER_AND_RETURN(missionListManager, ERR_NO_INIT); CHECK_CALLER_IS_SYSTEM_APP; if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } @@ -4817,7 +4817,7 @@ int AbilityManagerService::GetRemoteMissionInfo(const std::string& deviceId, int MissionInfo &missionInfo) { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); - TAG_LOGI(AAFwkTag::ABILITYMGR, "GetMissionInfoFromDms begin"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "getMissionInfoFromDms"); std::vector missionVector; int result = GetRemoteMissionInfos(deviceId, MAX_NUMBER_OF_DISTRIBUTED_MISSIONS, missionVector); if (result != ERR_OK) { @@ -4836,13 +4836,13 @@ int AbilityManagerService::GetRemoteMissionInfo(const std::string& deviceId, int int AbilityManagerService::CleanMission(int32_t missionId) { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); - TAG_LOGI(AAFwkTag::ABILITYMGR, "request CleanMission, missionId:%{public}d", missionId); + TAG_LOGI(AAFwkTag::ABILITYMGR, "request cleanMission, missionId:%{public}d", missionId); auto missionListManager = GetCurrentMissionListManager(); CHECK_POINTER_AND_RETURN(missionListManager, ERR_NO_INIT); CHECK_CALLER_IS_SYSTEM_APP; if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } @@ -4852,20 +4852,20 @@ int AbilityManagerService::CleanMission(int32_t missionId) int AbilityManagerService::CleanAllMissions() { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); - TAG_LOGI(AAFwkTag::ABILITYMGR, "request CleanAllMissions "); + TAG_LOGI(AAFwkTag::ABILITYMGR, "request cleanAllMissions"); auto missionListManager = GetCurrentMissionListManager(); CHECK_POINTER_AND_RETURN(missionListManager, ERR_NO_INIT); CHECK_CALLER_IS_SYSTEM_APP; if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } Want want; want.SetElementName(AbilityConfig::LAUNCHER_BUNDLE_NAME, AbilityConfig::LAUNCHER_ABILITY_NAME); if (!IsAbilityControllerStart(want, AbilityConfig::LAUNCHER_BUNDLE_NAME)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "IsAbilityControllerStart failed: %{public}s", want.GetBundle().c_str()); + TAG_LOGE(AAFwkTag::ABILITYMGR, "isAbilityControllerStart failed:%{public}s", want.GetBundle().c_str()); return ERR_WOULD_BLOCK; } @@ -4878,12 +4878,12 @@ int AbilityManagerService::MoveMissionToFront(int32_t missionId) TAG_LOGI(AAFwkTag::ABILITYMGR, "request MoveMissionToFront, missionId:%{public}d", missionId); CHECK_CALLER_IS_SYSTEM_APP; if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } if (!IsAbilityControllerStartById(missionId)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "IsAbilityControllerStart false"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "isAbilityControllerStart false"); return ERR_WOULD_BLOCK; } @@ -4904,12 +4904,12 @@ int AbilityManagerService::MoveMissionToFront(int32_t missionId, const StartOpti TAG_LOGI(AAFwkTag::ABILITYMGR, "request MoveMissionToFront, missionId:%{public}d", missionId); CHECK_CALLER_IS_SYSTEM_APP; if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } if (!IsAbilityControllerStartById(missionId)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "IsAbilityControllerStart false"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "isAbilityControllerStart false"); return ERR_WOULD_BLOCK; } @@ -4929,14 +4929,14 @@ int AbilityManagerService::MoveMissionsToForeground(const std::vector& { CHECK_CALLER_IS_SYSTEM_APP; if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } #ifdef SUPPORT_SCREEN if (wmsHandler_) { auto ret = wmsHandler_->MoveMissionsToForeground(missionIds, topMissionId); if (ret) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "MoveMissionsToForeground failed, missiondIds may be invalid"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "moveMissionsToForeground failed, missiondIds may invalid"); return ERR_INVALID_VALUE; } else { return NO_ERROR; @@ -4951,14 +4951,14 @@ int AbilityManagerService::MoveMissionsToBackground(const std::vector& { CHECK_CALLER_IS_SYSTEM_APP; if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } #ifdef SUPPORT_SCREEN if (wmsHandler_) { auto ret = wmsHandler_->MoveMissionsToBackground(missionIds, result); if (ret) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "MoveMissionsToBackground failed, missiondIds may be invalid"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "moveMissionsToBackground failed, missiondIds may invalid"); return ERR_INVALID_VALUE; } else { return NO_ERROR; @@ -4973,11 +4973,11 @@ int32_t AbilityManagerService::GetMissionIdByToken(const sptr &to TAG_LOGD(AAFwkTag::ABILITYMGR, "request GetMissionIdByToken."); auto abilityRecord = Token::GetAbilityRecordByToken(token); if (!abilityRecord) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityRecord is null."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityRecord null"); return ERR_INVALID_VALUE; } if (!JudgeSelfCalled(abilityRecord) && !CheckCallerIsDmsProcess()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission deny."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission deny"); return ERR_INVALID_VALUE; } return GetMissionIdByAbilityTokenInner(token); @@ -4988,18 +4988,18 @@ bool AbilityManagerService::IsAbilityControllerStartById(int32_t missionId) HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); auto missionListWrap = GetMissionListWrap(); if (missionListWrap == nullptr) { - TAG_LOGW(AAFwkTag::ABILITYMGR, "missionListWrap null."); + TAG_LOGW(AAFwkTag::ABILITYMGR, "missionListWrap null"); return true; } InnerMissionInfo innerMissionInfo; int getMission = missionListWrap->GetInnerMissionInfoById(missionId, innerMissionInfo); if (getMission != ERR_OK) { TAG_LOGE(AAFwkTag::ABILITYMGR, - "cannot find mission info from MissionInfoList by missionId: %{public}d", missionId); + "cannot find mission info:%{public}d", missionId); return true; } if (!IsAbilityControllerStart(innerMissionInfo.missionInfo.want, innerMissionInfo.missionInfo.want.GetBundle())) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "IsAbilityControllerStart failed: %{public}s", + TAG_LOGE(AAFwkTag::ABILITYMGR, "isAbilityControllerStart failed:%{public}s", innerMissionInfo.missionInfo.want.GetBundle().c_str()); return false; } @@ -5019,10 +5019,10 @@ bool AbilityManagerService::GenerateDataAbilityRequestByUri(const std::string& d { auto bms = GetBundleManager(); CHECK_POINTER_AND_RETURN(bms, false); - TAG_LOGI(AAFwkTag::ABILITYMGR, "called. userId %{public}d", userId); + TAG_LOGI(AAFwkTag::ABILITYMGR, "called userId %{public}d", userId); bool queryResult = IN_PROCESS_CALL(bms->QueryAbilityInfoByUri(dataAbilityUri, userId, abilityRequest.abilityInfo)); if (!queryResult || abilityRequest.abilityInfo.name.empty() || abilityRequest.abilityInfo.bundleName.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Invalid ability info for data ability acquiring."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid ability info acquiring"); return false; } abilityRequest.callerToken = callerToken; @@ -5034,27 +5034,27 @@ sptr AbilityManagerService::AcquireDataAbility( { auto localUri(uri); if (localUri.GetScheme() != AbilityConfig::SCHEME_DATA_ABILITY) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Acquire data ability with invalid uri scheme."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "acquire data ability invalid uri scheme"); return nullptr; } std::vector pathSegments; localUri.GetPathSegments(pathSegments); if (pathSegments.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Acquire data ability with invalid uri path."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "acquire data ability invalid uri path"); return nullptr; } auto userId = GetValidUserId(INVALID_USER_ID); AbilityRequest abilityRequest; if (!GenerateDataAbilityRequestByUri(localUri.ToString(), abilityRequest, callerToken, userId)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Generate data ability request by uri failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "generate data ability request failed"); return nullptr; } auto isShellCall = AAFwk::PermissionVerification::GetInstance()->IsShellCall(); auto isSaCall = AAFwk::PermissionVerification::GetInstance()->IsSACall(); if (!isSaCall && CheckCallDataAbilityPermission(abilityRequest, isShellCall, isSaCall) != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Invalid ability request info for data ability acquiring."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid ability request info acquiring"); return nullptr; } @@ -5064,12 +5064,12 @@ sptr AbilityManagerService::AcquireDataAbility( if (CheckStaticCfgPermission(abilityRequest, false, -1, true, isSaCall) != AppExecFwk::Constants::PERMISSION_GRANTED) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "CheckStaticCfgPermission fail"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "checkStaticCfgPermission fail"); return nullptr; } if (!VerificationAllToken(callerToken)) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "VerificationAllToken fail"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "verificationAllToken fail"); return nullptr; } @@ -5090,13 +5090,13 @@ int AbilityManagerService::ReleaseDataAbility( { TAG_LOGI(AAFwkTag::ABILITYMGR, "called"); if (!dataAbilityScheduler || !callerToken) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "dataAbilitySchedule or callerToken is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "dataAbilitySchedule or callerToken null"); return ERR_INVALID_VALUE; } std::shared_ptr dataAbilityManager = GetDataAbilityManager(dataAbilityScheduler); if (!dataAbilityManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "dataAbilityScheduler is not exists"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "dataAbilityScheduler absent"); return ERR_INVALID_VALUE; } @@ -5127,20 +5127,20 @@ int AbilityManagerService::AttachAbilityThread( // force timeout ability for test if (IsNeedTimeoutForTest(abilityInfo.name, AbilityRecord::ConvertAbilityState(AbilityState::INITIAL))) { TAG_LOGW(AAFwkTag::ABILITYMGR, - "force timeout ability for test, state:INITIAL, ability: %{public}s", abilityInfo.name.c_str()); + "force timeout ability, state:INITIAL, ability:%{public}s", abilityInfo.name.c_str()); return ERR_OK; } if (type == AppExecFwk::AbilityType::SERVICE || type == AppExecFwk::AbilityType::EXTENSION) { auto connectManager = GetConnectManagerByUserId(userId); if (!connectManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager is nullptr. userId=%{public}d", userId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager null userId=%{public}d", userId); return ERR_INVALID_VALUE; } return connectManager->AttachAbilityThreadLocked(scheduler, token); } else if (type == AppExecFwk::AbilityType::DATA) { auto dataAbilityManager = GetDataAbilityManagerByUserId(userId); if (!dataAbilityManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "dataAbilityManager is Null. userId=%{public}d", userId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "dataAbilityManager null userId=%{public}d", userId); return ERR_INVALID_VALUE; } return dataAbilityManager->AttachAbilityThread(scheduler, token); @@ -5263,7 +5263,7 @@ void AbilityManagerService::DumpSysAbilityInner( return; } if (argList.size() >= MIN_DUMP_ARGUMENT_NUM) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "argList = %{public}s", argList[1].c_str()); + TAG_LOGI(AAFwkTag::ABILITYMGR, "argList=%{public}s", argList[1].c_str()); std::vector params(argList.begin() + MIN_DUMP_ARGUMENT_NUM, argList.end()); try { auto abilityId = static_cast(std::stoi(argList[1])); @@ -5290,7 +5290,7 @@ void AbilityManagerService::DumpSysAbilityInnerBySCB( return; } if (argList.size() >= MIN_DUMP_ARGUMENT_NUM) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "argList = %{public}s", argList[1].c_str()); + TAG_LOGI(AAFwkTag::ABILITYMGR, "argList=%{public}s", argList[1].c_str()); std::vector params(argList.begin() + MIN_DUMP_ARGUMENT_NUM, argList.end()); try { auto abilityId = static_cast(std::stoi(argList[1])); @@ -5309,7 +5309,7 @@ void AbilityManagerService::DumpSysAbilityInnerBySCB( void AbilityManagerService::DumpSysStateInner( const std::string& args, std::vector& info, bool isClient, bool isUserID, int userId) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "DumpSysStateInner begin:%{public}s", args.c_str()); + TAG_LOGI(AAFwkTag::ABILITYMGR, "dumpSysStateInner begin:%{public}s", args.c_str()); std::shared_ptr targetManager; if (isUserID) { @@ -5336,7 +5336,7 @@ void AbilityManagerService::DumpSysStateInner( } else if (argList.size() < MIN_DUMP_ARGUMENT_NUM) { targetManager->DumpState(info, isClient); } else { - TAG_LOGI(AAFwkTag::ABILITYMGR, "uri = %{public}s", argList[1].c_str()); + TAG_LOGI(AAFwkTag::ABILITYMGR, "uri=%{public}s", argList[1].c_str()); std::vector params(argList.begin() + MIN_DUMP_ARGUMENT_NUM, argList.end()); targetManager->DumpStateByUri(info, isClient, argList[1], params); } @@ -5423,14 +5423,14 @@ void AbilityManagerService::DumpUIExtensionRootHostRunningInfos(pid_t pid, std:: { auto appMgr = GetAppMgr(); if (appMgr == nullptr) { - TAG_LOGW(AAFwkTag::ABILITYMGR, "Get AppMgr failed."); + TAG_LOGW(AAFwkTag::ABILITYMGR, "get appMgr failed"); return; } std::vector hostPids; auto ret = IN_PROCESS_CALL(appMgr->GetAllUIExtensionRootHostPid(pid, hostPids)); if (ret != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get root host process info faild."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "get root host process info faild"); return; } @@ -5452,14 +5452,14 @@ void AbilityManagerService::DumpUIExtensionProviderRunningInfos(pid_t hostPid, s { auto appMgr = GetAppMgr(); if (appMgr == nullptr) { - TAG_LOGW(AAFwkTag::ABILITYMGR, "Get AppMgr failed."); + TAG_LOGW(AAFwkTag::ABILITYMGR, "get appMgr failed"); return; } std::vector providerPids; auto ret = IN_PROCESS_CALL(appMgr->GetAllUIExtensionProviderPid(hostPid, providerPids)); if (ret != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get provider process info faild."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "get process info failed"); return; } @@ -5620,7 +5620,7 @@ void AbilityManagerService::DumpState(const std::string &args, std::vectorIsShellCall(); auto isHidumperServiceCall = (IPCSkeleton::GetCallingUid() == HIDUMPER_SERVICE_UID); if (!isShellCall && !isHidumperServiceCall) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission deny."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission deny"); return; } std::vector argList; @@ -5664,7 +5664,7 @@ void AbilityManagerService::DumpSysState( auto isShellCall = AAFwk::PermissionVerification::GetInstance()->IsShellCall(); auto isHidumperServiceCall = (IPCSkeleton::GetCallingUid() == HIDUMPER_SERVICE_UID); if (!isShellCall && !isHidumperServiceCall) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission deny."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission deny"); return; } std::vector argList; @@ -5718,7 +5718,7 @@ int AbilityManagerService::AbilityTransitionDone(const sptr &toke } auto abilityInfo = abilityRecord->GetAbilityInfo(); - TAG_LOGI(AAFwkTag::ABILITYMGR, "Lifecycle: ability:%{public}s", abilityRecord->GetURI().c_str()); + TAG_LOGI(AAFwkTag::ABILITYMGR, "lifecycle:ability:%{public}s", abilityRecord->GetURI().c_str()); auto type = abilityInfo.type; auto userId = abilityRecord->GetApplicationInfo().uid / BASE_USER_RANGE; // force timeout ability for test @@ -5727,7 +5727,7 @@ int AbilityManagerService::AbilityTransitionDone(const sptr &toke std::string tempState = isTerminate ? AbilityRecord::ConvertAbilityState(AbilityState::TERMINATING) : AbilityRecord::ConvertAbilityState(static_cast(targetState)); if (IsNeedTimeoutForTest(abilityInfo.name, tempState)) { - TAG_LOGW(AAFwkTag::ABILITYMGR, "force timeout ability for test, state:%{public}s, ability: %{public}s", + TAG_LOGW(AAFwkTag::ABILITYMGR, "force timeout ability, state:%{public}s, ability:%{public}s", tempState.c_str(), abilityInfo.name.c_str()); return ERR_OK; @@ -5735,7 +5735,7 @@ int AbilityManagerService::AbilityTransitionDone(const sptr &toke if (type == AppExecFwk::AbilityType::SERVICE || type == AppExecFwk::AbilityType::EXTENSION) { auto connectManager = GetConnectManagerByUserId(userId); if (!connectManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager is nullptr. userId=%{public}d", userId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager null userId=%{public}d", userId); return ERR_INVALID_VALUE; } return connectManager->AbilityTransitionDone(token, state); @@ -5743,7 +5743,7 @@ int AbilityManagerService::AbilityTransitionDone(const sptr &toke if (type == AppExecFwk::AbilityType::DATA) { auto dataAbilityManager = GetDataAbilityManagerByUserId(userId); if (!dataAbilityManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "dataAbilityManager is Null. userId=%{public}d", userId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "dataAbilityManager null userId=%{public}d", userId); return ERR_INVALID_VALUE; } return dataAbilityManager->AbilityTransitionDone(token, state); @@ -5770,7 +5770,7 @@ int AbilityManagerService::AbilityTransitionDone(const sptr &toke } else { auto missionListManager = GetMissionListManagerByUserId(ownerMissionUserId); if (!missionListManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "missionListManager is Null. userId=%{public}d", ownerMissionUserId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "missionListManager null userId=%{public}d", ownerMissionUserId); return ERR_INVALID_VALUE; } return missionListManager->AbilityTransactionDone(token, state, saveData); @@ -5785,22 +5785,22 @@ int AbilityManagerService::AbilityWindowConfigTransitionDone( return ERR_INVALID_VALUE; } auto abilityRecord = Token::GetAbilityRecordByToken(token); - CHECK_POINTER_AND_RETURN_LOG(abilityRecord, ERR_INVALID_VALUE, "Ability record is nullptr."); + CHECK_POINTER_AND_RETURN_LOG(abilityRecord, ERR_INVALID_VALUE, "ability record null."); if (!JudgeSelfCalled(abilityRecord)) { return CHECK_PERMISSION_FAILED; } - TAG_LOGI(AAFwkTag::ABILITYMGR, "Lifecycle: ability:%{public}s", abilityRecord->GetURI().c_str()); + TAG_LOGI(AAFwkTag::ABILITYMGR, "lifecycle:ability:%{public}s", abilityRecord->GetURI().c_str()); auto abilityInfo = abilityRecord->GetAbilityInfo(); auto type = abilityInfo.extensionAbilityType; if (type != AppExecFwk::ExtensionAbilityType::UI_SERVICE) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Invalid type"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid type"); return ERR_INVALID_VALUE; } auto userId = abilityRecord->GetApplicationInfo().uid / BASE_USER_RANGE; auto connectManager = GetConnectManagerByUserId(userId); if(!connectManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager is nullptr. userId=%{public}d", userId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager null userId=%{public}d", userId); return ERR_INVALID_VALUE; } return connectManager->AbilityWindowConfigTransactionDone(token, windowConfig); @@ -5823,13 +5823,13 @@ int AbilityManagerService::ScheduleConnectAbilityDone( auto type = abilityRecord->GetAbilityInfo().type; if (type != AppExecFwk::AbilityType::SERVICE && type != AppExecFwk::AbilityType::EXTENSION) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Connect ability failed, target ability is not service."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "ability failed, target ability not service"); return TARGET_ABILITY_NOT_SERVICE; } auto userId = abilityRecord->GetApplicationInfo().uid / BASE_USER_RANGE; auto connectManager = GetConnectManagerByUserId(userId); if (!connectManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager is nullptr. userId=%{public}d", userId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager null userId=%{public}d", userId); return ERR_INVALID_VALUE; } return connectManager->ScheduleConnectAbilityDoneLocked(token, remoteObject); @@ -5851,13 +5851,13 @@ int AbilityManagerService::ScheduleDisconnectAbilityDone(const sptrGetAbilityInfo().type; if (type != AppExecFwk::AbilityType::SERVICE && type != AppExecFwk::AbilityType::EXTENSION) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Connect ability failed, target ability is not service."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "ability failed, target ability not service"); return TARGET_ABILITY_NOT_SERVICE; } auto userId = abilityRecord->GetApplicationInfo().uid / BASE_USER_RANGE; auto connectManager = GetConnectManagerByUserId(userId); if (!connectManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager is nullptr. userId=%{public}d", userId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager null userId=%{public}d", userId); return ERR_INVALID_VALUE; } return connectManager->ScheduleDisconnectAbilityDoneLocked(token); @@ -5878,19 +5878,19 @@ int AbilityManagerService::ScheduleCommandAbilityDone(const sptr } // force timeout ability for test if (IsNeedTimeoutForTest(abilityRecord->GetAbilityInfo().name, std::string("COMMAND"))) { - TAG_LOGW(AAFwkTag::ABILITYMGR, "force timeout ability for test, state:COMMAND, ability: %{public}s", + TAG_LOGW(AAFwkTag::ABILITYMGR, "force timeout ability, state:COMMAND, ability: %{public}s", abilityRecord->GetAbilityInfo().name.c_str()); return ERR_OK; } auto type = abilityRecord->GetAbilityInfo().type; if (type != AppExecFwk::AbilityType::SERVICE && type != AppExecFwk::AbilityType::EXTENSION) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Connect ability failed, target ability is not service."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "failed, target ability not service"); return TARGET_ABILITY_NOT_SERVICE; } auto userId = abilityRecord->GetApplicationInfo().uid / BASE_USER_RANGE; auto connectManager = GetConnectManagerByUserId(userId); if (!connectManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager is nullptr. userId=%{public}d", userId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager null userId=%{public}d", userId); return ERR_INVALID_VALUE; } return connectManager->ScheduleCommandAbilityDoneLocked(token); @@ -5916,13 +5916,13 @@ int AbilityManagerService::ScheduleCommandAbilityWindowDone( if (!UIExtensionUtils::IsUIExtension(abilityRecord->GetAbilityInfo().extensionAbilityType) && !UIExtensionUtils::IsWindowExtension(abilityRecord->GetAbilityInfo().extensionAbilityType)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "target ability is not ui or window extension."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "target ability not ui or window extension"); return ERR_INVALID_VALUE; } auto userId = abilityRecord->GetApplicationInfo().uid / BASE_USER_RANGE; auto connectManager = GetConnectManagerByUserId(userId); if (!connectManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager is nullptr. userId=%{public}d", userId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager null userId=%{public}d", userId); return ERR_INVALID_VALUE; } return connectManager->ScheduleCommandAbilityWindowDone(token, sessionInfo, winCmd, abilityCmd); @@ -5941,7 +5941,7 @@ void AbilityManagerService::OnAbilityRequestDone(const sptr &toke case AppExecFwk::AbilityType::DATA: { auto dataAbilityManager = GetDataAbilityManagerByUserId(userId); if (!dataAbilityManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "dataAbilityManager is Null. userId=%{public}d", userId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "dataAbilityManager null userId=%{public}d", userId); return; } dataAbilityManager->OnAbilityRequestDone(token, state); @@ -5951,7 +5951,7 @@ void AbilityManagerService::OnAbilityRequestDone(const sptr &toke case AppExecFwk::AbilityType::EXTENSION: { auto connectManager = GetConnectManagerByUserId(userId); if (!connectManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager is nullptr. userId=%{public}d", userId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager null userId=%{public}d", userId); return; } connectManager->OnAbilityRequestDone(token, state); @@ -5966,7 +5966,7 @@ void AbilityManagerService::OnAbilityRequestDone(const sptr &toke } else { auto missionListManager = GetMissionListManagerByUserId(ownerUserId); if (!missionListManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "missionListManager is Null. userId=%{public}d", ownerUserId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "missionListManager null userId=%{public}d", ownerUserId); return; } missionListManager->OnAbilityRequestDone(token, state); @@ -6031,10 +6031,10 @@ void AbilityManagerService::StartHighestPriorityAbility(int32_t userId, bool isB while (!IN_PROCESS_CALL(bms->ImplicitQueryInfoByPriority(want, AppExecFwk::AbilityInfoFlag::GET_ABILITY_INFO_DEFAULT, userId, abilityInfo, extensionAbilityInfo))) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "Waiting query highest priority ability info completed."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "waiting query highest priority ability info completed"); ++attemptNums; if (!isBoot && attemptNums > SWITCH_ACCOUNT_TRY) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Query highest priority ability failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "query highest priority ability failed"); return; } AbilityRequest abilityRequest; @@ -6042,20 +6042,20 @@ void AbilityManagerService::StartHighestPriorityAbility(int32_t userId, bool isB } if (abilityInfo.name.empty() && extensionAbilityInfo.name.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Query highest priority ability failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "query highest priority ability failed"); return; } Want abilityWant; // donot use 'want' here, because the entity of 'want' is not empty if (!abilityInfo.name.empty()) { /* highest priority ability */ - TAG_LOGI(AAFwkTag::ABILITYMGR, "Start the highest priority ability. bundleName: %{public}s, ability:%{public}s", + TAG_LOGI(AAFwkTag::ABILITYMGR, "start highest priority ability bundleName:%{public}s, ability:%{public}s", abilityInfo.bundleName.c_str(), abilityInfo.name.c_str()); abilityWant.SetElementName(abilityInfo.bundleName, abilityInfo.name); } else { /* highest priority extension ability */ TAG_LOGI(AAFwkTag::ABILITYMGR, - "Start the highest priority extension ability. bundleName: %{public}s, ability:%{public}s", + "start highest priority extension ability bundleName:%{public}s, ability:%{public}s", extensionAbilityInfo.bundleName.c_str(), extensionAbilityInfo.name.c_str()); abilityWant.SetElementName(extensionAbilityInfo.bundleName, extensionAbilityInfo.name); } @@ -6122,18 +6122,18 @@ int AbilityManagerService::GenerateAbilityRequest(const Want &want, int requestC } if (request.abilityInfo.type == AppExecFwk::AbilityType::SERVICE && request.abilityInfo.isStageBasedModel) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "Stage mode, abilityInfo SERVICE type reset EXTENSION."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "stage mode, abilityInfo SERVICE type reset EXTENSION"); request.abilityInfo.type = AppExecFwk::AbilityType::EXTENSION; } if (request.abilityInfo.applicationInfo.name.empty() || request.abilityInfo.applicationInfo.bundleName.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get app info failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "get app info failed"); return RESOLVE_APP_ERR; } if (want.GetIntParam(AAFwk::SCREEN_MODE_KEY, ScreenMode::IDLE_SCREEN_MODE) == ScreenMode::JUMP_SCREEN_MODE && (request.abilityInfo.applicationInfo.bundleType != AppExecFwk::BundleType::ATOMIC_SERVICE || request.abilityInfo.launchMode != AppExecFwk::LaunchMode::SINGLETON)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "The interface of starting atomicService can start only atomicService."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "interface of starting atomicService start only atomicService"); return TARGET_ABILITY_NOT_SERVICE; } request.appInfo = request.abilityInfo.applicationInfo; @@ -6188,7 +6188,7 @@ int32_t AbilityManagerService::InitialAbilityRequest(AbilityRequest &request, request.abilityInfo = abilityInfo.abilityInfo; request.extensionProcessMode = abilityInfo.extensionProcessMode; if (request.abilityInfo.applicationInfo.name.empty() || request.abilityInfo.applicationInfo.bundleName.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get app info failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "get app info failed"); return RESOLVE_APP_ERR; } request.appInfo = request.abilityInfo.applicationInfo; @@ -6214,14 +6214,14 @@ int AbilityManagerService::StopServiceAbility(const Want &want, int32_t userId, if (!isSaCall && !isShellCall) { auto abilityRecord = Token::GetAbilityRecordByToken(token); if (abilityRecord == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "callerRecord is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callerRecord null"); return ERR_INVALID_VALUE; } } int32_t validUserId = GetValidUserId(userId); if (!JudgeMultiUserConcurrency(validUserId)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Multi-user non-concurrent unsatisfied"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "multi-user non-concurrent unsatisfied"); return ERR_CROSS_USER; } @@ -6229,7 +6229,7 @@ int AbilityManagerService::StopServiceAbility(const Want &want, int32_t userId, AbilityRequest abilityRequest; auto result = GenerateAbilityRequest(want, DEFAULT_INVAL_VALUE, abilityRequest, nullptr, validUserId); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Generate ability request local error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "generate ability request local error"); return result; } @@ -6240,13 +6240,13 @@ int AbilityManagerService::StopServiceAbility(const Want &want, int32_t userId, auto type = abilityInfo.type; if (type != AppExecFwk::AbilityType::SERVICE && type != AppExecFwk::AbilityType::EXTENSION) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Target ability is not service type."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "target ability not service type"); return TARGET_ABILITY_NOT_SERVICE; } auto res = JudgeAbilityVisibleControl(abilityInfo); if (res != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Target ability is invisible"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "target ability invisible"); return res; } @@ -6326,14 +6326,14 @@ int AbilityManagerService::KillProcess(const std::string &bundleName, const bool AppExecFwk::BundleInfo bundleInfo; if (!IN_PROCESS_CALL( bms->GetBundleInfo(bundleName, AppExecFwk::BundleFlag::GET_BUNDLE_DEFAULT, bundleInfo, userId))) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Failed to get bundle info when kill process."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "get bundle info when kill process failed"); return GET_BUNDLE_INFO_FAILED; } bool keepAliveEnable = bundleInfo.isKeepAlive; AmsResidentProcessRdb::GetInstance().GetResidentProcessEnable(bundleName, keepAliveEnable); if (keepAliveEnable && DelayedSingleton::GetInstance()->IsMemorySizeSufficent()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Can not kill keep alive process."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "no kill alive process"); return KILL_PROCESS_KEEP_ALIVE; } @@ -6352,7 +6352,7 @@ int AbilityManagerService::UninstallApp(const std::string &bundleName, int32_t u int32_t AbilityManagerService::UninstallApp(const std::string &bundleName, int32_t uid, int32_t appIndex) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "Uninstall app, bundleName: %{public}s, uid=%{public}d, appIndex:%{public}d", + TAG_LOGI(AAFwkTag::ABILITYMGR, "uninstall app, bundleName:%{public}s, uid=%{public}d, appIndex:%{public}d", bundleName.c_str(), uid, appIndex); return UninstallAppInner(bundleName, uid, appIndex, false, ""); } @@ -6361,7 +6361,7 @@ int32_t AbilityManagerService::UpgradeApp(const std::string &bundleName, const i int32_t appIndex) { TAG_LOGI(AAFwkTag::ABILITYMGR, - "UpgradeApp app, bundleName: %{public}s, uid=%{public}d, exitMsg: %{public}s, appIndex:%{public}d", + "upgradeApp app, bundleName: %{public}s, uid=%{public}d, exitMsg:%{public}s, appIndex:%{public}d", bundleName.c_str(), uid, exitMsg.c_str(), appIndex); return UninstallAppInner(bundleName, uid, appIndex, true, exitMsg); } @@ -6372,7 +6372,7 @@ int32_t AbilityManagerService::UninstallAppInner(const std::string &bundleName, pid_t callingPid = IPCSkeleton::GetCallingPid(); pid_t pid = getprocpid(); if (callingPid != pid) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s: Not bundleMgr call.", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s: not bundleMgr", __func__); return CHECK_PERMISSION_FAILED; } @@ -6406,19 +6406,19 @@ std::shared_ptr AbilityManagerService::GetBundleMan int AbilityManagerService::PreLoadAppDataAbilities(const std::string &bundleName, const int32_t userId) { if (bundleName.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Invalid bundle name when app data abilities preloading."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid bundle name preloading"); return ERR_INVALID_VALUE; } if (taskHandler_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "taskHandler nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "taskHandler null"); return ERR_INVALID_STATE; } taskHandler_->SubmitTask([weak = weak_from_this(), bundleName, userId]() { auto pthis = weak.lock(); if (pthis == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "pthis nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "pthis null"); return; } pthis->PreLoadAppDataAbilitiesTask(bundleName, userId); @@ -6432,7 +6432,7 @@ void AbilityManagerService::PreLoadAppDataAbilitiesTask(const std::string &bundl TAG_LOGD(AAFwkTag::ABILITYMGR, "called"); auto dataAbilityManager = GetDataAbilityManagerByUserId(userId); if (dataAbilityManager == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Invalid data ability manager when app data abilities preloading."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid data ability manager preloading"); return; } @@ -6444,7 +6444,7 @@ void AbilityManagerService::PreLoadAppDataAbilitiesTask(const std::string &bundl bms->GetBundleInfo(bundleName, AppExecFwk::BundleFlag::GET_BUNDLE_WITH_ABILITIES, bundleInfo, userId)); if (!ret) { TAG_LOGE(AAFwkTag::ABILITYMGR, - "Failed to get bundle info when app data abilities preloading, userId is %{public}d", userId); + "get bundleInfo preloading failed, userId:%{public}d", userId); return; } @@ -6457,7 +6457,7 @@ void AbilityManagerService::PreLoadAppDataAbilitiesTask(const std::string &bundl continue; } if ((system_clock::now() - begin) >= DATA_ABILITY_START_TIMEOUT) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "App data ability preloading for '%{public}s' timeout.", bundleName.c_str()); + TAG_LOGE(AAFwkTag::ABILITYMGR, "app data ability preloading '%{public}s' timeout", bundleName.c_str()); return; } dataAbilityRequest.abilityInfo = *it; @@ -6468,7 +6468,7 @@ void AbilityManagerService::PreLoadAppDataAbilitiesTask(const std::string &bundl auto dataAbility = dataAbilityManager->Acquire(dataAbilityRequest, false, nullptr, false); if (dataAbility == nullptr) { TAG_LOGE(AAFwkTag::ABILITYMGR, - "Failed to preload data ability '%{public}s.%{public}s'.", it->bundleName.c_str(), it->name.c_str()); + "preload data ability failed '%{public}s.%{public}s'", it->bundleName.c_str(), it->name.c_str()); return; } } @@ -6578,14 +6578,14 @@ void AbilityManagerService::HandleShareDataTimeOut(int64_t uniqueId) WantParams wantParam; int32_t ret = GetShareDataPairAndReturnData(nullptr, ERR_TIMED_OUT, uniqueId, wantParam); if (ret) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "acqurieShareData failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "acqurieShareData failed"); } } int32_t AbilityManagerService::GetShareDataPairAndReturnData(std::shared_ptr abilityRecord, const int32_t &resultCode, const int32_t &uniqueId, WantParams &wantParam) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "resultCode:%{public}d, uniqueId:%{public}d, wantParam size:%{public}d.", + TAG_LOGI(AAFwkTag::ABILITYMGR, "resultCode:%{public}d, uniqueId:%{public}d, wantParam size:%{public}d", resultCode, uniqueId, wantParam.Size()); { std::lock_guard guard(iAcquireShareDataMapLock_); @@ -6593,12 +6593,12 @@ int32_t AbilityManagerService::GetShareDataPairAndReturnData(std::shared_ptrsecond; if (abilityRecord && shareDataPair.first != abilityRecord->GetAbilityRecordId()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityRecord is not the abilityRecord from request."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityRecord is not the abilityRecord from request"); return ERR_INVALID_VALUE; } auto callback = shareDataPair.second; if (!callback) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "callback object is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callback object null"); return ERR_INVALID_VALUE; } auto ret = callback->AcquireShareDataDone(resultCode, wantParam); @@ -6606,13 +6606,13 @@ int32_t AbilityManagerService::GetShareDataPairAndReturnData(std::shared_ptr &token) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "Verification token."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "verification token"); auto dataAbilityManager = GetCurrentDataAbilityManager(); CHECK_POINTER_RETURN_BOOL(dataAbilityManager); auto connectManager = GetCurrentConnectManager(); @@ -6628,26 +6628,26 @@ bool AbilityManagerService::VerificationToken(const sptr &token) } if (dataAbilityManager->GetAbilityRecordByToken(token)) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "Verification token4."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "verification token4"); return true; } if (connectManager->GetExtensionByTokenFromServiceMap(token)) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "Verification token5."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "verification token5"); return true; } if (connectManager->GetExtensionByTokenFromAbilityCache(token)) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "Verification token5."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "verification token5"); return true; } if (connectManager->GetExtensionByTokenFromTerminatingMap(token)) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "Verification token5."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "verification token5"); return true; } - TAG_LOGE(AAFwkTag::ABILITYMGR, "Failed to verify token."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "verify token failed"); return false; } @@ -6687,7 +6687,7 @@ std::shared_ptr AbilityManagerService::GetDataAbilityManager std::unordered_map> AbilityManagerService::GetConnectManagers() { if (subManagersHelper_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "pointer is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "pointer null"); return std::unordered_map>(); } return subManagersHelper_->GetConnectManagers(); @@ -6734,7 +6734,7 @@ std::shared_ptr AbilityManagerService::GetPendingWantManager std::unordered_map> AbilityManagerService::GetMissionListManagers() { if (subManagersHelper_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "pointer is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "pointer null"); return std::unordered_map>(); } return subManagersHelper_->GetMissionListManagers(); @@ -6761,7 +6761,7 @@ std::shared_ptr AbilityManagerService::GetMissionListWrap() std::unordered_map> AbilityManagerService::GetUIAbilityManagers() { if (subManagersHelper_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "pointer is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "pointer null"); return std::unordered_map>(); } return subManagersHelper_->GetUIAbilityManagers(); @@ -6794,11 +6794,11 @@ void AbilityManagerService::StartResidentApps() std::vector bundleInfos; if (!IN_PROCESS_CALL( bms->GetBundleInfos(OHOS::AppExecFwk::GET_BUNDLE_DEFAULT, bundleInfos, U0_USER_ID))) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get resident bundleinfos failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "get resident bundleinfos failed"); return; } DelayedSingleton::GetInstance()->Init(); - TAG_LOGI(AAFwkTag::ABILITYMGR, "StartResidentApps GetBundleInfos size: %{public}zu", bundleInfos.size()); + TAG_LOGI(AAFwkTag::ABILITYMGR, "startResidentApps getBundleInfos size:%{public}zu", bundleInfos.size()); DelayedSingleton::GetInstance()->StartResidentProcessWithMainElement(bundleInfos); if (!bundleInfos.empty()) { @@ -6813,14 +6813,14 @@ void AbilityManagerService::StartAutoStartupApps() { TAG_LOGD(AAFwkTag::ABILITYMGR, "called"); if (abilityAutoStartupService_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityAutoStartupService_ is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityAutoStartupService_ null"); return; } std::vector infoList; int32_t result = abilityAutoStartupService_->QueryAllAutoStartupApplicationsWithoutPermission(infoList, GetUserId()); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Failed to query data."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "failed query data"); return; } @@ -6856,7 +6856,7 @@ void AbilityManagerService::RetryStartAutoStartupApps( auto retryStartAutoStartupAppsTask = [aams = weak_from_this(), list = failedList, retryCount]() { auto obj = aams.lock(); if (obj == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Retry start auto startup app error, obj is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "retry start auto startup app error, obj null"); return; } obj->RetryStartAutoStartupApps(list, retryCount - 1); @@ -6878,18 +6878,18 @@ void AbilityManagerService::SubscribeScreenUnlockedEvent() TAG_LOGI(AAFwkTag::ABILITYMGR, "user screen unlocked."); auto abilityMgr = abilityManager.lock(); if (abilityMgr == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Invalid abilityMgr pointer."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid abilityMgr pointer"); return; } auto taskHandler = abilityMgr->GetTaskHandler(); if (taskHandler == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Invalid taskHandler pointer."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid taskHandler pointer"); return; } auto startAutoStartupAppsTask = [abilityManager]() { auto abilityMgr = abilityManager.lock(); if (abilityMgr == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Invalid abilityMgr pointer."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid abilityMgr pointer"); return; } abilityMgr->RemoveScreenUnlockInterceptor(); @@ -6922,7 +6922,7 @@ void AbilityManagerService::RetrySubscribeScreenUnlockedEvent(int32_t retryCount bool subResult = EventFwk::CommonEventManager::SubscribeCommonEvent(screenSubscriber); auto obj = aams.lock(); if (obj == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Retry subscribe screen unlocked event, obj is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "retry subscribe screen unlocked event, obj null"); return; } if (!subResult && retryCount > 0) { @@ -6941,32 +6941,32 @@ void AbilityManagerService::RemoveScreenUnlockInterceptor() void AbilityManagerService::ConnectBmsService() { TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s", __func__); - TAG_LOGI(AAFwkTag::ABILITYMGR, "Waiting AppMgr Service run completed."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "waiting appMgr service run completed"); while (!DelayedSingleton::GetInstance()->Init(shared_from_this())) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "failed to init AppScheduler"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "failed init appScheduler"); usleep(REPOLL_TIME_MICRO_SECONDS); } - TAG_LOGI(AAFwkTag::ABILITYMGR, "Waiting BundleMgr Service run completed."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "waiting bundleMgr service run completed"); /* wait until connected to bundle manager service */ std::lock_guard guard(globalLock_); while (iBundleManager_ == nullptr) { sptr bundle_obj = OHOS::DelayedSingleton::GetInstance()->GetSystemAbility(BUNDLE_MGR_SERVICE_SYS_ABILITY_ID); if (bundle_obj == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "failed to get bundle manager service"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "failed get bundle manager service"); usleep(REPOLL_TIME_MICRO_SECONDS); continue; } iBundleManager_ = iface_cast(bundle_obj); } - TAG_LOGI(AAFwkTag::ABILITYMGR, "Connect bms success!"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "bms success"); } int AbilityManagerService::GetWantSenderInfo(const sptr &target, std::shared_ptr &info) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "Get pending request info."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "get pending request info"); auto pendingWantManager = GetCurrentPendingWantManager(); CHECK_POINTER_AND_RETURN(pendingWantManager, ERR_INVALID_VALUE); CHECK_POINTER_AND_RETURN(target, ERR_INVALID_VALUE); @@ -6976,7 +6976,7 @@ int AbilityManagerService::GetWantSenderInfo(const sptr &target, st int AbilityManagerService::GetAppMemorySize() { - TAG_LOGI(AAFwkTag::ABILITYMGR, "service GetAppMemorySize start"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "service getAppMemorySize start"); const char *key = "const.product.arkheaplimit"; const char *def = "512m"; char *valueGet = nullptr; @@ -6985,7 +6985,7 @@ int AbilityManagerService::GetAppMemorySize() int resultInt = 0; if ((ret != GET_PARAMETER_OTHER) && (ret != GET_PARAMETER_INCORRECT)) { if (valueGet == nullptr) { - TAG_LOGW(AAFwkTag::ABILITYMGR, "%{public}s, valueGet is nullptr", __func__); + TAG_LOGW(AAFwkTag::ABILITYMGR, "%{public}s, valueGet null", __func__); return APP_MEMORY_SIZE; } int len = strlen(valueGet); @@ -7026,7 +7026,7 @@ int32_t AbilityManagerService::GetMissionIdByAbilityToken(const sptrGetOwnerMissionUserId(); @@ -7051,7 +7051,7 @@ int32_t AbilityManagerService::GetMissionIdByAbilityTokenInner(const sptrGetMissionIdByAbilityToken(token); @@ -7070,17 +7070,17 @@ sptr AbilityManagerService::GetAbilityTokenByMissionId(int32_t mi int AbilityManagerService::StartRemoteAbilityByCall(const Want &want, const sptr &callerToken, const sptr &connect) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s begin StartRemoteAbilityByCall", __func__); + TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s begin startRemoteAbilityByCall", __func__); Want remoteWant = want; if (AddStartControlParam(remoteWant, callerToken) != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s AddStartControlParam failed.", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s addStartControlParam failed", __func__); return ERR_INVALID_VALUE; } int32_t missionId = -1; if (Rosen::SceneBoardJudgement::IsSceneBoardEnabled()) { missionId = GetMissionIdByAbilityTokenInner(callerToken); if (!missionId) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Invalid missionId id."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid missionId id"); return ERR_INVALID_VALUE; } } else { @@ -7112,7 +7112,7 @@ int AbilityManagerService::StartAbilityByCall(const Want &want, const sptrDoProcess(interceptorParam); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ is nullptr or DoProcess return error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ null or doProcess error"); return result; } @@ -7145,7 +7145,7 @@ int AbilityManagerService::StartAbilityByCall(const Want &want, const sptrDoProcess(afterCheckParam); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "afterCheckExecuter_ is nullptr or DoProcess return error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "afterCheckExecuter_ null or doProcess error"); return result; } if (Rosen::SceneBoardJudgement::IsSceneBoardEnabled()) { @@ -7194,7 +7194,7 @@ int AbilityManagerService::StartAbilityByCall(const Want &want, const sptr callback) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "StartUser in service:%{public}d.", userId); + TAG_LOGI(AAFwkTag::ABILITYMGR, "startUser in service:%{public}d", userId); if (IPCSkeleton::GetCallingUid() != ACCOUNT_MGR_SERVICE_UID) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "StartUser permission verification failed, not account process."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "startUser permission verification failed, not account process"); if (callback != nullptr) { callback->OnStartUserDone(userId, CHECK_PERMISSION_FAILED); } @@ -7289,9 +7289,9 @@ int AbilityManagerService::StartUser(int userId, sptr callback) int AbilityManagerService::StopUser(int userId, const sptr &callback) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "StopUser in service:%{public}d", userId); + TAG_LOGI(AAFwkTag::ABILITYMGR, "stopUser in service:%{public}d", userId); if (IPCSkeleton::GetCallingUid() != ACCOUNT_MGR_SERVICE_UID) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "StopUser permission verification failed, not account process"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "stopUser permission verification failed, not account process"); if (callback != nullptr) { callback->OnStopUserDone(userId, CHECK_PERMISSION_FAILED); } @@ -7312,7 +7312,7 @@ int AbilityManagerService::StopUser(int userId, const sptr &callb int AbilityManagerService::LogoutUser(int32_t userId) { if (IPCSkeleton::GetCallingUid() != ACCOUNT_MGR_SERVICE_UID) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verification failed, not account process"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verification failed, not account process"); return CHECK_PERMISSION_FAILED; } @@ -7349,7 +7349,7 @@ void AbilityManagerService::OnAcceptWantResponse( void AbilityManagerService::OnStartSpecifiedAbilityTimeoutResponse(const AAFwk::Want &want, int32_t requestId) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s.", want.GetElement().GetURI().c_str()); + TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s", want.GetElement().GetURI().c_str()); if (Rosen::SceneBoardJudgement::IsSceneBoardEnabled()) { auto uiAbilityManager = GetCurrentUIAbilityManager(); CHECK_POINTER(uiAbilityManager); @@ -7377,7 +7377,7 @@ void AbilityManagerService::OnStartSpecifiedProcessResponse(const AAFwk::Want &w void AbilityManagerService::OnStartSpecifiedProcessTimeoutResponse(const AAFwk::Want &want, int32_t requestId) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s.", want.GetElement().GetURI().c_str()); + TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s", want.GetElement().GetURI().c_str()); if (Rosen::SceneBoardJudgement::IsSceneBoardEnabled()) { auto uiAbilityManager = GetCurrentUIAbilityManager(); CHECK_POINTER(uiAbilityManager); @@ -7423,7 +7423,7 @@ void AbilityManagerService::UpdateFocusState(std::vector &in auto abilityRecord = Token::GetAbilityRecordByToken(token); if (abilityRecord == nullptr) { - TAG_LOGW(AAFwkTag::ABILITYMGR, "%{public}s abilityRecord is null.", __func__); + TAG_LOGW(AAFwkTag::ABILITYMGR, "%{public}s abilityRecord null", __func__); return; } @@ -7471,14 +7471,14 @@ int AbilityManagerService::RegisterSnapshotHandler(const sptr& { auto isSaCall = AAFwk::PermissionVerification::GetInstance()->IsSACall(); if (!isSaCall) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s:permission verification failed", __func__); return 0; } auto missionListManager = GetCurrentMissionListManager(); CHECK_POINTER_AND_RETURN(missionListManager, INNER_ERR); missionListManager->RegisterSnapshotHandler(handler); - TAG_LOGI(AAFwkTag::ABILITYMGR, "snapshot: AbilityManagerService register snapshot handler success."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "snapshot: abilityManagerService register snapshot handler success"); return ERR_OK; } @@ -7488,15 +7488,15 @@ int32_t AbilityManagerService::GetMissionSnapshot(const std::string& deviceId, i HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); CHECK_CALLER_IS_SYSTEM_APP; if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s: permission verification failed", __func__); return CHECK_PERMISSION_FAILED; } if (CheckIsRemote(deviceId)) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "get remote mission snapshot."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "get remote mission snapshot"); return GetRemoteMissionSnapshotInfo(deviceId, missionId, missionSnapshot); } - TAG_LOGI(AAFwkTag::ABILITYMGR, "get local mission snapshot."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "get local mission snapshot"); auto missionListManager = GetCurrentMissionListManager(); CHECK_POINTER_AND_RETURN(missionListManager, INNER_ERR); auto token = GetAbilityTokenByMissionId(missionId); @@ -7527,11 +7527,11 @@ void AbilityManagerService::EnableRecoverAbility(const sptr& toke } auto record = Token::GetAbilityRecordByToken(token); if (record == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s AppRecovery::failed find abilityRecord by given token.", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s appRecovery::failed find abilityRecord by token", __func__); return; } if (record->IsClearMissionFlag()) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s AppRecovery::not allow EnableRecoverAbility before clearMission.", + TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s appRecovery::not allow EnableRecoverAbility before clearMission", __func__); return; } @@ -7539,7 +7539,7 @@ void AbilityManagerService::EnableRecoverAbility(const sptr& toke auto callingTokenId = IPCSkeleton::GetCallingTokenID(); auto tokenID = record->GetApplicationInfo().accessTokenId; if (callingTokenId != tokenID) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "AppRecovery ScheduleRecoverAbility not self, not enabled"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "appRecovery scheduleRecoverAbility not self, not enabled"); return; } { @@ -7564,7 +7564,7 @@ void AbilityManagerService::EnableRecoverAbility(const sptr& toke } else { auto missionListMgr = GetMissionListManagerByUserId(userId); if (missionListMgr == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "missionListMgr is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "missionListMgr null"); return; } missionListMgr->EnableRecoverAbility(record->GetMissionId()); @@ -7577,12 +7577,12 @@ void AbilityManagerService::ScheduleClearRecoveryPageStack() std::string bundleName; auto bms = GetBundleManager(); if (bms == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "ScheduleClearRecoveryPageStack failed to get bms"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "scheduleClearRecoveryPageStack get bms failed"); return; } if (IN_PROCESS_CALL(bms->GetNameForUid(callerUid, bundleName)) != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "ScheduleClearRecoveryPageStack failed to get bundleName by uid"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "scheduleClearRecoveryPageStack get bundleName failed"); return; } @@ -7612,12 +7612,12 @@ void AbilityManagerService::ReportAppRecoverResult(const int32_t appId, const Ap void AbilityManagerService::SubmitSaveRecoveryInfo(const sptr& token) { if (token == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "submitInfo token is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "submitInfo token null"); return; } auto abilityRecord = Token::GetAbilityRecordByToken(token); if (abilityRecord == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "submitInfo abilityRecord is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "submitInfo abilityRecord null"); return; } auto abilityInfo = abilityRecord->GetAbilityInfo(); @@ -7639,7 +7639,7 @@ void AbilityManagerService::SubmitSaveRecoveryInfo(const sptr& to } else { auto missionListMgr = GetMissionListManagerByUserId(userId); if (missionListMgr == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "missionListMgr is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "missionListMgr null"); return; } abilityName += std::to_string(abilityRecord->GetMissionId()); @@ -7684,19 +7684,19 @@ void AbilityManagerService::ScheduleRecoverAbility(const sptr& to } auto record = Token::GetAbilityRecordByToken(token); if (record == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s AppRecovery::failed find abilityRecord by given token.", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s appRecovery::failed find abilityRecord by token", __func__); return; } if (!record->IsForeground() && !record->GetAbilityForegroundingFlag()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s AppRecovery::failed to recoveryAbility." - "due to it is background", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s appRecovery::recoveryAbility failed" + "due background", __func__); return; } auto callingTokenId = IPCSkeleton::GetCallingTokenID(); auto tokenID = record->GetApplicationInfo().accessTokenId; if (callingTokenId != tokenID) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "AppRecovery ScheduleRecoverAbility not self, not enabled"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "appRecovery scheduleRecoverAbility no self, no enabled"); return; } @@ -7705,7 +7705,7 @@ void AbilityManagerService::ScheduleRecoverAbility(const sptr& to std::lock_guard guard(globalLock_); auto type = record->GetAbilityInfo().type; if (type != AppExecFwk::AbilityType::PAGE) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s AppRecovery::only do recover for page ability.", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s appRecovery::only recover for page ability", __func__); return; } @@ -7718,7 +7718,7 @@ void AbilityManagerService::ScheduleRecoverAbility(const sptr& to if ((it != appRecoveryHistory_.end()) && (it->second + MIN_RECOVERY_TIME > now)) { TAG_LOGE(AAFwkTag::ABILITYMGR, - "%{public}s AppRecovery recover app more than once in one minute, just kill app(%{public}d).", + "%{public}s appRecovery recover more once in one minute, kill app(%{public}d)", __func__, record->GetPid()); ReportAppRecoverResult(record->GetUid(), appInfo, abilityInfo.name, "FAIL_WITHIN_ONE_MINUTE"); AppRecoverKill(record->GetPid(), reason); @@ -7730,7 +7730,7 @@ void AbilityManagerService::ScheduleRecoverAbility(const sptr& to appInfo.bundleName.c_str(), want->GetElement().GetBundleName().c_str()); if (want->GetElement().GetBundleName().empty() || (appInfo.bundleName.compare(want->GetElement().GetBundleName()) != 0)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "AppRecovery BundleName not match, Not recovery ability!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "appRecovery bundleName not match, not recovery ability"); ReportAppRecoverResult(record->GetUid(), appInfo, abilityInfo.name, "FAIL_BUNDLE_NAME_NOT_MATCH"); return; } else if (want->GetElement().GetAbilityName().empty()) { @@ -7740,7 +7740,7 @@ void AbilityManagerService::ScheduleRecoverAbility(const sptr& to } else { auto bms = GetBundleManager(); if (bms == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "bms is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "bms null"); return; } AppExecFwk::BundleInfo bundleInfo; @@ -7750,7 +7750,7 @@ void AbilityManagerService::ScheduleRecoverAbility(const sptr& to bms->GetBundleInfo(bundleName, AppExecFwk::BundleFlag::GET_BUNDLE_WITH_ABILITIES, bundleInfo, userId)); if (!ret) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "AppRecovery Failed to get bundle info, not do recovery!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "appRecovery get bundleInfo fail, not recovery"); return; } bool isRestartPage = false; @@ -7762,7 +7762,7 @@ void AbilityManagerService::ScheduleRecoverAbility(const sptr& to } } if (!isRestartPage) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "AppRecovery the target ability type is not PAGE!"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "appRecovery target ability type not PAGE"); ReportAppRecoverResult(record->GetUid(), appInfo, abilityName, "FAIL_TARGET_ABILITY_NOT_PAGE"); return; } @@ -7782,12 +7782,12 @@ int32_t AbilityManagerService::GetRemoteMissionSnapshotInfo(const std::string& d MissionSnapshot& missionSnapshot) { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); - TAG_LOGI(AAFwkTag::ABILITYMGR, "GetRemoteMissionSnapshotInfo begin"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "getRemoteMissionSnapshotInfo"); std::unique_ptr missionSnapshotPtr = std::make_unique(); DistributedClient dmsClient; int result = dmsClient.GetRemoteMissionSnapshotInfo(deviceId, missionId, missionSnapshotPtr); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "GetRemoteMissionSnapshotInfo failed, result = %{public}d", result); + TAG_LOGE(AAFwkTag::ABILITYMGR, "getRemoteMissionSnapshotInfo failed, result=%{public}d", result); return result; } missionSnapshot = *missionSnapshotPtr; @@ -7798,18 +7798,18 @@ void AbilityManagerService::StartSwitchUserDialog() { TAG_LOGD(AAFwkTag::ABILITYMGR, "Start switch user dialog extension ability come"); if (Rosen::SceneBoardJudgement::IsSceneBoardEnabled()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Scene board enabled, dialog not show."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "scene board enabled, dialog not show"); return; } if (userController_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "User Controller instance is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "user Controller instance null"); return; } #ifdef SUPPORT_GRAPHICS auto sysDialog = DelayedSingleton::GetInstance(); if (sysDialog == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "System dialog scheduler instance is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "system dialog scheduler instance null"); return; } @@ -7827,7 +7827,7 @@ void AbilityManagerService::StartSwitchUserDialogInner(const Want &want, int32_t AbilityRequest abilityRequest; auto result = GenerateExtensionAbilityRequest(want, abilityRequest, nullptr, lastUserId); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Generate ability request local error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "generate ability request local error"); eventInfo.errCode = result; EventReport::SendExtensionEvent(EventName::START_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return; @@ -7837,7 +7837,7 @@ void AbilityManagerService::StartSwitchUserDialogInner(const Want &want, int32_t auto startUserId = abilityInfo.applicationInfo.singleton ? U0_USER_ID : lastUserId; result = CheckOptExtensionAbility(want, abilityRequest, startUserId, AppExecFwk::ExtensionAbilityType::SERVICE); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Check extensionAbility type error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "check extensionAbility type error"); eventInfo.errCode = result; EventReport::SendExtensionEvent(EventName::START_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return; @@ -7849,7 +7849,7 @@ void AbilityManagerService::StartSwitchUserDialogInner(const Want &want, int32_t subManagersHelper_->InitConnectManager(startUserId, false); connectManager = GetConnectManagerByUserId(startUserId); if (connectManager == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "ConnectManager is nullptr. userId=%{public}d", startUserId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager null userId=%{public}d", startUserId); eventInfo.errCode = ERR_INVALID_VALUE; EventReport::SendExtensionEvent(EventName::START_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); return; @@ -7858,7 +7858,7 @@ void AbilityManagerService::StartSwitchUserDialogInner(const Want &want, int32_t eventInfo.errCode = connectManager->StartAbility(abilityRequest); if (eventInfo.errCode != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "EventInfo errCode is %{public}d", eventInfo.errCode); + TAG_LOGE(AAFwkTag::ABILITYMGR, "eventInfo errCode:%{public}d", eventInfo.errCode); EventReport::SendExtensionEvent(EventName::START_EXTENSION_ERROR, HiSysEventType::FAULT, eventInfo); } } @@ -7905,7 +7905,7 @@ void AbilityManagerService::SwitchToUser(int32_t oldUserId, int32_t userId, sptr StartHighestPriorityAbility(userId, isBoot); if (Rosen::SceneBoardJudgement::IsSceneBoardEnabled() && AmsConfigurationParameter::GetInstance().MultiUserType() != 0) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "no need to terminate old scb."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "no need terminate old scb"); return; } PauseOldConnectManager(oldUserId); @@ -7939,7 +7939,7 @@ void AbilityManagerService::PauseOldConnectManager(int32_t userId) { TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s, PauseOldConnectManager:%{public}d-----begin", __func__, userId); if (userId == U0_USER_ID) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s, u0 not stop, id:%{public}d-----nullptr", __func__, userId); + TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s, u0 not stop, id:%{public}d-----null", __func__, userId); return; } @@ -7980,7 +7980,7 @@ int AbilityManagerService::SetAbilityController(const sptr & TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s, imAStabilityTest: %{public}d", __func__, imAStabilityTest); auto isPerm = AAFwk::PermissionVerification::GetInstance()->VerifyControllerPerm(); if (!isPerm) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } @@ -8012,7 +8012,7 @@ bool AbilityManagerService::IsAbilityControllerStart(const Want &want, const std bool isStart = abilityController_->AllowAbilityStart(want, bundleName); if (!isStart) { TAG_LOGI(AAFwkTag::ABILITYMGR, - "Not finishing start ability because controller starting: %{public}s", bundleName.c_str()); + "controller starting can't start ability:%{public}s", bundleName.c_str()); return false; } } @@ -8031,7 +8031,7 @@ bool AbilityManagerService::IsAbilityControllerForeground(const std::string &bun bool isResume = abilityController_->AllowAbilityBackground(bundleName); if (!isResume) { TAG_LOGI(AAFwkTag::ABILITYMGR, - "Not finishing terminate ability because controller resuming: %{public}s", bundleName.c_str()); + "controller resuming can't terminate ability:%{public}s", bundleName.c_str()); return false; } } @@ -8042,13 +8042,13 @@ int AbilityManagerService::StartUserTest(const Want &want, const sptrGetBundleInfo(bundleName, AppExecFwk::BundleFlag::GET_BUNDLE_DEFAULT, bundleInfo, U0_USER_ID))) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Failed to get bundle info by U0_USER_ID %{public}d.", U0_USER_ID); + TAG_LOGE(AAFwkTag::ABILITYMGR, "failed get bundleInfo by U0_USER_ID %{public}d", U0_USER_ID); int32_t userId = GetUserId(); if (!IN_PROCESS_CALL( bms->GetBundleInfo(bundleName, AppExecFwk::BundleFlag::GET_BUNDLE_DEFAULT, bundleInfo, userId))) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Failed to get bundle info by userId %{public}d.", userId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "failed get bundleInfo by userId %{public}d", userId); return GET_BUNDLE_INFO_FAILED; } } @@ -8074,7 +8074,7 @@ int AbilityManagerService::FinishUserTest( { TAG_LOGD(AAFwkTag::ABILITYMGR, "enter"); if (bundleName.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Invalid bundle name."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid bundle name"); return ERR_INVALID_VALUE; } @@ -8086,7 +8086,7 @@ int AbilityManagerService::GetTopAbility(sptr &token) HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); auto isSaCall = AAFwk::PermissionVerification::GetInstance()->IsSACall(); if (!isSaCall) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verification failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verification failed"); return CHECK_PERMISSION_FAILED; } #ifdef SUPPORT_SCREEN @@ -8096,14 +8096,14 @@ int AbilityManagerService::GetTopAbility(sptr &token) token = focusChangeInfo.abilityToken_; } else { if (!wmsHandler_) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "wmsHandler_ is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "wmsHandler_ null"); return ERR_INVALID_VALUE; } wmsHandler_->GetFocusWindow(token); } if (!token) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "token is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "token null"); return ERR_INVALID_VALUE; } #endif @@ -8120,26 +8120,26 @@ int AbilityManagerService::DelegatorDoAbilityForeground(const sptrGetPid(); TAG_LOGD(AAFwkTag::ABILITYMGR, "callerPid: %{public}d, appPid: %{public}d", callerPid, appPid); if (callerPid != appPid) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Caller is not the application itself"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "caller not application itself"); return ERR_INVALID_VALUE; } if (Rosen::SceneBoardJudgement::IsSceneBoardEnabled()) { auto sessionId = GetMissionIdByAbilityTokenInner(token); if (!sessionId) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Invalid session id."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid session id"); return ERR_INVALID_VALUE; } auto want = abilityRecord->GetWant(); if (!IsAbilityControllerStart(want, want.GetBundle())) { TAG_LOGE(AAFwkTag::ABILITYMGR, - "SceneBoard IsAbilityControllerStart failed: %{public}s", want.GetBundle().c_str()); + "sceneBoard IsAbilityControllerStart failed:%{public}s", want.GetBundle().c_str()); return ERR_WOULD_BLOCK; } return ERR_OK; } auto missionId = GetMissionIdByAbilityToken(token); if (missionId < 0) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Invalid mission id."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid mission id"); return ERR_INVALID_VALUE; } return DelegatorMoveMissionToFront(missionId); @@ -8155,7 +8155,7 @@ int AbilityManagerService::DelegatorDoAbilityBackground(const sptr &token, TAG_LOGD(AAFwkTag::ABILITYMGR, "DoAbilityForeground, sceneFlag:%{public}u", flag); CHECK_POINTER_AND_RETURN(token, ERR_INVALID_VALUE); if (!VerificationToken(token) && !VerificationAllToken(token)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s token error.", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s token error", __func__); return ERR_INVALID_VALUE; } @@ -8182,12 +8182,12 @@ int AbilityManagerService::DoAbilityForeground(const sptr &token, auto type = abilityRecord->GetAbilityInfo().type; if (type != AppExecFwk::AbilityType::PAGE) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Cannot minimize except page ability."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "cannot minimize except page ability"); return ERR_WRONG_INTERFACE_CALL; } if (!IsAbilityControllerForeground(abilityRecord->GetAbilityInfo().bundleName)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "IsAbilityControllerForeground false."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "isAbilityControllerForeground false"); return ERR_WOULD_BLOCK; } @@ -8212,7 +8212,7 @@ int AbilityManagerService::DoAbilityBackground(const sptr &token, int AbilityManagerService::DelegatorMoveMissionToFront(int32_t missionId) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "enter missionId : %{public}d", missionId); + TAG_LOGI(AAFwkTag::ABILITYMGR, "enter missionId:%{public}d", missionId); auto missionListManager = GetCurrentMissionListManager(); CHECK_POINTER_AND_RETURN(missionListManager, ERR_NO_INIT); @@ -8320,7 +8320,7 @@ void AbilityManagerService::UpdateAsCallerInfoFromToken(Want& want, sptrtargetWant; @@ -8400,7 +8400,7 @@ void AbilityManagerService::UpdateCallerInfoFromToken(Want& want, const sptrCheckStaticCfgPermission(abilityRequest.want, isImplicit); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Check permission failed from broker."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "Check permission failed from broker"); return AppExecFwk::Constants::PERMISSION_NOT_GRANTED; } } @@ -8634,7 +8634,7 @@ int AbilityManagerService::CheckPermissionForUIService(AppExecFwk::ExtensionAbil return ERR_OK; } if (!want.HasParameter(UISERVICEHOSTPROXY_KEY)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "need UISERVICEHOSTPROXY_KEY to connect UI_SERVICE"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "need UISERVICEHOSTPROXY_KEY connect UI_SERVICE"); return ERR_WRONG_INTERFACE_CALL; } if (extensionType != AppExecFwk::ExtensionAbilityType::UI_SERVICE) { @@ -8679,7 +8679,7 @@ bool AbilityManagerService::GetDataAbilityUri(const std::vectorFreeInstallAbilityFromRemote(want, callback, validUserId, requestCode); @@ -8750,7 +8750,7 @@ AppExecFwk::ElementName AbilityManagerService::GetTopAbility(bool isNeedLocalDev AppExecFwk::RunningProcessInfo processInfo; DelayedSingleton::GetInstance()->GetRunningProcessInfoByPid(callerPid, processInfo); if (!processInfo.isTestProcess) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "caller can not use system-api or not test process."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "can't use system-api or not test process"); return elementName; } } @@ -8761,12 +8761,12 @@ AppExecFwk::ElementName AbilityManagerService::GetTopAbility(bool isNeedLocalDev return elementName; } if (!token) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "token is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "token null"); return elementName; } auto abilityRecord = Token::GetAbilityRecordByToken(token); if (abilityRecord == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s abilityRecord is null.", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s abilityRecord null", __func__); return elementName; } elementName = abilityRecord->GetElementName(); @@ -8787,12 +8787,12 @@ AppExecFwk::ElementName AbilityManagerService::GetElementNameByToken(sptrGetElementName(); @@ -8881,7 +8881,7 @@ ErrCode AbilityManagerService::ProcessMultiParam(std::vector& argsS cmd.append(" "); } } - TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s, isClient:%{public}d, userID is : %{public}d, cmd is : %{public}s", + TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s, isClient:%{public}d, userID:%{public}d, cmd:%{public}s", __func__, isClient, userID, cmd.c_str()); std::vector dumpResults; @@ -8920,10 +8920,10 @@ void AbilityManagerService::ShowIllegalInfomation(std::string& result) int AbilityManagerService::DumpAbilityInfoDone(std::vector &infos, const sptr &callerToken) { - TAG_LOGD(AAFwkTag::ABILITYMGR, "DumpAbilityInfoDone begin"); + TAG_LOGD(AAFwkTag::ABILITYMGR, "dumpAbilityInfoDone begin"); auto abilityRecord = Token::GetAbilityRecordByToken(callerToken); if (abilityRecord == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityRecord nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityRecord null"); return ERR_INVALID_VALUE; } if (!JudgeSelfCalled(abilityRecord)) { @@ -8941,14 +8941,14 @@ int AbilityManagerService::SetMissionContinueState(const sptr &to int32_t missionId = GetMissionIdByAbilityToken(token); if (missionId == -1) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "SetMissionContinueState failed to get missionId. State: %{public}d", state); + TAG_LOGE(AAFwkTag::ABILITYMGR, "failed state:%{public}d", state); return ERR_INVALID_VALUE; } auto abilityRecord = Token::GetAbilityRecordByToken(token); if (!abilityRecord) { TAG_LOGE(AAFwkTag::ABILITYMGR, - "SetMissionContinueState: No such ability record. Mission id: %{public}d, state: %{public}d", + "no such ability record missionId:%{public}d, state:%{public}d", missionId, state); return -1; } @@ -8957,7 +8957,7 @@ int AbilityManagerService::SetMissionContinueState(const sptr &to auto tokenID = abilityRecord->GetApplicationInfo().accessTokenId; if (callingTokenId != tokenID) { TAG_LOGE(AAFwkTag::ABILITYMGR, - "SetMissionContinueState not self, not enabled. Mission id: %{public}d, state: %{public}d", + "setMissionContinueState not self, not enabled. missionId:%{public}d, state:%{public}d", missionId, state); return -1; } @@ -8965,7 +8965,7 @@ int AbilityManagerService::SetMissionContinueState(const sptr &to auto userId = abilityRecord->GetOwnerMissionUserId(); auto missionListManager = GetMissionListManagerByUserId(userId); if (!missionListManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "failed to find mission list manager. Mission id: %{public}d, state: %{public}d", + TAG_LOGE(AAFwkTag::ABILITYMGR, "find missionListManager failed missionId:%{public}d, state:%{public}d", missionId, state); return -1; } @@ -8973,7 +8973,7 @@ int AbilityManagerService::SetMissionContinueState(const sptr &to auto setResult = missionListManager->SetMissionContinueState(token, missionId, state); if (setResult != ERR_OK) { TAG_LOGE(AAFwkTag::ABILITYMGR, - "missionListManager set failed, result: %{public}d, mission id: %{public}d, state: %{public}d", + "missionListManager set failed, result:%{public}d, missionId:%{public}d, state:%{public}d", setResult, missionId, state); return setResult; } @@ -9004,14 +9004,14 @@ int AbilityManagerService::SetMissionLabel(const sptr &token, con auto callingTokenId = IPCSkeleton::GetCallingTokenID(); auto tokenID = abilityRecord->GetApplicationInfo().accessTokenId; if (callingTokenId != tokenID) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "SetMissionLabel not self, not enabled"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "setMissionLabel not self, not enabled"); return -1; } auto userId = abilityRecord->GetOwnerMissionUserId(); auto missionListManager = GetMissionListManagerByUserId(userId); if (!missionListManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "failed to find mission list manager when set mission label."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "missionListManager find failed when set mission label"); return -1; } @@ -9032,14 +9032,14 @@ int AbilityManagerService::SetMissionIcon(const sptr &token, auto callingTokenId = IPCSkeleton::GetCallingTokenID(); auto tokenID = abilityRecord->GetApplicationInfo().accessTokenId; if (callingTokenId != tokenID) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "not self, not enable to set mission icon"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "not self, not enable set mission icon"); return -1; } auto userId = abilityRecord->GetOwnerMissionUserId(); auto missionListManager = GetMissionListManagerByUserId(userId); if (!missionListManager) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "failed to find mission list manager."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "find missionListManager failed"); return -1; } @@ -9051,7 +9051,7 @@ int AbilityManagerService::RegisterWindowManagerServiceHandler(const sptrIsSACall(); if (!isSaCall) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); return CHECK_PERMISSION_FAILED; } wmsHandler_ = handler; @@ -9069,7 +9069,7 @@ void AbilityManagerService::CompleteFirstFrameDrawing(const sptr { TAG_LOGD(AAFwkTag::ABILITYMGR, "called"); if (IPCSkeleton::GetCallingUid() != FOUNDATION_UID) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not foundation call."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "not foundation call"); return; } auto abilityRecord = Token::GetAbilityRecordByToken(abilityToken); @@ -9085,7 +9085,7 @@ void AbilityManagerService::CompleteFirstFrameDrawing(int32_t sessionId) { TAG_LOGD(AAFwkTag::ABILITYMGR, "called"); if (!IsCallerSceneBoard()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not sceneboard called, not allowed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "not sceneboard called, not allowed"); return; } auto uiAbilityManager = GetUIAbilityManagerByUid(IPCSkeleton::GetCallingUid()); @@ -9111,7 +9111,7 @@ int32_t AbilityManagerService::ShowPickerDialog( bool AbilityManagerService::CheckWindowMode(int32_t windowMode, const std::vector& windowModes) const { - TAG_LOGI(AAFwkTag::ABILITYMGR, "Window mode is %{public}d.", windowMode); + TAG_LOGI(AAFwkTag::ABILITYMGR, "window mode:%{public}d", windowMode); if (windowMode == AbilityWindowConfiguration::MULTI_WINDOW_DISPLAY_UNDEFINED) { return true; } @@ -9132,7 +9132,7 @@ int AbilityManagerService::PrepareTerminateAbility(const sptr &to { TAG_LOGD(AAFwkTag::ABILITYMGR, "call"); if (callback == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "callback is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callback null"); return ERR_INVALID_VALUE; } if (!CheckPrepareTerminateEnable()) { @@ -9142,20 +9142,20 @@ int AbilityManagerService::PrepareTerminateAbility(const sptr &to auto abilityRecord = Token::GetAbilityRecordByToken(token); if (abilityRecord == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "record is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "record null"); callback->DoPrepareTerminate(); return ERR_INVALID_VALUE; } if (!JudgeSelfCalled(abilityRecord)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not self call."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "not self call"); callback->DoPrepareTerminate(); return CHECK_PERMISSION_FAILED; } auto type = abilityRecord->GetAbilityInfo().type; if (type != AppExecFwk::AbilityType::PAGE) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Only support PAGE."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "only support PAGE"); callback->DoPrepareTerminate(); return RESOLVE_CALL_ABILITY_TYPE_ERR; } @@ -9202,7 +9202,7 @@ void AbilityManagerService::HandleUnfocused(const sptrRegisterFocusListener(); } }; @@ -9221,13 +9221,13 @@ void AbilityManagerService::InitFocusListener() void AbilityManagerService::RegisterFocusListener() { - TAG_LOGI(AAFwkTag::ABILITYMGR, "Register focus listener"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "register focus listener"); if (!focusListener_) { TAG_LOGE(AAFwkTag::ABILITYMGR, "no listener obj"); return; } Rosen::WindowManager::GetInstance().RegisterFocusChangedListener(focusListener_); - TAG_LOGI(AAFwkTag::ABILITYMGR, "Register focus listener success"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "register focus listener success"); } void AbilityManagerService::InitPrepareTerminateConfig() @@ -9235,7 +9235,7 @@ void AbilityManagerService::InitPrepareTerminateConfig() char value[PREPARE_TERMINATE_ENABLE_SIZE] = "false"; int retSysParam = GetParameter(PREPARE_TERMINATE_ENABLE_PARAMETER, "false", value, PREPARE_TERMINATE_ENABLE_SIZE); TAG_LOGI(AAFwkTag::ABILITYMGR, - "CheckPrepareTerminateEnable, %{public}s value is %{public}s.", PREPARE_TERMINATE_ENABLE_PARAMETER, + "checkPrepareTerminateEnable, %{public}s value=%{public}s", PREPARE_TERMINATE_ENABLE_PARAMETER, value); if (retSysParam > 0 && !std::strcmp(value, "true")) { isPrepareTerminateEnable_ = true; @@ -9270,7 +9270,7 @@ int AbilityManagerService::CheckCallServicePermission(const AbilityRequest &abil abilityRequest.want.GetElement().GetBundleName() == AppUtils::GetInstance().GetBrokerDelegateBundleName()) { auto collaborator = GetCollaborator(CollaboratorType::RESERVE_TYPE); if (collaborator != nullptr) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "Collaborator CheckCallAbilityPermission."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "Collaborator CheckCallAbilityPermission"); return collaborator->CheckCallAbilityPermission(abilityRequest.want); } } @@ -9294,11 +9294,11 @@ int AbilityManagerService::CheckCallDataAbilityPermission(AbilityRequest &abilit abilityRequest.appInfo = abilityRequest.abilityInfo.applicationInfo; abilityRequest.uid = abilityRequest.appInfo.uid; if (abilityRequest.appInfo.name.empty() || abilityRequest.appInfo.bundleName.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Invalid app info for data ability acquiring."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid app info acquiring"); return ERR_INVALID_VALUE; } if (abilityRequest.abilityInfo.type != AppExecFwk::AbilityType::DATA) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "BMS query result is not a data ability."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "BMS query result not data ability"); return ERR_WRONG_INTERFACE_CALL; } @@ -9313,7 +9313,7 @@ int AbilityManagerService::CheckCallDataAbilityPermission(AbilityRequest &abilit int result = AAFwk::PermissionVerification::GetInstance()->CheckCallDataAbilityPermission(verificationInfo, isShell); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Do not have permission to start DataAbility"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "without start DataAbility permission"); return result; } @@ -9364,7 +9364,7 @@ int AbilityManagerService::CheckCallServiceExtensionPermission(const AbilityRequ if (isParamStartAbilityEnable_) { bool stopContinuousTaskFlag = ShouldPreventStartAbility(abilityRequest); if (stopContinuousTaskFlag) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Do not have permission to start ServiceExtension"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "no have permission to start ServiceExtension"); return CHECK_PERMISSION_FAILED; } } @@ -9384,7 +9384,7 @@ int AbilityManagerService::CheckCallServiceExtensionPermission(const AbilityRequ int result = AAFwk::PermissionVerification::GetInstance()->CheckCallServiceExtensionPermission(verificationInfo); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Do not have permission to start ServiceExtension or DataShareExtension"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "without start serviceExtension or sataShareExtension permission"); } return result; } @@ -9413,14 +9413,14 @@ int AbilityManagerService::CheckCallOtherExtensionPermission(const AbilityReques if (extensionType == AppExecFwk::ExtensionAbilityType::AUTO_FILL_PASSWORD || extensionType == AppExecFwk::ExtensionAbilityType::AUTO_FILL_SMART) { if (!abilityRequest.appInfo.isSystemApp) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "The application requesting the call is a non system application."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "application requesting call isn't system application"); return CHECK_PERMISSION_FAILED; } std::string jsonDataStr = abilityRequest.want.GetStringParam(WANT_PARAMS_VIEW_DATA_KEY); AbilityBase::ViewData viewData; viewData.FromJsonString(jsonDataStr.c_str()); if (!CheckCallingTokenId(viewData.bundleName)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not %{public}s called, not allowed.", viewData.bundleName.c_str()); + TAG_LOGE(AAFwkTag::ABILITYMGR, "no %{public}s called, no allowed", viewData.bundleName.c_str()); return ERR_WRONG_INTERFACE_CALL; } return ERR_OK; @@ -9439,7 +9439,7 @@ int AbilityManagerService::CheckCallOtherExtensionPermission(const AbilityReques return CheckCallServiceExtensionPermission(abilityRequest); } - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not SA, can not start other Extension"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "not SA, can't start other extension"); return CHECK_PERMISSION_FAILED; } @@ -9454,13 +9454,13 @@ int AbilityManagerService::CheckUIExtensionPermission(const AbilityRequest &abil if (AAFwk::UIExtensionUtils::IsSystemUIExtension(extensionType)) { auto callerRecord = Token::GetAbilityRecordByToken(abilityRequest.callerToken); if (callerRecord == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Invalid caller."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid caller"); return NO_FOUND_ABILITY_BY_CALLER; } if (!abilityRequest.appInfo.isSystemApp && !callerRecord->GetApplicationInfo().isSystemApp) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Bundle %{public}s wanna to start or caller bundle %{public}s " - "isn't system app, type %{public}d not allowed.", abilityRequest.appInfo.bundleName.c_str(), + TAG_LOGE(AAFwkTag::ABILITYMGR, "bundle %{public}s want start or caller bundle %{public}s " + "isn't system app, type %{public}d not allowed", abilityRequest.appInfo.bundleName.c_str(), callerRecord->GetApplicationInfo().bundleName.c_str(), extensionType); return CHECK_PERMISSION_FAILED; } @@ -9469,15 +9469,15 @@ int AbilityManagerService::CheckUIExtensionPermission(const AbilityRequest &abil if (AAFwk::UIExtensionUtils::IsSystemCallerNeeded(extensionType)) { auto callerRecord = Token::GetAbilityRecordByToken(abilityRequest.callerToken); if (callerRecord == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Invalid caller."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid caller"); return NO_FOUND_ABILITY_BY_CALLER; } if (!callerRecord->GetApplicationInfo().isSystemApp && !AAFwk::PermissionVerification::GetInstance()->IsSACall()) { TAG_LOGE(AAFwkTag::ABILITYMGR, - "Bundle %{public}s wanna to start but caller bundle %{public}s " - "isn't system app, type %{public}d not allowed.", + "bundle %{public}s want start but caller bundle %{public}s " + "isn't system app, type %{public}d not allowed", abilityRequest.appInfo.bundleName.c_str(), callerRecord->GetApplicationInfo().bundleName.c_str(), extensionType); return CHECK_PERMISSION_FAILED; @@ -9534,7 +9534,7 @@ bool AbilityManagerService::CheckUIExtensionCallerIsForeground(const AbilityRequ return true; } - TAG_LOGE(AAFwkTag::ABILITYMGR, "Caller app is not foreground, can't start %{public}s", + TAG_LOGE(AAFwkTag::ABILITYMGR, "caller app not foreground, can't start %{public}s", abilityRequest.want.GetElement().GetURI().c_str()); return false; } @@ -9606,7 +9606,7 @@ bool AbilityManagerService::CheckUIExtensionCallerPidByHostWindowId(const Abilit } } - TAG_LOGE(AAFwkTag::UI_EXT, "Check pid by windowId %{public}d failed, got %{public}d but actual is %{public}d", + TAG_LOGE(AAFwkTag::UI_EXT, "check pid %{public}d fail, got %{public}d actual %{public}d", hostWindowId, hostPid, callerAbility->GetPid()); return false; #else @@ -9624,7 +9624,7 @@ int AbilityManagerService::CheckCallServiceAbilityPermission(const AbilityReques int result = AAFwk::PermissionVerification::GetInstance()->CheckCallServiceAbilityPermission(verificationInfo); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Do not have permission to start ServiceAbility"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "without start serviceAbility permission"); } return result; } @@ -9647,7 +9647,7 @@ int AbilityManagerService::CheckCallAbilityPermission(const AbilityRequest &abil int result = AAFwk::PermissionVerification::GetInstance()->CheckCallAbilityPermission( verificationInfo, isCallByShortcut); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Do not have permission to start PageAbility(FA) or Ability(Stage)"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "without start pageAbility(FA) or ability(Stage) permission"); } return result; } @@ -9658,7 +9658,7 @@ int AbilityManagerService::CheckStartByCallPermission(const AbilityRequest &abil // check whether the target ability is page type and not specified mode. if (abilityRequest.abilityInfo.type != AppExecFwk::AbilityType::PAGE || abilityRequest.abilityInfo.launchMode == AppExecFwk::LaunchMode::SPECIFIED) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Called ability is not common ability."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "called ability not common ability"); return RESOLVE_CALL_ABILITY_TYPE_ERR; } @@ -9671,10 +9671,10 @@ int AbilityManagerService::CheckStartByCallPermission(const AbilityRequest &abil } if (AAFwk::PermissionVerification::GetInstance()->CheckStartByCallPermission(verificationInfo) != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Do not have permission to StartAbilityByCall."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "without startAbilityByCall permission"); return RESOLVE_CALL_NO_PERMISSIONS; } - TAG_LOGD(AAFwkTag::ABILITYMGR, "The caller has permission to resolve the call proxy of common ability."); + TAG_LOGD(AAFwkTag::ABILITYMGR, "caller has permission to resolve the call proxy of common ability"); return ERR_OK; } @@ -9730,7 +9730,7 @@ int AbilityManagerService::IsCallFromBackground(const AbilityRequest &abilityReq isBackgroundCall = false; return ERR_OK; } - TAG_LOGE(AAFwkTag::ABILITYMGR, "Caller does not have PERMISSION_START_ABILITIES_FROM_BACKGROUND, REJECT."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "without PERMISSION_START_ABILITIES_FROM_BACKGROUND, REJECT"); return ERR_INVALID_VALUE; } } @@ -9796,7 +9796,7 @@ bool AbilityManagerService::CheckNewRuleSwitchState(const std::string ¶m) { char value[NEW_RULE_VALUE_SIZE] = "false"; int retSysParam = GetParameter(param.c_str(), "false", value, NEW_RULE_VALUE_SIZE); - TAG_LOGI(AAFwkTag::ABILITYMGR, "CheckNewRuleSwitchState, %{public}s value is %{public}s.", param.c_str(), value); + TAG_LOGI(AAFwkTag::ABILITYMGR, "checkNewRuleSwitchState, %{public}s value: %{public}s", param.c_str(), value); if (retSysParam > 0 && !std::strcmp(value, "true")) { return true; } @@ -9883,7 +9883,7 @@ int AbilityManagerService::CheckDlpForExtension( if (!DlpUtils::OtherAppsAccessDlpCheck(callerToken, want) || VerifyAccountPermission(userId) == CHECK_PERMISSION_FAILED || !DlpUtils::DlpAccessOtherAppsCheck(callerToken, want)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verify failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verify failed"); eventInfo.errCode = CHECK_PERMISSION_FAILED; EventReport::SendExtensionEvent(eventName, HiSysEventType::FAULT, eventInfo); return CHECK_PERMISSION_FAILED; @@ -9901,7 +9901,7 @@ bool AbilityManagerService::JudgeSelfCalled(const std::shared_ptr auto callingTokenId = IPCSkeleton::GetCallingTokenID(); auto tokenID = abilityRecord->GetApplicationInfo().accessTokenId; if (callingTokenId != tokenID) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Is not self, not enabled"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "no self, no enabled"); return false; } @@ -9925,19 +9925,19 @@ std::shared_ptr AbilityManagerService::GetFocusAbility() #ifdef SUPPORT_SCREEN sptr token; if (!wmsHandler_) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "wmsHandler_ is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "wmsHandler_ null"); return nullptr; } wmsHandler_->GetFocusWindow(token); if (!token) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "token is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "token null"); return nullptr; } auto abilityRecord = Token::GetAbilityRecordByToken(token); if (!abilityRecord) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityRecord is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityRecord null"); } return abilityRecord; #endif @@ -9950,7 +9950,7 @@ int AbilityManagerService::CheckUIExtensionIsFocused(uint32_t uiExtensionTokenId sptr token; auto ret = GetTopAbility(token); if (ret != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "GetTopAbility failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "getTopAbility failed"); return ret; } @@ -9968,7 +9968,7 @@ int AbilityManagerService::CheckUIExtensionIsFocused(uint32_t uiExtensionTokenId focused = connectManager->IsUIExtensionFocused(uiExtensionTokenId, token) || connectManager->IsWindowExtensionFocused(uiExtensionTokenId, token); } else { - TAG_LOGW(AAFwkTag::ABILITYMGR, "connectManager is nullptr, userId: %{public}d", userId); + TAG_LOGW(AAFwkTag::ABILITYMGR, "connectManager null, userId:%{public}d", userId); } if (!focused && userId != U0_USER_ID) { TAG_LOGD(AAFwkTag::ABILITYMGR, "Check connectManager in user0"); @@ -9977,7 +9977,7 @@ int AbilityManagerService::CheckUIExtensionIsFocused(uint32_t uiExtensionTokenId focused = connectManager->IsUIExtensionFocused(uiExtensionTokenId, token) || connectManager->IsWindowExtensionFocused(uiExtensionTokenId, token); } else { - TAG_LOGW(AAFwkTag::ABILITYMGR, "connectManager is nullptr, userId: 0"); + TAG_LOGW(AAFwkTag::ABILITYMGR, "connectManager null, userId: 0"); } } isFocused = focused; @@ -9990,7 +9990,7 @@ int AbilityManagerService::AddFreeInstallObserver(const sptr &cal { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); if (freeInstallManager_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "freeInstallManager_ is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "freeInstallManager_ null"); return ERR_INVALID_VALUE; } return freeInstallManager_->AddFreeInstallObserver(callerToken, observer); @@ -10002,7 +10002,7 @@ int32_t AbilityManagerService::IsValidMissionIds( auto userId = IPCSkeleton::GetCallingUid() / BASE_USER_RANGE; auto missionlistMgr = GetMissionListManagerByUserId(userId); if (missionlistMgr == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "missionlistMgr is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "missionlistMgr null"); return ERR_INVALID_VALUE; } @@ -10016,7 +10016,7 @@ int AbilityManagerService::VerifyPermission(const std::string &permission, int p pid, uid); if (permission.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "VerifyPermission permission invalid"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "verifyPermission permission invalid"); return CHECK_PERMISSION_FAILED; } @@ -10025,7 +10025,7 @@ int AbilityManagerService::VerifyPermission(const std::string &permission, int p std::string bundleName; if (IN_PROCESS_CALL(bms->GetNameForUid(uid, bundleName)) != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "VerifyPermission failed to get bundle name by uid"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "verifyPermission get bundle name failed"); return CHECK_PERMISSION_FAILED; } @@ -10034,7 +10034,7 @@ int AbilityManagerService::VerifyPermission(const std::string &permission, int p AppExecFwk::ApplicationInfo appInfo; if (!IN_PROCESS_CALL(bms->GetApplicationInfo(bundleName, AppExecFwk::BundleFlag::GET_BUNDLE_DEFAULT, account, appInfo))) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "VerifyPermission failed to get application info"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "verifyPermission get application info failed"); return CHECK_PERMISSION_FAILED; } @@ -10063,7 +10063,7 @@ int32_t AbilityManagerService::AcquireShareData( abilityRecord = missionListManager->GetAbilityRecordByMissionId(missionId); } if (!abilityRecord) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityRecord is null."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityRecord null"); return ERR_INVALID_VALUE; } std::lock_guard guard(iAcquireShareDataMapLock_); @@ -10078,7 +10078,7 @@ int32_t AbilityManagerService::AcquireShareData( int32_t AbilityManagerService::ShareDataDone( const sptr &token, const int32_t &resultCode, const int32_t &uniqueId, WantParams &wantParam) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "resultCode:%{public}d, uniqueId:%{public}d.", resultCode, uniqueId); + TAG_LOGI(AAFwkTag::ABILITYMGR, "resultCode:%{public}d, uniqueId:%{public}d", resultCode, uniqueId); if (!VerificationAllToken(token)) { return ERR_INVALID_VALUE; } @@ -10117,7 +10117,7 @@ int32_t AbilityManagerService::NotifySaveAsResult(const Want &want, int resultCo void AbilityManagerService::SetRootSceneSession(const sptr &rootSceneSession) { if (!IsCallerSceneBoard()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not sceneboard called, not allowed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "no sceneboard called, no allowed"); return; } auto uiAbilityManager = GetUIAbilityManagerByUid(IPCSkeleton::GetCallingUid()); @@ -10128,7 +10128,7 @@ void AbilityManagerService::SetRootSceneSession(const sptr &rootS void AbilityManagerService::CallUIAbilityBySCB(const sptr &sessionInfo, bool &isColdStart) { if (!IsCallerSceneBoard()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not sceneboard called, not allowed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "no sceneboard called, no allowed"); return; } auto uiAbilityManager = GetUIAbilityManagerByUid(IPCSkeleton::GetCallingUid()); @@ -10139,17 +10139,17 @@ void AbilityManagerService::CallUIAbilityBySCB(const sptr &sessionI int32_t AbilityManagerService::SetSessionManagerService(const sptr &sessionManagerService) { if (!IsCallerSceneBoard()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not sceneboard called, not allowed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "no sceneboard called, no allowed"); return ERR_WRONG_INTERFACE_CALL; } - TAG_LOGI(AAFwkTag::ABILITYMGR, "Call SetSessionManagerService of WMS."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "call setSessionManagerService of WMS"); auto ret = Rosen::MockSessionManagerService::GetInstance().SetSessionManagerService(sessionManagerService); if (ret) { TAG_LOGD(AAFwkTag::ABILITYMGR, "Call SetSessionManagerService of WMS."); return ERR_OK; } - TAG_LOGE(AAFwkTag::ABILITYMGR, "SMS SetSessionManagerService return false."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "SMS setSessionManagerService return false"); return ERR_OK; } @@ -10169,7 +10169,7 @@ bool AbilityManagerService::CheckPrepareTerminateEnable() void AbilityManagerService::StartSpecifiedAbilityBySCB(const Want &want) { if (!IsCallerSceneBoard()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not sceneboard called, not allowed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "no sceneboard called, no allowed"); return; } auto uiAbilityManager = GetUIAbilityManagerByUid(IPCSkeleton::GetCallingUid()); @@ -10184,11 +10184,11 @@ int32_t AbilityManagerService::RegisterIAbilityManagerCollaborator( auto callingUid = IPCSkeleton::GetCallingUid(); if (!isSaCall || (callingUid != AppUtils::GetInstance().GetCollaboratorBrokerUID() && callingUid != AppUtils::GetInstance().GetCollaboratorBrokerReserveUID())) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "The interface only support for broker"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "interface only support broker"); return CHECK_PERMISSION_FAILED; } if (!CheckCollaboratorType(type)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "collaborator register failed, invalid type."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "collaborator register failed, invalid type"); return ERR_INVALID_VALUE; } { @@ -10204,11 +10204,11 @@ int32_t AbilityManagerService::UnregisterIAbilityManagerCollaborator(int32_t typ auto callingUid = IPCSkeleton::GetCallingUid(); if (!isSaCall || (callingUid != AppUtils::GetInstance().GetCollaboratorBrokerUID() && callingUid != AppUtils::GetInstance().GetCollaboratorBrokerReserveUID())) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "The interface only support for broker"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "interface only support broker"); return CHECK_PERMISSION_FAILED; } if (!CheckCollaboratorType(type)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "collaborator unregister failed, invalid type."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "collaborator unregister failed, invalid type"); return ERR_INVALID_VALUE; } { @@ -10251,7 +10251,7 @@ void AbilityManagerService::GetConnectManagerAndUIExtensionBySessionInfo(const s if (connectManager) { targetAbility = connectManager->GetUIExtensioBySessionInfo(sessionInfo); } else { - TAG_LOGW(AAFwkTag::ABILITYMGR, "connectManager is nullptr, userId: %{public}d", userId); + TAG_LOGW(AAFwkTag::ABILITYMGR, "connectManager null, userId:%{public}d", userId); } if (targetAbility == nullptr && userId != U0_USER_ID) { TAG_LOGD(AAFwkTag::ABILITYMGR, "try to find UIExtension in user0"); @@ -10259,7 +10259,7 @@ void AbilityManagerService::GetConnectManagerAndUIExtensionBySessionInfo(const s if (connectManager) { targetAbility = connectManager->GetUIExtensioBySessionInfo(sessionInfo); } else { - TAG_LOGW(AAFwkTag::ABILITYMGR, "connectManager is nullptr, userId: 0"); + TAG_LOGW(AAFwkTag::ABILITYMGR, "connectManager null, userId:0"); } } } @@ -10267,7 +10267,7 @@ void AbilityManagerService::GetConnectManagerAndUIExtensionBySessionInfo(const s int32_t AbilityManagerService::RegisterStatusBarDelegate(sptr delegate) { if (!IsCallerSceneBoard()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not sceneboard called, not allowed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "no sceneboard called, no allowed"); return ERR_WRONG_INTERFACE_CALL; } auto uiAbilityManager = GetUIAbilityManagerByUid(IPCSkeleton::GetCallingUid()); @@ -10278,7 +10278,7 @@ int32_t AbilityManagerService::RegisterStatusBarDelegate(sptr& pids) { if (!IsCallerSceneBoard()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not sceneboard called, not allowed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "no sceneboard called, no allowed"); return ERR_WRONG_INTERFACE_CALL; } auto uiAbilityManager = GetUIAbilityManagerByUid(IPCSkeleton::GetCallingUid()); @@ -10289,7 +10289,7 @@ int32_t AbilityManagerService::KillProcessWithPrepareTerminate(const std::vector int32_t AbilityManagerService::RegisterAutoStartupSystemCallback(const sptr &callback) { if (abilityAutoStartupService_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityAutoStartupService_ is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityAutoStartupService_ null"); return ERR_NO_INIT; } return abilityAutoStartupService_->RegisterAutoStartupSystemCallback(callback); @@ -10298,7 +10298,7 @@ int32_t AbilityManagerService::RegisterAutoStartupSystemCallback(const sptr &callback) { if (abilityAutoStartupService_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityAutoStartupService_ is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityAutoStartupService_ null"); return ERR_NO_INIT; } return abilityAutoStartupService_->UnregisterAutoStartupSystemCallback(callback); @@ -10307,7 +10307,7 @@ int32_t AbilityManagerService::UnregisterAutoStartupSystemCallback(const sptrSetApplicationAutoStartup(info); @@ -10316,7 +10316,7 @@ int32_t AbilityManagerService::SetApplicationAutoStartup(const AutoStartupInfo & int32_t AbilityManagerService::CancelApplicationAutoStartup(const AutoStartupInfo &info) { if (abilityAutoStartupService_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityAutoStartupService_ is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityAutoStartupService_ null"); return ERR_NO_INIT; } return abilityAutoStartupService_->CancelApplicationAutoStartup(info); @@ -10325,7 +10325,7 @@ int32_t AbilityManagerService::CancelApplicationAutoStartup(const AutoStartupInf int32_t AbilityManagerService::QueryAllAutoStartupApplications(std::vector &infoList) { if (abilityAutoStartupService_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityAutoStartupService_ is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityAutoStartupService_ null"); return ERR_NO_INIT; } return abilityAutoStartupService_->QueryAllAutoStartupApplications(infoList, GetUserId()); @@ -10336,12 +10336,12 @@ int AbilityManagerService::PrepareTerminateAbilityBySCB(const sptr HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); TAG_LOGD(AAFwkTag::ABILITYMGR, "Call."); if (sessionInfo == nullptr || sessionInfo->sessionToken == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "sessionInfo is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "sessionInfo null"); return ERR_INVALID_VALUE; } if (!IsCallerSceneBoard()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not sceneboard called, not allowed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "not sceneboard called, not allowed"); return ERR_WRONG_INTERFACE_CALL; } @@ -10357,7 +10357,7 @@ int AbilityManagerService::RegisterSessionHandler(const sptr &obj { TAG_LOGI(AAFwkTag::ABILITYMGR, "call"); if (!IsCallerSceneBoard()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not sceneboard called, not allowed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "no sceneboard called, no allowed"); return ERR_WRONG_INTERFACE_CALL; } auto uiAbilityManager = GetUIAbilityManagerByUid(IPCSkeleton::GetCallingUid()); @@ -10373,11 +10373,11 @@ bool AbilityManagerService::CheckUserIdActive(int32_t userId) auto ret = DelayedSingleton::GetInstance()-> QueryActiveOsAccountIds(osActiveAccountIds); if (ret != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "QueryActiveOsAccountIds failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "queryActiveOsAccountIds failed"); return false; } if (osActiveAccountIds.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "QueryActiveOsAccountIds empty"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "queryActiveOsAccountIds empty"); return false; } auto iter = std::find(osActiveAccountIds.begin(), osActiveAccountIds.end(), userId); @@ -10395,23 +10395,23 @@ int32_t AbilityManagerService::CheckProcessOptions(const Want &want, const Start return ERR_OK; } - TAG_LOGI(AAFwkTag::ABILITYMGR, "start ability with process options."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "start ability with process options"); bool isEnable = AppUtils::GetInstance().IsStartOptionsWithProcessOptions(); if (!Rosen::SceneBoardJudgement::IsSceneBoardEnabled() || !isEnable) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not support process options."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "not support process options"); return ERR_CAPABILITY_NOT_SUPPORT; } auto element = want.GetElement(); if (element.GetAbilityName().empty() || want.GetAction().compare(ACTION_CHOOSE) == 0) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not allow implicit start."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "not allow implicit start"); return ERR_NOT_ALLOW_IMPLICIT_START; } int32_t appIndex = 0; appIndex = !AbilityRuntime::StartupUtil::GetAppIndex(want, appIndex) ? 0 : appIndex; if (!CheckCallingTokenId(element.GetBundleName(), userId, appIndex)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not self application."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "not self application"); return ERR_NOT_SELF_APPLICATION; } @@ -10420,14 +10420,14 @@ int32_t AbilityManagerService::CheckProcessOptions(const Want &want, const Start if (ProcessOptions::IsAttachToStatusBarMode(startOptions.processOptions->processMode) && !uiAbilityManager->IsCallerInStatusBar()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Caller is not in status bar in attch to status bar mode."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "caller not in status bar in attch status bar mode"); return ERR_START_OPTIONS_CHECK_FAILED; } auto abilityRecords = uiAbilityManager->GetAbilityRecordsByName(element); if (!abilityRecords.empty() && abilityRecords[0] && abilityRecords[0]->GetAbilityInfo().launchMode != AppExecFwk::LaunchMode::STANDARD) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "If it is not in STANDARD mode, repeated starts are not allowed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "if not STANDARD mode, repeated starts not allowed"); return ERR_ABILITY_ALREADY_RUNNING; } @@ -10438,7 +10438,7 @@ int32_t AbilityManagerService::RegisterAppDebugListener(sptrIsSACall()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verification failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verification failed"); return CHECK_PERMISSION_FAILED; } return DelayedSingleton::GetInstance()->RegisterAppDebugListener(listener); @@ -10448,7 +10448,7 @@ int32_t AbilityManagerService::UnregisterAppDebugListener(sptrIsSACall()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verification failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verification failed"); return CHECK_PERMISSION_FAILED; } return DelayedSingleton::GetInstance()->UnregisterAppDebugListener(listener); @@ -10468,7 +10468,7 @@ std::shared_ptr AbilityManagerService::ConnectInitAbilityDebug TAG_LOGD(AAFwkTag::ABILITYMGR, "Creat ability debug deal object."); abilityDebugDeal_ = std::make_shared(); if (abilityDebugDeal_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Creat ability debug deal object failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "creat ability debug deal object failed"); return nullptr; } @@ -10480,13 +10480,13 @@ int32_t AbilityManagerService::AttachAppDebug(const std::string &bundleName) { TAG_LOGD(AAFwkTag::ABILITYMGR, "called"); if (!system::GetBoolParameter(DEVELOPER_MODE_STATE, false)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Developer Mode is false."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "developer Mode false"); return ERR_NOT_DEVELOPER_MODE; } if (!AAFwk::PermissionVerification::GetInstance()->IsSACall() && !AAFwk::PermissionVerification::GetInstance()->IsShellCall()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verification failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verification failed"); return CHECK_PERMISSION_FAILED; } @@ -10499,7 +10499,7 @@ int32_t AbilityManagerService::DetachAppDebug(const std::string &bundleName) TAG_LOGD(AAFwkTag::ABILITYMGR, "called"); if (!AAFwk::PermissionVerification::GetInstance()->IsSACall() && !AAFwk::PermissionVerification::GetInstance()->IsShellCall()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verification failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verification failed"); return CHECK_PERMISSION_FAILED; } @@ -10534,7 +10534,7 @@ int32_t AbilityManagerService::ExecuteIntent(uint64_t key, const sptr &targetRecord, const int32_t oriValidUserId) { if (Rosen::SceneBoardJudgement::IsSceneBoardEnabled()) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "scene board is enable"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "scene board enable"); auto uiAbilityManager = GetUIAbilityManagerByUserId(oriValidUserId); CHECK_POINTER_AND_RETURN(uiAbilityManager, false); return uiAbilityManager->IsAbilityStarted(abilityRequest, targetRecord); @@ -10578,7 +10578,7 @@ bool AbilityManagerService::IsAbilityStarted(AbilityRequest &abilityRequest, int32_t AbilityManagerService::OnExecuteIntent(AbilityRequest &abilityRequest, std::shared_ptr &targetRecord) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "OnExecuteIntent"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "onExecuteIntent"); if (targetRecord == nullptr || targetRecord->GetScheduler() == nullptr) { return ERR_INVALID_VALUE; } @@ -10616,10 +10616,10 @@ int32_t AbilityManagerService::StartExtensionAbilityWithInsightIntent(const Want int32_t AbilityManagerService::StartAbilityByCallWithInsightIntent(const Want &want, const sptr &callerToken, const InsightIntentExecuteParam ¶m) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "call StartAbilityByCallWithInsightIntent."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "call startAbilityByCallWithInsightIntent"); sptr connect = sptr::MakeSptr(); if (connect == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Invalid connect."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid connect"); return ERR_INVALID_VALUE; } @@ -10633,7 +10633,7 @@ int32_t AbilityManagerService::StartAbilityByCallWithInsightIntent(const Want &w abilityRequest.connect = connect; int32_t result = GenerateAbilityRequest(want, -1, abilityRequest, callerToken, GetUserId()); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Generate ability request error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "generate ability request error"); return result; } std::shared_ptr targetRecord; @@ -10647,7 +10647,7 @@ int32_t AbilityManagerService::StartAbilityByCallWithInsightIntent(const Want &w result = StartAbilityByCall(want, connect, callerToken); } - TAG_LOGI(AAFwkTag::ABILITYMGR, "StartAbilityByCallWithInsightIntent %{public}d", result); + TAG_LOGI(AAFwkTag::ABILITYMGR, "startAbilityByCallWithInsightIntent %{public}d", result); return result; } @@ -10659,7 +10659,7 @@ bool AbilityManagerService::IsAbilityControllerStart(const Want &want) if (isBrokerCall) { return IsAbilityControllerStart(want, want.GetBundle()); } - TAG_LOGE(AAFwkTag::ABILITYMGR, "The interface only support for broker"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "interface only support broker"); return true; } @@ -10677,14 +10677,14 @@ int32_t AbilityManagerService::ExecuteInsightIntentDone(const sptr::GetInstance()->GetBundleName(intentId, bundleNameStored); if (ret != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get matched bundleName failed, intentId: %{public}" PRIu64"", intentId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "matched bundleName failed, intentId:%{public}" PRIu64"", intentId); return ERR_INVALID_VALUE; } std::string bundleName = abilityRecord->GetAbilityInfo().bundleName; if (bundleNameStored != bundleName) { TAG_LOGE(AAFwkTag::ABILITYMGR, - "BundleName %{public}s and %{public}s mismatch.", bundleName.c_str(), bundleNameStored.c_str()); + "bundleName %{public}s and %{public}s mismatch", bundleName.c_str(), bundleNameStored.c_str()); return ERR_INVALID_VALUE; } @@ -10695,7 +10695,7 @@ int32_t AbilityManagerService::ExecuteInsightIntentDone(const sptrSetApplicationAutoStartupByEDM(info, flag); @@ -10704,7 +10704,7 @@ int32_t AbilityManagerService::SetApplicationAutoStartupByEDM(const AutoStartupI int32_t AbilityManagerService::CancelApplicationAutoStartupByEDM(const AutoStartupInfo &info, bool flag) { if (abilityAutoStartupService_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityAutoStartupService_ is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityAutoStartupService_ null"); return ERR_NO_INIT; } return abilityAutoStartupService_->CancelApplicationAutoStartupByEDM(info, flag); @@ -10716,7 +10716,7 @@ int32_t AbilityManagerService::GetForegroundUIAbilities(std::vectorVerifyRunningInfoPerm(); if (!isPerm) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verification failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verification failed"); return CHECK_PERMISSION_FAILED; } @@ -10747,7 +10747,7 @@ int32_t AbilityManagerService::GetForegroundUIAbilities(std::vectorUpdateConfiguration(config, userId); @@ -10783,7 +10783,7 @@ void AbilityManagerService::OnAppRemoteDied(const std::vectorGetAbilityInfo().name.c_str(), abilityRecord->GetAbilityInfo().bundleName.c_str()); abilityRecord->OnProcessDied(); } @@ -10799,7 +10799,7 @@ int32_t AbilityManagerService::OpenFile(const Uri& uri, uint32_t flag) } auto collaborator = GetCollaborator(CollaboratorType::RESERVE_TYPE); if (collaborator == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "collaborator GetCollaborator is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "collaborator getCollaborator null"); return ERR_COLLABORATOR_NOT_REGISTER; } return collaborator->OpenFile(uri, flag); @@ -10859,7 +10859,7 @@ void AbilityManagerService::RemoveLauncherDeathRecipient(int32_t userId) { auto connectManager = GetConnectManagerByUserId(userId); if (connectManager == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager is nullptr. userId=%{public}d", userId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "connectManager null userId=%{public}d", userId); return; } connectManager->RemoveLauncherDeathRecipient(); @@ -10891,28 +10891,28 @@ int32_t AbilityManagerService::CheckDebugAssertPermission() TAG_LOGD(AAFwkTag::ABILITYMGR, "called"); HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); if (!system::GetBoolParameter(PRODUCT_ASSERT_FAULT_DIALOG_ENABLED, false)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Product of assert fault dialog is not enabled."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "assert fault product dialog not enabled"); return ERR_NOT_SUPPORTED_PRODUCT_TYPE; } if (!system::GetBoolParameter(DEVELOPER_MODE_STATE, false)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Developer Mode is false."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "developer mode false"); return ERR_NOT_SUPPORTED_PRODUCT_TYPE; } auto bundleMgr = GetBundleManager(); if (bundleMgr == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get bundle manager instance is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "get bundle manager instance null"); return ERR_INVALID_VALUE; } int32_t flags = static_cast(AppExecFwk::GetBundleInfoFlag::GET_BUNDLE_INFO_WITH_APPLICATION); AppExecFwk::BundleInfo bundleInfo; auto ret = bundleMgr->GetBundleInfoForSelf(flags, bundleInfo); if (ret != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get bundle Info failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "get bundle info failed"); return ret; } if (!bundleInfo.applicationInfo.debug) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Non-debug version application."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "non-debug version app"); return ERR_INVALID_VALUE; } return ERR_OK; @@ -10924,7 +10924,7 @@ void AbilityManagerService::CloseAssertDialog(const std::string &assertSessionId auto validUserId = GetUserId(); auto connectManager = GetConnectManagerByUserId(validUserId); if (connectManager == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Connect manager is nullptr, userId: %{public}d.", validUserId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "manager null, userId: %{public}d", validUserId); return; } @@ -10935,13 +10935,13 @@ int32_t AbilityManagerService::SetResidentProcessEnabled(const std::string &bund { TAG_LOGD(AAFwkTag::ABILITYMGR, "called"); if (!AAFwk::PermissionVerification::GetInstance()->IsSystemAppCall()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verification failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verification failed"); return ERR_NOT_SYSTEM_APP; } auto residentProcessManager = DelayedSingleton::GetInstance(); if (residentProcessManager == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get resident proces mgr is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "get resident proces mgr null"); return INNER_ERR; } @@ -10950,7 +10950,7 @@ int32_t AbilityManagerService::SetResidentProcessEnabled(const std::string &bund auto callerPid = IPCSkeleton::GetCallingPid(); DelayedSingleton::GetInstance()->GetBundleNameByPid(callerPid, callerName, uid); if (callerName.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Failed to obtain caller name."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "obtain caller name failed"); return INNER_ERR; } @@ -10964,12 +10964,12 @@ int32_t AbilityManagerService::RequestAssertFaultDialog( HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); auto checkRet = CheckDebugAssertPermission(); if (checkRet != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Check debug assert permission error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "check debug assert permission error"); return checkRet; } sptr remoteCallback = callback; if (remoteCallback == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Params remote callback is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "params remote callback null"); return ERR_INVALID_VALUE; } auto debugDeal = ConnectInitAbilityDebugDeal(); @@ -10977,11 +10977,11 @@ int32_t AbilityManagerService::RequestAssertFaultDialog( #ifdef SUPPORT_SCREEN auto sysDialog = DelayedSingleton::GetInstance(); if (sysDialog == nullptr || debugDeal == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "sysDialog or debugDeal is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "sysDialog or debugDeal null"); return ERR_INVALID_VALUE; } if (!sysDialog->GetAssertFaultDialogWant(want)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get assert fault dialog want failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "get assert fault dialog want failed"); return ERR_INVALID_VALUE; } #endif // SUPPORT_SCREEN @@ -10991,18 +10991,18 @@ int32_t AbilityManagerService::RequestAssertFaultDialog( auto &connection = AbilityRuntime::ModalSystemAssertUIExtension::GetInstance(); want.SetParam(UIEXTENSION_MODAL_TYPE, 1); if (!IN_PROCESS_CALL(connection.CreateModalUIExtension(want))) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Create modal ui extension failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "create modal ui extension failed"); return ERR_INVALID_VALUE; } auto callbackDeathMgr = DelayedSingleton::GetInstance(); if (callbackDeathMgr == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get callback death manager instance is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "get callback death manager instance null"); return ERR_INVALID_VALUE; } auto callbackTask = [weak = weak_from_this()] (const std::string &assertSessionId) { auto abilityMgr = weak.lock(); if (abilityMgr == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "ability manager instance is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "ability manager instance null"); return; } abilityMgr->CloseAssertDialog(assertSessionId); @@ -11016,25 +11016,25 @@ int32_t AbilityManagerService::NotifyDebugAssertResult(uint64_t assertFaultSessi { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); if (!system::GetBoolParameter(PRODUCT_ASSERT_FAULT_DIALOG_ENABLED, false)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Product of assert fault dialog is not enabled."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "assert fault dialog product not enabled"); return ERR_NOT_SUPPORTED_PRODUCT_TYPE; } CHECK_CALLER_IS_SYSTEM_APP; auto permissionSA = PermissionVerification::GetInstance(); if (permissionSA == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verification instance is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verification instance null"); return ERR_INVALID_VALUE; } if (!permissionSA->VerifyCallingPermission(PermissionConstants::PERMISSION_NOTIFY_DEBUG_ASSERT_RESULT)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission %{public}s verification failed.", + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission %{public}s verification failed", PermissionConstants::PERMISSION_NOTIFY_DEBUG_ASSERT_RESULT); return ERR_PERMISSION_DENIED; } auto callbackDeathMgr = DelayedSingleton::GetInstance(); if (callbackDeathMgr == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get callback death manager instance is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "get callback death manager instance null"); return ERR_INVALID_VALUE; } callbackDeathMgr->CallAssertFaultCallback(assertFaultSessionId, userStatus); @@ -11045,10 +11045,10 @@ int32_t AbilityManagerService::UpdateSessionInfoBySCB(std::list &se std::vector &sessionIds) { if (!IsCallerSceneBoard()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not sceneboard called, not allowed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "no sceneboard called, no allowed"); return ERR_WRONG_INTERFACE_CALL; } - TAG_LOGI(AAFwkTag::ABILITYMGR, "The sceneboard is being restored."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "sceneboard being restored"); auto uiAbilityManager = GetUIAbilityManagerByUid(IPCSkeleton::GetCallingUid()); CHECK_POINTER_AND_RETURN(uiAbilityManager, ERR_INVALID_VALUE); return uiAbilityManager->UpdateSessionInfoBySCB(sessionInfos, sessionIds); @@ -11062,7 +11062,7 @@ bool AbilityManagerService::CheckSenderWantInfo(int32_t callerUid, const WantSen std::string bundleName; if (IN_PROCESS_CALL(bms->GetNameForUid(callerUid, bundleName)) != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get Bundle Name failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "get bundle name failed"); return false; } if (wantSenderInfo.bundleName != bundleName) { @@ -11081,7 +11081,7 @@ bool AbilityManagerService::CheckCallerIsDmsProcess() int32_t result = Security::AccessToken::AccessTokenKit::GetNativeTokenInfo(accessToken, nativeTokenInfo); if (tokenType != Security::AccessToken::ATokenTypeEnum::TOKEN_NATIVE || result != ERR_OK || nativeTokenInfo.processName != DMS_PROCESS_NAME) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "caller is not dms"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "caller not dms"); return false; } return true; @@ -11112,18 +11112,18 @@ int32_t AbilityManagerService::GetUIExtensionRootHostInfo(const sptrIsSACall() && !IsCallerSceneBoard()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission deny."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission deny"); return ERR_PERMISSION_DENIED; } auto callerRecord = GetUIExtensionRootCaller(token, userId); if (callerRecord == nullptr) { - TAG_LOGE(AAFwkTag::UI_EXT, "Get root host info failed."); + TAG_LOGE(AAFwkTag::UI_EXT, "get root host info failed"); return ERR_INVALID_VALUE; } hostInfo.elementName_ = callerRecord->GetElementName(); - TAG_LOGD(AAFwkTag::UI_EXT, "Root host uri: %{public}s.", hostInfo.elementName_.GetURI().c_str()); + TAG_LOGD(AAFwkTag::UI_EXT, "uri: %{public}s.", hostInfo.elementName_.GetURI().c_str()); return ERR_OK; } @@ -11133,7 +11133,7 @@ std::shared_ptr AbilityManagerService::GetUIExtensionRootCaller(c auto validUserId = GetValidUserId(userId); auto connectManager = GetConnectManagerByUserId(validUserId); if (connectManager == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Connect manager is nullptr, userId: %{public}d.", validUserId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "manager null, userId:%{public}d", validUserId); return nullptr; } @@ -11141,7 +11141,7 @@ std::shared_ptr AbilityManagerService::GetUIExtensionRootCaller(c if (callerRecord == nullptr && validUserId != U0_USER_ID) { connectManager = GetConnectManagerByUserId(U0_USER_ID); if (connectManager == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Connect manager is nullptr, userId: %{public}d.", U0_USER_ID); + TAG_LOGE(AAFwkTag::ABILITYMGR, "manager null, userId: %{public}d", U0_USER_ID); return nullptr; } callerRecord = connectManager->GetUIExtensionRootHostInfo(token); @@ -11158,20 +11158,20 @@ int32_t AbilityManagerService::GetUIExtensionSessionInfo(const sptrIsSACall() && !IsCallerSceneBoard()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission deny."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission deny"); return ERR_PERMISSION_DENIED; } auto validUserId = GetValidUserId(userId); auto connectManager = GetConnectManagerByUserId(validUserId); if (connectManager == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Connect manager is nullptr, userId: %{public}d.", validUserId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "manager null, userId:%{public}d", validUserId); return ERR_INVALID_VALUE; } auto ret = connectManager->GetUIExtensionSessionInfo(token, uiExtensionSessionInfo); if (ret != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get ui extension session info failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "get ui extension session info failed"); return ret; } @@ -11180,10 +11180,10 @@ int32_t AbilityManagerService::GetUIExtensionSessionInfo(const sptr::GetInstance()->KillApplicationSelf(); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "KillApplicationSelf error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "killApplicationSelf error"); return result; } - TAG_LOGD(AAFwkTag::ABILITYMGR, "RestartApp, start ability without CheckCallAbilityPermission."); + TAG_LOGD(AAFwkTag::ABILITYMGR, "restartApp, without checkCallAbilityPermission."); result = StartAbilityWrap(want, nullptr, DEFAULT_INVAL_VALUE, false, DEFAULT_INVAL_VALUE, false, 0, isForegroundToRestartApp); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "StartAbility error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "startAbility error"); return result; } RestartAppManager::GetInstance().AddRestartAppHistory(key, now); @@ -11227,7 +11227,7 @@ int32_t AbilityManagerService::CheckRestartAppWant(const AAFwk::Want &want) { std::string bundleName = want.GetElement().GetBundleName(); if (!CheckCallingTokenId(bundleName)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Not itself called, not allowed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "no itself called, no allowed"); return AAFwk::ERR_RESTART_APP_INCORRECT_ABILITY; } @@ -11239,7 +11239,7 @@ int32_t AbilityManagerService::CheckRestartAppWant(const AAFwk::Want &want) bool queryResult = IN_PROCESS_CALL(bms->QueryAbilityInfo(want, abilityInfoFlag, userId, abilityInfo)); if (!queryResult || abilityInfo.name.empty() || abilityInfo.bundleName.empty() || abilityInfo.type != AbilityType::PAGE) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Ability is invalid or not UIAbility."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "ability invalid or not UIAbility"); return AAFwk::ERR_RESTART_APP_INCORRECT_ABILITY; } return ERR_OK; @@ -11250,12 +11250,12 @@ int32_t AbilityManagerService::SignRestartAppFlag(int32_t userId, const std::str { auto appMgr = GetAppMgr(); if (appMgr == nullptr) { - TAG_LOGW(AAFwkTag::ABILITYMGR, "GetAppMgr failed"); + TAG_LOGW(AAFwkTag::ABILITYMGR, "getAppMgr failed"); return ERR_INVALID_VALUE; } auto ret = IN_PROCESS_CALL(appMgr->SignRestartAppFlag(bundleName)); if (ret != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "AppMgr SignRestartAppFlag error"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "appMgr signRestartAppFlag error"); return ret; } @@ -11269,7 +11269,7 @@ int32_t AbilityManagerService::SignRestartAppFlag(int32_t userId, const std::str } auto missionListManager = GetMissionListManagerByUserId(userId); if (missionListManager == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "missionListManager is nullptr. userId:%{public}d", userId); + TAG_LOGE(AAFwkTag::ABILITYMGR, "missionListManager null userId:%{public}d", userId); return ERR_INVALID_VALUE; } missionListManager->SignRestartAppFlag(bundleName); @@ -11280,28 +11280,28 @@ bool AbilityManagerService::IsEmbeddedOpenAllowed(sptr callerToke { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); if (!AppUtils::GetInstance().IsLaunchEmbededUIAbility()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "device type is not allowd."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "device type not allowd"); return false; } auto accessTokenId = IPCSkeleton::GetCallingTokenID(); auto type = Security::AccessToken::AccessTokenKit::GetTokenTypeFlag(accessTokenId); if (type != Security::AccessToken::TypeATokenTypeEnum::TOKEN_HAP) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "The caller is not hap."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "caller not hap"); return false; } auto uiAbilityManager = GetUIAbilityManagerByUid(IPCSkeleton::GetCallingUid()); CHECK_POINTER_AND_RETURN(uiAbilityManager, ERR_INVALID_VALUE); auto callerAbility = uiAbilityManager->GetAbilityRecordByToken(callerToken); if (callerAbility == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "The caller is invalid."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "caller invalid"); return false; } if (callerAbility->GetApplicationInfo().accessTokenId != accessTokenId) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "The callerToken does not belong to the caller."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken don't belong caller"); return false; } if (!callerAbility->IsForeground() && !callerAbility->GetAbilityForegroundingFlag()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "The caller not foreground."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "caller not foreground"); return false; } std::string bundleName = ATOMIC_SERVICE_PREFIX + appId; @@ -11311,7 +11311,7 @@ bool AbilityManagerService::IsEmbeddedOpenAllowed(sptr callerToke UpdateCallerInfo(want, callerToken); int32_t ret = freeInstallManager_->StartFreeInstall(want, GetUserId(), 0, callerToken, false); if (ret != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "The target is not allowed to free install."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "target not allowed free install"); return false; } want.SetParam(Want::PARAM_RESV_CALLER_BUNDLE_NAME, callerAbility->GetElementName().GetBundleName()); @@ -11365,7 +11365,7 @@ bool AbilityManagerService::ShouldPreventStartAbility(const AbilityRequest &abil TAG_LOGD(AAFwkTag::ABILITYMGR, "Process is in white list Pass"); return false; } - TAG_LOGE(AAFwkTag::ABILITYMGR, "Do not have permission to start ServiceExtension %{public}s.", + TAG_LOGE(AAFwkTag::ABILITYMGR, "without start serviceExtension %{public}s permission", abilityRecord->GetURI().c_str()); ReportPreventStartAbilityResult(callerAbilityInfo, abilityInfo); return true; @@ -11481,14 +11481,14 @@ bool AbilityManagerService::ParseJsonFromBoot(const std::string &relativePath) std::string AbilityManagerService::GetConfigFileAbsolutePath(const std::string &relativePath) { if (relativePath.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "relativePath is empty"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "relativePath empty"); return ""; } char buf[PATH_MAX]; char *tmpPath = GetOneCfgFile(relativePath.c_str(), buf, PATH_MAX); char absolutePath[PATH_MAX] = {0}; if (!tmpPath || strlen(tmpPath) > PATH_MAX || !realpath(tmpPath, absolutePath)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "get file fail."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "get file fail"); return ""; } return std::string(absolutePath); @@ -11499,12 +11499,12 @@ int32_t AbilityManagerService::ParseJsonValueFromFile(nlohmann::json &value, con std::ifstream fin; std::string realPath; if (!ConvertFullPath(filePath, realPath)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get real path failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "get real path failed"); return ERR_INVALID_VALUE; } fin.open(realPath, std::ios::in); if (!fin.is_open()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "cannot open file %{private}s", realPath.c_str()); + TAG_LOGE(AAFwkTag::ABILITYMGR, "can't open file %{private}s", realPath.c_str()); return ERR_INVALID_VALUE; } char buffer[MAX_BUFFER]; @@ -11515,7 +11515,7 @@ int32_t AbilityManagerService::ParseJsonValueFromFile(nlohmann::json &value, con const std::string data = os.str(); value = nlohmann::json::parse(data, nullptr, false); if (value.is_discarded()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "failed due to data is discarded"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "failed due data discarded"); return ERR_INVALID_VALUE; } return ERR_OK; @@ -11538,12 +11538,12 @@ int32_t AbilityManagerService::StartShortcut(const Want &want, const StartOption { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); if (!PermissionVerification::GetInstance()->IsSystemAppCall()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "non-system app calling system api."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "non-system app calling system api"); return ERR_NOT_SYSTEM_APP; } if (!PermissionVerification::GetInstance()->VerifyCallingPermission( PermissionConstants::PERMISSION_START_SHORTCUT)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission %{public}s verification failed.", + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission %{public}s verification failed", PermissionConstants::PERMISSION_START_SHORTCUT); return ERR_PERMISSION_DENIED; } @@ -11556,7 +11556,7 @@ int32_t AbilityManagerService::GetAbilityStateByPersistentId(int32_t persistentI { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); if (!CheckCallerIsDmsProcess()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "GetAbilityStateByPersistentId, caller is not dms."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "getAbilityStateByPersistentId, caller not dms"); return ERR_PERMISSION_DENIED; } @@ -11565,7 +11565,7 @@ int32_t AbilityManagerService::GetAbilityStateByPersistentId(int32_t persistentI CHECK_POINTER_AND_RETURN(uiAbilityManager, ERR_INVALID_VALUE); return uiAbilityManager->GetAbilityStateByPersistentId(persistentId, state); } - TAG_LOGE(AAFwkTag::ABILITYMGR, "GetAbilityStateByPersistentId, mission not have persistent id."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "getAbilityStateByPersistentId, mission without persistent id"); return INNER_ERR; } @@ -11576,12 +11576,12 @@ int32_t AbilityManagerService::TransferAbilityResultForExtension(const sptrGetAbilityInfo().type; if (type != AppExecFwk::AbilityType::EXTENSION) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "type is not uiextension."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "type not uiextension"); return ERR_INVALID_VALUE; } // save result to caller AbilityRecord. @@ -11597,12 +11597,12 @@ void AbilityManagerService::GetRunningMultiAppIndex(const std::string &bundleNam AppExecFwk::RunningMultiAppInfo runningMultiAppInfo; auto appMgr = GetAppMgr(); if (appMgr == nullptr) { - TAG_LOGW(AAFwkTag::ABILITYMGR, "GetAppMgr failed"); + TAG_LOGW(AAFwkTag::ABILITYMGR, "getAppMgr failed"); return; } auto ret = IN_PROCESS_CALL(appMgr->GetRunningMultiAppInfoByBundleName(bundleName, runningMultiAppInfo)); if (ret != ERR_OK) { - TAG_LOGW(AAFwkTag::ABILITYMGR, "GetAppInfo failed, bundle:%{public}s", + TAG_LOGW(AAFwkTag::ABILITYMGR, "getAppInfo failed, bundle:%{public}s", bundleName.c_str()); } for (auto &item : runningMultiAppInfo.runningAppClones) { @@ -11616,12 +11616,12 @@ void AbilityManagerService::GetRunningMultiAppIndex(const std::string &bundleNam void AbilityManagerService::NotifyFrozenProcessByRSS(const std::vector &pidList, int32_t uid) { if (!PermissionVerification::GetInstance()->CheckSpecificSystemAbilityAccessPermission(RSS_PROCESS_NAME)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "caller is not RSS."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "caller not RSS"); return; } auto userId = uid / BASE_USER_RANGE; auto connectManager = GetConnectManagerByUserId(userId); - CHECK_POINTER_LOG(connectManager, "can not find user connect manager"); + CHECK_POINTER_LOG(connectManager, "can't find user connect manager"); connectManager->HandleProcessFrozen(pidList, uid); } @@ -11636,34 +11636,34 @@ void AbilityManagerService::HandleRestartResidentProcessDependedOnWeb() int32_t AbilityManagerService::PreStartMission(const std::string& bundleName, const std::string& moduleName, const std::string& abilityName, const std::string& startTime) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "called"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "call"); CHECK_CALLER_IS_SYSTEM_APP; if (!PermissionVerification::GetInstance()->VerifyPreStartAtomicServicePermission()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "calling user is not ag."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "calling user not ag"); return ERR_PERMISSION_DENIED; } if (!freeInstallManager_) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "freeInstallManager_ is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "freeInstallManager_ null"); return ERR_INVALID_VALUE; } FreeInstallInfo taskInfo; if (!freeInstallManager_->GetFreeInstallTaskInfo(bundleName, abilityName, startTime, taskInfo)) { TAG_LOGE(AAFwkTag::ABILITYMGR, - "failed to find free install task info:bundleName=%{public}s,abilityName=%{public}s,startTime=%{public}s", + "failed find free install task info:bundleName=%{public}s,abilityName=%{public}s,startTime=%{public}s", bundleName.c_str(), abilityName.c_str(), startTime.c_str()); return ERR_FREE_INSTALL_TASK_NOT_EXIST; } if (taskInfo.isFreeInstallFinished) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "free install is finished."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "free install finished"); if (!taskInfo.isInstalled) { TAG_LOGE(AAFwkTag::ABILITYMGR, "free install task failed,resultCode=%{public}d", taskInfo.resultCode); } else { - TAG_LOGI(AAFwkTag::ABILITYMGR, "free install has succeeded."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "free install succeeded"); } // if free install is already finished then either the window is opened (on success) // or the user is informed of the error (on failure). @@ -11716,7 +11716,7 @@ int32_t AbilityManagerService::PreStartInner(const FreeInstallInfo& taskInfo) sptr sessionInfo = nullptr; auto errCode = uiAbilityManager->NotifySCBToPreStartUIAbility(abilityRequest, sessionInfo); if (errCode != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "failed to notify sceneboard to pre-start uiability."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "failed notify sceneboard pre-start uiability"); return errCode; } freeInstallManager_->SetFreeInstallTaskSessionId(taskInfo.want.GetElement().GetBundleName(), @@ -11733,26 +11733,26 @@ int32_t AbilityManagerService::PreStartInner(const FreeInstallInfo& taskInfo) int32_t AbilityManagerService::StartUIAbilityByPreInstall(const FreeInstallInfo &taskInfo) { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); - TAG_LOGI(AAFwkTag::ABILITYMGR, "called"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "call"); if (!taskInfo.isFreeInstallFinished || !taskInfo.isInstalled) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "free install is not finished or has failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "free install not finished or failed"); return ERR_INVALID_VALUE; } if (!taskInfo.isStartUIAbilityBySCBCalled) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "Free install is finished, StartUIAbilityBySCB has not been called"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "free install finished, startUIAbilityBySCB not called"); return ERR_OK; } const auto& want = taskInfo.want; auto sessionId = want.GetStringParam(KEY_SESSION_ID); if (sessionId.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "session id is empty."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "session id empty"); return ERR_INVALID_VALUE; } auto bundleName = want.GetElement().GetBundleName(); auto abilityName = want.GetElement().GetAbilityName(); auto startTime = want.GetStringParam(Want::PARAM_RESV_START_TIME); - TAG_LOGI(AAFwkTag::ABILITYMGR, "called" + TAG_LOGI(AAFwkTag::ABILITYMGR, "call" "sessionId=%{public}s,bundleName=%{public}s,abilityName=%{public}s,startTime=%{public}s", sessionId.c_str(), bundleName.c_str(), abilityName.c_str(), startTime.c_str()); sptr sessionInfo = nullptr; @@ -11760,7 +11760,7 @@ int32_t AbilityManagerService::StartUIAbilityByPreInstall(const FreeInstallInfo std::lock_guard guard(preStartSessionMapLock_); auto it = preStartSessionMap_.find(sessionId); if (it == preStartSessionMap_.end()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "failed to find session info with sessionId=%{public}s", + TAG_LOGE(AAFwkTag::ABILITYMGR, "failed find session info with sessionId=%{public}s", sessionId.c_str()); return ERR_INVALID_VALUE; } @@ -11771,7 +11771,7 @@ int32_t AbilityManagerService::StartUIAbilityByPreInstall(const FreeInstallInfo int errCode = ERR_OK; bool isColdStart = true; if ((errCode = StartUIAbilityByPreInstallInner(sessionInfo, taskInfo.specifyTokenId, 0, isColdStart)) != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "StartUIAbilityByPreInstallInner failed,errCode=%{public}d.", errCode); + TAG_LOGE(AAFwkTag::ABILITYMGR, "startUIAbilityByPreInstallInner failed,errCode=%{public}d", errCode); } RemovePreStartSession(sessionId); return errCode; @@ -11781,7 +11781,7 @@ int32_t AbilityManagerService::StartUIAbilityByPreInstall(const FreeInstallInfo int AbilityManagerService::StartUIAbilityByPreInstallInner(sptr sessionInfo, uint32_t specifyTokenId, uint32_t sceneFlag, bool &isColdStart) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "called"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "call"); auto callerToken = sessionInfo->callerToken; const auto& want = sessionInfo->want; const auto userId = sessionInfo->userId; @@ -11792,10 +11792,10 @@ int AbilityManagerService::StartUIAbilityByPreInstallInner(sptr ses auto isSpecificSA = AAFwk::PermissionVerification::GetInstance()-> CheckSpecificSystemAbilityAccessPermission(DMS_PROCESS_NAME); if (!isSpecificSA) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s VerificationAllToken failed.", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s verificationAllToken failed", __func__); return ERR_INVALID_CALLER; } - TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s: Caller is specific system ability.", __func__); + TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s: caller specific system ability", __func__); } int32_t oriValidUserId = GetValidUserId(userId); @@ -11811,7 +11811,7 @@ int AbilityManagerService::StartUIAbilityByPreInstallInner(sptr ses auto result = interceptorExecuter_ == nullptr ? ERR_INVALID_VALUE : interceptorExecuter_->DoProcess(interceptorParam); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ is nullptr or DoProcess return error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "interceptorExecuter_ null or doProcess error"); return result; } @@ -11821,7 +11821,7 @@ int AbilityManagerService::StartUIAbilityByPreInstallInner(sptr ses std::string callerBundleName = abilityRecord ? abilityRecord->GetAbilityInfo().bundleName : ""; if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Generate ability request local error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "Generate ability request local error"); return result; } if (!UriUtils::GetInstance().CheckNonImplicitShareFileUri(abilityRequest)) { @@ -11849,14 +11849,14 @@ int AbilityManagerService::StartUIAbilityByPreInstallInner(sptr ses result = CheckStaticCfgPermission(abilityRequest, isStartAsCaller, abilityRequest.want.GetIntParam(Want::PARAM_RESV_CALLER_TOKEN, 0), false, false, false); if (result != AppExecFwk::Constants::PERMISSION_GRANTED) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "CheckStaticCfgPermission error, result is %{public}d.", result); + TAG_LOGE(AAFwkTag::ABILITYMGR, "checkStaticCfgPermission error, result:%{public}d", result); return ERR_STATIC_CFG_PERMISSION; } result = CheckCallPermission(want, abilityInfo, abilityRequest, false, false, specifyTokenId, callerBundleName); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "CheckCallPermission error, result is %{public}d.", result); + TAG_LOGE(AAFwkTag::ABILITYMGR, "checkCallPermission error, result:%{public}d", result); return result; } @@ -11868,7 +11868,7 @@ int AbilityManagerService::StartUIAbilityByPreInstallInner(sptr ses bool isReplaceWantExist = newWant.GetBoolParam("queryWantFromErms", false); newWant.RemoveParam("queryWantFromErms"); if (result != ERR_OK && isReplaceWantExist == false) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "DoProcess failed or replaceWant not exist"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "doProcess failed or replaceWant absent"); return result; } #ifdef SUPPORT_SCREEN @@ -11888,13 +11888,13 @@ int AbilityManagerService::StartUIAbilityByPreInstallInner(sptr ses } if (!IsAbilityControllerStart(want, abilityInfo.bundleName)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "IsAbilityControllerStart failed: %{public}s.", abilityInfo.bundleName.c_str()); + TAG_LOGE(AAFwkTag::ABILITYMGR, "isAbilityControllerStart failed:%{public}s", abilityInfo.bundleName.c_str()); return ERR_WOULD_BLOCK; } abilityRequest.want.RemoveParam(SPECIFY_TOKEN_ID); if (specifyTokenId > 0) { - TAG_LOGD(AAFwkTag::ABILITYMGR, "Set specifyTokenId, the specifyTokenId is %{public}d.", specifyTokenId); + TAG_LOGD(AAFwkTag::ABILITYMGR, "set specifyTokenId, the specifyTokenId is %{public}d", specifyTokenId); abilityRequest.want.SetParam(SPECIFY_TOKEN_ID, static_cast(specifyTokenId)); abilityRequest.specifyTokenId = specifyTokenId; } @@ -11909,13 +11909,13 @@ int AbilityManagerService::StartUIAbilityByPreInstallInner(sptr ses void AbilityManagerService::NotifySCBToHandleAtomicServiceException(const std::string& sessionId, int32_t errCode, const std::string& reason) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "called"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "call"); sptr sessionInfo = nullptr; { std::lock_guard guard(preStartSessionMapLock_); auto it = preStartSessionMap_.find(sessionId); if (it == preStartSessionMap_.end()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "failed to find session info with sessionId=%{public}s", + TAG_LOGE(AAFwkTag::ABILITYMGR, "failed find session info with sessionId=%{public}s", sessionId.c_str()); return; } @@ -11923,7 +11923,7 @@ void AbilityManagerService::NotifySCBToHandleAtomicServiceException(const std::s preStartSessionMap_.erase(it); } if (sessionInfo == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "sessionInfo is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "sessionInfo null"); return; } auto uiAbilityManager = GetCurrentUIAbilityManager(); @@ -11940,7 +11940,7 @@ void AbilityManagerService::RemovePreStartSession(const std::string& sessionId) ErrCode AbilityManagerService::OpenLink(const Want& want, sptr callerToken, int32_t userId, int requestCode) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "called"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "call"); std::string url = want.GetUriString(); bool isAtomicServiceShortUrl = false; #ifdef APP_DOMAIN_VERIFY_ENABLED @@ -11948,25 +11948,25 @@ ErrCode AbilityManagerService::OpenLink(const Want& want, sptr ca #endif int32_t retCode = ERR_OK; if (!isAtomicServiceShortUrl) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "not atomic service short url, start ability by default."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "not atomic service short url, start ability by default"); retCode = StartAbility(want, callerToken, userId, requestCode); - CHECK_RET_RETURN_RET(retCode, "StartAbility failed"); + CHECK_RET_RETURN_RET(retCode, "startAbility failed"); return ERR_OPEN_LINK_START_ABILITY_DEFAULT_OK; } Want convertedWant = want; retCode = ConvertToExplicitWant(convertedWant); if (retCode != ERR_OK) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "failed to convert to explicit want, start ability by default."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "failed convert explicit want, start ability by default"); retCode = StartAbility(want, callerToken, userId, requestCode); CHECK_RET_RETURN_RET(retCode, "StartAbility failed"); return ERR_OPEN_LINK_START_ABILITY_DEFAULT_OK; } if (!freeInstallManager_) { - TAG_LOGW(AAFwkTag::ABILITYMGR, "free install manager is nullptr, start ability by default."); + TAG_LOGW(AAFwkTag::ABILITYMGR, "free install manager null, start ability by default"); retCode = StartAbility(want, callerToken, userId, requestCode); - CHECK_RET_RETURN_RET(retCode, "StartAbility failed"); + CHECK_RET_RETURN_RET(retCode, "startAbility failed"); return ERR_OPEN_LINK_START_ABILITY_DEFAULT_OK; } @@ -11975,12 +11975,12 @@ ErrCode AbilityManagerService::OpenLink(const Want& want, sptr ca retCode = freeInstallManager_->StartFreeInstall(convertedWant, GetValidUserId(userId), requestCode, callerToken, true, 0, true, std::make_shared(want)); if (retCode != ERR_OK) { - TAG_LOGW(AAFwkTag::ABILITYMGR, "StartFreeInstall returns errCode=%{public}d.", retCode); + TAG_LOGW(AAFwkTag::ABILITYMGR, "startFreeInstall returns errCode=%{public}d", retCode); if (retCode == NOT_TOP_ABILITY) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "start from background is not allowed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "start from background not allowed"); return retCode; } - TAG_LOGI(AAFwkTag::ABILITYMGR, "start ability by default."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "start ability by default"); retCode = StartAbility(want, callerToken, userId, requestCode); CHECK_RET_RETURN_RET(retCode, "StartAbility failed"); return ERR_OPEN_LINK_START_ABILITY_DEFAULT_OK; @@ -11994,17 +11994,17 @@ ErrCode AbilityManagerService::ConvertToExplicitWant(Want& want) #ifdef APP_DOMAIN_VERIFY_ENABLED auto bundleMgrHelper = GetBundleManager(); if (bundleMgrHelper == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "bundleMgrHelper is invalid."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "bundleMgrHelper invalid"); return ERR_INVALID_VALUE; } int32_t callerUid = IPCSkeleton::GetCallingUid(); std::string callerBundleName; retCode = IN_PROCESS_CALL(bundleMgrHelper->GetNameForUid(callerUid, callerBundleName)); if (retCode != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get callerBundleName failed,retCode=%{public}d.", retCode); + TAG_LOGE(AAFwkTag::ABILITYMGR, "get callerBundleName failed,retCode=%{public}d", retCode); return retCode; } - TAG_LOGI(AAFwkTag::ABILITYMGR, "callerBundleName=%{public}s.", callerBundleName.c_str()); + TAG_LOGI(AAFwkTag::ABILITYMGR, "callerBundleName=%{public}s", callerBundleName.c_str()); want.SetParam(Want::PARAM_RESV_CALLER_BUNDLE_NAME, callerBundleName); bool isUsed = false; @@ -12020,7 +12020,7 @@ ErrCode AbilityManagerService::ConvertToExplicitWant(Want& want) std::lock_guard lock(callbackDoneMutex); isUsed = true; } - TAG_LOGI(AAFwkTag::ABILITYMGR, "start to notify."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "start notify"); callbackDoneCv.notify_all(); TAG_LOGI(AAFwkTag::ABILITYMGR, "convert callback task finished"); }; @@ -12029,13 +12029,13 @@ ErrCode AbilityManagerService::ConvertToExplicitWant(Want& want) AppDomainVerify::AppDomainVerifyMgrClient::GetInstance()->ConvertToExplicitWant(want, callback); auto condition = [&isUsed] { return isUsed; }; std::unique_lock lock(callbackDoneMutex); - TAG_LOGI(AAFwkTag::ABILITYMGR, "start to wait for condition."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "wait for condition"); if (!callbackDoneCv.wait_for(lock, seconds(CONVERT_CALLBACK_TIMEOUT_SECONDS), condition)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "convert callback timeout."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "convert callback timeout"); callbackTask->Cancel(); retCode = ERR_TIMED_OUT; } - TAG_LOGI(AAFwkTag::ABILITYMGR, "finish wait for condition."); + TAG_LOGI(AAFwkTag::ABILITYMGR, "finish wait condition"); #endif return retCode; } @@ -12044,18 +12044,18 @@ int32_t AbilityManagerService::CleanUIAbilityBySCB(const sptr &sess { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); if (sessionInfo == nullptr || sessionInfo->sessionToken == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "sessionInfo is invalid."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "sessionInfo invalid"); return ERR_INVALID_VALUE; } if (!IsCallerSceneBoard()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "only support sceneboard call."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "only support sceneboard call"); return ERR_WRONG_INTERFACE_CALL; } auto uiAbilityManager = GetUIAbilityManagerByUid(IPCSkeleton::GetCallingUid()); CHECK_POINTER_AND_RETURN(uiAbilityManager, ERR_INVALID_VALUE); - TAG_LOGI(AAFwkTag::ABILITYMGR, "user request ot clean session: %{public}d.", sessionInfo->persistentId); + TAG_LOGI(AAFwkTag::ABILITYMGR, "user request clean session: %{public}d", sessionInfo->persistentId); auto abilityRecord = uiAbilityManager->GetUIAbilityRecordBySessionInfo(sessionInfo); CHECK_POINTER_AND_RETURN(abilityRecord, ERR_INVALID_VALUE); bool forceKillProcess = ResSchedUtil::GetInstance().CheckShouldForceKillProcess(abilityRecord->GetPid()); @@ -12111,21 +12111,21 @@ void AbilityManagerService::SetAbilityRequestSessionInfo(AbilityRequest &ability } } } else { - TAG_LOGE(AAFwkTag::ABILITYMGR, "callerAbilityRecord is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callerAbilityRecord null"); } } int32_t AbilityManagerService::TerminateMission(int32_t missionId) { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); - TAG_LOGI(AAFwkTag::ABILITYMGR, "TerminateMission call"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "terminateMission call"); auto missionListManager = GetCurrentMissionListManager(); CHECK_POINTER_AND_RETURN(missionListManager, ERR_NO_INIT); CHECK_CALLER_IS_SYSTEM_APP; if (!PermissionVerification::GetInstance()->VerifyCallingPermission( PermissionConstants::PERMISSION_KILL_APP_PROCESSES)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Permission verification failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "permission verification failed"); return CHECK_PERMISSION_FAILED; } diff --git a/services/abilitymgr/src/ability_manager_stub.cpp b/services/abilitymgr/src/ability_manager_stub.cpp index 269e0c12f3..834594bc26 100644 --- a/services/abilitymgr/src/ability_manager_stub.cpp +++ b/services/abilitymgr/src/ability_manager_stub.cpp @@ -766,7 +766,7 @@ int AbilityManagerStub::OnRemoteRequestInner(uint32_t code, MessageParcel &data, if (retCode != ERR_CODE_NOT_EXIST) { return retCode; } - TAG_LOGW(AAFwkTag::ABILITYMGR, "default case, need check."); + TAG_LOGW(AAFwkTag::ABILITYMGR, "default case"); return IPCObjectStub::OnRemoteRequest(code, data, reply, option); } @@ -866,7 +866,7 @@ int AbilityManagerStub::OnRemoteRequest(uint32_t code, MessageParcel &data, Mess std::u16string abilityDescriptor = AbilityManagerStub::GetDescriptor(); std::u16string remoteDescriptor = data.ReadInterfaceToken(); if (abilityDescriptor != remoteDescriptor && extensionDescriptor != remoteDescriptor) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "local descriptor is unequal to remote"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "local descriptor unequal to remote"); return ERR_INVALID_STATE; } @@ -914,12 +914,12 @@ int32_t AbilityManagerStub::MoveUIAbilityToBackgroundInner(MessageParcel &data, { const sptr token = data.ReadRemoteObject(); if (!token) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "token is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "token null"); return IPC_STUB_ERR; } int32_t result = MoveUIAbilityToBackground(token); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "write result failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write failed"); return IPC_STUB_ERR; } return NO_ERROR; @@ -986,7 +986,7 @@ int AbilityManagerStub::SendResultToAbilityInner(MessageParcel &data, MessagePar int resultCode = data.ReadInt32(); Want *resultWant = data.ReadParcelable(); if (resultWant == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "resultWant is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "resultWant null"); return ERR_INVALID_VALUE; } int32_t result = SendResultToAbility(requestCode, resultCode, *resultWant); @@ -1035,7 +1035,7 @@ int AbilityManagerStub::AttachAbilityThreadInner(MessageParcel &data, MessagePar { auto scheduler = iface_cast(data.ReadRemoteObject()); if (scheduler == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "scheduler is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "scheduler null"); return ERR_INVALID_VALUE; } auto token = data.ReadRemoteObject(); @@ -1050,7 +1050,7 @@ int AbilityManagerStub::AbilityTransitionDoneInner(MessageParcel &data, MessageP int targetState = data.ReadInt32(); std::unique_ptr saveData(data.ReadParcelable()); if (!saveData) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "save data is nullptr"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "saveData null"); return ERR_INVALID_VALUE; } int32_t result = AbilityTransitionDone(token, targetState, *saveData); @@ -1063,7 +1063,7 @@ int AbilityManagerStub::AbilityWindowConfigTransitionDoneInner(MessageParcel &da auto token = data.ReadRemoteObject(); std::unique_ptr windowConfig(data.ReadParcelable()); if (!windowConfig) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "windowConfig is nullptr"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "windowConfig null"); return ERR_INVALID_VALUE; } int32_t result = AbilityWindowConfigTransitionDone(token, *windowConfig); @@ -1133,7 +1133,7 @@ int AbilityManagerStub::ReleaseDataAbilityInner(MessageParcel &data, MessageParc { auto scheduler = iface_cast(data.ReadRemoteObject()); if (scheduler == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "scheduler is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "scheduler null"); return ERR_INVALID_VALUE; } auto callerToken = data.ReadRemoteObject(); @@ -1186,7 +1186,7 @@ int AbilityManagerStub::StartAbilityInner(MessageParcel &data, MessageParcel &re { std::shared_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return ERR_INVALID_VALUE; } int32_t userId = data.ReadInt32(); @@ -1200,7 +1200,7 @@ int AbilityManagerStub::StartAbilityInnerSpecifyTokenId(MessageParcel &data, Mes { std::shared_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return ERR_INVALID_VALUE; } @@ -1220,7 +1220,7 @@ int AbilityManagerStub::StartAbilityByUIContentSessionAddCallerInner(MessageParc { std::unique_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return ERR_INVALID_VALUE; } @@ -1228,7 +1228,7 @@ int AbilityManagerStub::StartAbilityByUIContentSessionAddCallerInner(MessageParc if (data.ReadBool()) { callerToken = data.ReadRemoteObject(); if (callerToken == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken null"); return ERR_INVALID_VALUE; } } @@ -1237,7 +1237,7 @@ int AbilityManagerStub::StartAbilityByUIContentSessionAddCallerInner(MessageParc if (data.ReadBool()) { sessionInfo = data.ReadParcelable(); if (sessionInfo == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "sessionInfo is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "sessionInfo null"); return ERR_INVALID_VALUE; } } @@ -1253,12 +1253,12 @@ int AbilityManagerStub::StartAbilityByUIContentSessionForOptionsInner(MessagePar { std::unique_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return ERR_INVALID_VALUE; } std::unique_ptr startOptions(data.ReadParcelable()); if (startOptions == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "startOptions is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "startOptions null"); return ERR_INVALID_VALUE; } startOptions->processOptions = nullptr; @@ -1266,7 +1266,7 @@ int AbilityManagerStub::StartAbilityByUIContentSessionForOptionsInner(MessagePar if (data.ReadBool()) { callerToken = data.ReadRemoteObject(); if (callerToken == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken null"); return ERR_INVALID_VALUE; } } @@ -1274,7 +1274,7 @@ int AbilityManagerStub::StartAbilityByUIContentSessionForOptionsInner(MessagePar if (data.ReadBool()) { sessionInfo = data.ReadParcelable(); if (sessionInfo == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "sessionInfo is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "sessionInfo null"); return ERR_INVALID_VALUE; } } @@ -1290,7 +1290,7 @@ int AbilityManagerStub::StartExtensionAbilityInner(MessageParcel &data, MessageP { std::shared_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return ERR_INVALID_VALUE; } sptr callerToken = nullptr; @@ -1309,7 +1309,7 @@ int AbilityManagerStub::RequestModalUIExtensionInner(MessageParcel &data, Messag { std::shared_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return ERR_INVALID_VALUE; } int32_t result = RequestModalUIExtension(*want); @@ -1321,7 +1321,7 @@ int AbilityManagerStub::PreloadUIExtensionAbilityInner(MessageParcel &data, Mess { std::shared_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return ERR_INVALID_VALUE; } std::string hostBundleName = Str16ToStr8(data.ReadString16()); @@ -1335,14 +1335,14 @@ int AbilityManagerStub::ChangeAbilityVisibilityInner(MessageParcel &data, Messag { sptr token = data.ReadRemoteObject(); if (!token) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "read ability token failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "read token fail"); return ERR_NULL_OBJECT; } bool isShow = data.ReadBool(); int result = ChangeAbilityVisibility(token, isShow); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "write result failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "fail"); return ERR_NATIVE_IPC_PARCEL_FAILED; } return NO_ERROR; @@ -1352,14 +1352,14 @@ int AbilityManagerStub::ChangeUIAbilityVisibilityBySCBInner(MessageParcel &data, { sptr sessionInfo = data.ReadParcelable(); if (!sessionInfo) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "read sessionInfo failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "read sessionInfo fail"); return ERR_NULL_OBJECT; } bool isShow = data.ReadBool(); int result = ChangeUIAbilityVisibilityBySCB(sessionInfo, isShow); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "write result failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write fail"); return ERR_NATIVE_IPC_PARCEL_FAILED; } return NO_ERROR; @@ -1371,7 +1371,7 @@ int AbilityManagerStub::StartUIExtensionAbilityInner(MessageParcel &data, Messag if (data.ReadBool()) { extensionSessionInfo = data.ReadParcelable(); if (extensionSessionInfo == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "read extensionSessionInfo failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null extensionSessionInfo"); return ERR_NULL_OBJECT; } // To ensure security, this attribute must be rewritten. @@ -1391,7 +1391,7 @@ int AbilityManagerStub::StartUIExtensionAbilityEmbeddedInner(MessageParcel &data if (data.ReadBool()) { extensionSessionInfo = data.ReadParcelable(); if (extensionSessionInfo == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "read extensionSessionInfo failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null extensionSessionInfo"); return ERR_NULL_OBJECT; } // To ensure security, this attribute must be rewritten. @@ -1411,7 +1411,7 @@ int AbilityManagerStub::StartUIExtensionConstrainedEmbeddedInner(MessageParcel & if (data.ReadBool()) { extensionSessionInfo = data.ReadParcelable(); if (extensionSessionInfo == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "read extensionSessionInfo failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null extensionSessionInfo"); return ERR_NULL_OBJECT; } // To ensure security, this attribute must be rewritten. @@ -1429,7 +1429,7 @@ int AbilityManagerStub::StopExtensionAbilityInner(MessageParcel& data, MessagePa { std::shared_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null want"); return ERR_INVALID_VALUE; } sptr callerToken = nullptr; @@ -1448,7 +1448,7 @@ int AbilityManagerStub::StartAbilityAddCallerInner(MessageParcel &data, MessageP { std::shared_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null want"); return ERR_INVALID_VALUE; } @@ -1468,7 +1468,7 @@ int AbilityManagerStub::StartAbilityAsCallerByTokenInner(MessageParcel &data, Me { std::shared_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null want"); return ERR_INVALID_VALUE; } @@ -1491,12 +1491,12 @@ int AbilityManagerStub::StartAbilityAsCallerForOptionInner(MessageParcel &data, { std::shared_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null want"); return ERR_INVALID_VALUE; } StartOptions *startOptions = data.ReadParcelable(); if (startOptions == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "startOptions is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null startOptions"); return ERR_INVALID_VALUE; } startOptions->processOptions = nullptr; @@ -1520,7 +1520,7 @@ int AbilityManagerStub::ConnectAbilityInner(MessageParcel &data, MessageParcel & { std::shared_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null want"); return ERR_INVALID_VALUE; } sptr callback = nullptr; @@ -1541,7 +1541,7 @@ int AbilityManagerStub::ConnectAbilityWithTypeInner(MessageParcel &data, Message { std::shared_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s, want is nullptr!", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s, null want", __func__); return ERR_INVALID_VALUE; } sptr callback = nullptr; @@ -1564,7 +1564,7 @@ int AbilityManagerStub::ConnectUIExtensionAbilityInner(MessageParcel &data, Mess { std::shared_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s, want is nullptr", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s, null want", __func__); return ERR_INVALID_VALUE; } sptr callback = nullptr; @@ -1584,7 +1584,7 @@ int AbilityManagerStub::ConnectUIExtensionAbilityInner(MessageParcel &data, Mess int32_t result = ConnectUIExtensionAbility(*want, callback, sessionInfo, userId, connectInfo); if (connectInfo != nullptr && !reply.WriteParcelable(connectInfo)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "connectInfo write failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "connectInfo write fail"); } reply.WriteInt32(result); @@ -1595,7 +1595,7 @@ int AbilityManagerStub::DisconnectAbilityInner(MessageParcel &data, MessageParce { sptr callback = iface_cast(data.ReadRemoteObject()); if (callback == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "callback is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callback null"); return ERR_INVALID_VALUE; } int32_t result = DisconnectAbility(callback); @@ -1608,7 +1608,7 @@ int AbilityManagerStub::StopServiceAbilityInner(MessageParcel &data, MessageParc { std::shared_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null want"); return ERR_INVALID_VALUE; } int32_t userId = data.ReadInt32(); @@ -1663,12 +1663,12 @@ int AbilityManagerStub::StartAbilityForSettingsInner(MessageParcel &data, Messag { std::shared_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null want"); return ERR_INVALID_VALUE; } AbilityStartSetting *abilityStartSetting = data.ReadParcelable(); if (abilityStartSetting == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityStartSetting is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityStartSetting null"); return ERR_INVALID_VALUE; } sptr callerToken = nullptr; @@ -1687,12 +1687,12 @@ int AbilityManagerStub::StartAbilityForOptionsInner(MessageParcel &data, Message { std::shared_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return ERR_INVALID_VALUE; } StartOptions *startOptions = data.ReadParcelable(); if (startOptions == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "startOptions is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "startOptions null"); return ERR_INVALID_VALUE; } sptr callerToken = nullptr; @@ -1722,7 +1722,7 @@ int AbilityManagerStub::GetWantSenderInner(MessageParcel &data, MessageParcel &r { std::unique_ptr wantSenderInfo(data.ReadParcelable()); if (wantSenderInfo == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "wantSenderInfo is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "wantSenderInfo null"); return ERR_INVALID_VALUE; } sptr callerToken = nullptr; @@ -1731,7 +1731,7 @@ int AbilityManagerStub::GetWantSenderInner(MessageParcel &data, MessageParcel &r } sptr wantSender = GetWantSender(*wantSenderInfo, callerToken); if (!reply.WriteRemoteObject(((wantSender == nullptr) ? nullptr : wantSender->AsObject()))) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "failed to reply wantSender instance to client, for write parcel error"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "failed reply wantSender to client, for write parcel error"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -1741,12 +1741,12 @@ int AbilityManagerStub::SendWantSenderInner(MessageParcel &data, MessageParcel & { sptr wantSender = iface_cast(data.ReadRemoteObject()); if (wantSender == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "wantSender is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "wantSender null"); return ERR_INVALID_VALUE; } std::unique_ptr senderInfo(data.ReadParcelable()); if (senderInfo == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "senderInfo is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "senderInfo null"); return ERR_INVALID_VALUE; } int32_t result = SendWantSender(wantSender, *senderInfo); @@ -1758,7 +1758,7 @@ int AbilityManagerStub::CancelWantSenderInner(MessageParcel &data, MessageParcel { sptr wantSender = iface_cast(data.ReadRemoteObject()); if (wantSender == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "wantSender is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "wantSender null"); return ERR_INVALID_VALUE; } CancelWantSender(wantSender); @@ -1769,7 +1769,7 @@ int AbilityManagerStub::GetPendingWantUidInner(MessageParcel &data, MessageParce { sptr wantSender = iface_cast(data.ReadRemoteObject()); if (wantSender == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "wantSender is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "wantSender null"); return ERR_INVALID_VALUE; } @@ -1782,7 +1782,7 @@ int AbilityManagerStub::GetPendingWantUserIdInner(MessageParcel &data, MessagePa { sptr wantSender = iface_cast(data.ReadRemoteObject()); if (wantSender == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "wantSender is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "wantSender null"); return ERR_INVALID_VALUE; } @@ -1795,13 +1795,13 @@ int AbilityManagerStub::GetPendingWantBundleNameInner(MessageParcel &data, Messa { auto remote = data.ReadRemoteObject(); if (remote == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "ReadRemoteObject is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "readRemoteObject null"); return ERR_INVALID_VALUE; } sptr wantSender = iface_cast(remote); if (wantSender == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "wantSender is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "wantSender null"); return ERR_INVALID_VALUE; } @@ -1814,7 +1814,7 @@ int AbilityManagerStub::GetPendingWantCodeInner(MessageParcel &data, MessageParc { sptr wantSender = iface_cast(data.ReadRemoteObject()); if (wantSender == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "wantSender is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "wantSender null"); return ERR_INVALID_VALUE; } @@ -1827,7 +1827,7 @@ int AbilityManagerStub::GetPendingWantTypeInner(MessageParcel &data, MessageParc { sptr wantSender = iface_cast(data.ReadRemoteObject()); if (wantSender == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "wantSender is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "wantSender null"); return ERR_INVALID_VALUE; } @@ -1840,12 +1840,12 @@ int AbilityManagerStub::RegisterCancelListenerInner(MessageParcel &data, Message { sptr sender = iface_cast(data.ReadRemoteObject()); if (sender == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "sender is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "sender null"); return ERR_INVALID_VALUE; } sptr receiver = iface_cast(data.ReadRemoteObject()); if (receiver == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "receiver is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "receiver null"); return ERR_INVALID_VALUE; } RegisterCancelListener(sender, receiver); @@ -1856,12 +1856,12 @@ int AbilityManagerStub::UnregisterCancelListenerInner(MessageParcel &data, Messa { sptr sender = iface_cast(data.ReadRemoteObject()); if (sender == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "sender is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "sender null"); return ERR_INVALID_VALUE; } sptr receiver = iface_cast(data.ReadRemoteObject()); if (receiver == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "receiver is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "receiver null"); return ERR_INVALID_VALUE; } UnregisterCancelListener(sender, receiver); @@ -1873,14 +1873,14 @@ int AbilityManagerStub::GetPendingRequestWantInner(MessageParcel &data, MessageP HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); sptr wantSender = iface_cast(data.ReadRemoteObject()); if (wantSender == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "wantSender is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "wantSender null"); return ERR_INVALID_VALUE; } std::shared_ptr want(data.ReadParcelable()); int32_t result = GetPendingRequestWant(wantSender, want); if (result != NO_ERROR) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "GetPendingRequestWant is failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "getPendingRequestWant fail"); return ERR_INVALID_VALUE; } reply.WriteParcelable(want.get()); @@ -1891,14 +1891,14 @@ int AbilityManagerStub::GetWantSenderInfoInner(MessageParcel &data, MessageParce { sptr wantSender = iface_cast(data.ReadRemoteObject()); if (wantSender == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "wantSender is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "wantSender null"); return ERR_INVALID_VALUE; } std::shared_ptr info(data.ReadParcelable()); int32_t result = GetWantSenderInfo(wantSender, info); if (result != NO_ERROR) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "GetWantSenderInfo is failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "getWantSenderInfo fail"); return ERR_INVALID_VALUE; } reply.WriteParcelable(info.get()); @@ -1908,7 +1908,7 @@ int AbilityManagerStub::GetWantSenderInfoInner(MessageParcel &data, MessageParce int AbilityManagerStub::GetAppMemorySizeInner(MessageParcel &data, MessageParcel &reply) { int32_t result = GetAppMemorySize(); - TAG_LOGI(AAFwkTag::ABILITYMGR, "GetAppMemorySizeInner result %{public}d", result); + TAG_LOGI(AAFwkTag::ABILITYMGR, "result %{public}d", result); if (!reply.WriteInt32(result)) { TAG_LOGE(AAFwkTag::ABILITYMGR, "GetAppMemorySize error"); return ERR_INVALID_VALUE; @@ -1920,7 +1920,7 @@ int AbilityManagerStub::IsRamConstrainedDeviceInner(MessageParcel &data, Message { auto result = IsRamConstrainedDevice(); if (!reply.WriteBool(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -1934,41 +1934,41 @@ int AbilityManagerStub::ContinueMissionInner(MessageParcel &data, MessageParcel int32_t missionId = data.ReadInt32(); sptr callback = data.ReadRemoteObject(); if (callback == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "ContinueMissionInner callback readParcelable failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null callback"); return ERR_NULL_OBJECT; } std::unique_ptr wantParams(data.ReadParcelable()); if (wantParams == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "ContinueMissionInner wantParams readParcelable failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null wantParams"); return ERR_NULL_OBJECT; } int32_t result = ContinueMission(srcDeviceId, dstDeviceId, missionId, callback, *wantParams); - TAG_LOGI(AAFwkTag::ABILITYMGR, "ContinueMissionInner result = %{public}d.", result); + TAG_LOGI(AAFwkTag::ABILITYMGR, "result=%{public}d", result); return result; } int AbilityManagerStub::ContinueMissionOfBundleNameInner(MessageParcel &data, MessageParcel &reply) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "amsStub %{public}s called!", __func__); + TAG_LOGI(AAFwkTag::ABILITYMGR, "amsStub %{public}s call", __func__); ContinueMissionInfo continueMissionInfo; continueMissionInfo.srcDeviceId = data.ReadString(); continueMissionInfo.dstDeviceId = data.ReadString(); continueMissionInfo.bundleName = data.ReadString(); sptr callback = data.ReadRemoteObject(); if (callback == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "ContinueMissionInner callback readParcelable failed!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null wantParams"); return ERR_NULL_OBJECT; } std::unique_ptr wantParams(data.ReadParcelable()); if (wantParams == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "ContinueMissionInner wantParams readParcelable failed!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null wantParams"); return ERR_NULL_OBJECT; } continueMissionInfo.wantParams = *wantParams; continueMissionInfo.srcBundleName = data.ReadString(); continueMissionInfo.continueType = data.ReadString(); int32_t result = ContinueMission(continueMissionInfo, callback); - TAG_LOGI(AAFwkTag::ABILITYMGR, "ContinueMissionInner result = %{public}d", result); + TAG_LOGI(AAFwkTag::ABILITYMGR, "result=%{public}d", result); return result; } @@ -1979,7 +1979,7 @@ int AbilityManagerStub::ContinueAbilityInner(MessageParcel &data, MessageParcel uint32_t versionCode = data.ReadUint32(); AAFWK::ContinueRadar::GetInstance().SaveDataContinue("ContinueAbility"); int32_t result = ContinueAbility(deviceId, missionId, versionCode); - TAG_LOGI(AAFwkTag::ABILITYMGR, "ContinueAbilityInner result = %{public}d", result); + TAG_LOGI(AAFwkTag::ABILITYMGR, "result=%{public}d", result); return result; } @@ -1988,18 +1988,18 @@ int AbilityManagerStub::StartContinuationInner(MessageParcel &data, MessageParce AAFWK::ContinueRadar::GetInstance().SaveDataRes("GetContentInfo"); std::unique_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "StartContinuationInner want readParcelable failed!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null want"); return ERR_NULL_OBJECT; } sptr abilityToken = data.ReadRemoteObject(); if (abilityToken == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get abilityToken failed!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null abilityToken"); return ERR_NULL_OBJECT; } int32_t status = data.ReadInt32(); int32_t result = StartContinuation(*want, abilityToken, status); - TAG_LOGI(AAFwkTag::ABILITYMGR, "StartContinuationInner result = %{public}d", result); + TAG_LOGI(AAFwkTag::ABILITYMGR, "result=%{public}d", result); return result; } @@ -2011,7 +2011,7 @@ int AbilityManagerStub::NotifyCompleteContinuationInner(MessageParcel &data, Mes bool isSuccess = data.ReadBool(); NotifyCompleteContinuation(devId, sessionId, isSuccess); - TAG_LOGI(AAFwkTag::ABILITYMGR, "NotifyCompleteContinuationInner end"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "end"); return NO_ERROR; } @@ -2021,7 +2021,7 @@ int AbilityManagerStub::NotifyContinuationResultInner(MessageParcel &data, Messa int32_t continuationResult = data.ReadInt32(); int32_t result = NotifyContinuationResult(missionId, continuationResult); - TAG_LOGI(AAFwkTag::ABILITYMGR, "StartContinuationInner result = %{public}d", result); + TAG_LOGI(AAFwkTag::ABILITYMGR, "result=%{public}d", result); return result; } @@ -2030,7 +2030,7 @@ int AbilityManagerStub::LockMissionForCleanupInner(MessageParcel &data, MessageP int32_t id = data.ReadInt32(); int result = LockMissionForCleanup(id); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "AbilityManagerStub: lock mission failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "lock mission fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2042,7 +2042,7 @@ int AbilityManagerStub::UnlockMissionForCleanupInner(MessageParcel &data, Messag int32_t id = data.ReadInt32(); int result = UnlockMissionForCleanup(id); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "AbilityManagerStub: unlock mission failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "unlock mission fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2060,7 +2060,7 @@ int AbilityManagerStub::RegisterMissionListenerInner(MessageParcel &data, Messag { sptr listener = iface_cast(data.ReadRemoteObject()); if (listener == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "stub register mission listener, listener is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null listener"); return ERR_INVALID_VALUE; } @@ -2073,7 +2073,7 @@ int AbilityManagerStub::UnRegisterMissionListenerInner(MessageParcel &data, Mess { sptr listener = iface_cast(data.ReadRemoteObject()); if (listener == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "stub unregister mission listener, listener is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null listener"); return ERR_INVALID_VALUE; } @@ -2126,7 +2126,7 @@ int AbilityManagerStub::CleanMissionInner(MessageParcel &data, MessageParcel &re int32_t missionId = data.ReadInt32(); int result = CleanMission(missionId); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "CleanMission failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "cleanMission fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2137,7 +2137,7 @@ int AbilityManagerStub::CleanAllMissionsInner(MessageParcel &data, MessageParcel HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); int result = CleanAllMissions(); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "CleanAllMissions failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "cleanAllMissions fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2149,7 +2149,7 @@ int AbilityManagerStub::MoveMissionToFrontInner(MessageParcel &data, MessageParc int32_t missionId = data.ReadInt32(); int result = MoveMissionToFront(missionId); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "MoveMissionToFront failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write result fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2160,7 +2160,7 @@ int AbilityManagerStub::GetMissionIdByTokenInner(MessageParcel &data, MessagePar sptr token = data.ReadRemoteObject(); int32_t missionId = GetMissionIdByToken(token); if (!reply.WriteInt32(missionId)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "GetMissionIdByToken write missionId failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write missionId fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2172,13 +2172,13 @@ int AbilityManagerStub::MoveMissionToFrontByOptionsInner(MessageParcel &data, Me int32_t missionId = data.ReadInt32(); std::unique_ptr startOptions(data.ReadParcelable()); if (startOptions == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "startOptions is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "startOptions null"); return ERR_INVALID_VALUE; } startOptions->processOptions = nullptr; int result = MoveMissionToFront(missionId, *startOptions); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "MoveMissionToFront failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "moveMissionToFront fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2207,7 +2207,7 @@ int AbilityManagerStub::MoveMissionsToBackgroundInner(MessageParcel &data, Messa int32_t errCode = MoveMissionsToBackground(missionIds, result); TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called. resultSize: %{public}zu", __func__, result.size()); if (!reply.WriteInt32Vector(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s is called. WriteInt32Vector Failed", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s call writeInt32Vector fail", __func__); return ERR_INVALID_VALUE; } if (!reply.WriteInt32(errCode)) { @@ -2221,13 +2221,13 @@ int AbilityManagerStub::StartAbilityByCallInner(MessageParcel &data, MessageParc TAG_LOGD(AAFwkTag::ABILITYMGR, "AbilityManagerStub::StartAbilityByCallInner begin."); std::shared_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return ERR_INVALID_VALUE; } auto callback = iface_cast(data.ReadRemoteObject()); if (callback == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "callback is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callback null"); return ERR_INVALID_VALUE; } sptr callerToken = nullptr; @@ -2273,13 +2273,13 @@ int AbilityManagerStub::ReleaseCallInner(MessageParcel &data, MessageParcel &rep { auto callback = iface_cast(data.ReadRemoteObject()); if (callback == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "callback is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callback null"); return ERR_INVALID_VALUE; } std::unique_ptr element(data.ReadParcelable()); if (element == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "callback stub receive element is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "receive null"); return ERR_INVALID_VALUE; } int32_t result = ReleaseCall(callback, *element); @@ -2298,12 +2298,12 @@ int AbilityManagerStub::StartUserInner(MessageParcel &data, MessageParcel &reply if (data.ReadBool()) { callback = iface_cast(data.ReadRemoteObject()); } else { - TAG_LOGE(AAFwkTag::ABILITYMGR, "callback is invalid value."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callback invalid value"); return ERR_INVALID_VALUE; } int result = StartUser(userId, callback); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "StartUser failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "startUser fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2318,7 +2318,7 @@ int AbilityManagerStub::StopUserInner(MessageParcel &data, MessageParcel &reply) } int result = StopUser(userId, callback); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "StopUser failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "stopUser fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2329,7 +2329,7 @@ int AbilityManagerStub::LogoutUserInner(MessageParcel &data, MessageParcel &repl int32_t userId = data.ReadInt32(); int result = LogoutUser(userId); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "LogoutUser failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "logoutUser fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2391,7 +2391,7 @@ int AbilityManagerStub::StartSyncRemoteMissionsInner(MessageParcel &data, Messag int64_t tag = data.ReadInt64(); int result = StartSyncRemoteMissions(deviceId, fixConflict, tag); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "StartSyncRemoteMissionsInner failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2401,7 +2401,7 @@ int AbilityManagerStub::StopSyncRemoteMissionsInner(MessageParcel &data, Message { int result = StopSyncRemoteMissions(data.ReadString()); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "StopSyncRemoteMissionsInner failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2411,17 +2411,16 @@ int AbilityManagerStub::RegisterRemoteMissionListenerInner(MessageParcel &data, { std::string deviceId = data.ReadString(); if (deviceId.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "AbilityManagerStub: RegisterRemoteMissionListenerInner deviceId empty!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "deviceId empty"); return INVALID_PARAMETERS_ERR; } sptr listener = iface_cast(data.ReadRemoteObject()); if (listener == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "AbilityManagerStub: RegisterRemoteMissionListenerInner listener" - "readParcelable failed!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null listener"); return ERR_NULL_OBJECT; } int32_t result = RegisterMissionListener(deviceId, listener); - TAG_LOGI(AAFwkTag::ABILITYMGR, "AbilityManagerStub: RegisterRemoteMissionListenerInner result = %{public}d", + TAG_LOGI(AAFwkTag::ABILITYMGR, "result=%{public}d", result); return result; } @@ -2430,17 +2429,16 @@ int AbilityManagerStub::RegisterRemoteOnListenerInner(MessageParcel &data, Messa { std::string type = data.ReadString(); if (type.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "AbilityManagerStub: RegisterRemoteOnListenerInner type empty!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "type empty"); return ERR_NULL_OBJECT; } sptr listener = iface_cast(data.ReadRemoteObject()); if (listener == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "AbilityManagerStub: RegisterRemoteOnListenerInner listener" - "readParcelable failed!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null listener"); return ERR_NULL_OBJECT; } int32_t result = RegisterOnListener(type, listener); - TAG_LOGI(AAFwkTag::ABILITYMGR, "AbilityManagerStub: RegisterRemoteOnListenerInner result = %{public}d", result); + TAG_LOGI(AAFwkTag::ABILITYMGR, "result=%{public}d", result); return result; } @@ -2448,17 +2446,16 @@ int AbilityManagerStub::RegisterRemoteOffListenerInner(MessageParcel &data, Mess { std::string type = data.ReadString(); if (type.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "AbilityManagerStub: RegisterRemoteOffListenerInner type empty!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "type empty"); return ERR_NULL_OBJECT; } sptr listener = iface_cast(data.ReadRemoteObject()); if (listener == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "AbilityManagerStub: RegisterRemoteOffListenerInner listener" - "readParcelable failed!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null listener"); return ERR_NULL_OBJECT; } int32_t result = RegisterOffListener(type, listener); - TAG_LOGI(AAFwkTag::ABILITYMGR, "AbilityManagerStub: RegisterRemoteOffListenerInner result = %{public}d", result); + TAG_LOGI(AAFwkTag::ABILITYMGR, "result=%{public}d", result); return result; } @@ -2466,17 +2463,16 @@ int AbilityManagerStub::UnRegisterRemoteMissionListenerInner(MessageParcel &data { std::string deviceId = data.ReadString(); if (deviceId.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "AbilityManagerStub: UnRegisterRemoteMissionListenerInner deviceId empty!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "deviceId empty"); return INVALID_PARAMETERS_ERR; } sptr listener = iface_cast(data.ReadRemoteObject()); if (listener == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "AbilityManagerStub: UnRegisterRemoteMissionListenerInner listener" - "readParcelable failed!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null listener"); return ERR_NULL_OBJECT; } int32_t result = UnRegisterMissionListener(deviceId, listener); - TAG_LOGI(AAFwkTag::ABILITYMGR, "AbilityManagerStub: UnRegisterRemoteMissionListenerInner result = %{public}d", + TAG_LOGI(AAFwkTag::ABILITYMGR, "result=%{public}d", result); return result; } @@ -2485,11 +2481,11 @@ int AbilityManagerStub::RegisterSnapshotHandlerInner(MessageParcel &data, Messag { sptr handler = iface_cast(data.ReadRemoteObject()); if (handler == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "snapshot: AbilityManagerStub read snapshot handler failed!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null handler"); return ERR_NULL_OBJECT; } int32_t result = RegisterSnapshotHandler(handler); - TAG_LOGI(AAFwkTag::ABILITYMGR, "snapshot: AbilityManagerStub register snapshot handler result = %{public}d", + TAG_LOGI(AAFwkTag::ABILITYMGR, "result=%{public}d", result); return result; } @@ -2501,7 +2497,7 @@ int AbilityManagerStub::GetMissionSnapshotInfoInner(MessageParcel &data, Message bool isLowResolution = data.ReadBool(); MissionSnapshot missionSnapshot; int32_t result = GetMissionSnapshot(deviceId, missionId, missionSnapshot, isLowResolution); - TAG_LOGI(AAFwkTag::ABILITYMGR, "snapshot: AbilityManagerStub get snapshot result = %{public}d", result); + TAG_LOGI(AAFwkTag::ABILITYMGR, "result=%{public}d", result); if (!reply.WriteParcelable(&missionSnapshot)) { TAG_LOGE(AAFwkTag::ABILITYMGR, "GetMissionSnapshot error"); return ERR_INVALID_VALUE; @@ -2518,15 +2514,14 @@ int AbilityManagerStub::SetAbilityControllerInner(MessageParcel &data, MessagePa sptr controller = iface_cast(data.ReadRemoteObject()); if (controller == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "AbilityManagerStub: setAbilityControllerInner controller" - "readParcelable failed!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null controller"); return ERR_NULL_OBJECT; } bool imAStabilityTest = data.ReadBool(); int32_t result = SetAbilityController(controller, imAStabilityTest); - TAG_LOGI(AAFwkTag::ABILITYMGR, "AbilityManagerStub: setAbilityControllerInner result = %{public}d", result); + TAG_LOGI(AAFwkTag::ABILITYMGR, "result=%{public}d", result); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "setAbilityControllerInner failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2535,9 +2530,9 @@ int AbilityManagerStub::SetAbilityControllerInner(MessageParcel &data, MessagePa int AbilityManagerStub::IsRunningInStabilityTestInner(MessageParcel &data, MessageParcel &reply) { bool result = IsRunningInStabilityTest(); - TAG_LOGI(AAFwkTag::ABILITYMGR, "AbilityManagerStub: IsRunningInStabilityTest result = %{public}d", result); + TAG_LOGI(AAFwkTag::ABILITYMGR, "result=%{public}d", result); if (!reply.WriteBool(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "IsRunningInStabilityTest failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2547,7 +2542,7 @@ int AbilityManagerStub::StartUserTestInner(MessageParcel &data, MessageParcel &r { std::unique_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return ERR_INVALID_VALUE; } auto observer = data.ReadRemoteObject(); @@ -2571,7 +2566,7 @@ int AbilityManagerStub::GetTopAbilityTokenInner(MessageParcel &data, MessageParc sptr token; auto result = GetTopAbility(token); if (!reply.WriteRemoteObject(token)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "data write failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "data write fail"); return ERR_INVALID_VALUE; } reply.WriteInt32(result); @@ -2586,7 +2581,7 @@ int AbilityManagerStub::CheckUIExtensionIsFocusedInner(MessageParcel &data, Mess auto result = CheckUIExtensionIsFocused(uiExtensionTokenId, isFocused); if (result == ERR_OK) { if (!reply.WriteBool(isFocused)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write fail"); return ERR_INVALID_VALUE; } } @@ -2683,14 +2678,14 @@ int AbilityManagerStub::FreeInstallAbilityFromRemoteInner(MessageParcel &data, M { std::unique_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return ERR_INVALID_VALUE; } want->SetParam(FROM_REMOTE_KEY, true); auto callback = data.ReadRemoteObject(); if (callback == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "callback is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callback null"); return ERR_INVALID_VALUE; } @@ -2698,7 +2693,7 @@ int AbilityManagerStub::FreeInstallAbilityFromRemoteInner(MessageParcel &data, M int32_t requestCode = data.ReadInt32(); int32_t result = FreeInstallAbilityFromRemote(*want, callback, userId, requestCode); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2710,19 +2705,19 @@ int AbilityManagerStub::AddFreeInstallObserverInner(MessageParcel &data, Message if (data.ReadBool()) { callerToken = data.ReadRemoteObject(); if (callerToken == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "caller token is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null callerToken"); return ERR_INVALID_VALUE; } } sptr observer = iface_cast(data.ReadRemoteObject()); if (observer == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "observer is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "observer null"); return ERR_INVALID_VALUE; } int32_t result = AddFreeInstallObserver(callerToken, observer); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2735,7 +2730,7 @@ int AbilityManagerStub::DumpAbilityInfoDoneInner(MessageParcel &data, MessagePar sptr callerToken = data.ReadRemoteObject(); int32_t result = DumpAbilityInfoDone(infos, callerToken); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2745,13 +2740,13 @@ int AbilityManagerStub::UpdateMissionSnapShotFromWMSInner(MessageParcel &data, M { sptr token = data.ReadRemoteObject(); if (token == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "read ability token failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null token"); return ERR_NULL_OBJECT; } #ifdef SUPPORT_SCREEN std::shared_ptr pixelMap(data.ReadParcelable()); if (pixelMap == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "read pixelMap failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null pixelMap"); return ERR_NULL_OBJECT; } UpdateMissionSnapShot(token, pixelMap); @@ -2763,7 +2758,7 @@ int AbilityManagerStub::EnableRecoverAbilityInner(MessageParcel &data, MessagePa { sptr token = data.ReadRemoteObject(); if (!token) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "EnableRecoverAbilityInner read ability token failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "read ability token fail"); return ERR_NULL_OBJECT; } EnableRecoverAbility(token); @@ -2780,7 +2775,7 @@ int AbilityManagerStub::SubmitSaveRecoveryInfoInner(MessageParcel &data, Message { sptr token = data.ReadRemoteObject(); if (!token) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "SubmitSaveRecoveryInfoInner read ability token failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "read ability token fail"); return ERR_NULL_OBJECT; } SubmitSaveRecoveryInfo(token); @@ -2791,19 +2786,19 @@ int AbilityManagerStub::HandleRequestDialogService(MessageParcel &data, MessageP { std::unique_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null want"); return ERR_INVALID_VALUE; } sptr callerToken = data.ReadRemoteObject(); if (!callerToken) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken is invalid."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken invalid"); return ERR_INVALID_VALUE; } int32_t result = RequestDialogService(*want, callerToken); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2814,13 +2809,13 @@ int32_t AbilityManagerStub::HandleReportDrawnCompleted(MessageParcel &data, Mess TAG_LOGD(AAFwkTag::ABILITYMGR, "called"); sptr callerToken = data.ReadRemoteObject(); if (callerToken == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken is invalid."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null callerToken"); return ERR_INVALID_VALUE; } auto result = ReportDrawnCompleted(callerToken); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2831,12 +2826,12 @@ int AbilityManagerStub::AcquireShareDataInner(MessageParcel &data, MessageParcel int32_t missionId = data.ReadInt32(); sptr shareData = iface_cast(data.ReadRemoteObject()); if (!shareData) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "shareData read failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null shareData"); return ERR_INVALID_VALUE; } int32_t result = AcquireShareData(missionId, shareData); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2846,19 +2841,19 @@ int AbilityManagerStub::ShareDataDoneInner(MessageParcel &data, MessageParcel &r { sptr token = data.ReadRemoteObject(); if (!token) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "ShareDataDone read ability token failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "read ability token fail"); return ERR_NULL_OBJECT; } int32_t resultCode = data.ReadInt32(); int32_t uniqueId = data.ReadInt32(); std::shared_ptr wantParam(data.ReadParcelable()); if (!wantParam) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "wantParam read failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "wantParam read fail"); return ERR_INVALID_VALUE; } int32_t result = ShareDataDone(token, resultCode, uniqueId, *wantParam); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2868,7 +2863,7 @@ int AbilityManagerStub::GetAbilityTokenByCalleeObjInner(MessageParcel &data, Mes { sptr callStub = data.ReadRemoteObject(); if (!callStub) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "GetAbilityToken read call stub failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "read call stub fail"); return ERR_NULL_OBJECT; } sptr result; @@ -2881,7 +2876,7 @@ int AbilityManagerStub::ScheduleRecoverAbilityInner(MessageParcel &data, Message { sptr token = data.ReadRemoteObject(); if (!token) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "ScheduleRecoverAbility read ability token failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "read ability token fail"); return ERR_NULL_OBJECT; } @@ -2899,7 +2894,7 @@ int AbilityManagerStub::RegisterConnectionObserverInner(MessageParcel &data, Mes sptr observer = iface_cast( data.ReadRemoteObject()); if (!observer) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "RegisterConnectionObserverInner read observer failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "read observer fail"); return ERR_NULL_OBJECT; } @@ -2911,7 +2906,7 @@ int AbilityManagerStub::UnregisterConnectionObserverInner(MessageParcel &data, M sptr observer = iface_cast( data.ReadRemoteObject()); if (!observer) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "UnregisterConnectionObserverInner read observer failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "read observer fail"); return ERR_NULL_OBJECT; } @@ -2924,18 +2919,18 @@ int AbilityManagerStub::GetDlpConnectionInfosInner(MessageParcel &data, MessageP std::vector infos; auto result = GetDlpConnectionInfos(infos); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "write result failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write result fail"); return ERR_INVALID_VALUE; } if (!reply.WriteInt32(infos.size())) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "write infos size failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write infos size fail"); return ERR_INVALID_VALUE; } for (auto &item : infos) { if (!reply.WriteParcelable(&item)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "write info item failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write info item fail"); return ERR_INVALID_VALUE; } } @@ -2949,18 +2944,18 @@ int AbilityManagerStub::GetConnectionDataInner(MessageParcel &data, MessageParce std::vector connectionData; auto result = GetConnectionData(connectionData); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "write result failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write result fail"); return ERR_INVALID_VALUE; } if (!reply.WriteInt32(connectionData.size())) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "write infos size failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write infos size fail"); return ERR_INVALID_VALUE; } for (auto &item : connectionData) { if (!reply.WriteParcelable(&item)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "write info item failed"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write info item fail"); return ERR_INVALID_VALUE; } } @@ -2972,14 +2967,14 @@ int AbilityManagerStub::SetMissionContinueStateInner(MessageParcel &data, Messag { sptr token = data.ReadRemoteObject(); if (!token) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "SetMissionContinueStateInner read ability token failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "read ability token fail"); return ERR_NULL_OBJECT; } int32_t state = data.ReadInt32(); int result = SetMissionContinueState(token, static_cast(state)); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "SetMissionContinueState failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "setMissionContinueState fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -2990,14 +2985,14 @@ int AbilityManagerStub::SetMissionLabelInner(MessageParcel &data, MessageParcel { sptr token = data.ReadRemoteObject(); if (!token) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "SetMissionLabelInner read ability token failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "read ability token fail"); return ERR_NULL_OBJECT; } std::string label = Str16ToStr8(data.ReadString16()); int result = SetMissionLabel(token, label); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "SetMissionLabel failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "setMissionLabel failed"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -3007,19 +3002,19 @@ int AbilityManagerStub::SetMissionIconInner(MessageParcel &data, MessageParcel & { sptr token = data.ReadRemoteObject(); if (!token) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "SetMissionIconInner read ability token failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "read ability token fail"); return ERR_NULL_OBJECT; } std::shared_ptr icon(data.ReadParcelable()); if (!icon) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "SetMissionIconInner read icon failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "read icon fail"); return ERR_NULL_OBJECT; } int result = SetMissionIcon(token, icon); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "SetMissionIcon failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "setMissionIcon fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -3029,7 +3024,7 @@ int AbilityManagerStub::RegisterWindowManagerServiceHandlerInner(MessageParcel & { sptr handler = iface_cast(data.ReadRemoteObject()); if (handler == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s read WMS handler failed!", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s null handler", __func__); return ERR_NULL_OBJECT; } bool animationEnabled = data.ReadBool(); @@ -3041,7 +3036,7 @@ int AbilityManagerStub::CompleteFirstFrameDrawingInner(MessageParcel &data, Mess TAG_LOGD(AAFwkTag::ABILITYMGR, "called"); sptr abilityToken = data.ReadRemoteObject(); if (abilityToken == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s read abilityToken failed!", __func__); + TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s null abilityToken", __func__); return ERR_NULL_OBJECT; } CompleteFirstFrameDrawing(abilityToken); @@ -3065,12 +3060,12 @@ int AbilityManagerStub::PrepareTerminateAbilityInner(MessageParcel &data, Messag } sptr callback = iface_cast(data.ReadRemoteObject()); if (callback == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "callback is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callback null"); return ERR_NULL_OBJECT; } int result = PrepareTerminateAbility(token, callback); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "end faild. err: %{public}d", result); + TAG_LOGE(AAFwkTag::ABILITYMGR, "end failed err: %{public}d", result); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -3100,7 +3095,7 @@ int AbilityManagerStub::SendDialogResultInner(MessageParcel &data, MessageParcel TAG_LOGD(AAFwkTag::ABILITYMGR, "call"); std::unique_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return ERR_INVALID_VALUE; } std::string dialogSessionId = data.ReadString(); @@ -3117,14 +3112,14 @@ int AbilityManagerStub::RegisterAbilityFirstFrameStateObserverInner(MessageParce TAG_LOGD(AAFwkTag::ABILITYMGR, "called"); auto callback = iface_cast(data.ReadRemoteObject()); if (callback == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Callback is null."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callback null"); return ERR_INVALID_VALUE; } std::string targetBundleName = data.ReadString(); auto ret = RegisterAbilityFirstFrameStateObserver(callback, targetBundleName); if (!reply.WriteInt32(ret)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Write ret error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write ret error"); return IPC_STUB_ERR; } return NO_ERROR; @@ -3135,12 +3130,12 @@ int AbilityManagerStub::UnregisterAbilityFirstFrameStateObserverInner(MessagePar TAG_LOGD(AAFwkTag::ABILITYMGR, "called"); auto callback = iface_cast(data.ReadRemoteObject()); if (callback == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Callback is null."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callback null"); return ERR_INVALID_VALUE; } auto ret = UnregisterAbilityFirstFrameStateObserver(callback); if (!reply.WriteInt32(ret)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Write ret error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write ret error"); return IPC_STUB_ERR; } return NO_ERROR; @@ -3174,14 +3169,14 @@ int32_t AbilityManagerStub::IsValidMissionIdsInner(MessageParcel &data, MessageP int AbilityManagerStub::VerifyPermissionInner(MessageParcel &data, MessageParcel &reply) { - TAG_LOGD(AAFwkTag::ABILITYMGR, "VerifyPermission call."); + TAG_LOGD(AAFwkTag::ABILITYMGR, "verifyPermission call"); std::string permission = data.ReadString(); int32_t pid = data.ReadInt32(); int32_t uid = data.ReadInt32(); auto result = VerifyPermission(permission, pid, uid); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "VerifyPermission failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "verifyPermission fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -3192,12 +3187,12 @@ int32_t AbilityManagerStub::ForceExitAppInner(MessageParcel &data, MessageParcel int32_t pid = data.ReadInt32(); std::unique_ptr exitReason(data.ReadParcelable()); if (!exitReason) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "exitReason is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "exitReason null"); return ERR_INVALID_VALUE; } int32_t result = ForceExitApp(pid, *exitReason); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "write result failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write result fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -3207,12 +3202,12 @@ int32_t AbilityManagerStub::RecordAppExitReasonInner(MessageParcel &data, Messag { std::unique_ptr exitReason(data.ReadParcelable()); if (!exitReason) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "exitReason is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "exitReason null"); return ERR_INVALID_VALUE; } int32_t result = RecordAppExitReason(*exitReason); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "write result failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write result fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -3223,12 +3218,12 @@ int32_t AbilityManagerStub::RecordProcessExitReasonInner(MessageParcel &data, Me int32_t pid = data.ReadInt32(); std::unique_ptr exitReason(data.ReadParcelable()); if (!exitReason) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "exitReason is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "exitReason null"); return ERR_INVALID_VALUE; } int32_t result = RecordProcessExitReason(pid, *exitReason); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "write result failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write result fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -3239,7 +3234,7 @@ int AbilityManagerStub::SetRootSceneSessionInner(MessageParcel &data, MessagePar TAG_LOGD(AAFwkTag::ABILITYMGR, "Call."); auto rootSceneSession = data.ReadRemoteObject(); if (rootSceneSession == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Read rootSceneSession failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null rootSceneSession"); return ERR_INVALID_VALUE; } SetRootSceneSession(rootSceneSession); @@ -3264,7 +3259,7 @@ int32_t AbilityManagerStub::StartSpecifiedAbilityBySCBInner(MessageParcel &data, TAG_LOGD(AAFwkTag::ABILITYMGR, "Call."); std::unique_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return ERR_INVALID_VALUE; } StartSpecifiedAbilityBySCB(*want); @@ -3275,7 +3270,7 @@ int AbilityManagerStub::NotifySaveAsResultInner(MessageParcel &data, MessageParc { std::unique_ptr want(data.ReadParcelable()); if (!want) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return ERR_INVALID_VALUE; } int resultCode = data.ReadInt32(); @@ -3289,7 +3284,7 @@ int AbilityManagerStub::SetSessionManagerServiceInner(MessageParcel &data, Messa { sptr sessionManagerService = data.ReadRemoteObject(); if (!sessionManagerService) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "SetSessionManagerServiceInner read ability token failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "read ability token fail"); return ERR_NULL_OBJECT; } SetSessionManagerService(sessionManagerService); @@ -3301,7 +3296,7 @@ int32_t AbilityManagerStub::RegisterIAbilityManagerCollaboratorInner(MessageParc int32_t type = data.ReadInt32(); sptr collaborator = iface_cast(data.ReadRemoteObject()); if (collaborator == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "read collaborator failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null collaborator"); return ERR_NULL_OBJECT; } int32_t ret = RegisterIAbilityManagerCollaborator(type, collaborator); @@ -3328,7 +3323,7 @@ int AbilityManagerStub::PrepareTerminateAbilityBySCBInner(MessageParcel &data, M auto result = PrepareTerminateAbilityBySCB(sessionInfo, isPrepareTerminate); if (result == ERR_OK) { if (!reply.WriteBool(isPrepareTerminate)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write fail"); return ERR_INVALID_VALUE; } } @@ -3339,7 +3334,7 @@ int32_t AbilityManagerStub::RegisterStatusBarDelegateInner(MessageParcel &data, { auto delegate = iface_cast(data.ReadRemoteObject()); if (delegate == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "delegate is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "delegate null"); return ERR_NULL_OBJECT; } int32_t result = RegisterStatusBarDelegate(delegate); @@ -3351,7 +3346,7 @@ int32_t AbilityManagerStub::KillProcessWithPrepareTerminateInner(MessageParcel & { auto size = data.ReadUint32(); if (size == 0 || size > MAX_KILL_PROCESS_PID_COUNT) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Invalid size."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid size"); return ERR_INVALID_VALUE; } std::vector pids; @@ -3360,7 +3355,7 @@ int32_t AbilityManagerStub::KillProcessWithPrepareTerminateInner(MessageParcel & } int32_t result = KillProcessWithPrepareTerminate(pids); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "KillProcessWithPrepareTerminate failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "kill process fail"); } return NO_ERROR; } @@ -3369,7 +3364,7 @@ int32_t AbilityManagerStub::RegisterAutoStartupSystemCallbackInner(MessageParcel { sptr callback = data.ReadRemoteObject(); if (callback == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Callback is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callback null"); return ERR_INVALID_VALUE; } int32_t result = RegisterAutoStartupSystemCallback(callback); @@ -3381,7 +3376,7 @@ int32_t AbilityManagerStub::UnregisterAutoStartupSystemCallbackInner(MessageParc { sptr callback = data.ReadRemoteObject(); if (callback == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Callback is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callback null"); return ERR_INVALID_VALUE; } int32_t result = UnregisterAutoStartupSystemCallback(callback); @@ -3393,7 +3388,7 @@ int32_t AbilityManagerStub::SetApplicationAutoStartupInner(MessageParcel &data, { sptr info = data.ReadParcelable(); if (info == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Info is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "info null"); return ERR_INVALID_VALUE; } int32_t result = SetApplicationAutoStartup(*info); @@ -3405,7 +3400,7 @@ int32_t AbilityManagerStub::CancelApplicationAutoStartupInner(MessageParcel &dat { sptr info = data.ReadParcelable(); if (info == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Info is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "info null"); return ERR_INVALID_VALUE; } int32_t result = CancelApplicationAutoStartup(*info); @@ -3434,7 +3429,7 @@ int AbilityManagerStub::RegisterSessionHandlerInner(MessageParcel &data, Message { sptr handler = data.ReadRemoteObject(); if (handler == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "stub register session handler, handler is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null handler"); return ERR_INVALID_VALUE; } int32_t result = RegisterSessionHandler(handler); @@ -3447,13 +3442,13 @@ int32_t AbilityManagerStub::RegisterAppDebugListenerInner(MessageParcel &data, M TAG_LOGD(AAFwkTag::ABILITYMGR, "called"); auto appDebugLister = iface_cast(data.ReadRemoteObject()); if (appDebugLister == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "App debug lister is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "appDebugLister null"); return ERR_INVALID_VALUE; } auto result = RegisterAppDebugListener(appDebugLister); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Failed to write result."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write result fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -3464,13 +3459,13 @@ int32_t AbilityManagerStub::UnregisterAppDebugListenerInner(MessageParcel &data, TAG_LOGD(AAFwkTag::ABILITYMGR, "called"); auto appDebugLister = iface_cast(data.ReadRemoteObject()); if (appDebugLister == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "App debug lister is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "appDebugLister null"); return ERR_INVALID_VALUE; } auto result = UnregisterAppDebugListener(appDebugLister); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Fail to write result."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write result fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -3480,13 +3475,13 @@ int32_t AbilityManagerStub::AttachAppDebugInner(MessageParcel &data, MessageParc { auto bundleName = data.ReadString(); if (bundleName.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Bundle name is empty."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "empty bundleName"); return ERR_INVALID_VALUE; } auto result = AttachAppDebug(bundleName); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Fail to write result."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write result fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -3496,13 +3491,13 @@ int32_t AbilityManagerStub::DetachAppDebugInner(MessageParcel &data, MessageParc { auto bundleName = data.ReadString(); if (bundleName.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Bundle name is empty."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "empty bundleName"); return ERR_INVALID_VALUE; } auto result = DetachAppDebug(bundleName); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Fail to write result."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write result fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -3512,7 +3507,7 @@ int32_t AbilityManagerStub::IsAbilityControllerStartInner(MessageParcel &data, M { std::unique_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return true; } bool result = IsAbilityControllerStart(*want); @@ -3525,17 +3520,17 @@ int32_t AbilityManagerStub::ExecuteIntentInner(MessageParcel &data, MessageParce uint64_t key = data.ReadUint64(); sptr callerToken = data.ReadRemoteObject(); if (callerToken == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "failed to get remote object."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null callerToken"); return ERR_INVALID_VALUE; } std::unique_ptr param(data.ReadParcelable()); if (param == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "param is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "param null"); return ERR_INVALID_VALUE; } auto result = ExecuteIntent(key, callerToken, *param); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Fail to write result."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write result fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -3546,7 +3541,7 @@ int AbilityManagerStub::StartAbilityForResultAsCallerInner(MessageParcel &data, TAG_LOGD(AAFwkTag::ABILITYMGR, "called"); std::unique_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "The want is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return ERR_INVALID_VALUE; } sptr callerToken = nullptr; @@ -3565,12 +3560,12 @@ int AbilityManagerStub::StartAbilityForResultAsCallerForOptionsInner(MessageParc TAG_LOGD(AAFwkTag::ABILITYMGR, "called"); std::unique_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "The want is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return ERR_INVALID_VALUE; } std::unique_ptr startOptions(data.ReadParcelable()); if (startOptions == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "The startOptions is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "startOptions null"); return ERR_INVALID_VALUE; } sptr callerToken = nullptr; @@ -3588,7 +3583,7 @@ int32_t AbilityManagerStub::StartAbilityOnlyUIAbilityInner(MessageParcel &data, { std::unique_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null want"); return ERR_INVALID_VALUE; } @@ -3608,7 +3603,7 @@ int32_t AbilityManagerStub::StartAbilityByInsightIntentInner(MessageParcel &data { std::unique_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return ERR_INVALID_VALUE; } @@ -3630,14 +3625,14 @@ int32_t AbilityManagerStub::ExecuteInsightIntentDoneInner(MessageParcel &data, M TAG_LOGD(AAFwkTag::ABILITYMGR, "called"); auto token = data.ReadRemoteObject(); if (token == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Failed to get remote object."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null token"); return ERR_INVALID_VALUE; } auto intentId = data.ReadInt64(); std::unique_ptr executeResult(data.ReadParcelable()); if (!executeResult) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Execute result is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "executeResult null"); return ERR_INVALID_VALUE; } @@ -3650,7 +3645,7 @@ int32_t AbilityManagerStub::SetApplicationAutoStartupByEDMInner(MessageParcel &d { sptr info = data.ReadParcelable(); if (info == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Info is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "info null"); return ERR_INVALID_VALUE; } auto flag = data.ReadBool(); @@ -3662,7 +3657,7 @@ int32_t AbilityManagerStub::CancelApplicationAutoStartupByEDMInner(MessageParcel { sptr info = data.ReadParcelable(); if (info == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Info is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "info null"); return ERR_INVALID_VALUE; } auto flag = data.ReadBool(); @@ -3674,7 +3669,7 @@ int32_t AbilityManagerStub::OpenFileInner(MessageParcel &data, MessageParcel &re { std::unique_ptr uri(data.ReadParcelable()); if (!uri) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "To read uri failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "read uri fail"); return ERR_DEAD_OBJECT; } auto flag = data.ReadInt32(); @@ -3689,12 +3684,12 @@ int32_t AbilityManagerStub::RequestAssertFaultDialogInner(MessageParcel &data, M sptr callback = data.ReadRemoteObject(); std::unique_ptr wantParams(data.ReadParcelable()); if (wantParams == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "ContinueMissionInner wantParams readParcelable failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null wantParams"); return ERR_NULL_OBJECT; } auto result = RequestAssertFaultDialog(callback, *wantParams); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Write result failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write result fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -3707,7 +3702,7 @@ int32_t AbilityManagerStub::NotifyDebugAssertResultInner(MessageParcel &data, Me int32_t status = data.ReadInt32(); auto result = NotifyDebugAssertResult(assertSessionId, static_cast(status)); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Write result failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write result fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -3719,26 +3714,26 @@ int32_t AbilityManagerStub::GetForegroundUIAbilitiesInner(MessageParcel &data, M std::vector abilityStateDatas; int32_t result = GetForegroundUIAbilities(abilityStateDatas); if (result != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get foreground uI abilities is failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "get foreground abilities fail"); return result; } auto infoSize = abilityStateDatas.size(); if (infoSize > CYCLE_LIMIT) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Info size exceeds the limit."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "infoSize exceeds limit"); return ERR_INVALID_VALUE; } if (!reply.WriteInt32(infoSize)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Write data size failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write data size fail"); return ERR_INVALID_VALUE; } for (auto &it : abilityStateDatas) { if (!reply.WriteParcelable(&it)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Write parcelable failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write parcelable fail"); return ERR_INVALID_VALUE; } } if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Write result failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write result fail"); return ERR_INVALID_VALUE; } return result; @@ -3749,14 +3744,14 @@ int32_t AbilityManagerStub::UpdateSessionInfoBySCBInner(MessageParcel &data, Mes auto size = data.ReadInt32(); int32_t threshold = 512; if (size > threshold) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Size of vector too large."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "vector size too large"); return ERR_ENOUGH_DATA; } std::list sessionInfos; for (auto i = 0; i < size; i++) { std::unique_ptr info(data.ReadParcelable()); if (info == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Read session info failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null info"); return ERR_NATIVE_IPC_PARCEL_FAILED; } sessionInfos.emplace_back(*info); @@ -3769,7 +3764,7 @@ int32_t AbilityManagerStub::UpdateSessionInfoBySCBInner(MessageParcel &data, Mes } size = static_cast(sessionIds.size()); if (size > threshold) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Size of vector too large for sessionIds."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "vector size too large"); return ERR_ENOUGH_DATA; } reply.WriteInt32(size); @@ -3785,7 +3780,7 @@ int32_t AbilityManagerStub::GetUIExtensionRootHostInfoInner(MessageParcel &data, if (data.ReadBool()) { callerToken = data.ReadRemoteObject(); if (callerToken == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "caller token is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken null"); return ERR_INVALID_VALUE; } } @@ -3794,12 +3789,12 @@ int32_t AbilityManagerStub::GetUIExtensionRootHostInfoInner(MessageParcel &data, UIExtensionHostInfo hostInfo; auto result = GetUIExtensionRootHostInfo(callerToken, hostInfo, userId); if (!reply.WriteParcelable(&hostInfo)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Write host info failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write host info fail"); return ERR_INVALID_VALUE; } if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Write result failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write result fail"); return ERR_INVALID_VALUE; } @@ -3812,7 +3807,7 @@ int32_t AbilityManagerStub::GetUIExtensionSessionInfoInner(MessageParcel &data, if (data.ReadBool()) { callerToken = data.ReadRemoteObject(); if (callerToken == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "caller token is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken null"); return ERR_INVALID_VALUE; } } @@ -3821,12 +3816,12 @@ int32_t AbilityManagerStub::GetUIExtensionSessionInfoInner(MessageParcel &data, UIExtensionSessionInfo uiExtensionSessionInfo; auto result = GetUIExtensionSessionInfo(callerToken, uiExtensionSessionInfo, userId); if (!reply.WriteParcelable(&uiExtensionSessionInfo)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Write ui extension session info failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write ui extension session info fail"); return ERR_INVALID_VALUE; } if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Write result failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write result fail"); return ERR_INVALID_VALUE; } @@ -3838,13 +3833,13 @@ int32_t AbilityManagerStub::RestartAppInner(MessageParcel &data, MessageParcel & TAG_LOGD(AAFwkTag::ABILITYMGR, "call."); std::unique_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return IPC_STUB_ERR; } bool isAppRecovery = data.ReadBool(); auto result = RestartApp(*want, isAppRecovery); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "fail to write result."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write result fail"); return IPC_STUB_ERR; } return ERR_OK; @@ -3854,12 +3849,12 @@ int32_t AbilityManagerStub::OpenAtomicServiceInner(MessageParcel &data, MessageP { std::unique_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return ERR_INVALID_VALUE; } std::unique_ptr options(data.ReadParcelable()); if (options == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "options is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "options null"); return ERR_INVALID_VALUE; } sptr callerToken = nullptr; @@ -3870,11 +3865,11 @@ int32_t AbilityManagerStub::OpenAtomicServiceInner(MessageParcel &data, MessageP int32_t userId = data.ReadInt32(); int32_t openRet = OpenAtomicService(*want, *options, callerToken, requestCode, userId); if (openRet != ERR_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Open atomic service to be failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "open atomic service fail"); return openRet; } if (!reply.WriteInt32(openRet)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Write openRet failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write openRet fail"); return ERR_INVALID_VALUE; } return ERR_OK; @@ -3886,7 +3881,7 @@ int32_t AbilityManagerStub::SetResidentProcessEnableInner(MessageParcel &data, M bool enable = data.ReadBool(); auto result = SetResidentProcessEnabled(bundleName, enable); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Write result failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write result fail"); return ERR_INVALID_VALUE; } return NO_ERROR; @@ -3898,7 +3893,7 @@ int32_t AbilityManagerStub::IsEmbeddedOpenAllowedInner(MessageParcel &data, Mess if (data.ReadBool()) { callerToken = data.ReadRemoteObject(); if (callerToken == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "caller token is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken null"); return ERR_INVALID_VALUE; } } @@ -3907,7 +3902,7 @@ int32_t AbilityManagerStub::IsEmbeddedOpenAllowedInner(MessageParcel &data, Mess auto result = IsEmbeddedOpenAllowed(callerToken, appId); if (!reply.WriteInt32(result)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Write result failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "write result fail"); return ERR_INVALID_VALUE; } @@ -3918,12 +3913,12 @@ int32_t AbilityManagerStub::StartShortcutInner(MessageParcel &data, MessageParce { std::shared_ptr want(data.ReadParcelable()); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return ERR_INVALID_VALUE; } StartOptions *startOptions = data.ReadParcelable(); if (startOptions == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "startOptions is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "startOptions null"); return ERR_INVALID_VALUE; } startOptions->processOptions = nullptr; @@ -3941,7 +3936,7 @@ int32_t AbilityManagerStub::GetAbilityStateByPersistentIdInner(MessageParcel &da int32_t result = GetAbilityStateByPersistentId(persistentId, state); if (result == ERR_OK) { if (!reply.WriteBool(state)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "reply write fail"); return IPC_STUB_ERR; } } @@ -3954,7 +3949,7 @@ int32_t AbilityManagerStub::TransferAbilityResultForExtensionInner(MessageParcel int32_t resultCode = data.ReadInt32(); sptr want = data.ReadParcelable(); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return ERR_INVALID_VALUE; } int32_t result = TransferAbilityResultForExtension(callerToken, resultCode, *want); @@ -3997,7 +3992,7 @@ int32_t AbilityManagerStub::OpenLinkInner(MessageParcel &data, MessageParcel &re { sptr want = data.ReadParcelable(); if (want == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "want is nullptr."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "want null"); return ERR_INVALID_VALUE; } sptr callerToken = data.ReadRemoteObject(); @@ -4006,7 +4001,7 @@ int32_t AbilityManagerStub::OpenLinkInner(MessageParcel &data, MessageParcel &re int32_t result = OpenLink(*want, callerToken, userId, requestCode); if (result != NO_ERROR && result != ERR_OPEN_LINK_START_ABILITY_DEFAULT_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "OpenLink failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "openLink fail"); } reply.WriteInt32(result); return result; @@ -4017,7 +4012,7 @@ int32_t AbilityManagerStub::TerminateMissionInner(MessageParcel &data, MessagePa int32_t missionId = data.ReadInt32(); int32_t result = TerminateMission(missionId); if (result != NO_ERROR && result != ERR_OPEN_LINK_START_ABILITY_DEFAULT_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "OpenLink failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "openLink fail"); } reply.WriteInt32(result); return result; diff --git a/services/abilitymgr/src/deeplink_reserve/deeplink_reserve_config.cpp b/services/abilitymgr/src/deeplink_reserve/deeplink_reserve_config.cpp index 1d9513f5c7..3cb644f5ae 100644 --- a/services/abilitymgr/src/deeplink_reserve/deeplink_reserve_config.cpp +++ b/services/abilitymgr/src/deeplink_reserve/deeplink_reserve_config.cpp @@ -64,7 +64,7 @@ bool DeepLinkReserveConfig::LoadConfiguration() return false; } if (!LoadReservedUriList(jsonBuf)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "LoadConfiguration failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "load fail"); return false; } @@ -77,7 +77,7 @@ bool DeepLinkReserveConfig::isLinkReserved(const std::string &linkString, std::s for (auto it = deepLinkReserveUris_.begin(); it != deepLinkReserveUris_.end(); ++it) { for (auto &itemUri : it->second) { if (isUriMatched(itemUri, linkString)) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "link is: %{public}s, linkReserved is: %{public}s, matched!", + TAG_LOGI(AAFwkTag::ABILITYMGR, "link:%{public}s, linkReserved:%{public}s, matched", linkString.c_str(), itemUri.scheme.c_str()); bundleName = it->first; return true; @@ -180,42 +180,42 @@ void DeepLinkReserveConfig::LoadReservedUrilItem(const nlohmann::json &jsonUriOb if (jsonUriObject.contains(SCHEME_NAME) && jsonUriObject.at(SCHEME_NAME).is_string()) { std::string schemeName = jsonUriObject.at(SCHEME_NAME).get(); reserveUri.scheme = schemeName; - TAG_LOGD(AAFwkTag::ABILITYMGR, "scheme is: %{public}s", reserveUri.scheme.c_str()); + TAG_LOGD(AAFwkTag::ABILITYMGR, "scheme:%{public}s", reserveUri.scheme.c_str()); } if (jsonUriObject.contains(HOST_NAME) && jsonUriObject.at(HOST_NAME).is_string()) { std::string hostName = jsonUriObject.at(HOST_NAME).get(); reserveUri.host = hostName; - TAG_LOGD(AAFwkTag::ABILITYMGR, "host is: %{public}s", reserveUri.host.c_str()); + TAG_LOGD(AAFwkTag::ABILITYMGR, "host:%{public}s", reserveUri.host.c_str()); } if (jsonUriObject.contains(PORT_NAME) && jsonUriObject.at(PORT_NAME).is_string()) { std::string portName = jsonUriObject.at(PORT_NAME).get(); reserveUri.port = portName; - TAG_LOGD(AAFwkTag::ABILITYMGR, "port is: %{public}s", reserveUri.port.c_str()); + TAG_LOGD(AAFwkTag::ABILITYMGR, "port:%{public}s", reserveUri.port.c_str()); } if (jsonUriObject.contains(PATH_NAME) && jsonUriObject.at(PATH_NAME).is_string()) { std::string pathName = jsonUriObject.at(PATH_NAME).get(); reserveUri.path = PATH_NAME; - TAG_LOGD(AAFwkTag::ABILITYMGR, "path is: %{public}s", reserveUri.path.c_str()); + TAG_LOGD(AAFwkTag::ABILITYMGR, "path:%{public}s", reserveUri.path.c_str()); } if (jsonUriObject.contains(PATH_START_WITH_NAME) && jsonUriObject.at(PATH_START_WITH_NAME).is_string()) { std::string pathStartWithName = jsonUriObject.at(PATH_START_WITH_NAME).get(); reserveUri.pathStartWith = pathStartWithName; - TAG_LOGD(AAFwkTag::ABILITYMGR, "pathStartWith is: %{public}s", reserveUri.pathStartWith.c_str()); + TAG_LOGD(AAFwkTag::ABILITYMGR, "pathStartWith:%{public}s", reserveUri.pathStartWith.c_str()); } if (jsonUriObject.contains(PATH_REGEX_NAME) && jsonUriObject.at(PATH_REGEX_NAME).is_string()) { std::string pathRegexName = jsonUriObject.at(PATH_REGEX_NAME).get(); reserveUri.pathRegex = pathRegexName; - TAG_LOGD(AAFwkTag::ABILITYMGR, "pathRegex is: %{public}s", reserveUri.pathRegex.c_str()); + TAG_LOGD(AAFwkTag::ABILITYMGR, "pathRegex:%{public}s", reserveUri.pathRegex.c_str()); } if (jsonUriObject.contains(TYPE_NAME) && jsonUriObject.at(TYPE_NAME).is_string()) { std::string typeName = jsonUriObject.at(TYPE_NAME).get(); reserveUri.type = typeName; - TAG_LOGD(AAFwkTag::ABILITYMGR, "type is: %{public}s", reserveUri.type.c_str()); + TAG_LOGD(AAFwkTag::ABILITYMGR, "type:%{public}s", reserveUri.type.c_str()); } if (jsonUriObject.contains(UTD_NAME) && jsonUriObject.at(UTD_NAME).is_string()) { std::string utdName = jsonUriObject.at(UTD_NAME).get(); reserveUri.utd = utdName; - TAG_LOGD(AAFwkTag::ABILITYMGR, "utd is: %{public}s", reserveUri.utd.c_str()); + TAG_LOGD(AAFwkTag::ABILITYMGR, "utd:%{public}s", reserveUri.utd.c_str()); } uriList.emplace_back(reserveUri); @@ -224,18 +224,18 @@ void DeepLinkReserveConfig::LoadReservedUrilItem(const nlohmann::json &jsonUriOb bool DeepLinkReserveConfig::LoadReservedUriList(const nlohmann::json &object) { if (!object.contains(DEEPLINK_RESERVED_URI_NAME)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Deeplink reserved uri config not existed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "uri config absent"); return false; } for (auto &item : object.at(DEEPLINK_RESERVED_URI_NAME).items()) { const nlohmann::json& jsonObject = item.value(); if (!jsonObject.contains(BUNDLE_NAME) || !jsonObject.at(BUNDLE_NAME).is_string()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Wrong deeplink reserve bundleName."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "reserve bundleName fail"); return false; } if (!jsonObject.contains(URIS_NAME) || !jsonObject.at(URIS_NAME).is_array()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Wrong deeplink reserve uris."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "reserve uris fail"); return false; } std::string bundleName = jsonObject.at(BUNDLE_NAME).get(); @@ -252,18 +252,18 @@ bool DeepLinkReserveConfig::LoadReservedUriList(const nlohmann::json &object) bool DeepLinkReserveConfig::ReadFileInfoJson(const std::string &filePath, nlohmann::json &jsonBuf) { if (access(filePath.c_str(), F_OK) != 0) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Deeplink reserve config not exist."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "reserve config absent"); return false; } if (filePath.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "File path is empty."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "file path empty"); return false; } char path[PATH_MAX] = {0}; if (realpath(filePath.c_str(), path) == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "realpath error, errno is %{public}d.", errno); + TAG_LOGE(AAFwkTag::ABILITYMGR, "realpath error:%{public}d", errno); return false; } @@ -273,14 +273,14 @@ bool DeepLinkReserveConfig::ReadFileInfoJson(const std::string &filePath, nlohma in.open(path, std::ios_base::in); if (!in.is_open()) { strerror_r(errno, errBuf, sizeof(errBuf)); - TAG_LOGE(AAFwkTag::ABILITYMGR, "the file cannot be open due to %{public}s", errBuf); + TAG_LOGE(AAFwkTag::ABILITYMGR, "open error:%{public}s", errBuf); return false; } in.seekg(0, std::ios::end); int64_t size = in.tellg(); if (size <= 0) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "the file is an empty file"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "file empty"); in.close(); return false; } diff --git a/services/abilitymgr/src/rdb/ability_resident_process_rdb.cpp b/services/abilitymgr/src/rdb/ability_resident_process_rdb.cpp index fad4939622..c8f801851e 100644 --- a/services/abilitymgr/src/rdb/ability_resident_process_rdb.cpp +++ b/services/abilitymgr/src/rdb/ability_resident_process_rdb.cpp @@ -35,14 +35,14 @@ AmsResidentProcessRdbCallBack::AmsResidentProcessRdbCallBack(const AmsRdbConfig int32_t AmsResidentProcessRdbCallBack::OnCreate(NativeRdb::RdbStore &rdbStore) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "OnCreate"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "call"); std::string createTableSql = "CREATE TABLE IF NOT EXISTS " + rdbConfig_.tableName + " (KEY_BUNDLE_NAME TEXT NOT NULL PRIMARY KEY," + "KEEP_ALIVE_ENABLE TEXT NOT NULL, KEEP_ALIVE_CONFIGURED_LIST TEXT NOT NULL);"; auto sqlResult = rdbStore.ExecuteSql(createTableSql); if (sqlResult != NativeRdb::E_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Ability mgr rdb execute sql error"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "execute sql error"); return sqlResult; } @@ -64,7 +64,7 @@ int32_t AmsResidentProcessRdbCallBack::OnCreate(NativeRdb::RdbStore &rdbStore) int64_t insertNum = 0; int32_t ret = rdbStore.BatchInsert(insertNum, rdbConfig_.tableName, valuesBuckets); if (ret != NativeRdb::E_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Ability mgr rdb batch insert error[%{public}d]", ret); + TAG_LOGE(AAFwkTag::ABILITYMGR, "batch insert error[%{public}d]", ret); return ret; } return NativeRdb::E_OK; @@ -72,14 +72,14 @@ int32_t AmsResidentProcessRdbCallBack::OnCreate(NativeRdb::RdbStore &rdbStore) int32_t AmsResidentProcessRdbCallBack::OnUpgrade(NativeRdb::RdbStore &rdbStore, int currentVersion, int targetVersion) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "OnUpgrade currentVersion: %{plubic}d, targetVersion: %{plubic}d", currentVersion, + TAG_LOGI(AAFwkTag::ABILITYMGR, "onUpgrade current:%{plubic}d, target:%{plubic}d", currentVersion, targetVersion); return NativeRdb::E_OK; } int32_t AmsResidentProcessRdbCallBack::OnDowngrade(NativeRdb::RdbStore &rdbStore, int currentVersion, int targetVersion) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "OnDowngrade currentVersion: %{plubic}d, targetVersion: %{plubic}d", currentVersion, + TAG_LOGI(AAFwkTag::ABILITYMGR, "onDowngrade current:%{plubic}d, target:%{plubic}d", currentVersion, targetVersion); return NativeRdb::E_OK; } @@ -99,7 +99,7 @@ int32_t AmsResidentProcessRdbCallBack::onCorruption(std::string databaseFile) int32_t AmsResidentProcessRdb::Init() { if (rdbMgr_ != nullptr) { - TAG_LOGD(AAFwkTag::ABILITYMGR, "Rdb mgr existed."); + TAG_LOGD(AAFwkTag::ABILITYMGR, "rdb mgr existed"); return Rdb_OK; } @@ -107,7 +107,7 @@ int32_t AmsResidentProcessRdb::Init() config.tableName = ABILITY_RDB_TABLE_NAME; rdbMgr_ = std::make_unique(config); if (rdbMgr_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Failed to create database mgr object."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "create object fail"); return Rdb_Init_Err; } @@ -129,7 +129,7 @@ int32_t AmsResidentProcessRdb::VerifyConfigurationPermissions( const std::string &bundleName, const std::string &callerBundleName) { if (bundleName.empty() || callerBundleName.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Bundle name is null."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null bundle name"); return Rdb_Parameter_Err; } @@ -139,7 +139,7 @@ int32_t AmsResidentProcessRdb::VerifyConfigurationPermissions( } if (rdbMgr_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Rdb mgr error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "rdb mgr error"); return Rdb_Parameter_Err; } @@ -147,21 +147,21 @@ int32_t AmsResidentProcessRdb::VerifyConfigurationPermissions( absRdbPredicates.EqualTo(KEY_BUNDLE_NAME, bundleName); auto absSharedResultSet = rdbMgr_->QueryData(absRdbPredicates); if (absSharedResultSet == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Ability mgr rdb query data failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null absSharedResultSet"); return Rdb_Permissions_Err; } ScopeGuard stateGuard([absSharedResultSet] { absSharedResultSet->Close(); }); auto ret = absSharedResultSet->GoToFirstRow(); if (ret != NativeRdb::E_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Go to first row failed, ret: %{public}d", ret); + TAG_LOGE(AAFwkTag::ABILITYMGR, "fail, ret:%{public}d", ret); return Rdb_Search_Record_Err; } std::string KeepAliveConfiguredList; ret = absSharedResultSet->GetString(INDEX_KEEP_ALIVE_CONFIGURED_LIST, KeepAliveConfiguredList); if (ret != NativeRdb::E_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get configured list failed, ret: %{public}d", ret); + TAG_LOGE(AAFwkTag::ABILITYMGR, "fail, ret: %{public}d", ret); return Rdb_Search_Record_Err; } @@ -175,12 +175,12 @@ int32_t AmsResidentProcessRdb::VerifyConfigurationPermissions( int32_t AmsResidentProcessRdb::GetResidentProcessEnable(const std::string &bundleName, bool &enable) { if (bundleName.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Bundle name is null."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null bundleName"); return Rdb_Parameter_Err; } if (rdbMgr_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Rdb mgr error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "rdb mgr error"); return Rdb_Parameter_Err; } @@ -188,21 +188,21 @@ int32_t AmsResidentProcessRdb::GetResidentProcessEnable(const std::string &bundl absRdbPredicates.EqualTo(KEY_BUNDLE_NAME, bundleName); auto absSharedResultSet = rdbMgr_->QueryData(absRdbPredicates); if (absSharedResultSet == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Ability mgr rdb query data failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "rdb query fail"); return Rdb_Permissions_Err; } ScopeGuard stateGuard([absSharedResultSet] { absSharedResultSet->Close(); }); auto ret = absSharedResultSet->GoToFirstRow(); if (ret != NativeRdb::E_OK) { - TAG_LOGD(AAFwkTag::ABILITYMGR, "Go to first row failed, ret: %{public}d", ret); + TAG_LOGD(AAFwkTag::ABILITYMGR, "fail, ret: %{public}d", ret); return Rdb_Search_Record_Err; } std::string flag; ret = absSharedResultSet->GetString(INDEX_KEEP_ALIVE_ENABLE, flag); if (ret != NativeRdb::E_OK) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Get enable status failed, ret: %{public}d", ret); + TAG_LOGE(AAFwkTag::ABILITYMGR, "fail, ret: %{public}d", ret); return Rdb_Search_Record_Err; } @@ -213,12 +213,12 @@ int32_t AmsResidentProcessRdb::GetResidentProcessEnable(const std::string &bundl int32_t AmsResidentProcessRdb::UpdateResidentProcessEnable(const std::string &bundleName, bool enable) { if (bundleName.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Bundle name is null."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null bundleName"); return Rdb_Parameter_Err; } if (rdbMgr_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Rdb mgr error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "rdb mgr error"); return Rdb_Parameter_Err; } @@ -232,12 +232,12 @@ int32_t AmsResidentProcessRdb::UpdateResidentProcessEnable(const std::string &bu int32_t AmsResidentProcessRdb::RemoveData(std::string &bundleName) { if (bundleName.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Bundle name is null."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null bundleName"); return Rdb_Parameter_Err; } if (rdbMgr_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Rdb mgr error."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "rdb mgr error"); return Rdb_Parameter_Err; } NativeRdb::AbsRdbPredicates absRdbPredicates(ABILITY_RDB_TABLE_NAME); diff --git a/services/abilitymgr/src/rdb/parser_util.cpp b/services/abilitymgr/src/rdb/parser_util.cpp index 8de0d249cd..dbfddcc103 100644 --- a/services/abilitymgr/src/rdb/parser_util.cpp +++ b/services/abilitymgr/src/rdb/parser_util.cpp @@ -71,18 +71,18 @@ bool ParserUtil::FilterInfoFromJson( nlohmann::json &jsonBuf, std::vector> &list) { if (jsonBuf.is_discarded()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Profile format error"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "format error"); return false; } if (jsonBuf.find(INSTALL_LIST) == jsonBuf.end()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "InstallList not exist"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "installList absent"); return false; } auto arrays = jsonBuf.at(INSTALL_LIST); if (!arrays.is_array() || arrays.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Array not found"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "not found"); return false; } @@ -147,31 +147,31 @@ void ParserUtil::GetPreInstallRootDirList(std::vector &rootDirList) bool ParserUtil::ReadFileIntoJson(const std::string &filePath, nlohmann::json &jsonBuf) { if (access(filePath.c_str(), F_OK) != 0) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "File path is not exist."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "path not exist"); return false; } if (filePath.empty()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "File path empty."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "empty path"); return false; } char path[PATH_MAX] = {0}; if (realpath(filePath.c_str(), path) == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "realpath error, errno is %{public}d.", errno); + TAG_LOGE(AAFwkTag::ABILITYMGR, "realpath error:%{public}d", errno); return false; } std::ifstream fin(path); if (!fin.is_open()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "File path exception."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "path exception"); return false; } fin.seekg(0, std::ios::end); int64_t size = fin.tellg(); if (size <= 0) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "The file is an empty file!"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "empty file"); fin.close(); return false; } @@ -180,7 +180,7 @@ bool ParserUtil::ReadFileIntoJson(const std::string &filePath, nlohmann::json &j jsonBuf = nlohmann::json::parse(fin, nullptr, false); fin.close(); if (jsonBuf.is_discarded()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Bad profile file"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "bad profile"); return false; } return true; diff --git a/services/abilitymgr/src/rdb/rdb_data_manager.cpp b/services/abilitymgr/src/rdb/rdb_data_manager.cpp index 2efc5924cc..420bc5f1df 100644 --- a/services/abilitymgr/src/rdb/rdb_data_manager.cpp +++ b/services/abilitymgr/src/rdb/rdb_data_manager.cpp @@ -33,7 +33,7 @@ int32_t RdbDataManager::Init(NativeRdb::RdbOpenCallback &rdbCallback) int32_t ret = NativeRdb::E_OK; rdbStore_ = NativeRdb::RdbHelper::GetRdbStore(rdbStoreConfig, amsRdbConfig_.version, rdbCallback, ret); if (rdbStore_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Ability mgr rdb init fail"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null rdbStore_"); return NativeRdb::E_ERROR; } @@ -44,7 +44,7 @@ int32_t RdbDataManager::InsertData(const NativeRdb::ValuesBucket &valuesBucket) { std::lock_guard lock(rdbMutex_); if (rdbStore_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Rdb store is null"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null rdbStore_"); return NativeRdb::E_ERROR; } @@ -57,7 +57,7 @@ int32_t RdbDataManager::BatchInsert(int64_t &outInsertNum, const std::vector lock(rdbMutex_); if (rdbStore_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Rdb store is null"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null rdbStore_"); return NativeRdb::E_ERROR; } auto ret = rdbStore_->BatchInsert(outInsertNum, amsRdbConfig_.tableName, valuesBuckets); @@ -69,11 +69,11 @@ int32_t RdbDataManager::UpdateData( { std::lock_guard lock(rdbMutex_); if (rdbStore_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Rdb store is null"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null rdbStore_"); return NativeRdb::E_ERROR; } if (absRdbPredicates.GetTableName() != amsRdbConfig_.tableName) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Rdb store table is invalid"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid rdb store table"); return NativeRdb::E_ERROR; } int32_t rowId = -1; @@ -84,11 +84,11 @@ int32_t RdbDataManager::DeleteData(const NativeRdb::AbsRdbPredicates &absRdbPred { std::lock_guard lock(rdbMutex_); if (rdbStore_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Rdb store is null"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null rdbStore_"); return NativeRdb::E_ERROR; } if (absRdbPredicates.GetTableName() != amsRdbConfig_.tableName) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Rdb store table is invalid"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid rdb store table"); return NativeRdb::E_ERROR; } int32_t rowId = -1; @@ -100,16 +100,16 @@ std::shared_ptr RdbDataManager::QueryData( { std::lock_guard lock(rdbMutex_); if (rdbStore_ == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Rdb store is null"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "null rdbStore_"); return nullptr; } if (absRdbPredicates.GetTableName() != amsRdbConfig_.tableName) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Rdb store table is invalid"); + TAG_LOGE(AAFwkTag::ABILITYMGR, "invalid rdb store table"); return nullptr; } auto absSharedResultSet = rdbStore_->Query(absRdbPredicates, std::vector()); if (absSharedResultSet == nullptr || !absSharedResultSet->HasBlock()) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "Query data failed."); + TAG_LOGE(AAFwkTag::ABILITYMGR, "query data fail"); return nullptr; } return absSharedResultSet; diff --git a/services/appdfr/src/appfreeze_manager.cpp b/services/appdfr/src/appfreeze_manager.cpp index 8962bc162f..7ed237129f 100644 --- a/services/appdfr/src/appfreeze_manager.cpp +++ b/services/appdfr/src/appfreeze_manager.cpp @@ -156,7 +156,7 @@ int AppfreezeManager::AppfreezeHandleWithStack(const FaultData& faultData, const || faultData.errorObject.name == AppFreezeType::APP_INPUT_BLOCK || faultData.errorObject.name == AppFreezeType::THREAD_BLOCK_6S) { if (AppExecFwk::AppfreezeManager::GetInstance()->IsNeedIgnoreFreezeEvent(appInfo.pid)) { - TAG_LOGE(AAFwkTag::APPDFR, "AppFreeze happend"); + TAG_LOGE(AAFwkTag::APPDFR, "appFreeze happend"); return 0; } } @@ -199,14 +199,14 @@ std::string AppfreezeManager::WriteToFile(const std::string& fileName, std::stri } std::string realPath; if (!OHOS::PathToRealPath(dir_path, realPath)) { - TAG_LOGE(AAFwkTag::APPDFR, "PathToRealPath Failed:%{public}s", dir_path.c_str()); + TAG_LOGE(AAFwkTag::APPDFR, "pathToRealPath failed:%{public}s", dir_path.c_str()); return ""; } std::string stackPath = realPath + "/" + fileName; constexpr mode_t defaultLogFileMode = 0644; auto fd = open(stackPath.c_str(), O_CREAT | O_WRONLY | O_TRUNC, defaultLogFileMode); if (fd < 0) { - TAG_LOGI(AAFwkTag::APPDFR, "Failed to create stackPath"); + TAG_LOGI(AAFwkTag::APPDFR, "stackPath create failed"); return ""; } else { TAG_LOGI(AAFwkTag::APPDFR, "stackPath: %{public}s", stackPath.c_str());