From: luozheng <1732036298@qq.com> Date: Wed, 20 Mar 2024 12:05:24 +0000 (+0800) Subject: 添加关机动画 X-Git-Tag: release_V1.2.70_20241020_135402~1250^2~19^2~4 X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=e4e7c461de5fe83eb4b0cb86599a03c730262830;p=mirrors%2FFD230.git 添加关机动画 --- diff --git a/code/sdk/application/wearable/fd230app/CMakeLists.txt b/code/sdk/application/wearable/fd230app/CMakeLists.txt index ce419c505..8fc11ce15 100644 --- a/code/sdk/application/wearable/fd230app/CMakeLists.txt +++ b/code/sdk/application/wearable/fd230app/CMakeLists.txt @@ -180,6 +180,7 @@ set(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/rebootdevice/src/RebootModel.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/rebootdevice/src/RebootDeviceView.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/rebootdevice/src/ShutdownDeviceView.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/rebootdevice/src/ShutDownAnimatorView.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/callerlog/src/CallerLogView.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/callerlog/src/CallerLogPresenter.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/callerlog/src/CallerLogModel.cpp diff --git a/code/sdk/application/wearable/fd230app/nativelauncher/src/NativeLauncher.cpp b/code/sdk/application/wearable/fd230app/nativelauncher/src/NativeLauncher.cpp index 5b4f8d4c1..844d62643 100644 --- a/code/sdk/application/wearable/fd230app/nativelauncher/src/NativeLauncher.cpp +++ b/code/sdk/application/wearable/fd230app/nativelauncher/src/NativeLauncher.cpp @@ -55,8 +55,8 @@ #include "TempPresenter.h" #include "IndoorWalkPresenter.h" #include "IndoorWalkView.h" -#include "RebootView.h" -#include "RebootPresenter.h" +#include "rebootdevice/include/RebootView.h" +#include "rebootdevice/include/RebootPresenter.h" #include "UISampleView.h" #include "UISamplePresenter.h" diff --git a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/RebootDeviceView.h b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/RebootDeviceView.h index 95d01c265..b331447c0 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/RebootDeviceView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/RebootDeviceView.h @@ -1,7 +1,9 @@ /* - * Copyright (c) CompanyNameMagicTag 2022-2022. All rights reserved. - * Description: RebootDevice View - * Create: 2022-04-28 + * @Author: luozheng 1732036298@qq.com + * @Date: 2024-01-29 15:37:44 + * @LastEditors: luozheng 1732036298@qq.com + * @LastEditTime: 2024-03-20 10:52:37 + * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/RebootDeviceView.h */ #ifndef REBOOTDEVICE_VIEW_H #define REBOOTDEVICE_VIEW_H @@ -21,8 +23,8 @@ public: private: bool ShowUpRebootDeviceView(void); - UILabel *rebootDeviceLabel{nullptr}; - UIButton *rebootDeviceButton{nullptr}; + UILabel *rebootDeviceLabel{nullptr}; //重启标签 + UIButton *rebootDeviceButton{nullptr}; //重启按钮 UIViewGroup *group{nullptr}; }; } // namespace OHOS diff --git a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/RebootPresenter.h b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/RebootPresenter.h index 846a0f0cc..7037daf40 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/RebootPresenter.h +++ b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/RebootPresenter.h @@ -1,3 +1,11 @@ +/* + * @Author: luozheng 1732036298@qq.com + * @Date: 2024-01-29 15:37:44 + * @LastEditors: luozheng 1732036298@qq.com + * @LastEditTime: 2024-03-20 16:57:59 + * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/RebootPresenter.h + * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + */ /* * Copyright (c) CompanyNameMagicTag 2022-2022. All rights reserved. * Description: Reboot Presenter @@ -17,6 +25,7 @@ enum RebootPresenterNum : uint8_t { REBOOTVIEW = 0, REBOOTDEVICEVIEW, SHUTDOWNDEVICEVIEW, + SHUTDOWNANIMATORVIEW, //关机动画视图 REBOOT_MAX, }; diff --git a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/RebootView.h b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/RebootView.h index 458cffcf2..612c16479 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/RebootView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/RebootView.h @@ -1,20 +1,25 @@ /* - * Copyright (c) CompanyNameMagicTag 2022-2022. All rights reserved. - * Description: Reboot View - * Create: 2022-04-28 + * @Author: luozheng 1732036298@qq.com + * @Date: 2024-01-29 15:37:44 + * @LastEditors: luozheng 1732036298@qq.com + * @LastEditTime: 2024-03-20 20:01:01 + * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/RebootView.h */ + #ifndef REBOOT_VIEW_H #define REBOOT_VIEW_H #include "View.h" #include "ShutdownDeviceView.h" #include "RebootDeviceView.h" +#include "rebootdevice/include/ShutDownAnimatorView.h" #include "components/ui_view_group.h" #include "components/ui_label.h" #include "components/ui_button.h" - +#include "components/ui_image_animator.h" +#include "config/include/ConfigModel.h" namespace OHOS { -constexpr int16_t NUM_REBOOT_CONTAINER = 3; +constexpr int16_t NUM_REBOOT_CONTAINER = 4; class RebootPresenter; class RebootView : public View { @@ -33,6 +38,7 @@ private: bool ChangeRebootView(int16_t hideView, int16_t thisView); bool ChangeRebootDeviceView(int16_t hideView, int16_t thisView); bool ChangeShutdownDeviceView(int16_t hideView, int16_t thisView); + bool ChangeShutDownAnimatorView(int16_t hideView, int16_t thisView); bool CheckViewParam(int16_t hideView, int16_t showView); bool ShowUpRebootView(void); bool ShowUpShutdownView(void); @@ -43,6 +49,7 @@ private: UIViewGroup *group{nullptr}; RebootDeviceView *rebootDeviceView{nullptr}; ShutdownDeviceView *shutdownDeviceView{nullptr}; + ShutDownAnimatorView*shutDownAnimatorView{nullptr}; UIViewGroup *container[NUM_REBOOT_CONTAINER]{nullptr}; typedef bool (RebootView::*PreprosssChangeView)(int16_t hideView, int16_t thisView); PreprosssChangeView preProcessView[NUM_REBOOT_CONTAINER]; diff --git a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/ShutDownAnimatorView.h b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/ShutDownAnimatorView.h new file mode 100644 index 000000000..a41001825 --- /dev/null +++ b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/ShutDownAnimatorView.h @@ -0,0 +1,44 @@ +/* + * @Author: luozheng 1732036298@qq.com + * @Date: 2024-03-20 16:37:13 + * @LastEditors: luozheng 1732036298@qq.com + * @LastEditTime: 2024-03-20 19:33:40 + * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/ShutDownAnimatorView.h + */ + +#ifndef SHUTDOWN_ANIMATOR_VIEW_H +#define SHUTDOWN_ANIMATOR_VIEW_H + +#include "components/ui_view_group.h" +#include "components/ui_image_animator.h" + +namespace OHOS +{ + static constexpr int16_t SHUTDOWN_IMAGE_ANIMATOR_VIEW_X = 183; + static constexpr int16_t SHUTDOWN_IMAGE_ANIMATOR_VIEW_Y = 183; + static constexpr int16_t SHUTDOWN_IMAGE_ANIMATOR_VIEW_W = 100; + static constexpr int16_t SHUTDOWN_IMAGE_ANIMATOR_VIEW_H = 100; + static constexpr int16_t SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES = 70; // 图片帧数 + static constexpr int16_t SHUTDOWN_IMAGE_ANIMATOR_TIME = 100; // 图片更新间隔 + static constexpr char *ShutDownPaths = "/user/res/RebootAndShutDown/ShutDown/"; + class ShutDownAnimatorView + { + public: + ShutDownAnimatorView(); + ~ShutDownAnimatorView(); + static ShutDownAnimatorView *GetInstance(); + UIViewGroup *ShutDownAnimatorViewInit(void); + UIImageAnimatorView *GeShutDownImageAnimatorView(void); + + private: + void ClearAll(void); + bool ShowUpShutDownAnimatorView(); + const char **CreateImagePathsArray(const char *basePath, const char *fileExtension, int numImages); + void FreeImagePathsArray(const char **imagePaths, const int numImages); + UIViewGroup *group{nullptr}; + UIImageAnimatorView *ShutDownImageAnimatorView{nullptr}; // 关机动画 + ImageAnimatorInfo ShutDownImageInfo[SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES]; // 关机图像的信息 + const char **ShutDownPathsArray{nullptr}; // 关机图片路径数组 + }; +} +#endif \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/ShutdownDeviceView.h b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/ShutdownDeviceView.h index d291b0b4e..33d776dc4 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/ShutdownDeviceView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/ShutdownDeviceView.h @@ -21,8 +21,8 @@ public: private: bool ShowUpShutdownDeviceView(void); - UILabel *shutdownDeviceLabel{nullptr}; - UIButton *shutdownDeviceButton{nullptr}; + UILabel *shutdownDeviceLabel{nullptr}; //关机标签 + UIButton *shutdownDeviceButton{nullptr}; //关机按钮 UIViewGroup *group{nullptr}; }; } // namespace OHOS diff --git a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootDeviceView.cpp b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootDeviceView.cpp index 44210c037..bd714058c 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootDeviceView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootDeviceView.cpp @@ -4,7 +4,7 @@ * Create: 2022-04-28 */ -#include "RebootDeviceView.h" +#include "rebootdevice/include/RebootDeviceView.h" #include "wearable_log.h" #include "UiConfig.h" #include "RebootPresenter.h" @@ -37,6 +37,9 @@ RebootDeviceView *RebootDeviceView::GetInstance() return g_pRebootDeviceView; } +/* + * @brief 显示重启设备视图 +*/ bool RebootDeviceView::ShowUpRebootDeviceView() { if (rebootDeviceLabel == nullptr) { @@ -72,6 +75,9 @@ bool RebootDeviceView::ShowUpRebootDeviceView() return true; } +/* + * @brief 初始化重启视图 +*/ UIViewGroup *RebootDeviceView::InitShowUpView(void) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootDeviceView::InitShowUpView"); diff --git a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootModel.cpp index 1b2c15d31..f2c69ac93 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootModel.cpp @@ -8,6 +8,9 @@ #include "wearable_log.h" #include "NativeAbility.h" #include "errcode.h" +#include +#include +#include "power_display_service.h" namespace OHOS { RebootModel::RebootModel() {} @@ -49,9 +52,7 @@ namespace OHOS #ifdef __cplusplus } #endif -#include -#include -#include "power_display_service.h" + /* * @brief 长按四秒关机回调函数 */ diff --git a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootPresenter.cpp index fd81abf8a..da114272e 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootPresenter.cpp @@ -1,94 +1,123 @@ /* - * Copyright (c) CompanyNameMagicTag 2022-2022. All rights reserved. - * Description: Reboot Presenter - * Create: 2022-04-28 + * @Author: luozheng 1732036298@qq.com + * @Date: 2024-02-21 19:06:02 + * @LastEditors: luozheng 1732036298@qq.com + * @LastEditTime: 2024-03-20 19:47:13 + * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootPresenter.cpp */ - -#include "RebootPresenter.h" -#include "RebootView.h" -#include "RebootModel.h" +#include "rebootdevice/include/RebootPresenter.h" +#include "rebootdevice/include/RebootView.h" +#include "rebootdevice/include/RebootModel.h" #include "drag_event.h" #include "wearable_log.h" #include "custom_utils.h" -namespace OHOS { -static RebootPresenter *g_pRebootPresenter = nullptr; - -RebootPresenter::RebootPresenter() +#include "components/ui_image_animator.h" +namespace OHOS { - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootPresenter::RebootPresenter"); - g_pRebootPresenter = this; -} + static RebootPresenter *g_pRebootPresenter = nullptr; -RebootPresenter::~RebootPresenter() -{ - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootPresenter::~RebootPresenter"); - g_pRebootPresenter = nullptr; -} - -RebootPresenter *RebootPresenter::GetInstance() -{ - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootPresenter GetInstance"); - return g_pRebootPresenter; -} - -void RebootPresenter::OnStart() -{ - Presenter::OnStart(); - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootPresenter::On Start "); -} + RebootPresenter::RebootPresenter() + { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootPresenter::RebootPresenter"); + g_pRebootPresenter = this; + } -void RebootPresenter::OnPause(void) {} + RebootPresenter::~RebootPresenter() + { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootPresenter::~RebootPresenter"); + g_pRebootPresenter = nullptr; + } -void RebootPresenter::OnResume(void) {} + RebootPresenter *RebootPresenter::GetInstance() + { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootPresenter GetInstance"); + return g_pRebootPresenter; + } -void RebootPresenter::OnStop(void) {} + void RebootPresenter::OnStart() + { + Presenter::OnStart(); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootPresenter::On Start "); + } + void RebootPresenter::OnPause(void) {} -bool RebootPresenter::OnClick(UIView& view, const ClickEvent& event) -{ - UNUSED(event); - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "OnClick OnClick"); - if (strcmp(view.GetViewId(), REBOOT_BUTTON) == 0) { - RebootView::GetInstance()->ChangeView(REBOOTVIEW, REBOOTDEVICEVIEW); - } else if (strcmp(view.GetViewId(), SHUTDOWN_BUTTON) == 0) { - RebootView::GetInstance()->ChangeView(REBOOTVIEW, SHUTDOWNDEVICEVIEW); - } else if (strcmp(view.GetViewId(), REBOOTDEVICE_BUTTON) == 0) { - // 重启 - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "REBOOTDEVICE_BUTTON OnClick"); - uapi_reboot_device(); + void RebootPresenter::OnResume(void) {} - } else if (strcmp(view.GetViewId(), SHUTDOWNDEVICE_BUTTON) == 0) { - // 关机 - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SHUTDOWNDEVICE_BUTTON OnClick"); - // GetPMSDefaultInterface()->ShutDownDevice(NULL, NULL); - uapi_poweroff_device(); + void RebootPresenter::OnStop(void) {} + bool RebootPresenter::OnClick(UIView &view, const ClickEvent &event) + { + UNUSED(event); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "OnClick OnClick"); + if (strcmp(view.GetViewId(), REBOOT_BUTTON) == 0) + { + RebootView::GetInstance()->ChangeView(REBOOTVIEW, REBOOTDEVICEVIEW); + } + else if (strcmp(view.GetViewId(), SHUTDOWN_BUTTON) == 0) + { + RebootView::GetInstance()->ChangeView(REBOOTVIEW, SHUTDOWNDEVICEVIEW); + } + else if (strcmp(view.GetViewId(), REBOOTDEVICE_BUTTON) == 0) + { + // 重启 + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "REBOOTDEVICE_BUTTON OnClick"); + RebootView::GetInstance()->ChangeView(REBOOTDEVICEVIEW, SHUTDOWNANIMATORVIEW); + ShutDownAnimatorView::GetInstance()->GeShutDownImageAnimatorView()->Start(); + if (ShutDownAnimatorView::GetInstance()->GeShutDownImageAnimatorView()->GetState() == false) + { + uapi_reboot_device(); + } + } + else if (strcmp(view.GetViewId(), SHUTDOWNDEVICE_BUTTON) == 0) + { + // 关机 + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SHUTDOWNDEVICE_BUTTON OnClick"); + // GetPMSDefaultInterface()->ShutDownDevice(NULL, NULL); + RebootView::GetInstance()->ChangeView(SHUTDOWNDEVICEVIEW, SHUTDOWNANIMATORVIEW); + ShutDownAnimatorView::GetInstance()->GeShutDownImageAnimatorView()->Start(); + if (ShutDownAnimatorView::GetInstance()->GeShutDownImageAnimatorView()->GetState() == false) + { + uapi_poweroff_device(); + } + } + return true; } - return true; -} -bool RebootPresenter::OnDrag(UIView& view, const DragEvent& event) -{ - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootPresenter::OnDrag"); - if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) { - if (strcmp(view.GetViewId(), REBOOT_VIEW) == 0) { - NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN); - } else if (strcmp(view.GetViewId(), REBOOTDEVICE_VIEW) == 0) { - if (RebootModel::GetInstance()->GetExitsView() == 0) { - RebootView::GetInstance()->ChangeView(REBOOTDEVICEVIEW, REBOOTVIEW); - } else { - NativeAbility::GetInstance().ChangeSlice(VIEW_SETTING); - RebootModel::GetInstance()->SetExitsView(false); + bool RebootPresenter::OnDrag(UIView &view, const DragEvent &event) + { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootPresenter::OnDrag"); + if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) + { + if (strcmp(view.GetViewId(), REBOOT_VIEW) == 0) + { + NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN); + } + else if (strcmp(view.GetViewId(), REBOOTDEVICE_VIEW) == 0) + { + if (RebootModel::GetInstance()->GetExitsView() == 0) + { + RebootView::GetInstance()->ChangeView(REBOOTDEVICEVIEW, REBOOTVIEW); + } + else + { + NativeAbility::GetInstance().ChangeSlice(VIEW_SETTING); + RebootModel::GetInstance()->SetExitsView(false); + } } - } else if (strcmp(view.GetViewId(), SHUTDOWNDEVICE_VIEW) == 0) { - if (RebootModel::GetInstance()->GetExitsView() == 0) { - RebootView::GetInstance()->ChangeView(SHUTDOWNDEVICEVIEW, REBOOTVIEW); - } else { - NativeAbility::GetInstance().ChangeSlice(VIEW_SETTING); - RebootModel::GetInstance()->SetExitsView(false); + else if (strcmp(view.GetViewId(), SHUTDOWNDEVICE_VIEW) == 0) + { + if (RebootModel::GetInstance()->GetExitsView() == 0) + { + RebootView::GetInstance()->ChangeView(SHUTDOWNDEVICEVIEW, REBOOTVIEW); + } + else + { + NativeAbility::GetInstance().ChangeSlice(VIEW_SETTING); + RebootModel::GetInstance()->SetExitsView(false); + } } } + return true; } - return true; -} } diff --git a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootView.cpp b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootView.cpp index 1718954c0..9db397c39 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootView.cpp @@ -4,298 +4,390 @@ * Create: 2022-04-28 */ -#include "RebootView.h" -#include "RebootModel.h" +#include "rebootdevice/include/RebootView.h" +#include "rebootdevice/include/RebootModel.h" #include "wearable_log.h" #include "UiConfig.h" #include "RebootPresenter.h" -namespace OHOS { -static RebootView *g_pRebootView{nullptr}; -RebootView::RebootView() -{ - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::RebootView"); - preProcessView[REBOOTVIEW] = &RebootView::ChangeRebootView; - preProcessView[REBOOTDEVICEVIEW] = &RebootView::ChangeRebootDeviceView; - preProcessView[SHUTDOWNDEVICEVIEW] = &RebootView::ChangeShutdownDeviceView; - g_pRebootView = this; -} +static constexpr int16_t BOOT_IMAGE_ANIMATOR_VIEW_X = 0; +static constexpr int16_t BOOT_IMAGE_ANIMATOR_VIEW_Y = 0; +static constexpr int16_t BOOT_IMAGE_ANIMATOR_VIEW_W = 466; +static constexpr int16_t BOOT_IMAGE_ANIMATOR_VIEW_H = 466; +static constexpr int16_t BOOT_IMAGE_ANIMATOR_VIEW_NUM_FRAMES = 24; // 图片帧数 +static constexpr int16_t BOOT_IMAGE_ANIMATOR_TIME = 100; // 图片更新间隔 + +static constexpr char *BootPaths = ""; -RebootView::~RebootView() +namespace OHOS { - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::~RebootView"); - if (group != nullptr) { - group->RemoveAll(); + static RebootView *g_pRebootView{nullptr}; + RebootView::RebootView() + { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::RebootView"); + preProcessView[REBOOTVIEW] = &RebootView::ChangeRebootView; + preProcessView[REBOOTDEVICEVIEW] = &RebootView::ChangeRebootDeviceView; + preProcessView[SHUTDOWNDEVICEVIEW] = &RebootView::ChangeShutdownDeviceView; + preProcessView[SHUTDOWNANIMATORVIEW] = &RebootView::ChangeShutDownAnimatorView; + g_pRebootView = this; } - delete rebootLabel; - rebootLabel = nullptr; - delete rebootButton; - rebootButton = nullptr; - delete shutdownLabel; - shutdownLabel = nullptr; - delete shutdownButton; - shutdownButton = nullptr; - delete group; - group = nullptr; - g_pRebootView = nullptr; -} -RebootView *RebootView::GetInstance() -{ - return g_pRebootView; -} + RebootView::~RebootView() + { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::~RebootView"); + if (group != nullptr) + { + group->RemoveAll(); + } + delete rebootLabel; + rebootLabel = nullptr; + delete rebootButton; + rebootButton = nullptr; + delete shutdownLabel; + shutdownLabel = nullptr; + delete shutdownButton; + shutdownButton = nullptr; + delete group; + group = nullptr; + g_pRebootView = nullptr; + } -void RebootView::OnStart() -{ - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::~OnStart"); - View::OnStart(); - BaseView::RootView(Color::Black().full); - if (RebootModel::GetInstance()->GetSelectView() == REBOOT) { - ChangeView(REBOOT_MAX, REBOOTVIEW); - } else if (RebootModel::GetInstance()->GetSelectView() == REBOOTDEVICE) { - ChangeView(REBOOT_MAX, REBOOTDEVICEVIEW); - RebootModel::GetInstance()->SetSelectViewId(REBOOT); - } else if (RebootModel::GetInstance()->GetSelectView() == SHUTDOWNDEVICE) { - ChangeView(REBOOT_MAX, SHUTDOWNDEVICEVIEW); - RebootModel::GetInstance()->SetSelectViewId(REBOOT); + RebootView *RebootView::GetInstance() + { + return g_pRebootView; } - RootView::GetInstance()->Invalidate(); - return; -} -void RebootView::OnSetUpView() -{ - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::~OnSetUpView"); - View::OnSetUpView(); - Draw(); -} + void RebootView::OnStart() + { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::~OnStart"); + View::OnStart(); + BaseView::RootView(Color::Black().full); + if (RebootModel::GetInstance()->GetSelectView() == REBOOT) + { + ChangeView(REBOOT_MAX, REBOOTVIEW); + } + else if (RebootModel::GetInstance()->GetSelectView() == REBOOTDEVICE) + { + ChangeView(REBOOT_MAX, REBOOTDEVICEVIEW); + RebootModel::GetInstance()->SetSelectViewId(REBOOT); + } + else if (RebootModel::GetInstance()->GetSelectView() == SHUTDOWNDEVICE) + { + ChangeView(REBOOT_MAX, SHUTDOWNDEVICEVIEW); + RebootModel::GetInstance()->SetSelectViewId(REBOOT); + } + RootView::GetInstance()->Invalidate(); + return; + } -void RebootView::OnTearDownView() -{ - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::~OnTearDownView"); - View::OnTearDownView(); - return; -} + void RebootView::OnSetUpView() + { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::~OnSetUpView"); + View::OnSetUpView(); + Draw(); + } -void RebootView::OnStop() -{ - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::~OnStop"); - View::OnStop(); - if (container_ != nullptr) { - container_->RemoveAll(); - delete container_; - container_ = nullptr; + void RebootView::OnTearDownView() + { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::~OnTearDownView"); + View::OnTearDownView(); + return; } - RootView::GetInstance()->ClearOnKeyActListener(); - RootView::GetInstance()->RemoveAll(); - return; -} -bool RebootView::ShowUpRebootView() -{ - if (rebootLabel == nullptr) { - rebootLabel = new UILabel(); - if (rebootLabel == nullptr) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ShowUpRebootView rebootLabel new fail"); - return false; + void RebootView::OnStop() + { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::~OnStop"); + View::OnStop(); + if (container_ != nullptr) + { + container_->RemoveAll(); + delete container_; + container_ = nullptr; } + RootView::GetInstance()->ClearOnKeyActListener(); + RootView::GetInstance()->RemoveAll(); + return; } - rebootLabel->SetPosition(49, 272, 150, 45); // 49:x 272:y 150:width 45:height - rebootLabel->SetText("重启"); - rebootLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 35); // 35:font data - rebootLabel->SetStyle(STYLE_BACKGROUND_COLOR, OPA_OPAQUE); - rebootLabel->SetAlign(UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER, - UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER); - if (rebootButton == nullptr) { - rebootButton = new UIButton(); - if (rebootButton == nullptr) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ShowUpRebootView rebootButton new fail"); - return false; + bool RebootView::ShowUpRebootView() + { + if (rebootLabel == nullptr) + { + rebootLabel = new UILabel(); + if (rebootLabel == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ShowUpRebootView rebootLabel new fail"); + return false; + } } - } - rebootButton->SetPosition(69, 147, 110, 110); // 69:x 147:y 110:width 110:height - rebootButton->SetImageSrc(PNG_REBOOT_BUTTON_IMAGE, PNG_REBOOT_BUTTON_IMAGE); - rebootButton->SetViewId(REBOOT_BUTTON); - UIView::OnClickListener *clickListener = (UIView::OnClickListener *)OHOS::RebootPresenter::GetInstance(); - if (clickListener == nullptr) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "clickListener GetInstance nullptr"); - return false; - } - rebootButton->SetOnClickListener(clickListener); - return true; -} + rebootLabel->SetPosition(49, 272, 150, 45); // 49:x 272:y 150:width 45:height + rebootLabel->SetText("重启"); + rebootLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 35); // 35:font data + rebootLabel->SetStyle(STYLE_BACKGROUND_COLOR, OPA_OPAQUE); + rebootLabel->SetAlign(UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER, + UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER); -bool RebootView::ShowUpShutdownView() -{ - if (shutdownLabel == nullptr) { - shutdownLabel = new UILabel(); - if (shutdownLabel == nullptr) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ShowUpShutdownView shutdownLabel new fail"); + if (rebootButton == nullptr) + { + rebootButton = new UIButton(); + if (rebootButton == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ShowUpRebootView rebootButton new fail"); + return false; + } + } + rebootButton->SetPosition(69, 147, 110, 110); // 69:x 147:y 110:width 110:height + rebootButton->SetImageSrc(PNG_REBOOT_BUTTON_IMAGE, PNG_REBOOT_BUTTON_IMAGE); + rebootButton->SetViewId(REBOOT_BUTTON); + UIView::OnClickListener *clickListener = (UIView::OnClickListener *)OHOS::RebootPresenter::GetInstance(); + if (clickListener == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "clickListener GetInstance nullptr"); return false; } + rebootButton->SetOnClickListener(clickListener); + return true; } - shutdownLabel->SetPosition(255, 272, 150, 45); // 255:x 272:y 150:width 45:height - shutdownLabel->SetText("关机"); - shutdownLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 35); // 35:font data - shutdownLabel->SetStyle(STYLE_BACKGROUND_COLOR, OPA_OPAQUE); - shutdownLabel->SetAlign(UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER, - UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER); - if (shutdownButton == nullptr) { - shutdownButton = new UIButton(); - if (shutdownButton == nullptr) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ShowUpShutdownView shutdownButton new fail"); + bool RebootView::ShowUpShutdownView() + { + if (shutdownLabel == nullptr) + { + shutdownLabel = new UILabel(); + if (shutdownLabel == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ShowUpShutdownView shutdownLabel new fail"); + return false; + } + } + shutdownLabel->SetPosition(255, 272, 150, 45); // 255:x 272:y 150:width 45:height + shutdownLabel->SetText("关机"); + shutdownLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 35); // 35:font data + shutdownLabel->SetStyle(STYLE_BACKGROUND_COLOR, OPA_OPAQUE); + shutdownLabel->SetAlign(UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER, + UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER); + + if (shutdownButton == nullptr) + { + shutdownButton = new UIButton(); + if (shutdownButton == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ShowUpShutdownView shutdownButton new fail"); + return false; + } + } + shutdownButton->SetPosition(275, 147, 110, 110); // 275:x 147:y 110:width 110:height + shutdownButton->SetImageSrc(PNG_SHUTDOWN_BUTTON_IMAGE, PNG_SHUTDOWN_BUTTON_IMAGE); + shutdownButton->SetViewId(SHUTDOWN_BUTTON); + UIView::OnClickListener *clickListener = (UIView::OnClickListener *)OHOS::RebootPresenter::GetInstance(); + if (clickListener == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "clickListener GetInstance nullptr"); return false; } + shutdownButton->SetOnClickListener(clickListener); + return true; } - shutdownButton->SetPosition(275, 147, 110, 110); // 275:x 147:y 110:width 110:height - shutdownButton->SetImageSrc(PNG_SHUTDOWN_BUTTON_IMAGE, PNG_SHUTDOWN_BUTTON_IMAGE); - shutdownButton->SetViewId(SHUTDOWN_BUTTON); - UIView::OnClickListener *clickListener = (UIView::OnClickListener *)OHOS::RebootPresenter::GetInstance(); - if (clickListener == nullptr) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "clickListener GetInstance nullptr"); - return false; - } - shutdownButton->SetOnClickListener(clickListener); - return true; -} -UIViewGroup *RebootView::InitShowUpView(void) -{ - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::InitShowUpView"); - bool ret; - if (group == nullptr) { - group = new UIViewGroup(); - if (group == nullptr) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "group new fail"); + /* + * @brief 初始化开关机视图 + */ + UIViewGroup *RebootView::InitShowUpView(void) + { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::InitShowUpView"); + bool ret; + if (group == nullptr) + { + group = new UIViewGroup(); + if (group == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "group new fail"); + return nullptr; + } + group->SetPosition(0, 0); // 0:x; 0:y + group->SetWidth(HORIZONTAL_RESOLUTION); + group->SetHeight(VERTICAL_RESOLUTION); + } + ret = ShowUpRebootView(); + if (ret == false) + { return nullptr; } - group->SetPosition(0, 0); // 0:x; 0:y - group->SetWidth(HORIZONTAL_RESOLUTION); - group->SetHeight(VERTICAL_RESOLUTION); - } - ret = ShowUpRebootView(); - if (ret == false) { - return nullptr; - } - group->Add(rebootLabel); - group->Add(rebootButton); + group->Add(rebootLabel); + group->Add(rebootButton); - ret = ShowUpShutdownView(); - if (ret == false) { - return nullptr; - } - group->Add(shutdownLabel); - group->Add(shutdownButton); - UIView::OnDragListener *rebootDragListener = (UIView::OnDragListener *)OHOS::RebootPresenter::GetInstance(); - if (rebootDragListener == nullptr) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "rebootDragListener GetInstance fail"); - return nullptr; - } - group->SetOnDragListener(rebootDragListener); - group->SetViewId(REBOOT_VIEW); - group->SetDraggable(true); - group->SetTouchable(true); - return group; -} - -bool RebootView::ChangeRebootView(int16_t hideView, int16_t thisView) -{ - UNUSED(hideView); - // init view - UIViewGroup *group = InitShowUpView(); - if (group == nullptr) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "group nullptr fail"); - return false; + ret = ShowUpShutdownView(); + if (ret == false) + { + return nullptr; + } + group->Add(shutdownLabel); + group->Add(shutdownButton); + UIView::OnDragListener *rebootDragListener = (UIView::OnDragListener *)OHOS::RebootPresenter::GetInstance(); + if (rebootDragListener == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "rebootDragListener GetInstance fail"); + return nullptr; + } + group->SetOnDragListener(rebootDragListener); + group->SetViewId(REBOOT_VIEW); + group->SetDraggable(true); + group->SetTouchable(true); + return group; } - container[thisView] = group; - RootView::GetInstance()->Add(container[thisView]); - return true; -} -bool RebootView::ChangeRebootDeviceView(int16_t hideView, int16_t thisView) -{ - UNUSED(hideView); - if (container[thisView] == nullptr) { - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ChangeRebootDeviceView"); - rebootDeviceView = new RebootDeviceView(); - if (rebootDeviceView == nullptr) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "rebootDeviceView new fail"); - return false; - } + /* + * @brief 切换到重启和开关机视图 + */ + bool RebootView::ChangeRebootView(int16_t hideView, int16_t thisView) + { + UNUSED(hideView); // init view - UIViewGroup *group = rebootDeviceView->InitShowUpView(); - if (group == nullptr) { + UIViewGroup *group = InitShowUpView(); + if (group == nullptr) + { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "group nullptr fail"); return false; } container[thisView] = group; RootView::GetInstance()->Add(container[thisView]); + return true; } - return true; -} -bool RebootView::ChangeShutdownDeviceView(int16_t hideView, int16_t thisView) -{ - UNUSED(hideView); - if (container[thisView] == nullptr) { - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ChangeShutdownDeviceView"); - shutdownDeviceView = new ShutdownDeviceView(); - if (shutdownDeviceView == nullptr) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "shutdownDeviceView new fail"); - return false; - } - // init view - UIViewGroup *group = shutdownDeviceView->InitShowUpView(); - if (group == nullptr) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "group nullptr fail"); - return false; + /* + * @brief 切换到重启设备视图 + */ + bool RebootView::ChangeRebootDeviceView(int16_t hideView, int16_t thisView) + { + UNUSED(hideView); + if (container[thisView] == nullptr) + { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ChangeRebootDeviceView"); + rebootDeviceView = new RebootDeviceView(); + if (rebootDeviceView == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "rebootDeviceView new fail"); + return false; + } + // init view + UIViewGroup *group = rebootDeviceView->InitShowUpView(); + if (group == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "group nullptr fail"); + return false; + } + container[thisView] = group; + RootView::GetInstance()->Add(container[thisView]); } - container[thisView] = group; - RootView::GetInstance()->Add(container[thisView]); + return true; } - return true; -} -bool RebootView::CheckViewParam(int16_t hideView, int16_t showView) -{ - if (showView < 0 || showView >= REBOOT_MAX) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RebootView::CheckViewParam showView err."); - return false; + /* + * @brief 切换到开启设备视图 + */ + bool RebootView::ChangeShutdownDeviceView(int16_t hideView, int16_t thisView) + { + UNUSED(hideView); + if (container[thisView] == nullptr) + { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ChangeShutdownDeviceView"); + shutdownDeviceView = new ShutdownDeviceView(); + if (shutdownDeviceView == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "shutdownDeviceView new fail"); + return false; + } + // init view + UIViewGroup *group = shutdownDeviceView->InitShowUpView(); + if (group == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "group nullptr fail"); + return false; + } + container[thisView] = group; + RootView::GetInstance()->Add(container[thisView]); + } + return true; } - if (hideView < 0 || hideView > REBOOT_MAX) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RebootView::CheckViewParam hideView err."); - return false; + /* + * @brief 切换到关机动画视图 + */ + bool RebootView::ChangeShutDownAnimatorView(int16_t hideView, int16_t thisView) + { + UNUSED(hideView); + if (container[thisView] == nullptr) + { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ChangeShutdownDeviceView"); + shutDownAnimatorView = new ShutDownAnimatorView(); + if (shutDownAnimatorView == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "shutDownAnimatorView new fail"); + return false; + } + UIViewGroup *group = shutDownAnimatorView->ShutDownAnimatorViewInit(); + if (group == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "group nullptr fail"); + return false; + } + container[thisView] = group; + RootView::GetInstance()->Add(container[thisView]); + } + return true; } - return true; -} + /* + * @brief 用于检查传递给 ChangeView 方法的视图索引参数是否有效 + */ + bool RebootView::CheckViewParam(int16_t hideView, int16_t showView) + { + if (showView < 0 || showView >= REBOOT_MAX) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RebootView::CheckViewParam showView err."); + return false; + } -void RebootView::ChangeView(int16_t hideView, int16_t showView) -{ - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::ChangeView %d, %d", hideView, showView); + if (hideView < 0 || hideView > REBOOT_MAX) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RebootView::CheckViewParam hideView err."); + return false; + } - if (CheckViewParam(hideView, showView) == false) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RebootView::CheckViewParam failed."); - return; + return true; } - PreprosssChangeView tmpPreProcessView = preProcessView[showView]; + /* + * @brief 执行视图切换逻辑 + */ + void RebootView::ChangeView(int16_t hideView, int16_t showView) + { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::ChangeView %d, %d", hideView, showView); - if ((this->*tmpPreProcessView)(hideView, showView) == false) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RebootView::ChangeView %d %dfailed", showView, hideView); - return; - } - if (hideView != REBOOT_MAX) { - if (container[hideView] == nullptr) { + if (CheckViewParam(hideView, showView) == false) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RebootView::CheckViewParam failed."); + return; + } + + PreprosssChangeView tmpPreProcessView = preProcessView[showView]; + + if ((this->*tmpPreProcessView)(hideView, showView) == false) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RebootView::ChangeView %d %dfailed", showView, hideView); return; } - container[hideView]->SetVisible(false); + if (hideView != REBOOT_MAX) + { + if (container[hideView] == nullptr) + { + return; + } + container[hideView]->SetVisible(false); + } + container[showView]->SetVisible(true); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView:: ChangeView end!!!%d", showView); + RootView::GetInstance()->Invalidate(); } - container[showView]->SetVisible(true); - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView:: ChangeView end!!!%d", showView); - RootView::GetInstance()->Invalidate(); -} + } diff --git a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/ShutDownAnimatorView.cpp b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/ShutDownAnimatorView.cpp new file mode 100644 index 000000000..fda96c0a1 --- /dev/null +++ b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/ShutDownAnimatorView.cpp @@ -0,0 +1,114 @@ +#include "rebootdevice/include/ShutDownAnimatorView.h" +#include "wearable_log.h" +namespace OHOS +{ + + static ShutDownAnimatorView *g_pShutDownAnimatorView = nullptr; + + ShutDownAnimatorView::ShutDownAnimatorView() + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ShutDownAnimatorView::ShutDownAnimatorView"); + g_pShutDownAnimatorView = this; + } + ShutDownAnimatorView::~ShutDownAnimatorView() + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ShutDownAnimatorView::~ShutDownAnimatorView"); + ClearAll(); + g_pShutDownAnimatorView = nullptr; + } + ShutDownAnimatorView *ShutDownAnimatorView::GetInstance() + { + return g_pShutDownAnimatorView; + } + + const char **ShutDownAnimatorView::CreateImagePathsArray(const char *basePath, const char *fileExtension, int numImages) + { + const char **imagePaths = new const char *[numImages]; + char buffer[256]; + for (int i = 0; i < numImages; i++) + { + snprintf(buffer, sizeof(buffer), "%s%d.%s", basePath, i + 1, fileExtension); + imagePaths[i] = strdup(buffer); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, " imagePaths[%d] = %s", i, imagePaths[i]); + } + return imagePaths; + } + + void ShutDownAnimatorView::FreeImagePathsArray(const char **imagePaths, const int numImages) + { + for (int i = 0; i < numImages; i++) + { + delete imagePaths[i]; + imagePaths[i] = nullptr; + } + } + + void ShutDownAnimatorView::ClearAll(void) + { + group->RemoveAll(); + if (ShutDownImageAnimatorView != nullptr) + { + delete ShutDownImageAnimatorView; + ShutDownImageAnimatorView = nullptr; + } + FreeImagePathsArray(ShutDownPathsArray, SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES); + delete group; + group = nullptr; + } + + UIImageAnimatorView *ShutDownAnimatorView::GeShutDownImageAnimatorView(void) + { + return ShutDownImageAnimatorView; + } + + bool ShutDownAnimatorView::ShowUpShutDownAnimatorView() + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ShutDownAnimatorView::ShowUpShutDownAnimatorView"); + ShutDownPathsArray = CreateImagePathsArray(ShutDownPaths, "bin", SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES); + + if (ShutDownImageAnimatorView == nullptr) + { + ShutDownImageAnimatorView = new UIImageAnimatorView(); + if (ShutDownImageAnimatorView == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BluetoothEarPhoneView new ShutDownImageAnimatorView fail"); + return false; + } + for (uint8_t i = 0; i < SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES; i++) + { + ShutDownImageInfo[i].imagePath = (ShutDownPathsArray[i]); + ShutDownImageInfo[i].imageType = IMG_SRC_FILE_PATH; + ShutDownImageInfo[i].pos.x = SHUTDOWN_IMAGE_ANIMATOR_VIEW_X; + ShutDownImageInfo[i].pos.y = SHUTDOWN_IMAGE_ANIMATOR_VIEW_Y; + ShutDownImageInfo[i].width = SHUTDOWN_IMAGE_ANIMATOR_VIEW_W; + ShutDownImageInfo[i].height = SHUTDOWN_IMAGE_ANIMATOR_VIEW_H; + } + ShutDownImageAnimatorView->SetPosition(SHUTDOWN_IMAGE_ANIMATOR_VIEW_X, SHUTDOWN_IMAGE_ANIMATOR_VIEW_Y, SHUTDOWN_IMAGE_ANIMATOR_VIEW_W, SHUTDOWN_IMAGE_ANIMATOR_VIEW_H); + ShutDownImageAnimatorView->SetStyle(STYLE_BACKGROUND_COLOR, 0xffffffff); + ShutDownImageAnimatorView->SetStyle(STYLE_BACKGROUND_OPA, 0xff); + ShutDownImageAnimatorView->SetImageAnimatorSrc(ShutDownImageInfo, SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES, 100); + } + + return true; + } + + UIViewGroup *ShutDownAnimatorView::ShutDownAnimatorViewInit(void) + { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ShutDownAnimatorView::InitShowUpView"); + bool ret; + group = new UIViewGroup(); + if (group == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "group new fail"); + return nullptr; + } + group->SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION); + ret = ShowUpShutDownAnimatorView(); + if (ret == false) + { + return nullptr; + } + group->Add(ShutDownImageAnimatorView); + return group; + } +} \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/ShutdownDeviceView.cpp b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/ShutdownDeviceView.cpp index 6e54ee63a..4881c02d5 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/ShutdownDeviceView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/ShutdownDeviceView.cpp @@ -4,10 +4,10 @@ * Create: 2022-04-28 */ -#include "ShutdownDeviceView.h" +#include "rebootdevice/include/ShutdownDeviceView.h" #include "wearable_log.h" #include "UiConfig.h" -#include "RebootPresenter.h" +#include "rebootdevice/include/RebootPresenter.h" namespace OHOS { static ShutdownDeviceView *g_pShutdownDeviceView{nullptr}; @@ -37,6 +37,9 @@ ShutdownDeviceView *ShutdownDeviceView::GetInstance() return g_pShutdownDeviceView; } +/* + * @brief 显示关闭设备视图 +*/ bool ShutdownDeviceView::ShowUpShutdownDeviceView() { if (shutdownDeviceLabel == nullptr) { @@ -72,6 +75,10 @@ bool ShutdownDeviceView::ShowUpShutdownDeviceView() return true; } +/* + * @brief 关机视图初始化 + * @return 初始化成功,返回关机视图,反之返回nullptr +*/ UIViewGroup *ShutdownDeviceView::InitShowUpView(void) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ShutdownDeviceView::InitShowUpView"); diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/1.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/1.bin new file mode 100644 index 000000000..f1079eaed Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/1.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/10.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/10.bin new file mode 100644 index 000000000..1300aec3c Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/10.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/11.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/11.bin new file mode 100644 index 000000000..67767dade Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/11.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/12.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/12.bin new file mode 100644 index 000000000..5c5bfc24b Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/12.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/13.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/13.bin new file mode 100644 index 000000000..bc1195915 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/13.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/14.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/14.bin new file mode 100644 index 000000000..dfab0e0af Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/14.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/15.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/15.bin new file mode 100644 index 000000000..e0febf0d0 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/15.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/16.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/16.bin new file mode 100644 index 000000000..822aa1367 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/16.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/17.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/17.bin new file mode 100644 index 000000000..b97a70821 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/17.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/18.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/18.bin new file mode 100644 index 000000000..73ee17d62 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/18.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/19.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/19.bin new file mode 100644 index 000000000..e4d7b2fd6 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/19.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/2.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/2.bin new file mode 100644 index 000000000..252300e99 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/2.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/20.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/20.bin new file mode 100644 index 000000000..9fb9b8de2 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/20.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/21.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/21.bin new file mode 100644 index 000000000..0c01ad832 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/21.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/22.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/22.bin new file mode 100644 index 000000000..6702412b7 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/22.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/23.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/23.bin new file mode 100644 index 000000000..7901c3e1b Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/23.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/24.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/24.bin new file mode 100644 index 000000000..76b814f2b Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/24.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/25.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/25.bin new file mode 100644 index 000000000..a017d55a1 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/25.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/26.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/26.bin new file mode 100644 index 000000000..fc303b027 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/26.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/27.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/27.bin new file mode 100644 index 000000000..d5191d92b Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/27.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/28.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/28.bin new file mode 100644 index 000000000..0111655e6 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/28.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/29.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/29.bin new file mode 100644 index 000000000..628f6dd3b Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/29.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/3.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/3.bin new file mode 100644 index 000000000..6d26d05a2 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/3.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/30.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/30.bin new file mode 100644 index 000000000..5c90a405f Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/30.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/31.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/31.bin new file mode 100644 index 000000000..895fcb469 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/31.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/32.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/32.bin new file mode 100644 index 000000000..1723257f8 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/32.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/33.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/33.bin new file mode 100644 index 000000000..fc9fe192b Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/33.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/34.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/34.bin new file mode 100644 index 000000000..6726b6099 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/34.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/35.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/35.bin new file mode 100644 index 000000000..8ac69d78a Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/35.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/36.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/36.bin new file mode 100644 index 000000000..795cda230 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/36.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/37.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/37.bin new file mode 100644 index 000000000..25c4ea924 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/37.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/38.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/38.bin new file mode 100644 index 000000000..e320bf95c Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/38.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/39.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/39.bin new file mode 100644 index 000000000..29b6a04e6 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/39.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/4.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/4.bin new file mode 100644 index 000000000..c04812013 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/4.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/40.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/40.bin new file mode 100644 index 000000000..eebb60654 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/40.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/41.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/41.bin new file mode 100644 index 000000000..472f7e7c2 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/41.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/42.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/42.bin new file mode 100644 index 000000000..9a551d69f Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/42.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/43.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/43.bin new file mode 100644 index 000000000..a9f8338ca Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/43.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/44.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/44.bin new file mode 100644 index 000000000..b5a903550 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/44.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/45.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/45.bin new file mode 100644 index 000000000..bd3646917 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/45.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/46.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/46.bin new file mode 100644 index 000000000..734c49744 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/46.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/47.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/47.bin new file mode 100644 index 000000000..adacf5e0f Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/47.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/48.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/48.bin new file mode 100644 index 000000000..a71ed83a0 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/48.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/49.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/49.bin new file mode 100644 index 000000000..9b0343f2f Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/49.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/5.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/5.bin new file mode 100644 index 000000000..6f8a0590f Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/5.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/50.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/50.bin new file mode 100644 index 000000000..adbf953c3 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/50.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/51.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/51.bin new file mode 100644 index 000000000..fc7882c96 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/51.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/52.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/52.bin new file mode 100644 index 000000000..1fec957b9 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/52.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/53.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/53.bin new file mode 100644 index 000000000..844bc1b09 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/53.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/54.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/54.bin new file mode 100644 index 000000000..62f5af811 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/54.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/55.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/55.bin new file mode 100644 index 000000000..fed284514 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/55.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/56.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/56.bin new file mode 100644 index 000000000..6c05fce44 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/56.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/57.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/57.bin new file mode 100644 index 000000000..3f0686616 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/57.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/58.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/58.bin new file mode 100644 index 000000000..8fe4c9501 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/58.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/59.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/59.bin new file mode 100644 index 000000000..700e67c21 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/59.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/6.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/6.bin new file mode 100644 index 000000000..740b19bc9 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/6.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/60.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/60.bin new file mode 100644 index 000000000..958cf2ad9 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/60.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/61.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/61.bin new file mode 100644 index 000000000..a1c8da523 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/61.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/62.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/62.bin new file mode 100644 index 000000000..bf0329a6a Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/62.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/63.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/63.bin new file mode 100644 index 000000000..5ac831077 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/63.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/64.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/64.bin new file mode 100644 index 000000000..7f9f26787 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/64.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/65.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/65.bin new file mode 100644 index 000000000..6bd2d351e Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/65.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/66.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/66.bin new file mode 100644 index 000000000..102cdfd26 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/66.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/67.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/67.bin new file mode 100644 index 000000000..38027841e Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/67.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/68.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/68.bin new file mode 100644 index 000000000..618a58ed2 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/68.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/69.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/69.bin new file mode 100644 index 000000000..6463ceb16 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/69.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/7.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/7.bin new file mode 100644 index 000000000..a68837323 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/7.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/70.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/70.bin new file mode 100644 index 000000000..45e02259d Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/70.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/8.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/8.bin new file mode 100644 index 000000000..cd8a8ba29 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/8.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/9.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/9.bin new file mode 100644 index 000000000..247daf897 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/RebootAndShutDown/ShutDown/9.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/userdata/recording/test.txt b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/userdata/recording/test.txt new file mode 100644 index 000000000..56529f294 --- /dev/null +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/userdata/recording/test.txt @@ -0,0 +1 @@ +recording test \ No newline at end of file diff --git a/code/sdk/middleware/services/gui/uikit/proprietary/src/utils/frameworks/mem_check.cpp b/code/sdk/middleware/services/gui/uikit/proprietary/src/utils/frameworks/mem_check.cpp index d0544c121..139ccbb34 100755 --- a/code/sdk/middleware/services/gui/uikit/proprietary/src/utils/frameworks/mem_check.cpp +++ b/code/sdk/middleware/services/gui/uikit/proprietary/src/utils/frameworks/mem_check.cpp @@ -34,7 +34,7 @@ #include "hals/gralloc_engines.h" -#define SUPPRESS_DUMP 1 +#define SUPPRESS_DUMP 0 namespace OHOS { using std::string;