From 4a546d297c0aa7f8432e14b6c15f0a5f23fcfbef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=A5=E7=BB=B4?= Date: Tue, 5 Aug 2025 10:03:04 +0800 Subject: [PATCH 1/6] =?UTF-8?q?description:=E5=BA=94=E7=94=A8=E7=94=9F?= =?UTF-8?q?=E5=91=BD=E5=91=A8=E6=9C=9F=E5=87=BD=E6=95=B0=E4=B8=8D=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E6=97=B6=EF=BC=8C=E4=B8=8D=E6=89=93=E5=8D=B0error?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 查维 --- .../native/ability/native/ability_runtime/js_ui_ability.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frameworks/native/ability/native/ability_runtime/js_ui_ability.cpp b/frameworks/native/ability/native/ability_runtime/js_ui_ability.cpp index 7809a6a7e5a..ceb06f601e3 100644 --- a/frameworks/native/ability/native/ability_runtime/js_ui_ability.cpp +++ b/frameworks/native/ability/native/ability_runtime/js_ui_ability.cpp @@ -1833,7 +1833,7 @@ napi_value JsUIAbility::CallObjectMethod(const char *name, napi_value const *arg } int64_t timeStart = AbilityRuntime::TimeUtil::SystemTimeMillisecond(); napi_status status = napi_call_function(env, obj, methodOnCreate, argc, argv, nullptr); - if (status != napi_ok) { + if (status != napi_ok && status != napi_function_expected) { TAG_LOGE(AAFwkTag::UIABILITY, "napi err: %{public}d", status); } int64_t timeEnd = AbilityRuntime::TimeUtil::SystemTimeMillisecond(); @@ -2181,7 +2181,7 @@ void JsUIAbility::OnAfterFocusedCommon(bool isFocused) void JsUIAbility::SetContinueState(int32_t state) { if (scene_ == nullptr) { - TAG_LOGE(AAFwkTag::UIABILITY, "windowScene is nullptr."); + TAG_LOGW(AAFwkTag::UIABILITY, "windowScene is nullptr."); return; } auto window = scene_->GetMainWindow(); -- Gitee From c4fc02b706cca685b83307bd9aa66424cb945ddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=A5=E7=BB=B4?= Date: Fri, 8 Aug 2025 09:44:35 +0800 Subject: [PATCH 2/6] =?UTF-8?q?serviceext=E6=97=A5=E5=BF=97=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 查维 --- services/appmgr/src/app_mgr_service_inner.cpp | 2 +- services/appmgr/src/app_running_manager.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/appmgr/src/app_mgr_service_inner.cpp b/services/appmgr/src/app_mgr_service_inner.cpp index 66dd689fce1..2c7fa9e1054 100644 --- a/services/appmgr/src/app_mgr_service_inner.cpp +++ b/services/appmgr/src/app_mgr_service_inner.cpp @@ -1688,7 +1688,7 @@ void AppMgrServiceInner::ApplicationForegrounded(const int32_t recordId) if (callerRecord != nullptr) { eventInfo.callerBundleName = callerRecord->GetBundleName(); } else { - TAG_LOGE(AAFwkTag::APPMGR, "callerRecord null"); + TAG_LOGD(AAFwkTag::APPMGR, "callerRecord null"); } AAFwk::EventReport::SendAppForegroundEvent(AAFwk::EventName::APP_FOREGROUND, eventInfo); } diff --git a/services/appmgr/src/app_running_manager.cpp b/services/appmgr/src/app_running_manager.cpp index e78da739dca..24de164036c 100644 --- a/services/appmgr/src/app_running_manager.cpp +++ b/services/appmgr/src/app_running_manager.cpp @@ -1026,7 +1026,7 @@ int32_t AppRunningManager::AssignRunningProcessInfoByAppRecord( { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); if (!appRecord) { - TAG_LOGE(AAFwkTag::APPMGR, "null"); + TAG_LOGW(AAFwkTag::APPMGR, "null"); return ERR_INVALID_OPERATION; } -- Gitee From 2cee899aac5e6ced4205710e09e37d1ad46b0263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=A5=E7=BB=B4?= Date: Fri, 8 Aug 2025 16:37:41 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=B8=8D=E5=90=88=E7=90=86=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E7=BA=A7=E5=88=AB=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 查维 --- services/abilitymgr/src/ability_cache_manager.cpp | 2 +- services/abilitymgr/src/ability_record.cpp | 2 +- services/appmgr/src/app_mgr_service_inner.cpp | 4 ++-- services/appmgr/src/app_running_record.cpp | 2 +- services/appmgr/src/app_state_observer_manager.cpp | 4 ++-- services/appmgr/src/exit_resident_process_manager.cpp | 6 +++--- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/services/abilitymgr/src/ability_cache_manager.cpp b/services/abilitymgr/src/ability_cache_manager.cpp index aea838f0094..795d3a93994 100644 --- a/services/abilitymgr/src/ability_cache_manager.cpp +++ b/services/abilitymgr/src/ability_cache_manager.cpp @@ -64,7 +64,7 @@ void AbilityCacheManager::RemoveAbilityRecInProcList(std::shared_ptrGetApplicationInfo().accessTokenId; auto findProcInfo = procLruMap_.find(accessTokenId); if (findProcInfo == procLruMap_.end()) { - TAG_LOGD(AAFwkTag::SERVICE_EXT, "no record"); + TAG_LOGW(AAFwkTag::SERVICE_EXT, "no record"); return; } auto it = findProcInfo->second.recList.begin(); diff --git a/services/abilitymgr/src/ability_record.cpp b/services/abilitymgr/src/ability_record.cpp index bd5836d9ac5..1216ebfd733 100644 --- a/services/abilitymgr/src/ability_record.cpp +++ b/services/abilitymgr/src/ability_record.cpp @@ -3658,7 +3658,7 @@ bool AbilityRecord::IsAbilityWindowReady() void AbilityRecord::SetAbilityWindowState(const sptr &sessionInfo, WindowCommand winCmd, bool isFinished) { if (sessionInfo == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "null sessionInfo"); + TAG_LOGW(AAFwkTag::ABILITYMGR, "null sessionInfo"); return; } if (isFinished) { diff --git a/services/appmgr/src/app_mgr_service_inner.cpp b/services/appmgr/src/app_mgr_service_inner.cpp index 2c7fa9e1054..43d23764c59 100644 --- a/services/appmgr/src/app_mgr_service_inner.cpp +++ b/services/appmgr/src/app_mgr_service_inner.cpp @@ -8163,7 +8163,7 @@ bool AppMgrServiceInner::IsAttachDebug(const std::string &bundleName) TAG_LOGD(AAFwkTag::APPMGR, "called"); auto isSaCall = AAFwk::PermissionVerification::GetInstance()->IsSACall(); if (!isSaCall) { - TAG_LOGE(AAFwkTag::APPMGR, "caller token not SA"); + TAG_LOGW(AAFwkTag::APPMGR, "caller token not SA"); return false; } if (appRunningManager_ == nullptr || bundleName.empty()) { @@ -10217,7 +10217,7 @@ void AppMgrServiceInner::RemoveUIExtensionBindItem( } if (!AAFwk::UIExtensionUtils::IsUIExtension(abilityInfo->extensionAbilityType)) { - TAG_LOGE(AAFwkTag::APPMGR, "not uiextension"); + TAG_LOGW(AAFwkTag::APPMGR, "not uiextension"); return; } diff --git a/services/appmgr/src/app_running_record.cpp b/services/appmgr/src/app_running_record.cpp index 58fe5677a6f..df1b5695346 100644 --- a/services/appmgr/src/app_running_record.cpp +++ b/services/appmgr/src/app_running_record.cpp @@ -1162,7 +1162,7 @@ void AppRunningRecord::SetAppMgrServiceInner(const std::weak_ptr lock(webMutexLock_); - TAG_LOGE(AAFwkTag::APPMGR, "call"); + TAG_LOGD(AAFwkTag::APPMGR, "call"); exitResidentBundlesDependedOnWeb_.emplace_back(bundleName, uid); } @@ -116,7 +116,7 @@ void ExitResidentProcessManager::HandleExitResidentBundleDependedOnWeb( std::vector &bundleNames) { std::lock_guard lock(webMutexLock_); - TAG_LOGE(AAFwkTag::APPMGR, "call"); + TAG_LOGD(AAFwkTag::APPMGR, "call"); bundleNames = std::move(exitResidentBundlesDependedOnWeb_); } @@ -175,7 +175,7 @@ void ExitResidentProcessManager::QueryExitBundleInfos(const std::vector bundleNames; { std::lock_guard lock(webMutexLock_); -- Gitee From 0e3c01a5ad5d1395cc9a2c11e60e1f9c23f167f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=A5=E7=BB=B4?= Date: Tue, 12 Aug 2025 00:24:32 +0000 Subject: [PATCH 4/6] update services/abilitymgr/src/ability_cache_manager.cpp. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 查维 --- services/abilitymgr/src/ability_cache_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/abilitymgr/src/ability_cache_manager.cpp b/services/abilitymgr/src/ability_cache_manager.cpp index 795d3a93994..aea838f0094 100644 --- a/services/abilitymgr/src/ability_cache_manager.cpp +++ b/services/abilitymgr/src/ability_cache_manager.cpp @@ -64,7 +64,7 @@ void AbilityCacheManager::RemoveAbilityRecInProcList(std::shared_ptrGetApplicationInfo().accessTokenId; auto findProcInfo = procLruMap_.find(accessTokenId); if (findProcInfo == procLruMap_.end()) { - TAG_LOGW(AAFwkTag::SERVICE_EXT, "no record"); + TAG_LOGD(AAFwkTag::SERVICE_EXT, "no record"); return; } auto it = findProcInfo->second.recList.begin(); -- Gitee From 4511f259dfe5dba41fb25d0b2ddc039d61d7a327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=A5=E7=BB=B4?= Date: Wed, 13 Aug 2025 10:05:32 +0800 Subject: [PATCH 5/6] =?UTF-8?q?description:=E6=97=A5=E5=BF=97=E4=BC=98?= =?UTF-8?q?=E5=8C=96-7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 查维 --- .../napi/app/js_app_manager/js_app_manager.cpp | 2 +- .../ability_runtime/connection_manager.cpp | 6 ++++-- .../context/js_application_context_utils.cpp | 1 - .../ability_simulator/src/context_impl.cpp | 2 +- .../ability_start_with_wait_observer_manager.cpp | 4 ++-- services/appmgr/src/app_mgr_service_inner.cpp | 8 ++++---- services/appmgr/src/app_running_record.cpp | 4 ++-- services/common/src/permission_verification.cpp | 16 ---------------- 8 files changed, 14 insertions(+), 29 deletions(-) diff --git a/frameworks/js/napi/app/js_app_manager/js_app_manager.cpp b/frameworks/js/napi/app/js_app_manager/js_app_manager.cpp index 18c80c2fc80..c7e7a79d8ed 100644 --- a/frameworks/js/napi/app/js_app_manager/js_app_manager.cpp +++ b/frameworks/js/napi/app/js_app_manager/js_app_manager.cpp @@ -1068,7 +1068,7 @@ private: return; } bool ret = appManager->IsSharedBundleRunning(bundleName, versionCode); - TAG_LOGI(AAFwkTag::APPMGR, "result:%{public}d", ret); + TAG_LOGD(AAFwkTag::APPMGR, "result:%{public}d", ret); task->ResolveWithNoError(env, CreateJsValue(env, ret)); delete task; }; diff --git a/frameworks/native/ability/ability_runtime/connection_manager.cpp b/frameworks/native/ability/ability_runtime/connection_manager.cpp index 27a7b227a86..2d86850e2ed 100644 --- a/frameworks/native/ability/ability_runtime/connection_manager.cpp +++ b/frameworks/native/ability/ability_runtime/connection_manager.cpp @@ -197,6 +197,9 @@ ErrCode ConnectionManager::DisconnectAbility(const sptr& connectC std::lock_guard lock(connectionsLock_); bool found = false; auto item = abilityConnections_.begin(); + if (!abilityConnections_.empty()) { + TAG_LOGI(AAFwkTag::CONNECTION, "Connection size:%{public}zu", abilityConnections_.size()); + } while (item != abilityConnections_.end()) { if (!MatchConnection(connectCaller, connectReceiver, accountId, *item) || std::find(item->second.begin(), item->second.end(), connectCallback) == item->second.end()) { @@ -204,8 +207,7 @@ ErrCode ConnectionManager::DisconnectAbility(const sptr& connectC continue; } found = true; - TAG_LOGI(AAFwkTag::CONNECTION, "Connection size:%{public}zu, callback size: %{public}zu", - abilityConnections_.size(), item->second.size()); + TAG_LOGD(AAFwkTag::CONNECTION, "callback size: %{public}zu", item->second.size()); auto iter = item->second.begin(); while (iter != item->second.end()) { if (*iter == connectCallback) { diff --git a/frameworks/native/appkit/ability_runtime/context/js_application_context_utils.cpp b/frameworks/native/appkit/ability_runtime/context/js_application_context_utils.cpp index c507ba81c46..951b1c8d426 100644 --- a/frameworks/native/appkit/ability_runtime/context/js_application_context_utils.cpp +++ b/frameworks/native/appkit/ability_runtime/context/js_application_context_utils.cpp @@ -206,7 +206,6 @@ napi_value JsApplicationContextUtils::OnCreateModuleContext(napi_env env, NapiCa } if (!moduleContext) { - TAG_LOGE(AAFwkTag::APPKIT, "null moduleContext"); AbilityRuntimeErrorUtil::Throw(env, ERR_ABILITY_RUNTIME_EXTERNAL_INVALID_PARAMETER); return CreateJsUndefined(env); } diff --git a/frameworks/simulator/ability_simulator/src/context_impl.cpp b/frameworks/simulator/ability_simulator/src/context_impl.cpp index f06072bc1d9..006e20a1afa 100644 --- a/frameworks/simulator/ability_simulator/src/context_impl.cpp +++ b/frameworks/simulator/ability_simulator/src/context_impl.cpp @@ -472,7 +472,7 @@ std::shared_ptr ContextImpl::CreateModuleContext( [&moduleName]( const AppExecFwk::HapModuleInfo &hapModuleInfo) { return hapModuleInfo.moduleName == moduleName; }); if (info == bundleInfo.hapModuleInfos.end()) { - TAG_LOGE(AAFwkTag::ABILITY_SIM, "moduleName error"); + TAG_LOGE(AAFwkTag::ABILITY_SIM, "moduleName %{public}s error", moduleName.c_str()); return nullptr; } appContext->InitHapModuleInfo(*info); diff --git a/services/abilitymgr/src/ability_start_with_wait_observer_manager/ability_start_with_wait_observer_manager.cpp b/services/abilitymgr/src/ability_start_with_wait_observer_manager/ability_start_with_wait_observer_manager.cpp index 2f821984a20..a99527a3024 100644 --- a/services/abilitymgr/src/ability_start_with_wait_observer_manager/ability_start_with_wait_observer_manager.cpp +++ b/services/abilitymgr/src/ability_start_with_wait_observer_manager/ability_start_with_wait_observer_manager.cpp @@ -136,10 +136,10 @@ void AbilityStartWithWaitObserverManager::NotifyAATerminateWait( } auto observerId = abilityRecord->GetWant().GetIntParam(Want::START_ABILITY_WITH_WAIT_OBSERVER_ID_KEY, -1); if (observerId == -1) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "invaid observerId"); + TAG_LOGW(AAFwkTag::ABILITYMGR, "invaid observerId"); return; } - TAG_LOGE(AAFwkTag::ABILITYMGR, "observerId:%{public}d", observerId); + TAG_LOGD(AAFwkTag::ABILITYMGR, "observerId:%{public}d", observerId); abilityRecord->RemoveSpecifiedWantParam(Want::START_ABILITY_WITH_WAIT_OBSERVER_ID_KEY); sptr proxy = nullptr; AbilityStartWithWaitObserverData data; diff --git a/services/appmgr/src/app_mgr_service_inner.cpp b/services/appmgr/src/app_mgr_service_inner.cpp index 43d23764c59..6a325d445a8 100644 --- a/services/appmgr/src/app_mgr_service_inner.cpp +++ b/services/appmgr/src/app_mgr_service_inner.cpp @@ -38,7 +38,7 @@ #include "app_state_observer_manager.h" #include "app_utils.h" #include "appfreeze_manager.h" -#include "application_state_observer_stub.h" +#include "application_state_observer_stub..h" #include "appspawn_util.h" #include "bundle_constants.h" #include "bundle_mgr_helper.h" @@ -1413,7 +1413,7 @@ bool AppMgrServiceInner::GetBundleAndHapInfo(const AbilityInfo &abilityInfo, void AppMgrServiceInner::AttachApplication(const pid_t pid, const sptr &appScheduler) { - TAG_LOGI(AAFwkTag::APPMGR, "%{public}s called", __func__); + TAG_LOGD(AAFwkTag::APPMGR, "%{public}s called", __func__); if (pid <= 0) { TAG_LOGE(AAFwkTag::APPMGR, "invalid pid:%{public}d", pid); return; @@ -8163,7 +8163,7 @@ bool AppMgrServiceInner::IsAttachDebug(const std::string &bundleName) TAG_LOGD(AAFwkTag::APPMGR, "called"); auto isSaCall = AAFwk::PermissionVerification::GetInstance()->IsSACall(); if (!isSaCall) { - TAG_LOGW(AAFwkTag::APPMGR, "caller token not SA"); + TAG_LOGE(AAFwkTag::APPMGR, "caller token not SA"); return false; } if (appRunningManager_ == nullptr || bundleName.empty()) { @@ -10217,7 +10217,7 @@ void AppMgrServiceInner::RemoveUIExtensionBindItem( } if (!AAFwk::UIExtensionUtils::IsUIExtension(abilityInfo->extensionAbilityType)) { - TAG_LOGW(AAFwkTag::APPMGR, "not uiextension"); + TAG_LOGE(AAFwkTag::APPMGR, "not uiextension"); return; } diff --git a/services/appmgr/src/app_running_record.cpp b/services/appmgr/src/app_running_record.cpp index df1b5695346..7f05f6feea2 100644 --- a/services/appmgr/src/app_running_record.cpp +++ b/services/appmgr/src/app_running_record.cpp @@ -2467,14 +2467,14 @@ void AppRunningRecord::SetWatchdogBackgroundStatusRunning(bool status) bool AppRunningRecord::SetSupportedProcessCache(bool isSupport) { - TAG_LOGI(AAFwkTag::APPMGR, "call"); + TAG_LOGD(AAFwkTag::APPMGR, "call"); procCacheSupportState_ = isSupport ? SupportProcessCacheState::SUPPORT : SupportProcessCacheState::NOT_SUPPORT; return true; } bool AppRunningRecord::SetEnableProcessCache(bool enable) { - TAG_LOGI(AAFwkTag::APPMGR, "call"); + TAG_LOGD(AAFwkTag::APPMGR, "call"); enableProcessCache_ = enable; return true; } diff --git a/services/common/src/permission_verification.cpp b/services/common/src/permission_verification.cpp index ef809e79ca6..53b08a3e46b 100644 --- a/services/common/src/permission_verification.cpp +++ b/services/common/src/permission_verification.cpp @@ -153,7 +153,6 @@ bool PermissionVerification::VerifyRunningInfoPerm() const TAG_LOGD(AAFwkTag::DEFAULT, "Permission granted"); return true; } - TAG_LOGE(AAFwkTag::DEFAULT, "Permission denied"); return false; } @@ -163,7 +162,6 @@ bool PermissionVerification::VerifyCustomSandbox(uint32_t accessTokenId) const TAG_LOGD(AAFwkTag::DEFAULT, "Permission granted"); return true; } - TAG_LOGE(AAFwkTag::DEFAULT, "Permission denied"); return false; } @@ -173,7 +171,6 @@ bool PermissionVerification::VerifyControllerPerm() const TAG_LOGD(AAFwkTag::DEFAULT, "Permission granted"); return true; } - TAG_LOGE(AAFwkTag::DEFAULT, "Permission denied"); return false; } @@ -187,7 +184,6 @@ bool PermissionVerification::VerifyDlpPermission(Want &want) const if (VerifyCallingPermission(PermissionConstants::PERMISSION_ACCESS_DLP)) { return true; } - TAG_LOGE(AAFwkTag::DEFAULT, "Permission denied"); return false; } @@ -196,7 +192,6 @@ int PermissionVerification::VerifyAccountPermission() const if (VerifyCallingPermission(PermissionConstants::PERMISSION_INTERACT_ACROSS_LOCAL_ACCOUNTS)) { return ERR_OK; } - TAG_LOGE(AAFwkTag::DEFAULT, "Permission denied"); return CHECK_PERMISSION_FAILED; } @@ -207,7 +202,6 @@ bool PermissionVerification::VerifyMissionPermission() const TAG_LOGD(AAFwkTag::DEFAULT, "Permission granted"); return true; } - TAG_LOGE(AAFwkTag::DEFAULT, "Permission denied"); return false; } @@ -217,7 +211,6 @@ int PermissionVerification::VerifyAppStateObserverPermission() const TAG_LOGD(AAFwkTag::DEFAULT, "Permission granted"); return ERR_OK; } - TAG_LOGE(AAFwkTag::DEFAULT, "Permission denied"); return ERR_PERMISSION_DENIED; } @@ -228,8 +221,6 @@ int32_t PermissionVerification::VerifyUpdateConfigurationPerm() const "Permission %{public}s granted", PermissionConstants::PERMISSION_UPDATE_CONFIGURATION); return ERR_OK; } - TAG_LOGE(AAFwkTag::DEFAULT, - "Permission %{public}s denied", PermissionConstants::PERMISSION_UPDATE_CONFIGURATION); return ERR_PERMISSION_DENIED; } @@ -240,8 +231,6 @@ int32_t PermissionVerification::VerifyUpdateAPPConfigurationPerm() const "Permission %{public}s granted", PermissionConstants::PERMISSION_UPDATE_APP_CONFIGURATION); return ERR_OK; } - TAG_LOGE(AAFwkTag::DEFAULT, - "Permission %{public}s denied", PermissionConstants::PERMISSION_UPDATE_APP_CONFIGURATION); return ERR_PERMISSION_DENIED; } @@ -252,8 +241,6 @@ bool PermissionVerification::VerifyInstallBundlePermission() const "Permission %{public}s granted", PermissionConstants::PERMISSION_INSTALL_BUNDLE); return true; } - - TAG_LOGE(AAFwkTag::DEFAULT, "Permission %{public}s denied", PermissionConstants::PERMISSION_INSTALL_BUNDLE); return false; } @@ -264,9 +251,6 @@ bool PermissionVerification::VerifyGetBundleInfoPrivilegedPermission() const "Permission %{public}s granted", PermissionConstants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); return true; } - - TAG_LOGE(AAFwkTag::DEFAULT, - "Permission %{public}s denied", PermissionConstants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); return false; } -- Gitee From e578a60ba14844552c0903cf4a3cbd313b5d20a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=A5=E7=BB=B4?= Date: Fri, 15 Aug 2025 19:27:22 -0700 Subject: [PATCH 6/6] =?UTF-8?q?dfx=E5=A4=A7=E6=A8=A1=E5=9E=8B=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 查维 --- frameworks/js/napi/app/js_app_manager/js_app_manager.cpp | 2 +- .../inner_api/app_manager/src/appmgr/app_mgr_client.cpp | 4 ++-- .../inner_api/app_manager/src/appmgr/app_scheduler_host.cpp | 2 +- services/abilitymgr/src/ability_manager_client.cpp | 4 ++-- services/appmgr/src/app_mgr_service.cpp | 4 ++-- services/appmgr/src/app_mgr_service_inner.cpp | 6 +++--- services/appmgr/src/app_running_manager.cpp | 6 +++--- services/appmgr/src/app_running_record.cpp | 1 - services/appmgr/src/app_spawn_client.cpp | 4 ++-- 9 files changed, 16 insertions(+), 17 deletions(-) diff --git a/frameworks/js/napi/app/js_app_manager/js_app_manager.cpp b/frameworks/js/napi/app/js_app_manager/js_app_manager.cpp index c7e7a79d8ed..e49d958fa1d 100644 --- a/frameworks/js/napi/app/js_app_manager/js_app_manager.cpp +++ b/frameworks/js/napi/app/js_app_manager/js_app_manager.cpp @@ -1194,7 +1194,7 @@ private: return; } int32_t memorySize = abilityManager->GetAppMemorySize(); - TAG_LOGI(AAFwkTag::APPMGR, "memorySize:%{public}d", memorySize); + TAG_LOGD(AAFwkTag::APPMGR, "memorySize:%{public}d", memorySize); task->ResolveWithNoError(env, CreateJsValue(env, memorySize)); delete task; }; diff --git a/interfaces/inner_api/app_manager/src/appmgr/app_mgr_client.cpp b/interfaces/inner_api/app_manager/src/appmgr/app_mgr_client.cpp index adc3efbdbf4..f8d1769b8bc 100644 --- a/interfaces/inner_api/app_manager/src/appmgr/app_mgr_client.cpp +++ b/interfaces/inner_api/app_manager/src/appmgr/app_mgr_client.cpp @@ -1437,7 +1437,7 @@ int32_t AppMgrClient::PreloadApplication(const std::string &bundleName, int32_t int32_t AppMgrClient::SetSupportedProcessCacheSelf(bool isSupport) { - TAG_LOGI(AAFwkTag::APPMGR, "Called"); + TAG_LOGD(AAFwkTag::APPMGR, "Called"); sptr service = iface_cast(mgrHolder_->GetRemoteObject()); if (service == nullptr) { TAG_LOGE(AAFwkTag::APPMGR, "Service is nullptr."); @@ -1448,7 +1448,7 @@ int32_t AppMgrClient::SetSupportedProcessCacheSelf(bool isSupport) int32_t AppMgrClient::SetSupportedProcessCache(int32_t pid, bool isSupport) { - TAG_LOGI(AAFwkTag::APPMGR, "Called"); + TAG_LOGD(AAFwkTag::APPMGR, "Called"); sptr service = iface_cast(mgrHolder_->GetRemoteObject()); if (service == nullptr) { TAG_LOGE(AAFwkTag::APPMGR, "Service is nullptr."); diff --git a/interfaces/inner_api/app_manager/src/appmgr/app_scheduler_host.cpp b/interfaces/inner_api/app_manager/src/appmgr/app_scheduler_host.cpp index 78d986e17ca..fbff8d8f992 100644 --- a/interfaces/inner_api/app_manager/src/appmgr/app_scheduler_host.cpp +++ b/interfaces/inner_api/app_manager/src/appmgr/app_scheduler_host.cpp @@ -32,7 +32,7 @@ void AppSchedulerHost::InitMemberFuncMap() {} AppSchedulerHost::~AppSchedulerHost() { - TAG_LOGI(AAFwkTag::APPMGR, "AppSchedulerHost destruction"); + TAG_LOGD(AAFwkTag::APPMGR, "AppSchedulerHost destruction"); } int AppSchedulerHost::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) diff --git a/services/abilitymgr/src/ability_manager_client.cpp b/services/abilitymgr/src/ability_manager_client.cpp index e4149b294d1..bc5b52dd421 100644 --- a/services/abilitymgr/src/ability_manager_client.cpp +++ b/services/abilitymgr/src/ability_manager_client.cpp @@ -1600,7 +1600,7 @@ AppExecFwk::ElementName AbilityManagerClient::GetTopAbility(bool isNeedLocalDevi TAG_LOGE(AAFwkTag::ABILITYMGR, "get sceneSessionManager failed"); return elementName; } - TAG_LOGI(AAFwkTag::ABILITYMGR, "call GetTopAbility"); + TAG_LOGI(AAFwkTag::ABILITYMGR, "GetTopAbility"); (void)sceneSessionManager->GetFocusSessionElement(elementName); return elementName; } @@ -1648,7 +1648,7 @@ ErrCode AbilityManagerClient::AddFreeInstallObserver(const sptr c int32_t AbilityManagerClient::IsValidMissionIds( const std::vector &missionIds, std::vector &results) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "call"); + TAG_LOGD(AAFwkTag::ABILITYMGR, "call"); #ifdef SUPPORT_SCREEN if (Rosen::SceneBoardJudgement::IsSceneBoardEnabled()) { auto sceneSessionManager = SessionManagerLite::GetInstance().GetSceneSessionManagerLiteProxy(); diff --git a/services/appmgr/src/app_mgr_service.cpp b/services/appmgr/src/app_mgr_service.cpp index 1b907c9f601..e63d18761b7 100644 --- a/services/appmgr/src/app_mgr_service.cpp +++ b/services/appmgr/src/app_mgr_service.cpp @@ -1668,7 +1668,7 @@ int32_t AppMgrService::NotifyMemorySizeStateChanged(int32_t memorySizeState) int32_t AppMgrService::SetSupportedProcessCacheSelf(bool isSupport) { - TAG_LOGI(AAFwkTag::APPMGR, "call"); + TAG_LOGD(AAFwkTag::APPMGR, "call"); if (!IsReady()) { TAG_LOGE(AAFwkTag::APPMGR, "not ready"); return ERR_INVALID_OPERATION; @@ -1678,7 +1678,7 @@ int32_t AppMgrService::SetSupportedProcessCacheSelf(bool isSupport) int32_t AppMgrService::SetSupportedProcessCache(int32_t pid, bool isSupport) { - TAG_LOGI(AAFwkTag::APPMGR, "Called"); + TAG_LOGD(AAFwkTag::APPMGR, "Called"); if (!IsReady()) { TAG_LOGE(AAFwkTag::APPMGR, "Not ready."); return ERR_INVALID_OPERATION; diff --git a/services/appmgr/src/app_mgr_service_inner.cpp b/services/appmgr/src/app_mgr_service_inner.cpp index 6a325d445a8..72bf65490b2 100644 --- a/services/appmgr/src/app_mgr_service_inner.cpp +++ b/services/appmgr/src/app_mgr_service_inner.cpp @@ -8163,7 +8163,7 @@ bool AppMgrServiceInner::IsAttachDebug(const std::string &bundleName) TAG_LOGD(AAFwkTag::APPMGR, "called"); auto isSaCall = AAFwk::PermissionVerification::GetInstance()->IsSACall(); if (!isSaCall) { - TAG_LOGE(AAFwkTag::APPMGR, "caller token not SA"); + TAG_LOGW(AAFwkTag::APPMGR, "caller token not SA"); return false; } if (appRunningManager_ == nullptr || bundleName.empty()) { @@ -9424,7 +9424,7 @@ bool AppMgrServiceInner::GetKeepAliveState(const std::shared_ptr &sharedBundles) { - TAG_LOGI(AAFwkTag::APPMGR, "QueryRunningSharedBundles call, pid:%{public}d", pid); + TAG_LOGD(AAFwkTag::APPMGR, "QueryRunningSharedBundles call, pid:%{public}d", pid); HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); auto appRecord = GetAppRunningRecordByPid(pid); if (!appRecord) { diff --git a/services/appmgr/src/app_running_manager.cpp b/services/appmgr/src/app_running_manager.cpp index 24de164036c..cea3714032e 100644 --- a/services/appmgr/src/app_running_manager.cpp +++ b/services/appmgr/src/app_running_manager.cpp @@ -704,10 +704,10 @@ std::shared_ptr AppRunningManager::OnRemoteDied(const wptrRemoveAppDeathRecipient(); appRecord->SetApplicationClient(nullptr); - TAG_LOGI(AAFwkTag::APPMGR, "pname: %{public}s", appRecord->GetProcessName().c_str()); auto priorityObject = appRecord->GetPriorityObject(); if (priorityObject != nullptr) { - TAG_LOGI(AAFwkTag::APPMGR, "pid: %{public}d", priorityObject->GetPid()); + TAG_LOGI(AAFwkTag::APPMGR, "pname: %{public}s, pid: %{public}d", appRecord->GetProcessName().c_str(), + priorityObject->GetPid()); if (appMgrServiceInner != nullptr) { appMgrServiceInner->KillProcessByPid(priorityObject->GetPid(), "OnRemoteDied"); } @@ -1796,7 +1796,7 @@ void AppRunningManager::HandleChildRelation( std::shared_ptr AppRunningManager::OnChildProcessRemoteDied(const wptr &remote) { - TAG_LOGE(AAFwkTag::APPMGR, "On child process remote died"); + TAG_LOGD(AAFwkTag::APPMGR, "On child process remote died"); if (remote == nullptr) { TAG_LOGE(AAFwkTag::APPMGR, "null remote"); return nullptr; diff --git a/services/appmgr/src/app_running_record.cpp b/services/appmgr/src/app_running_record.cpp index 7f05f6feea2..0fd51e2c3a6 100644 --- a/services/appmgr/src/app_running_record.cpp +++ b/services/appmgr/src/app_running_record.cpp @@ -1236,7 +1236,6 @@ void AppRunningRecord::SendEvent(uint32_t msg, int64_t timeOut) appEventId_++; auto param = appEventId_; - TAG_LOGI(AAFwkTag::APPMGR, "eventId %{public}d", static_cast(param)); eventHandler_->SendEvent(AAFwk::EventWrap(msg, param), timeOut, false); AppEventUtil::GetInstance().AddEvent(shared_from_this(), msg, param); } diff --git a/services/appmgr/src/app_spawn_client.cpp b/services/appmgr/src/app_spawn_client.cpp index f1f1e51387c..7a6bcff3ede 100644 --- a/services/appmgr/src/app_spawn_client.cpp +++ b/services/appmgr/src/app_spawn_client.cpp @@ -664,7 +664,7 @@ int32_t AppSpawnClient::SendAppSpawnUninstallDebugHapMsg(int32_t userId) int32_t AppSpawnClient::GetRenderProcessTerminationStatus(const AppSpawnStartMsg &startMsg, int &status) { - TAG_LOGI(AAFwkTag::APPMGR, "call"); + TAG_LOGD(AAFwkTag::APPMGR, "call"); int32_t ret = 0; AppSpawnReqMsgHandle reqHandle = nullptr; @@ -684,7 +684,7 @@ int32_t AppSpawnClient::GetRenderProcessTerminationStatus(const AppSpawnStartMsg return ret; } - TAG_LOGI(AAFwkTag::APPMGR, "AppspawnSendMsg"); + TAG_LOGD(AAFwkTag::APPMGR, "AppspawnSendMsg"); AppSpawnResult result = {0}; ret = AppSpawnClientSendMsg(handle_, reqHandle, &result); status = result.result; -- Gitee