#include "system/include/MemoryManager.h"
#include "thunderbird/include/ThunderBirdModel.h"
#include "NativeAbility.h"
-#include "ln_api_interface.h"
#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_pub_api.h"
#endif
void OtaModel::HandleDownloadSuccess(int type)
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "OtaModel::HandleDownloadSuccess type=%d", type);
-
- // 判断是表情下载还是屏保下载
- if(type == DOWNLOAD_FILE_TYPE_EMOJI || type == DOWNLOAD_FILE_TYPE_SCREEN_IMAGE)
- {
- // 表情下载或屏保下载完成,跳转回主界面
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "OtaModel::HandleDownloadSuccess: 表情/屏保下载完成,跳转回主界面");
- uapi_setScreenDuration(30000); // 重新设置30秒自动息屏
-
- // 清空下载文件类型
- ThunderBirdModel::GetInstance()->ClearDownloadFile();
-
- // 跳转回主界面
- NativeAbility::GetInstance().SwitchSlice(VIEW_THUNDER_BIRD);
- }
- else
- {
// OTA升级下载完成,跳转到OTA升级成功界面
if(OtaDownloadView::GetInstance())
{
uapi_setScreenDuration(30000); // 重新设置30秒自动息屏
OtaView::GetInstance()->ChangeView(OtaView::OTA_VIEW_DOWNLOAD, OtaView::OTA_VIEW_UPDATE_SUCCESS);
OtaSuccessView::GetInstance()->UpdateDownloadSuccess("下载成功");
+ // 清空下载文件类型
+ ThunderBirdModel::GetInstance()->ClearDownloadFile();
}
- }
}
//下载进度通知
uapi_setScreenDuration(30000); // 重新设置30秒自动息屏
OtaView::GetInstance()->ChangeView(OtaView::OTA_VIEW_DOWNLOAD, OtaView::OTA_VIEW_UPDATE_SUCCESS);
OtaSuccessView::GetInstance()->UpdateDownloadSuccess("下载失败");
+ // 清空下载文件类型
+ ThunderBirdModel::GetInstance()->ClearDownloadFile();
}
}
RemindLabel->SetVisible(true);
group->Add(RemindLabel);
}
+ RemindIcon = new UIImageView();
+ if (RemindIcon)
+ {
+ RemindIcon->SetAutoEnable(false);
+ RemindIcon->SetPosition(159, 276, 22, 22);
+ RemindIcon->SetResizeMode(UIImageView::CONTAIN);
+ RemindIcon->SetSrc("/user/res/volume_up.bin");
+ RemindIcon->SetVisible(false);
+ group->Add(RemindIcon);
+ }
RemindIcon1 = new UIImageView();
if (RemindIcon1)
{
if (TextLabel) { delete TextLabel; TextLabel = nullptr; }
if (LittleTextLabel) { delete LittleTextLabel; LittleTextLabel = nullptr; }
if (RemindLabel) { delete RemindLabel; RemindLabel = nullptr; }
+ if (RemindIcon) { delete RemindIcon; RemindIcon = nullptr; }
if (RemindIcon1) { delete RemindIcon1; RemindIcon1 = nullptr; }
}
RemindIcon1->Invalidate();
return;
}
+
TextLabel->SetText(content.c_str());
LittleTextLabel->SetVisible(false);
+ RemindIcon->SetVisible(true);
+ if (RemindLabel) {
+ RemindLabel->SetPosition(136, 275, 88, 25);
+ RemindLabel->SetText("按 确认");
+ RemindLabel->SetVisible(true);
+ }
TextLabel->Invalidate();
}
// 添加状态栏(如果ThunderBirdMainView存在则复用,否则创建独立的状态栏)
- ScrollView_->Add(CreateIndependentStatusBar()); // 创建独立的状态栏
+ // ScrollView_->Add(CreateIndependentStatusBar()); // 创建独立的状态栏
// 启动状态栏更新定时器
// 暂时关闭刷新时间和信号的定时器
}
group[hideView]->SetVisible(false);
}
- else
- {
- // 当hideView == MAX_OTA_VIEW时,隐藏所有其他已创建的视图,避免显示混乱
- for (int i = 0; i < MAX_OTA_VIEW; i++)
- {
- if (group[i] != nullptr && i != showView)
- {
- group[i]->SetVisible(false);
- }
- }
- }
ClickFunc(showView);
group[showView]->SetStyle(STYLE_BACKGROUND_OPA, 0x00);
group[showView]->SetVisible(true);