From 4b0d3794d43bec90b6f5069536cc0e3342c61df9 Mon Sep 17 00:00:00 2001 From: huaqingsimeng Date: Fri, 15 Sep 2023 16:47:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A4=87=E4=BB=BD=E6=81=A2?= =?UTF-8?q?=E5=A4=8Dhilog=E7=BB=B4=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huaqingsimeng --- .../backup_kit_inner/src/b_session_restore_async.cpp | 7 ++++++- services/backup_sa/src/module_ipc/service.cpp | 1 + services/backup_sa/src/module_ipc/svc_session_manager.cpp | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/frameworks/native/backup_kit_inner/src/b_session_restore_async.cpp b/frameworks/native/backup_kit_inner/src/b_session_restore_async.cpp index c3f0b8ee8..19ba21e78 100644 --- a/frameworks/native/backup_kit_inner/src/b_session_restore_async.cpp +++ b/frameworks/native/backup_kit_inner/src/b_session_restore_async.cpp @@ -121,6 +121,7 @@ void BSessionRestoreAsync::OnBackupServiceDied() void BSessionRestoreAsync::PopBundleInfo() { + HILOGE("Start"); AppendBundleInfo info; isAppend_.store(true); { @@ -137,6 +138,7 @@ void BSessionRestoreAsync::PopBundleInfo() void BSessionRestoreAsync::AppendBundlesImpl(AppendBundleInfo info) { + HILOGD("Start"); auto proxy = ServiceProxy::GetInstance(); if (proxy == nullptr) { return OnBundleStarted(BError(BError::Codes::SDK_BROKEN_IPC, "Failed to get backup service").GetCode(), @@ -152,10 +154,13 @@ void BSessionRestoreAsync::AppendBundlesImpl(AppendBundleInfo info) .onBackupServiceDied = onBackupServiceDied}; int32_t res = proxy->InitRestoreSession(new ServiceReverse(callbacksTmp)); if (res != 0) { - HILOGE("Failed to Restore because of %{public}d", res); + HILOGE("Failed to Init Restore because of %{public}d", res); BError(BError::Codes::SDK_BROKEN_IPC, "Failed to int restore session").GetCode(); return OnBundleStarted(res, info.bundlesToRestore); } + for (auto &bundleName : info.bundlesToRestore) { + HILOGD("Append bundleName: %{public}s", bundleName.c_str()); + } res = proxy->AppendBundlesRestoreSession(move(info.remoteCap), info.bundlesToRestore, info.restoreType, info.userId); if (res != 0) { diff --git a/services/backup_sa/src/module_ipc/service.cpp b/services/backup_sa/src/module_ipc/service.cpp index 9b77fdf77..0607ac933 100644 --- a/services/backup_sa/src/module_ipc/service.cpp +++ b/services/backup_sa/src/module_ipc/service.cpp @@ -246,6 +246,7 @@ ErrCode Service::AppendBundlesRestoreSession(UniqueFd fd, } session_->AppendBundles(bundleNames); for (auto bundleName : bundleNames) { + HILOGD("bundleName: %{public}s", bundleName.c_str()); for (auto &&bundleInfo : bundleInfos) { if (bundleInfo.name != bundleName) { continue; 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 9b5f1abf6..f679f14a2 100644 --- a/services/backup_sa/src/module_ipc/svc_session_manager.cpp +++ b/services/backup_sa/src/module_ipc/svc_session_manager.cpp @@ -388,6 +388,7 @@ void SvcSessionManager::AppendBundles(const vector &bundleNames) } for (auto &&bundleName : bundleNames) { + HILOGD("bundleName: %{public}s", bundleName.c_str()); BackupExtInfo info {}; info.backUpConnection = GetBackupExtAbility(bundleName); impl_.backupExtNameMap.insert(make_pair(bundleName, info)); -- Gitee