From cb2760b897a1a64126028e4873e0b4f3eefcb0ec Mon Sep 17 00:00:00 2001 From: sun_fan Date: Wed, 20 Oct 2021 21:18:18 +0800 Subject: [PATCH 1/4] updater: fix logo bugs Signed-off-by: sun_fan --- services/ui/progress_bar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/ui/progress_bar.cpp b/services/ui/progress_bar.cpp index 4b8f044d..4a724170 100644 --- a/services/ui/progress_bar.cpp +++ b/services/ui/progress_bar.cpp @@ -36,9 +36,9 @@ ProgressBar::ProgressBar(const int mStartX, const int mStartY, const int w, cons progressColor_.g = DEFAULT_NORMAL_COLOR; progressColor_.b = DEFAULT_NORMAL_COLOR; progressColor_.a = DEFAULT_NORMAL_COLOR; - normalColor_.r = DEFAULT_PROGRESS_COLOR; + normalColor_.r = DEFAULT_NORMAL_COLOR; normalColor_.g = DEFAULT_PROGRESS_COLOR; - normalColor_.b = DEFAULT_NORMAL_COLOR; + normalColor_.b = DEFAULT_PROGRESS_COLOR; normalColor_.a = DEFAULT_NORMAL_COLOR; DrawBackground(); } -- Gitee From 6198b9d9740c9bb6b5fdb4509b7ee203d7397fa1 Mon Sep 17 00:00:00 2001 From: sun_fan Date: Thu, 21 Oct 2021 09:50:29 +0800 Subject: [PATCH 2/4] updater: fix codedex Signed-off-by: sun_fan --- services/ui/progress_bar.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/ui/progress_bar.cpp b/services/ui/progress_bar.cpp index 4a724170..48e474cf 100644 --- a/services/ui/progress_bar.cpp +++ b/services/ui/progress_bar.cpp @@ -24,12 +24,12 @@ constexpr int DEFAULT_NORMAL_COLOR = 0xFF; constexpr int MAX_PROGRESS_VALUE = 100; constexpr uint32_t DEFAULT_PROGRESS_COLOR = 0x00; -ProgressBar::ProgressBar(const int mStartX, const int mStartY, const int w, const int h, Frame *mParent) +ProgressBar::ProgressBar(const int StartX, const int StartY, const int w, const int h, Frame *Parent) { - startX_ = mStartX; - startY_ = mStartY; + startX_ = StartX; + startY_ = StartY; this->CreateBuffer(w, h, View::PixelFormat::BGRA888); - parent_ = mParent; + parent_ = Parent; SetFocusAble(false); parent_->ViewRegister(this); progressColor_.r = DEFAULT_NORMAL_COLOR; -- Gitee From aac82a37c2e2de673e28dd1eacc9c869dc9a8f0f Mon Sep 17 00:00:00 2001 From: sun_fan Date: Thu, 21 Oct 2021 10:11:35 +0800 Subject: [PATCH 3/4] updater: fix codedex Signed-off-by: sun_fan --- services/ui/progress_bar.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/ui/progress_bar.cpp b/services/ui/progress_bar.cpp index 48e474cf..d3df1185 100644 --- a/services/ui/progress_bar.cpp +++ b/services/ui/progress_bar.cpp @@ -24,12 +24,12 @@ constexpr int DEFAULT_NORMAL_COLOR = 0xFF; constexpr int MAX_PROGRESS_VALUE = 100; constexpr uint32_t DEFAULT_PROGRESS_COLOR = 0x00; -ProgressBar::ProgressBar(const int StartX, const int StartY, const int w, const int h, Frame *Parent) +ProgressBar::ProgressBar(const int startX, const int startY, const int w, const int h, Frame *parent) { - startX_ = StartX; - startY_ = StartY; + startX_ = startX; + startY_ = startY; this->CreateBuffer(w, h, View::PixelFormat::BGRA888); - parent_ = Parent; + parent_ = parent; SetFocusAble(false); parent_->ViewRegister(this); progressColor_.r = DEFAULT_NORMAL_COLOR; -- Gitee From 3056b6cfb806d600ab994d8e74fe067125f4bb4a Mon Sep 17 00:00:00 2001 From: sun_fan Date: Thu, 21 Oct 2021 10:19:33 +0800 Subject: [PATCH 4/4] updater: fix loger level Signed-off-by: sun_fan --- services/main.cpp | 2 +- services/updater.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/main.cpp b/services/main.cpp index e492a280..bb29543f 100644 --- a/services/main.cpp +++ b/services/main.cpp @@ -39,7 +39,7 @@ int main(int argc, char **argv) const int flashBootLength = 10; bool useFlash = memcmp(boot.command, "boot_flash", flashBootLength) == 0; InitUpdaterLogger(useFlash ? "FLASHD" : "UPDATER", TMP_LOG, TMP_STAGE_LOG, TMP_ERROR_CODE_PATH); - SetLogLevel(VERBOSE); + SetLogLevel(INFO); LoadFstab(); STAGE(UPDATE_STAGE_OUT) << "Init Params: " << boot.update; LOG(INFO) << "boot.command " << boot.command; diff --git a/services/updater.cpp b/services/updater.cpp index caccbbfe..9448d4b1 100644 --- a/services/updater.cpp +++ b/services/updater.cpp @@ -247,7 +247,7 @@ static void HandleChildOutput(const std::string &buffer, int32_t bufferLen, } else if (outputHeader == "set_progress") { HandleProgressSet(output); } else { - LOG(DEBUG) << "Child process returns unexpected message: " << outputHeader; + LOG(WARNING) << "Child process returns unexpected message: " << outputHeader; } } -- Gitee