|
|
|
@ -61,6 +61,7 @@ public class AppMaster {
|
|
|
|
|
public static final String CMD_REBOOT_APP = "cmd_reboot_app";
|
|
|
|
|
public static final String CMD_REBOOT_MASTER = "cmd_reboot_mpmaster";
|
|
|
|
|
public static final String CMD_REBOOT_DEV = "yw_cmd_android_reboot";
|
|
|
|
|
public static final String CMD_REBOOT_MCU_DEV = "yw_cmd_mcu_reboot";
|
|
|
|
|
public static final String CMD_UPGRADE = "upgrade";
|
|
|
|
|
public static final String CMD_UPLOAD_LOGS = "yw_cmd_upload_i1_zip_log";
|
|
|
|
|
public static final String CMD_SET_CMA = "i1_cmd_set_i1_server_ip_port";
|
|
|
|
@ -566,11 +567,13 @@ public class AppMaster {
|
|
|
|
|
|
|
|
|
|
private void processCmd(long cid, JSONObject jsonObject) {
|
|
|
|
|
String cmd = jsonObject.optString("cmd", "");
|
|
|
|
|
|
|
|
|
|
if (TextUtils.equals(cmd, CMD_REBOOT_DEV)) {
|
|
|
|
|
mService.logger.warning("Recv Reset Cmd");
|
|
|
|
|
MpMasterService.rebootDevice();
|
|
|
|
|
// SysApi.reboot(mService.getApplicationContext());
|
|
|
|
|
} else if (TextUtils.equals(cmd, CMD_REBOOT_MCU_DEV)) {
|
|
|
|
|
mService.logger.warning("Recv Reset MCU Cmd");
|
|
|
|
|
SysApi.reboot(mService.getApplicationContext());
|
|
|
|
|
} else if (TextUtils.equals(cmd, CMD_UPLOAD_LOGS)) {
|
|
|
|
|
String url = jsonObject.optString("url", null);
|
|
|
|
|
mService.logger.warning("Recv Upload Log " + url);
|
|
|
|
|