From 484771ddf18fc50d5f109e3786c36099737f3494 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=A1=A2?= Date: Mon, 31 Jul 2023 06:21:39 +0000 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E4=BB=BD=E6=81=A2=E5=A4=8D=E6=A1=86?= =?UTF-8?q?=E6=9E=B6=E5=91=8A=E8=AD=A6=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王桢 --- frameworks/native/backup_ext/include/ext_backup.h | 3 +-- frameworks/native/backup_ext/src/ext_backup.cpp | 1 - frameworks/native/backup_ext/src/ext_backup_js.cpp | 7 +------ frameworks/native/backup_ext/src/ext_extension.cpp | 2 +- 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/frameworks/native/backup_ext/include/ext_backup.h b/frameworks/native/backup_ext/include/ext_backup.h index f96fa6b92..2b2ce8740 100644 --- a/frameworks/native/backup_ext/include/ext_backup.h +++ b/frameworks/native/backup_ext/include/ext_backup.h @@ -78,7 +78,6 @@ public: */ sptr OnConnect(const AAFwk::Want &want) override; - /** * @brief Called when all abilities connected to this Wallpaper extension are disconnected. * @@ -153,4 +152,4 @@ private: }; } // namespace OHOS::FileManagement::Backup -#endif // OHOS_FILEMGMT_BACKUP_EXT_BACKUP_H \ No newline at end of file +#endif // OHOS_FILEMGMT_BACKUP_EXT_BACKUP_H diff --git a/frameworks/native/backup_ext/src/ext_backup.cpp b/frameworks/native/backup_ext/src/ext_backup.cpp index 0bd7341a4..30ca48335 100644 --- a/frameworks/native/backup_ext/src/ext_backup.cpp +++ b/frameworks/native/backup_ext/src/ext_backup.cpp @@ -180,7 +180,6 @@ sptr ExtBackup::OnConnect(const AAFwk::Want &want) } return remoteObject->AsObject(); - } catch (const BError &e) { return nullptr; } catch (const exception &e) { diff --git a/frameworks/native/backup_ext/src/ext_backup_js.cpp b/frameworks/native/backup_ext/src/ext_backup_js.cpp index c82e9d311..f2e602382 100644 --- a/frameworks/native/backup_ext/src/ext_backup_js.cpp +++ b/frameworks/native/backup_ext/src/ext_backup_js.cpp @@ -237,23 +237,19 @@ int ExtBackupJs::CallJsMethod(const std::string &funcName, const std::vector &argv, ResultValueParser retParser) { - uv_loop_s *loop = nullptr; napi_status status = napi_get_uv_event_loop(reinterpret_cast(&jsRuntime.GetNativeEngine()), &loop); if (status != napi_ok) { - HILOGE("failed to get uv event loop."); return EINVAL; } auto param = std::make_shared(funcName, &jsRuntime, jsObj, argv, retParser); if (param == nullptr) { - HILOGE("failed to new param."); return EINVAL; } auto work = std::make_shared(); if (work == nullptr) { - HILOGE("failed to new uv_work_t."); return EINVAL; } @@ -276,7 +272,6 @@ int ExtBackupJs::CallJsMethod(const std::string &funcName, param->backupOperateCondition.notify_one(); }); if (ret != 0) { - HILOGE("failed to exec uv_queue_work."); return EINVAL; } @@ -285,4 +280,4 @@ int ExtBackupJs::CallJsMethod(const std::string &funcName, return ERR_OK; } -} // namespace OHOS::FileManagement::Backup \ No newline at end of file +} // namespace OHOS::FileManagement::Backup diff --git a/frameworks/native/backup_ext/src/ext_extension.cpp b/frameworks/native/backup_ext/src/ext_extension.cpp index 4a3bcd122..8f43e3383 100644 --- a/frameworks/native/backup_ext/src/ext_extension.cpp +++ b/frameworks/native/backup_ext/src/ext_extension.cpp @@ -573,4 +573,4 @@ void BackupExtExtension::AsyncTaskRestoreForUpgrade() } }); } -} // namespace OHOS::FileManagement::Backup \ No newline at end of file +} // namespace OHOS::FileManagement::Backup -- Gitee