From ea97e704228d477ea20a4d8c2399a450f4396cff Mon Sep 17 00:00:00 2001 From: huhui Date: Fri, 30 May 2025 18:15:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BB=B4=E6=B5=8B=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huhui --- .../src/module_ipc/svc_session_manager.cpp | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/services/backup_sa/src/module_ipc/svc_session_manager.cpp b/services/backup_sa/src/module_ipc/svc_session_manager.cpp index 4293b6dc6..a575474a1 100644 --- a/services/backup_sa/src/module_ipc/svc_session_manager.cpp +++ b/services/backup_sa/src/module_ipc/svc_session_manager.cpp @@ -310,19 +310,6 @@ wptr SvcSessionManager::GetExtConnection(const BundleName & return wptr(it->second.backUpConnection); } -void SvcSessionManager::UpdateDfxInfo(const std::string &bundleName, uint64_t uniqId) -{ - auto backupConnection = GetExtConnection(bundleName); - if (backupConnection == nullptr) { - return; - } - auto proxy = backupConnection->GetBackupExtProxy(); - if (proxy == nullptr) { - return; - } - proxy->UpdateDfxInfo(uniqId, backupConnection->GetConnectSpan(), bundleName); -} - std::weak_ptr SvcSessionManager::GetSAExtConnection(const BundleName &bundleName) { HILOGD("svcMrg:GetExt, bundleName:%{public}s", bundleName.c_str()); @@ -1210,7 +1197,11 @@ bool SvcSessionManager::CleanAndCheckIfNeedWait(ErrCode &ret, std::vector lock(lock_); for (auto it = impl_.backupExtNameMap.begin(); it != impl_.backupExtNameMap.end();) { + HILOGI("ExtensionAbility bundleName: %{public}s, schedAction: %{public}d, isInPublishFile: %{public}d", + it->first.c_str(), it->second.schedAction, it->second.isInPublishFile); if (it->second.schedAction == BConstants::ServiceSchedAction::WAIT) { + HILOGI("Clear extensionAbility bundleName: %{public}s, schedAction: %{public}d", + it->first.c_str(), it->second.schedAction); it = impl_.backupExtNameMap.erase(it); } else if (it->second.schedAction == BConstants::ServiceSchedAction::START || (it->second.schedAction == BConstants::ServiceSchedAction::RUNNING && !it->second.isInPublishFile)) { @@ -1221,14 +1212,14 @@ bool SvcSessionManager::CleanAndCheckIfNeedWait(ErrCode &ret, std::vectorsecond.backUpConnection; if (backUpConnection == nullptr) { - HILOGE("Clear session error, backUpConnection is empty"); + HILOGE("Clear session error, backUpConnection is empty, bundleName: %{public}s", it->first.c_str()); it = impl_.backupExtNameMap.erase(it); continue; } auto proxy = backUpConnection->GetBackupExtProxy(); // start action if (proxy == nullptr) { - HILOGE("Clear session error, backUpConnection is empty"); + HILOGE("Clear session error, BackupExtProxy is empty, bundleName: %{public}s", it->first.c_str()); backUpConnection->DisconnectBackupExtAbility(); it = impl_.backupExtNameMap.erase(it); continue; @@ -1244,6 +1235,7 @@ bool SvcSessionManager::CleanAndCheckIfNeedWait(ErrCode &ret, std::vectorDisconnectBackupExtAbility(); + HILOGI("Disconnect, extensionAbility, bundleName: %{public}s", it->first.c_str()); it = impl_.backupExtNameMap.erase(it); } else { ++it; -- Gitee