From df63cbde4ec92eac44d07389be94fc9144cfb5e5 Mon Sep 17 00:00:00 2001 From: z30054037 Date: Thu, 16 Nov 2023 06:24:52 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A4=87=E4=BB=BD=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=9C=A8=E6=81=A2=E5=A4=8D=E6=97=B6=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E5=BA=94=E7=94=A8=E5=B8=82=E5=9C=BA=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BC=A0=E9=80=92=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: z30054037 Change-Id: I34884f146f63168865f5d26a8a87cfe02e488393 --- services/backup_sa/BUILD.gn | 1 + .../app_gallery_dispose_proxy.h | 64 ++++++++++ .../app_gallery_service_connection.h | 78 ++++++++++++ .../module_app_gallery/i_appgallery_service.h | 44 +++++++ .../app_gallery_dispose_proxy.cpp | 116 ++++++++++++++++++ .../src/module_ipc/service_reverse_proxy.cpp | 9 ++ 6 files changed, 312 insertions(+) create mode 100644 services/backup_sa/include/module_app_gallery/app_gallery_dispose_proxy.h create mode 100644 services/backup_sa/include/module_app_gallery/app_gallery_service_connection.h create mode 100644 services/backup_sa/include/module_app_gallery/i_appgallery_service.h create mode 100644 services/backup_sa/src/module_app_gallery/app_gallery_dispose_proxy.cpp diff --git a/services/backup_sa/BUILD.gn b/services/backup_sa/BUILD.gn index d589c50d6..cf8de03ca 100644 --- a/services/backup_sa/BUILD.gn +++ b/services/backup_sa/BUILD.gn @@ -16,6 +16,7 @@ import("//foundation/filemanagement/app_file_service/backup.gni") ohos_shared_library("backup_sa") { sources = [ + "src/module_app_gallery/app_gallery_dispose_proxy.cpp", "src/module_external/bms_adapter.cpp", "src/module_external/inner_receiver_impl.cpp", "src/module_external/sms_adapter.cpp", diff --git a/services/backup_sa/include/module_app_gallery/app_gallery_dispose_proxy.h b/services/backup_sa/include/module_app_gallery/app_gallery_dispose_proxy.h new file mode 100644 index 000000000..536e6d11b --- /dev/null +++ b/services/backup_sa/include/module_app_gallery/app_gallery_dispose_proxy.h @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef OHOS_FILEMGMT_BACKUP_APP_GALLERY_DISPOSE_PROXY_H +#define OHOS_FILEMGMT_BACKUP_APP_GALLERY_DISPOSE_PROXY_H + +#include +#include + +#include + +#include "i_appgallery_service.h" + +namespace OHOS::FileManagement::Backup { +enum class DisposeErr { + OK = 0, + CONN_FAIL = 1, + IPC_FAIL = 2, + REQUEST_FAIL = 3, +}; + +class AppGalleryDisposeProxy : public IRemoteStub { +public: + DISALLOW_COPY_AND_MOVE(AppGalleryDisposeProxy); + + AppGalleryDisposeProxy(); + ~AppGalleryDisposeProxy(); + + static sptr GetInstance(); + + DisposeErr StartBackup(const std::string &bundleName); + DisposeErr EndBackup(const std::string &bundleName); + DisposeErr StartRestore(const std::string &bundleName); + DisposeErr EndRestore(const std::string &bundleName); + + static std::condition_variable conditionVal_; + static std::string abilityName; + static std::mutex appRemoteObjLock_; + static std::mutex connectMutex; + static sptr appRemoteObj_; + +private: + DisposeErr DoDispose(const std::string &bundleName, DisposeOperation disposeOperation); + +private: + static std::mutex instanceLock_; + static std::mutex conditionMutex_; + static sptr appGalleryDisposeProxyInstance_; +}; +} // namespace OHOS::FileManagement::Backup + +#endif // OHOS_FILEMGMT_BACKUP_APP_GALLERY_DISPOSE_PROXY_H \ No newline at end of file diff --git a/services/backup_sa/include/module_app_gallery/app_gallery_service_connection.h b/services/backup_sa/include/module_app_gallery/app_gallery_service_connection.h new file mode 100644 index 000000000..8f0216702 --- /dev/null +++ b/services/backup_sa/include/module_app_gallery/app_gallery_service_connection.h @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef OHOS_FILEMGMT_BACKUP_APP_GALLERY_SERVICE_CONNECTION_H +#define OHOS_FILEMGMT_BACKUP_APP_GALLERY_SERVICE_CONNECTION_H + +#include +#include +#include + +#include "ability_manager_client.h" +#include "ability_connect_callback_stub.h" +#include "want.h" + +#include "i_appgallery_service.h" +#include "filemgmt_libhilog.h" + +namespace OHOS::FileManagement::Backup { +using namespace OHOS::AppExecFwk; +const std::string APP_GALLERY_PKG_NAME = "backup"; +const int32_t CONNECT_TIME = 5; + +template class AppGralleryConnection : public AbilityConnectionStub { +public: + void OnAbilityConnectDone(const AppExecFwk::ElementName &element, const sptr &remoteObject, + int resultCode) + { + std::string uri = element.GetURI(); + HILOGI("OnAbilityConnectDone, uri = %{public}s", uri.c_str()); + T::appRemoteObj_ = remoteObject; + T::conditionVal_.notify_one(); + } + + void OnAbilityDisconnectDone(const AppExecFwk::ElementName &element, int resultCode) + { + std::string uri = element.GetURI(); + HILOGI("OnAbilityDisconnectDone, uri = %{public}s", uri.c_str()); + T::appRemoteObj_ = nullptr; + } +}; + +template bool ConnectExtAbility() +{ + HILOGI("ConnectExtAbility called"); + std::lock_guard autoLock(T::appRemoteObjLock_); + if (T::appRemoteObj_ != nullptr) { + return true; + } + + Want want; + want.SetElementName(APP_GALLERY_PKG_NAME, T::abilityName); + sptr connect = new AppGralleryConnection(); + auto ret = AbilityManagerClient::GetInstance()->ConnectAbility(want, connect, -1); + + std::unique_lock uniqueLock(T::connectMutex); + T::conditionVal_.wait_for(uniqueLock, std::chrono::seconds(CONNECT_TIME)); + if (ret != IAppGalleryService::ERR_OK || T::appRemoteObj_ == nullptr) { + HILOGI("ConnectExtAbility failed, ret=%{public}d", ret); + T::appRemoteObj_ = nullptr; + return false; + } + HILOGI("ConnectExtAbility success, ret=%{public}d", ret); + return true; +}; +} // namespace OHOS::FileManagement::Backup +#endif // OHOS_FILEMGMT_BACKUP_APP_GALLERY_SERVICE_CONNECTION_H \ No newline at end of file diff --git a/services/backup_sa/include/module_app_gallery/i_appgallery_service.h b/services/backup_sa/include/module_app_gallery/i_appgallery_service.h new file mode 100644 index 000000000..3d58f3497 --- /dev/null +++ b/services/backup_sa/include/module_app_gallery/i_appgallery_service.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef OHOS_FILEMGMT_BACKUP_I_APP_GALLERY_SERVICE_H +#define OHOS_FILEMGMT_BACKUP_I_APP_GALLERY_SERVICE_H + +#include + +#include "iremote_proxy.h" + +namespace OHOS::FileManagement::Backup { +class IAppGalleryService : public OHOS::IRemoteBroker { +public: + DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.FileManagement.Backup.IAppGalleryService"); + + enum class DisposeOperation { + START_RESTORE = 3, + END_RESTORE = 4, + START_BACKUP = 5, + END_BACKUP = 6, + }; + + enum Errcode { + ERR_BASE = (-99), + ERR_FAILED = (-1), + ERR_PERMISSION_DENIED = (-2), + ERR_OK = 0, + }; +}; +} // namespace OHOS::FileManagement::Backup + +#endif // OHOS_FILEMGMT_BACKUP_I_APP_GALLERY_SERVICE_H \ No newline at end of file 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 new file mode 100644 index 000000000..a176b7ccf --- /dev/null +++ b/services/backup_sa/src/module_app_gallery/app_gallery_dispose_proxy.cpp @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include "message_parcel.h" +#include "nlohmann/json.hpp" +#include "want.h" + +#include "module_app_gallery/app_gallery_dispose_proxy.h" +#include "module_app_gallery/app_gallery_service_connection.h" +#include "filemgmt_libhilog.h" + +namespace OHOS::FileManagement::Backup { +using namespace std; + +mutex AppGalleryDisposeProxy::instanceLock_; +mutex AppGalleryDisposeProxy::conditionMutex_; + +string AppGalleryDisposeProxy::abilityName = "AppFoundationServiceExtensionAbility"; +sptr AppGalleryDisposeProxy::appRemoteObj_; +condition_variable AppGalleryDisposeProxy::conditionVal_; +mutex AppGalleryDisposeProxy::appRemoteObjLock_; +mutex AppGalleryDisposeProxy::connectMutex; +sptr AppGalleryDisposeProxy::appGalleryDisposeProxyInstance_; + +AppGalleryDisposeProxy::AppGalleryDisposeProxy() +{ + HILOGI("AppGalleryDisposeProxy constructor"); +} + +AppGalleryDisposeProxy::~AppGalleryDisposeProxy() +{ + HILOGI("AppGalleryDisposeProxy destructor"); +} + +sptr AppGalleryDisposeProxy::GetInstance() +{ + if (appGalleryDisposeProxyInstance_ == nullptr) { + lock_guard autoLock(instanceLock_); + if (appGalleryDisposeProxyInstance_ == nullptr) { + appGalleryDisposeProxyInstance_ = new AppGalleryDisposeProxy; + } + } + + return appGalleryDisposeProxyInstance_; +} + +DisposeErr AppGalleryDisposeProxy::StartBackup(const std::string &bundleName) +{ + HILOGI("StartBackup, app %{public}s", bundleName.c_str()); + return DoDispose(bundleName, DisposeOperation::START_BACKUP); +} + +DisposeErr AppGalleryDisposeProxy::EndBackup(const std::string &bundleName) +{ + HILOGI("EndBackup, app %{public}s", bundleName.c_str()); + return DoDispose(bundleName, DisposeOperation::END_BACKUP); +} + +DisposeErr AppGalleryDisposeProxy::StartRestore(const std::string &bundleName) +{ + HILOGI("StartRestore, app %{public}s", bundleName.c_str()); + return DoDispose(bundleName, DisposeOperation::START_RESTORE); +} + +DisposeErr AppGalleryDisposeProxy::EndRestore(const std::string &bundleName) +{ + HILOGI("EndRestore, app %{public}s", bundleName.c_str()); + return DoDispose(bundleName, DisposeOperation::END_RESTORE); +} + +DisposeErr AppGalleryDisposeProxy::DoDispose(const std::string &bundleName, DisposeOperation disposeOperation) +{ + HILOGI("DoDispose, app %{public}s, operation %{public}d", bundleName.c_str(), disposeOperation); + if (!ConnectExtAbility() || appRemoteObj_ == nullptr) { + HILOGI("Can not connect to %{public}s", bundleName.c_str()); + return DisposeErr::CONN_FAIL; + } + + MessageParcel data; + if (!data.WriteString16(Str8ToStr16(bundleName))) { + HILOGI("write ownerInfo and bundleName failed"); + return DisposeErr::IPC_FAIL; + } + + if (!data.WriteRemoteObject(this)) { + HILOGI("write RemoteObject failed"); + return DisposeErr::IPC_FAIL; + } + + MessageParcel reply; + MessageOption option(MessageOption::TF_ASYNC); + auto ret = appRemoteObj_->SendRequest(static_cast(disposeOperation), data, reply, option); + if (ret != ERR_NONE) { + HILOGI("SendRequest error, code=%{public}d, bundleName=%{public}s", disposeOperation, bundleName.c_str()); + return DisposeErr::REQUEST_FAIL; + } + + HILOGI("SendRequest error, code=%{public}d, bundleName=%{public}s", disposeOperation, bundleName.c_str()); + return DisposeErr::OK; +} + +} // namespace OHOS::FileManagement::Backup \ No newline at end of file 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 6dd0e4100..b403037a8 100644 --- a/services/backup_sa/src/module_ipc/service_reverse_proxy.cpp +++ b/services/backup_sa/src/module_ipc/service_reverse_proxy.cpp @@ -15,6 +15,7 @@ #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" @@ -114,6 +115,10 @@ void ServiceReverseProxy::RestoreOnBundleStarted(int32_t errCode, string bundleN err != ERR_OK) { throw BError(BError::Codes::SA_BROKEN_IPC, to_string(err)); } + AppGalleryDisposeProxy appGalleryDisposeProxy; + DisposeErr disposeErr = appGalleryDisposeProxy.StartRestore(bundleName); + HILOGI("AppGalleryDisposeProxy StartRestore, code=%{public}d, bundleName=%{public}s", disposeErr, + bundleName.c_str()); } void ServiceReverseProxy::RestoreOnBundleFinished(int32_t errCode, string bundleName) @@ -133,6 +138,10 @@ void ServiceReverseProxy::RestoreOnBundleFinished(int32_t errCode, string bundle err != ERR_OK) { throw BError(BError::Codes::SA_BROKEN_IPC, to_string(err)); } + + AppGalleryDisposeProxy appGalleryDisposeProxy; + DisposeErr disposeErr = appGalleryDisposeProxy.EndRestore(bundleName); + HILOGI("AppGalleryDisposeProxy EndRestore, code=%{public}d, bundleName=%{public}s", disposeErr, bundleName.c_str()); } void ServiceReverseProxy::RestoreOnAllBundlesFinished(int32_t errCode) -- Gitee From 135a1bbe0d4e3737d3461e2ed3ecb880785428b7 Mon Sep 17 00:00:00 2001 From: z30054037 Date: Thu, 16 Nov 2023 10:31:10 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A4=87=E4=BB=BD=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=9C=A8=E6=81=A2=E5=A4=8D=E6=97=B6=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E5=BA=94=E7=94=A8=E5=B8=82=E5=9C=BA=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BC=A0=E9=80=92=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: z30054037 Change-Id: If6694dad5ce4b39fa377d797afb7a2f345e3cffe --- .../backup_sa/include/module_app_gallery/i_appgallery_service.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/backup_sa/include/module_app_gallery/i_appgallery_service.h b/services/backup_sa/include/module_app_gallery/i_appgallery_service.h index 3d58f3497..16a065cba 100644 --- a/services/backup_sa/include/module_app_gallery/i_appgallery_service.h +++ b/services/backup_sa/include/module_app_gallery/i_appgallery_service.h @@ -21,7 +21,7 @@ #include "iremote_proxy.h" namespace OHOS::FileManagement::Backup { -class IAppGalleryService : public OHOS::IRemoteBroker { +class IAppGalleryService : public OHOS::IRemoteBroker { public: DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.FileManagement.Backup.IAppGalleryService"); -- Gitee From 67f8beda1968ce63213aefde871dfcaddbf96a71 Mon Sep 17 00:00:00 2001 From: z30054037 Date: Thu, 16 Nov 2023 12:38:55 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=E5=A4=87=E4=BB=BD=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=9C=A8=E6=81=A2=E5=A4=8D=E6=97=B6=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E5=BA=94=E7=94=A8=E5=B8=82=E5=9C=BA=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BC=A0=E9=80=92=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: z30054037 Change-Id: Ie149506697ae5c29c524376b5ced7bee1600071a --- .../module_app_gallery/app_gallery_dispose_proxy.h | 1 + .../app_gallery_service_connection.h | 3 +-- .../module_app_gallery/app_gallery_dispose_proxy.cpp | 1 + services/backup_sa/src/module_ipc/service.cpp | 12 ++++++++++++ .../src/module_ipc/service_reverse_proxy.cpp | 4 ---- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/services/backup_sa/include/module_app_gallery/app_gallery_dispose_proxy.h b/services/backup_sa/include/module_app_gallery/app_gallery_dispose_proxy.h index 536e6d11b..d9f7bb569 100644 --- a/services/backup_sa/include/module_app_gallery/app_gallery_dispose_proxy.h +++ b/services/backup_sa/include/module_app_gallery/app_gallery_dispose_proxy.h @@ -47,6 +47,7 @@ public: static std::condition_variable conditionVal_; static std::string abilityName; + static std::string pkgName; static std::mutex appRemoteObjLock_; static std::mutex connectMutex; static sptr appRemoteObj_; diff --git a/services/backup_sa/include/module_app_gallery/app_gallery_service_connection.h b/services/backup_sa/include/module_app_gallery/app_gallery_service_connection.h index 8f0216702..643bf1b90 100644 --- a/services/backup_sa/include/module_app_gallery/app_gallery_service_connection.h +++ b/services/backup_sa/include/module_app_gallery/app_gallery_service_connection.h @@ -29,7 +29,6 @@ namespace OHOS::FileManagement::Backup { using namespace OHOS::AppExecFwk; -const std::string APP_GALLERY_PKG_NAME = "backup"; const int32_t CONNECT_TIME = 5; template class AppGralleryConnection : public AbilityConnectionStub { @@ -60,7 +59,7 @@ template bool ConnectExtAbility() } Want want; - want.SetElementName(APP_GALLERY_PKG_NAME, T::abilityName); + want.SetElementName(T::pkgName, T::abilityName); sptr connect = new AppGralleryConnection(); auto ret = AbilityManagerClient::GetInstance()->ConnectAbility(want, connect, -1); 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 a176b7ccf..f7c7ad6c5 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 @@ -30,6 +30,7 @@ mutex AppGalleryDisposeProxy::instanceLock_; mutex AppGalleryDisposeProxy::conditionMutex_; string AppGalleryDisposeProxy::abilityName = "AppFoundationServiceExtensionAbility"; +string AppGalleryDisposeProxy::pkgName = "com.huawei.hmsapp.appgallery"; sptr AppGalleryDisposeProxy::appRemoteObj_; condition_variable AppGalleryDisposeProxy::conditionVal_; mutex AppGalleryDisposeProxy::appRemoteObjLock_; diff --git a/services/backup_sa/src/module_ipc/service.cpp b/services/backup_sa/src/module_ipc/service.cpp index 39b063594..842693b7f 100644 --- a/services/backup_sa/src/module_ipc/service.cpp +++ b/services/backup_sa/src/module_ipc/service.cpp @@ -48,6 +48,7 @@ #include "bundle_mgr_client.h" #include "filemgmt_libhilog.h" #include "ipc_skeleton.h" +#include "module_app_gallery/app_gallery_dispose_proxy.h" #include "module_external/bms_adapter.h" #include "module_ipc/svc_backup_connection.h" #include "module_ipc/svc_restore_deps_manager.h" @@ -455,6 +456,12 @@ ErrCode Service::LaunchBackupExtension(const BundleName &bundleName) { try { HILOGE("begin %{public}s", bundleName.data()); + + AppGalleryDisposeProxy appGalleryDisposeProxy; + DisposeErr disposeErr = appGalleryDisposeProxy.StartRestore(bundleName); + HILOGI("AppGalleryDisposeProxy StartRestore, code=%{public}d, bundleName=%{public}s", disposeErr, + bundleName.c_str()); + IServiceReverse::Scenario scenario = session_->GetScenario(); BConstants::ExtensionAction action; if (scenario == IServiceReverse::Scenario::BACKUP) { @@ -626,6 +633,11 @@ void Service::ExtConnectFailed(const string &bundleName, ErrCode ret) session_->GetServiceReverseProxy()->BackupOnBundleStarted(ret, bundleName); } else if (scenario == IServiceReverse::Scenario::RESTORE) { session_->GetServiceReverseProxy()->RestoreOnBundleStarted(ret, bundleName); + + AppGalleryDisposeProxy appGalleryDisposeProxy; + DisposeErr disposeErr = appGalleryDisposeProxy.EndRestore(bundleName); + HILOGI("AppGalleryDisposeProxy EndRestore, code=%{public}d, bundleName=%{public}s", disposeErr, + bundleName.c_str()); } ClearSessionAndSchedInfo(bundleName); return; 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 b403037a8..744663ccc 100644 --- a/services/backup_sa/src/module_ipc/service_reverse_proxy.cpp +++ b/services/backup_sa/src/module_ipc/service_reverse_proxy.cpp @@ -115,10 +115,6 @@ void ServiceReverseProxy::RestoreOnBundleStarted(int32_t errCode, string bundleN err != ERR_OK) { throw BError(BError::Codes::SA_BROKEN_IPC, to_string(err)); } - AppGalleryDisposeProxy appGalleryDisposeProxy; - DisposeErr disposeErr = appGalleryDisposeProxy.StartRestore(bundleName); - HILOGI("AppGalleryDisposeProxy StartRestore, code=%{public}d, bundleName=%{public}s", disposeErr, - bundleName.c_str()); } void ServiceReverseProxy::RestoreOnBundleFinished(int32_t errCode, string bundleName) -- Gitee