Commit f6ada5982b9a60c45d849798bf0702d2a7e96ad7

Authored by YangShuai
1 parent 9ad337a6

1 优化远程开关逻辑

config.gradle
@@ -21,7 +21,7 @@ ext { @@ -21,7 +21,7 @@ ext {
21 //编译方式 21 //编译方式
22 debug : false, 22 debug : false,
23 //版本号 23 //版本号
24 - version: "0.2.21", 24 + version: "0.2.22",
25 //Lib库前缀 25 //Lib库前缀
26 packeg : "com.cnlive.module", 26 packeg : "com.cnlive.module",
27 //Lib库名称 27 //Lib库名称
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) {