Commit 5346c2c5f14037728f718a439ee096c546729036
1 parent
3fb14aac
1 优化远程控制开关在无网络下关闭逻辑
Showing
2 changed files
with
10 additions
and
6 deletions
config.gradle
module_xiaojiaSoundBox/src/main/java/com/cnlive/strike/xiaojiaspeaker/ui/activity/RemoteControlActivity.java
| @@ -153,7 +153,7 @@ public class RemoteControlActivity extends AppCompatActivity { | @@ -153,7 +153,7 @@ public class RemoteControlActivity extends AppCompatActivity { | ||
| 153 | } | 153 | } |
| 154 | hideLoadingView(); | 154 | hideLoadingView(); |
| 155 | setRemoteBtnState(baseInfo.getData().isRemoteControlStatus()); | 155 | setRemoteBtnState(baseInfo.getData().isRemoteControlStatus()); |
| 156 | - XiaoJIaCommInfo.setRemoteSwitchState(RemoteControlActivity.this,baseInfo.getData().isRemoteControlStatus()); | 156 | + XiaoJIaCommInfo.setRemoteSwitchState(RemoteControlActivity.this, baseInfo.getData().isRemoteControlStatus()); |
| 157 | } | 157 | } |
| 158 | }) | 158 | }) |
| 159 | .setFailureCallback(new FailureCallback() { | 159 | .setFailureCallback(new FailureCallback() { |
| @@ -203,7 +203,7 @@ public class RemoteControlActivity extends AppCompatActivity { | @@ -203,7 +203,7 @@ public class RemoteControlActivity extends AppCompatActivity { | ||
| 203 | return; | 203 | return; |
| 204 | } | 204 | } |
| 205 | QMUITipDialogUtil.dismessDialog(); | 205 | QMUITipDialogUtil.dismessDialog(); |
| 206 | - XiaoJIaCommInfo.setRemoteSwitchState(RemoteControlActivity.this,binding.sbSwitch.isChecked()); | 206 | + XiaoJIaCommInfo.setRemoteSwitchState(RemoteControlActivity.this, binding.sbSwitch.isChecked()); |
| 207 | 207 | ||
| 208 | } | 208 | } |
| 209 | }) | 209 | }) |
| @@ -213,11 +213,15 @@ public class RemoteControlActivity extends AppCompatActivity { | @@ -213,11 +213,15 @@ public class RemoteControlActivity extends AppCompatActivity { | ||
| 213 | if (null == binding) { | 213 | if (null == binding) { |
| 214 | return; | 214 | return; |
| 215 | } | 215 | } |
| 216 | - setRemoteBtnState(false); | 216 | + if ("0".equals(type)) { |
| 217 | + setRemoteBtnState(false); | ||
| 218 | + } else { | ||
| 219 | + setRemoteBtnState(true); | ||
| 220 | + } | ||
| 217 | //显示重试 | 221 | //显示重试 |
| 218 | QMUITipDialogUtil.dismessDialog(); | 222 | QMUITipDialogUtil.dismessDialog(); |
| 219 | - AlertUtil.showDeftToast(context,s); | ||
| 220 | - XiaoJIaCommInfo.setRemoteSwitchState(RemoteControlActivity.this,binding.sbSwitch.isChecked()); | 223 | + AlertUtil.showDeftToast(context, s); |
| 224 | + XiaoJIaCommInfo.setRemoteSwitchState(RemoteControlActivity.this, binding.sbSwitch.isChecked()); | ||
| 221 | } | 225 | } |
| 222 | }) | 226 | }) |
| 223 | 227 |