| | |
| | | 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;
|
| | |
| | | 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();
|
| | | }
|
| | | }
|
| | |
|