|
|
@ -493,7 +493,7 @@ public class AppMaster {
|
|
|
|
mService.logger.warning("Recv Upload Log" + url);
|
|
|
|
mService.logger.warning("Recv Upload Log" + url);
|
|
|
|
int noSpecData = jsonObject.optInt("noSpecData", 0);
|
|
|
|
int noSpecData = jsonObject.optInt("noSpecData", 0);
|
|
|
|
uploadLogs(url, noSpecData == 0);
|
|
|
|
uploadLogs(url, noSpecData == 0);
|
|
|
|
uploadMasterLogs(url);
|
|
|
|
// uploadMasterLogs(url);
|
|
|
|
} else if (TextUtils.equals(cmd, CMD_SET_CMA)) {
|
|
|
|
} else if (TextUtils.equals(cmd, CMD_SET_CMA)) {
|
|
|
|
String ip = jsonObject.optString("value_str", null);
|
|
|
|
String ip = jsonObject.optString("value_str", null);
|
|
|
|
int port = jsonObject.optInt("value_int", 0);
|
|
|
|
int port = jsonObject.optInt("value_int", 0);
|
|
|
@ -870,6 +870,15 @@ public class AppMaster {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<File> folders = new ArrayList<>();
|
|
|
|
|
|
|
|
folders.add(logDir);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final String masterAppDir = MicroPhotoContext.buildMasterAppDir(mService.getApplicationContext());
|
|
|
|
|
|
|
|
final File mlogDir = new File(masterAppDir + "logs" + File.separator);
|
|
|
|
|
|
|
|
if (logDir.exists()) {
|
|
|
|
|
|
|
|
folders.add(mlogDir);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ZipUtils.Filter filter = new ZipUtils.Filter() {
|
|
|
|
ZipUtils.Filter filter = new ZipUtils.Filter() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean match(String fileName) {
|
|
|
|
public boolean match(String fileName) {
|
|
|
@ -882,7 +891,8 @@ public class AppMaster {
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
ZipUtils.ZipFolder(logDir, file, filter);
|
|
|
|
|
|
|
|
|
|
|
|
ZipUtils.ZipFolders(folders, file, filter);
|
|
|
|
|
|
|
|
|
|
|
|
if (!file.exists()) {
|
|
|
|
if (!file.exists()) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|