From e0cfa450cbc06358e3d53661d9323acee3355210 Mon Sep 17 00:00:00 2001 From: Rayllll Date: Wed, 12 Mar 2025 16:47:00 +0800 Subject: [PATCH 1/2] Signed-off-by: Rayllll notify not find sdcard pkg --- services/updater_main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/updater_main.cpp b/services/updater_main.cpp index b736a883..71f8f3f3 100644 --- a/services/updater_main.cpp +++ b/services/updater_main.cpp @@ -621,6 +621,9 @@ UpdaterStatus UpdaterFromSdcard(UpdaterParams &upParams) SetMessageToMisc(upParams.miscCmd, 0, "sdcard_update"); if (CheckSdcardPkgs(upParams) != UPDATE_SUCCESS) { LOG(ERROR) << "can not find sdcard packages"; + if (NotifyActionResult(upParams, status, {SET_INSTALL_STATUS}) != UPDATE_SUCCESS) { + LOG(ERROR) << "notify action fail"; + } return UPDATE_ERROR; } UpdaterStatus status = PreSdcardUpdatePackages(upParams); -- Gitee From 6f2ccd07c70a1aa975ae59f5c1bc57102af9f439 Mon Sep 17 00:00:00 2001 From: Rayllll Date: Wed, 12 Mar 2025 16:47:00 +0800 Subject: [PATCH 2/2] Signed-off-by: Rayllll notify not find sdcard pkg Signed-off-by: Rayllll --- services/updater_main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/services/updater_main.cpp b/services/updater_main.cpp index b736a883..01f324b5 100644 --- a/services/updater_main.cpp +++ b/services/updater_main.cpp @@ -619,11 +619,15 @@ UpdaterStatus UpdaterFromSdcard(UpdaterParams &upParams) UPDATER_INIT_RECORD; upParams.callbackProgress = [] (float value) { UPDATER_UI_INSTANCE.ShowProgress(value); }; SetMessageToMisc(upParams.miscCmd, 0, "sdcard_update"); - if (CheckSdcardPkgs(upParams) != UPDATE_SUCCESS) { + UpdaterStatus status = CheckSdcardPkgs(upParams); + if (status != UPDATE_SUCCESS) { LOG(ERROR) << "can not find sdcard packages"; + if (NotifyActionResult(upParams, status, {SET_INSTALL_STATUS}) != UPDATE_SUCCESS) { + LOG(ERROR) << "notify action fail"; + } return UPDATE_ERROR; } - UpdaterStatus status = PreSdcardUpdatePackages(upParams); + status = PreSdcardUpdatePackages(upParams); if (status == UPDATE_SUCCESS) { upParams.initialProgress += VERIFY_PERCENT; upParams.currentPercentage -= VERIFY_PERCENT; -- Gitee