|
|
@ -96,23 +96,23 @@ public class SimUtil {
|
|
|
|
queryFile(content);
|
|
|
|
queryFile(content);
|
|
|
|
} else if (content.contains(SmsTypeEnum.REBOOT1.value())) {
|
|
|
|
} else if (content.contains(SmsTypeEnum.REBOOT1.value())) {
|
|
|
|
ifmessageCorrect = true;
|
|
|
|
ifmessageCorrect = true;
|
|
|
|
restartType = 0;
|
|
|
|
restartType = RestartTypeEnum.REBOOT1.value();
|
|
|
|
sendmessage = getSendString(content, ifmessageCorrect);
|
|
|
|
sendmessage = getSendString(content, ifmessageCorrect);
|
|
|
|
} else if (content.contains(SmsTypeEnum.REBOOT2.value()) || content.contains(SmsTypeEnum.REBOOT3.value())) {
|
|
|
|
} else if (content.contains(SmsTypeEnum.REBOOT2.value()) || content.contains(SmsTypeEnum.REBOOT3.value())) {
|
|
|
|
ifmessageCorrect = true;
|
|
|
|
ifmessageCorrect = true;
|
|
|
|
restartType = 0;
|
|
|
|
restartType = RestartTypeEnum.REBOOT2.value();
|
|
|
|
sendmessage = getSendString(content, ifmessageCorrect);
|
|
|
|
sendmessage = getSendString(content, ifmessageCorrect);
|
|
|
|
} else if (content.contains(SmsTypeEnum.RESTART_MP.value()) || content.contains(SmsTypeEnum.RESTART_MP2.value())) {
|
|
|
|
} else if (content.contains(SmsTypeEnum.RESTART_MP.value()) || content.contains(SmsTypeEnum.RESTART_MP2.value())) {
|
|
|
|
ifmessageCorrect = true;
|
|
|
|
ifmessageCorrect = true;
|
|
|
|
restartType = 1;
|
|
|
|
restartType = RestartTypeEnum.RESTARTMPAPP.value();
|
|
|
|
sendmessage = getSendString(content, ifmessageCorrect);
|
|
|
|
sendmessage = getSendString(content, ifmessageCorrect);
|
|
|
|
} else if (content.contains(SmsTypeEnum.RESTART_MPMST.value()) || content.contains(SmsTypeEnum.RESTART_MPMST2.value())) {
|
|
|
|
} else if (content.contains(SmsTypeEnum.RESTART_MPMST.value()) || content.contains(SmsTypeEnum.RESTART_MPMST2.value())) {
|
|
|
|
ifmessageCorrect = true;
|
|
|
|
ifmessageCorrect = true;
|
|
|
|
restartType = 2;
|
|
|
|
restartType = RestartTypeEnum.RESTARTMPMASTER.value();
|
|
|
|
sendmessage = getSendString(content, ifmessageCorrect);
|
|
|
|
sendmessage = getSendString(content, ifmessageCorrect);
|
|
|
|
} else if (content.contains(SmsTypeEnum.RESTART_BOTH_APPS.value()) || content.contains(SmsTypeEnum.RESTART_BOTH_APPS2.value())) {
|
|
|
|
} else if (content.contains(SmsTypeEnum.RESTART_BOTH_APPS.value()) || content.contains(SmsTypeEnum.RESTART_BOTH_APPS2.value())) {
|
|
|
|
ifmessageCorrect = true;
|
|
|
|
ifmessageCorrect = true;
|
|
|
|
restartType = 3;
|
|
|
|
restartType = RestartTypeEnum.RESTARTBOTH.value();
|
|
|
|
sendmessage = getSendString(content, ifmessageCorrect);
|
|
|
|
sendmessage = getSendString(content, ifmessageCorrect);
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_YW_SCHEDULE.value())) {
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_YW_SCHEDULE.value())) {
|
|
|
|
ifmessageCorrect = true;
|
|
|
|
ifmessageCorrect = true;
|
|
|
@ -159,7 +159,7 @@ public class SimUtil {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
restartType = 2;
|
|
|
|
restartType = RestartTypeEnum.RESTARTMPMASTER.value();
|
|
|
|
sendmessage = getSendString(content, ifmessageCorrect);
|
|
|
|
sendmessage = getSendString(content, ifmessageCorrect);
|
|
|
|
} else if (content.contains(SmsTypeEnum.GET_YW_SCHEDULE.value())) {
|
|
|
|
} else if (content.contains(SmsTypeEnum.GET_YW_SCHEDULE.value())) {
|
|
|
|
List<Integer> absHeartbeats = UpdateSysConfigUtil.getAbsHeartbeats(context);
|
|
|
|
List<Integer> absHeartbeats = UpdateSysConfigUtil.getAbsHeartbeats(context);
|
|
|
@ -191,13 +191,13 @@ public class SimUtil {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
restartType = 2;
|
|
|
|
restartType = RestartTypeEnum.RESTARTMPMASTER.value();
|
|
|
|
sendmessage = getSendString(content, ifmessageCorrect);
|
|
|
|
sendmessage = getSendString(content, ifmessageCorrect);
|
|
|
|
} else if (content.contains(SmsTypeEnum.GET_OPERATE.value())) {
|
|
|
|
} else if (content.contains(SmsTypeEnum.GET_OPERATE.value())) {
|
|
|
|
int mntnMode = UpdateSysConfigUtil.getMntnMode(context);
|
|
|
|
int mntnMode = UpdateSysConfigUtil.getMntnMode(context);
|
|
|
|
sendmessage = SmsTypeEnum.GET_OPERATE.value() + "=" + mntnMode;
|
|
|
|
sendmessage = SmsTypeEnum.GET_OPERATE.value() + "=" + mntnMode;
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_OPERATE_URL.value())) {
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_OPERATE_URL.value())) {
|
|
|
|
restartType = 2;
|
|
|
|
restartType = RestartTypeEnum.RESTARTMPMASTER.value();
|
|
|
|
String[] split1 = StringUtils.splitString1(content);
|
|
|
|
String[] split1 = StringUtils.splitString1(content);
|
|
|
|
if (split1 != null && split1.length > 1) {
|
|
|
|
if (split1 != null && split1.length > 1) {
|
|
|
|
String s = split1[1];
|
|
|
|
String s = split1[1];
|
|
|
@ -228,7 +228,7 @@ public class SimUtil {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sendmessage = getSendString(content, ifmessageCorrect);
|
|
|
|
sendmessage = getSendString(content, ifmessageCorrect);
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_CMDID.value())) {
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_CMDID.value())) {
|
|
|
|
restartType = 1;
|
|
|
|
restartType = RestartTypeEnum.RESTARTMPAPP.value();
|
|
|
|
String[] split1 = StringUtils.splitString1(content);
|
|
|
|
String[] split1 = StringUtils.splitString1(content);
|
|
|
|
if (split1 != null && split1.length > 1) {
|
|
|
|
if (split1 != null && split1.length > 1) {
|
|
|
|
ifmessageCorrect = true;
|
|
|
|
ifmessageCorrect = true;
|
|
|
@ -247,7 +247,7 @@ public class SimUtil {
|
|
|
|
String serialNo = UpdateSysConfigUtil.getSerialNo();
|
|
|
|
String serialNo = UpdateSysConfigUtil.getSerialNo();
|
|
|
|
sendmessage = SmsTypeEnum.GET_CMDID.value() + "=" + serialNo + "," + cmdid;
|
|
|
|
sendmessage = SmsTypeEnum.GET_CMDID.value() + "=" + serialNo + "," + cmdid;
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_IP.value())) {
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_IP.value())) {
|
|
|
|
restartType = 1;
|
|
|
|
restartType = RestartTypeEnum.RESTARTMPAPP.value();
|
|
|
|
String[] split1 = StringUtils.splitString1(content);
|
|
|
|
String[] split1 = StringUtils.splitString1(content);
|
|
|
|
if (split1 != null && split1.length > 1) {
|
|
|
|
if (split1 != null && split1.length > 1) {
|
|
|
|
String server = null;
|
|
|
|
String server = null;
|
|
|
@ -284,7 +284,7 @@ public class SimUtil {
|
|
|
|
String ip = UpdateSysConfigUtil.getIP(context);
|
|
|
|
String ip = UpdateSysConfigUtil.getIP(context);
|
|
|
|
sendmessage = SmsTypeEnum.GET_IP.value() + "=" + ip;
|
|
|
|
sendmessage = SmsTypeEnum.GET_IP.value() + "=" + ip;
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_OSD.value())) {
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_OSD.value())) {
|
|
|
|
restartType = 1;
|
|
|
|
restartType = RestartTypeEnum.RESTARTMPAPP.value();
|
|
|
|
String[] split1 = StringUtils.splitString1(content);
|
|
|
|
String[] split1 = StringUtils.splitString1(content);
|
|
|
|
sendmessage = getSendString(content, ifmessageCorrect);
|
|
|
|
sendmessage = getSendString(content, ifmessageCorrect);
|
|
|
|
if (split1 != null && split1.length >= 2) {
|
|
|
|
if (split1 != null && split1.length >= 2) {
|
|
|
@ -420,7 +420,7 @@ public class SimUtil {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_PHOTO_SCHEDULE_LIST.value())) {
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_PHOTO_SCHEDULE_LIST.value())) {
|
|
|
|
restartType = 1;
|
|
|
|
restartType = RestartTypeEnum.RESTARTMPAPP.value();
|
|
|
|
String[] split1 = StringUtils.splitString1(content);
|
|
|
|
String[] split1 = StringUtils.splitString1(content);
|
|
|
|
if (split1 != null && split1.length > 1) {
|
|
|
|
if (split1 != null && split1.length > 1) {
|
|
|
|
String s = split1[1];
|
|
|
|
String s = split1[1];
|
|
|
@ -447,7 +447,7 @@ public class SimUtil {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_RESOLUTION.value())) {
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_RESOLUTION.value())) {
|
|
|
|
restartType = 1;
|
|
|
|
restartType = RestartTypeEnum.RESTARTMPAPP.value();
|
|
|
|
String[] split1 = StringUtils.splitString1(content);
|
|
|
|
String[] split1 = StringUtils.splitString1(content);
|
|
|
|
if (split1 != null && split1.length > 1) {
|
|
|
|
if (split1 != null && split1.length > 1) {
|
|
|
|
String s = split1[1];
|
|
|
|
String s = split1[1];
|
|
|
@ -497,7 +497,7 @@ public class SimUtil {
|
|
|
|
sendmessage = getSendString(content, ifmessageCorrect);
|
|
|
|
sendmessage = getSendString(content, ifmessageCorrect);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_HEART.value())) {
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_HEART.value())) {
|
|
|
|
restartType = 1;
|
|
|
|
restartType = RestartTypeEnum.RESTARTMPAPP.value();
|
|
|
|
String[] split1 = StringUtils.splitString1(content);
|
|
|
|
String[] split1 = StringUtils.splitString1(content);
|
|
|
|
if (split1 != null && split1.length == 2) {
|
|
|
|
if (split1 != null && split1.length == 2) {
|
|
|
|
ifmessageCorrect = true;
|
|
|
|
ifmessageCorrect = true;
|
|
|
@ -515,10 +515,10 @@ public class SimUtil {
|
|
|
|
} else if (content.contains(SmsTypeEnum.SIMCARD.value())) {
|
|
|
|
} else if (content.contains(SmsTypeEnum.SIMCARD.value())) {
|
|
|
|
sendmessage = getSimcardInfo(context);
|
|
|
|
sendmessage = getSimcardInfo(context);
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_AUTO_TIME.value())) {
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_AUTO_TIME.value())) {
|
|
|
|
restartType = 1;
|
|
|
|
restartType = RestartTypeEnum.RESTARTMPAPP.value();
|
|
|
|
sendmessage = setAutoTime(context, content);
|
|
|
|
sendmessage = setAutoTime(context, content);
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_TP.value())) {
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_TP.value())) {
|
|
|
|
restartType = 1;
|
|
|
|
restartType = RestartTypeEnum.RESTARTMPAPP.value();
|
|
|
|
String[] split1 = StringUtils.splitString1(content);
|
|
|
|
String[] split1 = StringUtils.splitString1(content);
|
|
|
|
if (split1 != null && split1.length == 2) {
|
|
|
|
if (split1 != null && split1.length == 2) {
|
|
|
|
ifmessageCorrect = true;
|
|
|
|
ifmessageCorrect = true;
|
|
|
@ -534,7 +534,7 @@ public class SimUtil {
|
|
|
|
int tb = UpdateSysConfigUtil.getTB(context);
|
|
|
|
int tb = UpdateSysConfigUtil.getTB(context);
|
|
|
|
sendmessage = SmsTypeEnum.GET_TP.value() + "=" + tb;
|
|
|
|
sendmessage = SmsTypeEnum.GET_TP.value() + "=" + tb;
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_PACKAGE.value())) {
|
|
|
|
} else if (content.contains(SmsTypeEnum.SET_PACKAGE.value())) {
|
|
|
|
restartType = 1;
|
|
|
|
restartType = RestartTypeEnum.RESTARTMPAPP.value();
|
|
|
|
String[] split1 = StringUtils.splitString1(content);
|
|
|
|
String[] split1 = StringUtils.splitString1(content);
|
|
|
|
if (split1 != null && split1.length == 2) {
|
|
|
|
if (split1 != null && split1.length == 2) {
|
|
|
|
ifmessageCorrect = true;
|
|
|
|
ifmessageCorrect = true;
|
|
|
|