| | |
| | | package com.hdl.photovoltaic.ui; |
| | | |
| | | import androidx.annotation.NonNull; |
| | | import androidx.annotation.Nullable; |
| | | import androidx.appcompat.content.res.AppCompatResources; |
| | | |
| | | import android.Manifest; |
| | | import android.content.ComponentName; |
| | | import android.content.Intent; |
| | | import android.content.ServiceConnection; |
| | | import android.content.pm.PackageManager; |
| | | import android.os.Bundle; |
| | |
| | | |
| | | @Override |
| | | public void onBindView(Bundle savedInstanceState) { |
| | | setNotificationBarBackgroundColor(CustomColor.blue); |
| | | //初始化 |
| | | initView(); |
| | | //初始化界面监听器 |
| | |
| | | } else if (event.getTopic().contains(HdlOtaLogic.localDownloadProgress)) { |
| | | //下载云端驱动或者固件文件,自己计算进度条上报到uni那边 |
| | | HDLUniMP.UniCallBackBaseBean uniCallBackBaseBean = new HDLUniMP.UniCallBackBaseBean(); |
| | | uniCallBackBaseBean.setType(HdlOtaLogic.localDownloadProgress); |
| | | uniCallBackBaseBean.setType(event.getType()); |
| | | uniCallBackBaseBean.setData(event.getData()); |
| | | HdlUniLogic.getInstance().sendUni(HDLUniMP.UNI_EVENT_REPLY_OTA_MODEL, uniCallBackBaseBean); |
| | | HdlLogLogic.print(((HdlOtaLogic.Progress) event.getData()).step + "", false); |
| | | HdlLogLogic.print("进度:" + ((HdlOtaLogic.Progress) event.getData()).step + "", false); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 点击返回键的事件 |
| | | */ |