#include "custom_utils.h"
#include "components/ui_image_animator.h"
#include "wearable_log.h"
+#include "uicomponents/UIComponents.h"
#ifdef __cplusplus
extern "C" {
static constexpr int16_t REBOOT_IMAGE_ANIMATOR_VIEW_Y = 0;
static constexpr int16_t REBOOT_IMAGE_ANIMATOR_VIEW_W = 466;
static constexpr int16_t REBOOT_IMAGE_ANIMATOR_VIEW_H = 466;
-const char **ReBootPathsArray{nullptr}; // 开机图片路径数组
+const OHOS::ImageInfo **ReBootPathsArray{nullptr}; // 开机图片路径数组
static OHOS::UIImageAnimatorView::AnimatorStopListener *bootStoplistener{nullptr};
static bool boot_animation_flag = false;
static app_task_definition_t taskcfg={0};
bootStoplistener = nullptr;
}
- FreeImagePathsArray(ReBootPathsArray, REBOOT_IMAGE_ANIMATOR_VIEW_NUM_FRAMES);
+ // FreeImagePathsArray(ReBootPathsArray, REBOOT_IMAGE_ANIMATOR_VIEW_NUM_FRAMES);
+ OHOS::FreeImageInfoArray(ReBootPathsArray, ReBootPaths, REBOOT_IMAGE_ANIMATOR_VIEW_NUM_FRAMES);
delete group;
group = nullptr;
bool ShowReBootAnimatorView()
{
- ReBootPathsArray = CreateImagePathsArray(ReBootPaths, "bin", REBOOT_IMAGE_ANIMATOR_VIEW_NUM_FRAMES);
+ ReBootPathsArray = OHOS::CreateImageInfoArray(ReBootPaths, REBOOT_IMAGE_ANIMATOR_VIEW_NUM_FRAMES);
if (ReBootImageAnimatorView == nullptr)
{
}
for (uint8_t i = 0; i < REBOOT_IMAGE_ANIMATOR_VIEW_NUM_FRAMES; i++)
{
- ReBootImageInfo[i].imagePath = (ReBootPathsArray[i]);
- ReBootImageInfo[i].imageType = OHOS::IMG_SRC_FILE_PATH;
+ ReBootImageInfo[i].imageInfo = (ReBootPathsArray[i]);
+ ReBootImageInfo[i].imageType = OHOS::IMG_SRC_IMAGE_INFO;
ReBootImageInfo[i].pos.x = REBOOT_IMAGE_ANIMATOR_VIEW_X;
ReBootImageInfo[i].pos.y = REBOOT_IMAGE_ANIMATOR_VIEW_Y;
ReBootImageInfo[i].width = REBOOT_IMAGE_ANIMATOR_VIEW_W;