Commit 74cc09eea7ce8f51363c243e065e6a403efc0634
1 parent
3edc6cd6
1 修改配网逻辑
Showing
3 changed files
with
5 additions
and
3 deletions
config.gradle
module_xiaojiaSoundBox/src/main/java/com/cnlive/strike/xiaojiaspeaker/frame/presenter/SelectWifiFragmentPresenter.java
| ... | ... | @@ -47,7 +47,6 @@ public class SelectWifiFragmentPresenter extends MvpBasePresenter<SelectWifiFrag |
| 47 | 47 | if (null == getView()) { |
| 48 | 48 | return; |
| 49 | 49 | } |
| 50 | - EventBus.getDefault().post(new EventMsg(EventMsg.CLOSE_BLUETOOTH_ACTIVITY,null)); | |
| 51 | 50 | QMUITipDialogUtil.dismessDialog(); |
| 52 | 51 | Log.e(TAG, "onSuccess: " + baseInfo.getMessage()); |
| 53 | 52 | if (null!=onResponseListener){ | ... | ... |
module_xiaojiaSoundBox/src/main/java/com/cnlive/strike/xiaojiaspeaker/frame/view/SelectWifiFragmentView.java
| ... | ... | @@ -22,6 +22,7 @@ import com.cnlive.strike.xiaojiaspeaker.R; |
| 22 | 22 | import com.cnlive.strike.xiaojiaspeaker.commonInfo.XiaoJIaCommInfo; |
| 23 | 23 | import com.cnlive.strike.xiaojiaspeaker.constants.BlufiConstants; |
| 24 | 24 | import com.cnlive.strike.xiaojiaspeaker.frame.presenter.SelectWifiFragmentPresenter; |
| 25 | +import com.cnlive.strike.xiaojiaspeaker.model.message.EventMsg; | |
| 25 | 26 | import com.cnlive.strike.xiaojiaspeaker.netWork.bean.NetworkResultBean; |
| 26 | 27 | import com.cnlive.strike.xiaojiaspeaker.ui.activity.ConnBluetoothSuccessActivity; |
| 27 | 28 | import com.cnlive.strike.xiaojiaspeaker.ui.adapter.WifiRecycleAdapter; |
| ... | ... | @@ -33,6 +34,8 @@ import com.cnlive.strike.xiaojiaspeaker.util.QMUITipDialogUtil; |
| 33 | 34 | import com.cnlive.strike.xiaojiaspeaker.util.WifiUtils; |
| 34 | 35 | import com.hannesdorfmann.mosby3.mvp.MvpView; |
| 35 | 36 | |
| 37 | +import org.greenrobot.eventbus.EventBus; | |
| 38 | + | |
| 36 | 39 | import java.io.UnsupportedEncodingException; |
| 37 | 40 | import java.util.ArrayList; |
| 38 | 41 | import java.util.List; |
| ... | ... | @@ -288,9 +291,9 @@ public class SelectWifiFragmentView implements MvpView { |
| 288 | 291 | if (null==getContext()){ |
| 289 | 292 | return; |
| 290 | 293 | } |
| 291 | - QMUITipDialogUtil.dismessDialog(); | |
| 292 | 294 | //判断是否绑定 |
| 293 | 295 | if (networkResultBean.isIsBinded()&&"success".equals(networkResultBean.getResult().trim())) { |
| 296 | + EventBus.getDefault().post(new EventMsg(EventMsg.CLOSE_BLUETOOTH_ACTIVITY,null)); | |
| 294 | 297 | ConnBluetoothSuccessActivity.startActivity(getContext(), networkResultBean); |
| 295 | 298 | } else { |
| 296 | 299 | AlertUtil.showDeftToast(getContext(), "配网失败"); | ... | ... |