From 6f85fabb5d43a8abb73806e35a9876ab90a9c6ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=99=9F=E9=92=B0?= Date: Mon, 11 Nov 2024 11:39:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=85=E6=97=B6=E7=AB=8B=E5=8D=B3=E6=B8=85?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张晟钰 --- .../src/module_app_gallery/app_gallery_dispose_proxy.cpp | 2 +- services/backup_sa/src/module_ipc/service.cpp | 6 ++++-- services/backup_sa/src/module_ipc/service_reverse_proxy.cpp | 5 ----- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/services/backup_sa/src/module_app_gallery/app_gallery_dispose_proxy.cpp b/services/backup_sa/src/module_app_gallery/app_gallery_dispose_proxy.cpp index 5818f7061..6b9176f39 100644 --- a/services/backup_sa/src/module_app_gallery/app_gallery_dispose_proxy.cpp +++ b/services/backup_sa/src/module_app_gallery/app_gallery_dispose_proxy.cpp @@ -150,7 +150,7 @@ DisposeErr AppGalleryDisposeProxy::DoDispose(const std::string &bundleName, Disp MessageOption option; int32_t ret = appRemoteObj_->SendRequest(static_cast(disposeOperation), data, reply, option); if (ret != ERR_NONE) { - HILOGI("SendRequest error, code=%{public}d, bundleName=%{public}s , appindex =%{public}d", + HILOGE("SendRequest error, code=%{public}d, bundleName=%{public}s , appindex =%{public}d", ret, bundleDetailInfo.bundleName.c_str(), bundleDetailInfo.bundleIndex); RecordDoDisposeRes(bundleName, disposeOperation, ret); return DisposeErr::REQUEST_FAIL; diff --git a/services/backup_sa/src/module_ipc/service.cpp b/services/backup_sa/src/module_ipc/service.cpp index 28fe3e312..4f4ef4809 100644 --- a/services/backup_sa/src/module_ipc/service.cpp +++ b/services/backup_sa/src/module_ipc/service.cpp @@ -757,6 +757,7 @@ ErrCode Service::ServiceResultReport(const std::string restoreRetInfo, HITRACE_METER_NAME(HITRACE_TAG_FILEMANAGEMENT, __PRETTY_FUNCTION__); try { callerName = VerifyCallerAndGetCallerName(); + SendEndAppGalleryNotify(callerName); if (sennario == BackupRestoreScenario::FULL_RESTORE) { session_->GetServiceReverseProxy()->RestoreOnResultReport(restoreRetInfo, callerName, errCode); NotifyCloneBundleFinish(callerName, sennario); @@ -828,7 +829,6 @@ void Service::NotifyCloneBundleFinish(std::string bundleName, const BackupRestor ClearSessionAndSchedInfo(bundleName); } RemoveExtensionMutex(bundleName); - SendEndAppGalleryNotify(bundleName); OnAllBundlesFinished(BError(BError::Codes::OK)); } catch (...) { HILOGI("Unexpected exception"); @@ -1096,6 +1096,7 @@ void Service::NoticeClientFinish(const string &bundleName, ErrCode errCode) HITRACE_METER_NAME(HITRACE_TAG_FILEMANAGEMENT, __PRETTY_FUNCTION__); HILOGI("begin %{public}s", bundleName.c_str()); try { + SendEndAppGalleryNotify(bundleName); auto scenario = session_->GetScenario(); if (scenario == IServiceReverse::Scenario::BACKUP && session_->GetIsIncrementalBackup()) { session_->GetServiceReverseProxy()->IncrementalBackupOnBundleFinished(errCode, bundleName); @@ -1292,7 +1293,7 @@ void Service::SendEndAppGalleryNotify(const BundleName &bundleName) HILOGI("EndRestore, code=%{public}d, bundleName=%{public}s", disposeErr, bundleName.c_str()); if (disposeErr != DisposeErr::OK) { - HILOGE("Error, disposal will be clear in the end"); + HILOGE("Error code=%{public}d, disposal will be clear in the end", disposeErr); return; } if (!disposal_->DeleteFromDisposalConfigFile(bundleName)) { @@ -1345,6 +1346,7 @@ void Service::ClearDisposalOnSaStart() if (!bundleNameList.empty()) { for (vector::iterator it = bundleNameList.begin(); it != bundleNameList.end(); ++it) { string bundleName = *it; + HILOGE("dispose has residual, clear now, bundelName =%{public}s", bundleName.c_str()); TryToClearDispose(bundleName); } } diff --git a/services/backup_sa/src/module_ipc/service_reverse_proxy.cpp b/services/backup_sa/src/module_ipc/service_reverse_proxy.cpp index b1f7a6e6c..efe357b20 100644 --- a/services/backup_sa/src/module_ipc/service_reverse_proxy.cpp +++ b/services/backup_sa/src/module_ipc/service_reverse_proxy.cpp @@ -15,7 +15,6 @@ #include "module_ipc/service_reverse_proxy.h" -#include "module_app_gallery/app_gallery_dispose_proxy.h" #include "b_error/b_error.h" #include "b_error/b_excep_utils.h" #include "filemgmt_libhilog.h" @@ -164,10 +163,6 @@ void ServiceReverseProxy::RestoreOnBundleFinished(int32_t errCode, string bundle err != ERR_OK) { throw BError(BError::Codes::SA_BROKEN_IPC, to_string(err)); } - - DisposeErr disposeErr = AppGalleryDisposeProxy::GetInstance()->EndRestore(bundleName); - HILOGI("RestoreOnBundleFinished EndRestore, code=%{public}d, bundleName=%{public}s", disposeErr, - bundleName.c_str()); } void ServiceReverseProxy::RestoreOnAllBundlesFinished(int32_t errCode) -- Gitee