Commit f6ada5982b9a60c45d849798bf0702d2a7e96ad7
1 parent
9ad337a6
1 优化远程开关逻辑
Showing
2 changed files
with
6 additions
and
2 deletions
config.gradle
module_xiaojiaSoundBox/src/main/java/com/cnlive/strike/xiaojiaspeaker/commonInfo/XiaoJIaCommInfo.java
| @@ -40,7 +40,11 @@ public class XiaoJIaCommInfo { | @@ -40,7 +40,11 @@ public class XiaoJIaCommInfo { | ||
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | public static boolean getRemoteSwitchState(Context context) { | 42 | public static boolean getRemoteSwitchState(Context context) { |
| 43 | - return MySpHelper.getInstance(context, MyCurrentMode).getBoolean(KEY_REMOTE_SWITCH_STATE, false); | 43 | + if (getUserIsBind(context)) { |
| 44 | + return MySpHelper.getInstance(context, MyCurrentMode).getBoolean(KEY_REMOTE_SWITCH_STATE, false); | ||
| 45 | + } else { | ||
| 46 | + return false; | ||
| 47 | + } | ||
| 44 | } | 48 | } |
| 45 | 49 | ||
| 46 | public static void setUserIsBind(Context context, boolean isBind) { | 50 | public static void setUserIsBind(Context context, boolean isBind) { |