| | |
| | | import com.mm.android.deviceaddmodule.views.popwindow.PopWindowFactory;
|
| | |
|
| | | import org.greenrobot.eventbus.EventBus;
|
| | | import org.greenrobot.eventbus.Subscribe;
|
| | | import org.greenrobot.eventbus.ThreadMode;
|
| | |
|
| | | import static android.Manifest.permission.ACCESS_COARSE_LOCATION;
|
| | | import static com.mm.android.deviceaddmodule.mobilecommon.common.Constants.PERMISSION_REQUEST_ID;
|
| | |
| | | };
|
| | | permissionHelper.requestPermissions(new String[]{
|
| | | ACCESS_COARSE_LOCATION}, defaultPermissionListener);
|
| | |
|
| | | if(!EventBus.getDefault().isRegistered(this)){
|
| | | EventBus.getDefault().register(this);
|
| | | }
|
| | | }
|
| | |
|
| | | //动态权限申请回调
|
| | |
| | | }
|
| | | mLoadingPopWindow = null;
|
| | | }
|
| | | EventBus.getDefault().post("backXamarin");
|
| | | if(!interfaceException) {
|
| | | EventBus.getDefault().post("backXamarin");
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 接口异常标记
|
| | | */
|
| | | private boolean interfaceException = false;
|
| | |
|
| | | @Subscribe(threadMode = ThreadMode.MAIN)
|
| | | public void onGetMessage(String obj) {
|
| | | if(obj.equals("InterfaceException")){
|
| | | if (EventBus.getDefault().isRegistered(this)) {
|
| | | EventBus.getDefault().unregister(this);
|
| | | }
|
| | | interfaceException = true;
|
| | | destroy();
|
| | | }
|
| | | }
|
| | |
|
| | | // 离线配网成功,返回上一级页面
|