!11342 修复不合理ERROR日志

Merge pull request !11342 from savior-xzh/logfix
This commit is contained in:
openharmony_ci 2024-10-25 13:35:28 +00:00 committed by Gitee
commit 5c6a8e6faf
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 12 additions and 7 deletions

View File

@ -842,7 +842,7 @@ void JsUIAbility::DoOnForegroundForSceneIsNull(const Want &want)
displayId = strtol(strDisplayId.c_str(), nullptr, BASE_DISPLAY_ID_NUM);
TAG_LOGD(AAFwkTag::UIABILITY, "displayId: %{public}d", displayId);
} else {
TAG_LOGE(AAFwkTag::UIABILITY, "formatRegex: [%{public}s] failed", strDisplayId.c_str());
TAG_LOGW(AAFwkTag::UIABILITY, "formatRegex: [%{public}s] failed", strDisplayId.c_str());
}
}
auto option = GetWindowOption(want);
@ -899,8 +899,12 @@ void JsUIAbility::RequestFocus(const Want &want)
void JsUIAbility::ContinuationRestore(const Want &want)
{
TAG_LOGD(AAFwkTag::UIABILITY, "called");
if (!IsRestoredInContinuation() || scene_ == nullptr) {
TAG_LOGE(AAFwkTag::UIABILITY, "is not in continuation or null scene_");
if (!IsRestoredInContinuation()) {
TAG_LOGW(AAFwkTag::UIABILITY, "not in continuation");
return;
}
if (scene_ == nullptr) {
TAG_LOGE(AAFwkTag::UIABILITY, "null scene_");
return;
}
RestorePageStack(want);

View File

@ -1421,8 +1421,9 @@ void AbilityRecord::SetAbilityStateInner(AbilityState state)
}
auto missionListWrap = DelayedSingleton<AbilityManagerService>::GetInstance()->GetMissionListWrap();
CHECK_POINTER(missionListWrap);
missionListWrap->SetMissionAbilityState(missionId_, currentState_);
if (missionListWrap != nullptr) {
missionListWrap->SetMissionAbilityState(missionId_, currentState_);
}
}
#endif // SUPPORT_SCREEN
bool AbilityRecord::GetAbilityForegroundingFlag() const

View File

@ -474,7 +474,7 @@ bool SubManagersHelper::VerificationAllToken(const sptr<IRemoteObject> &token)
return true;
}
}
TAG_LOGE(AAFwkTag::ABILITYMGR, "fail");
TAG_LOGE(AAFwkTag::ABILITYMGR, "VerificationAllToken fail");
return false;
}

View File

@ -1078,7 +1078,7 @@ void AppMgrServiceInner::AttachApplication(const pid_t pid, const sptr<IAppSched
return;
}
TAG_LOGI(AAFwkTag::APPMGR, "attach pid:%{public}d, bundle:%{public}s", pid, eventInfo.bundleName.c_str());
sptr<AppDeathRecipient> appDeathRecipient = new (std::nothrow) AppDeathRecipient();
sptr<AppDeathRecipient> appDeathRecipient = sptr<AppDeathRecipient>::MakeSptr();
CHECK_POINTER_AND_RETURN_LOG(appDeathRecipient, "Failed to create death recipient.");
appDeathRecipient->SetTaskHandler(taskHandler_);
appDeathRecipient->SetAppMgrServiceInner(shared_from_this());