| | |
| | | package com.lechange.demo.ui;
|
| | |
|
| | | import android.app.Activity;
|
| | | import android.content.Intent;
|
| | | import android.graphics.drawable.BitmapDrawable;
|
| | | import android.os.Bundle;
|
| | |
| | | import com.common.openapi.entity.DeviceLocalCacheData;
|
| | | import com.common.openapi.entity.DeviceUnBindData;
|
| | | import com.lechange.demo.R;
|
| | | import com.lechange.demo.dialog.DeviceUpdateDialog;
|
| | | import com.lechange.demo.dialog.RecoverSDCardDialog;
|
| | | import com.lechange.demo.tools.DialogUtils;
|
| | | import com.lechange.demo.tools.MediaPlayHelper;
|
| | | import com.mm.android.deviceaddmodule.LCDeviceEngine;
|
| | |
| | | }
|
| | |
|
| | | private void getCurrentWifiInfo() {
|
| | | //2022-12-07 11:43:33 隐藏,王赢的云端或报错
|
| | | //设备才能获取WIFI
|
| | | DialogUtils.show(getActivity());
|
| | | deviceDetailService.currentDeviceWifi(deviceListBean.deviceId, new IGetDeviceInfoCallBack.IDeviceCurrentWifiInfoCallBack() {
|
| | | @Override
|
| | | public void deviceCurrentWifiInfo(CurWifiInfo curWifiInfo) {
|
| | | DialogUtils.dismiss();
|
| | | if (!isAdded() || curWifiInfo == null) {
|
| | | return;
|
| | | }
|
| | | rlCurWifi.setVisibility(View.VISIBLE);
|
| | | if (curWifiInfo.isLinkEnable()) {
|
| | | wifiInfo = curWifiInfo;
|
| | | tvCurrentWifi.setText(wifiInfo.getSsid());
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void onError(Throwable throwable) {
|
| | | DialogUtils.dismiss();
|
| | | }
|
| | | });
|
| | | // DialogUtils.show(getActivity());
|
| | | // deviceDetailService.currentDeviceWifi(deviceListBean.deviceId, new IGetDeviceInfoCallBack.IDeviceCurrentWifiInfoCallBack() {
|
| | | // @Override
|
| | | // public void deviceCurrentWifiInfo(CurWifiInfo curWifiInfo) {
|
| | | // DialogUtils.dismiss();
|
| | | // if (!isAdded() || curWifiInfo == null) {
|
| | | // return;
|
| | | // }
|
| | | // rlCurWifi.setVisibility(View.VISIBLE);
|
| | | // if (curWifiInfo.isLinkEnable()) {
|
| | | // wifiInfo = curWifiInfo;
|
| | | // tvCurrentWifi.setText(wifiInfo.getSsid());
|
| | | // }
|
| | | // }
|
| | | //
|
| | | // @Override
|
| | | // public void onError(Throwable throwable) {
|
| | | // DialogUtils.dismiss();
|
| | | // }
|
| | | // });
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | deviceDetailService.deletePermission(deviceListBean.deviceId,null,this);
|
| | | }
|
| | | else if(id==R.id.tvFormat_sd){
|
| | | deviceDetailActivity.rlLoading.setVisibility(View.VISIBLE);
|
| | | DeviceDetailService deviceDetailService = ClassInstanceManager.newInstance().getDeviceDetailService();
|
| | | /* DeviceUnBindData deviceUnBindData = new DeviceUnBindData();
|
| | | deviceUnBindData.data.deviceId = deviceListBean.deviceId;
|
| | | deviceDetailService.unBindDevice(deviceUnBindData, this);*/
|
| | | deviceDetailService.recoverSDCard(deviceListBean.deviceId, new IGetDeviceInfoCallBack.IRecoverSDCardCallBack() {
|
| | | @Override
|
| | | public void onSuccess(String result) {
|
| | | deviceDetailActivity.rlLoading.setVisibility(View.GONE);
|
| | | }
|
| | |
|
| | | RecoverSDCardDialog dialog = new RecoverSDCardDialog(getContext());
|
| | | dialog.setOnOkClickLisenter(new DeviceUpdateDialog.OnOkClickLisenter() {
|
| | | @Override
|
| | | public void onError(Throwable throwable) {
|
| | | deviceDetailActivity.rlLoading.setVisibility(View.GONE);
|
| | | public void OnOK() {
|
| | | deviceDetailActivity.rlLoading.setVisibility(View.VISIBLE);
|
| | | DeviceDetailService deviceDetailService = ClassInstanceManager.newInstance().getDeviceDetailService();
|
| | | deviceDetailService.recoverSDCard(deviceListBean.deviceId, new IGetDeviceInfoCallBack.IRecoverSDCardCallBack() {
|
| | | @Override
|
| | | public void onSuccess(String result) {
|
| | | deviceDetailActivity.rlLoading.setVisibility(View.GONE);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void onError(Throwable throwable) {
|
| | | deviceDetailActivity.rlLoading.setVisibility(View.GONE);
|
| | | }
|
| | | });
|
| | |
|
| | | }
|
| | | });
|
| | |
|
| | | dialog.show();
|
| | | }
|
| | | }
|
| | |
|