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 5818f706143c1feaf465a52627a752668e0e27e5..6b9176f3978e959e0d59fc098652a1d25dedfa69 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 28fe3e3124c2cf941d4c5dbe7e955f0ef6bb433f..4f4ef4809116731041ae089e1b1e478833013f9f 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 b1f7a6e6c210a1c879dbb4e04371110d30efa941..efe357b202253a3788f67a905d1f49d1a625108d 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)