修复bug

serial
BlueMatthew 1 year ago
parent 91f987fd99
commit a842da9b33

@ -90,7 +90,7 @@ public class AppMaster {
}
private long getBootTime() {
return (System.currentTimeMillis() - SystemClock.elapsedRealtimeNanos() / 1000000) / 1000000;
return (System.currentTimeMillis() - SystemClock.elapsedRealtimeNanos() / 1000000) / 1000;
}
public void start() {
@ -195,7 +195,7 @@ public class AppMaster {
}
private void sendResult(long cid, int result, String action) {
private void sendResult(long cid, int result, String action, String content) {
String url = mMasterUrl;
try {
if (!url.endsWith("/")) {
@ -204,7 +204,8 @@ public class AppMaster {
url += "status/?";
url += MicroPhotoContext.MASTER_URL_CMDID + "=" + URLEncoder.encode(mCmdid, "UTF-8") +
"&cid=" + Long.toString(cid) +
"&res=" + Integer.toString(result) + "&act=" + URLEncoder.encode(action, "UTF-8");
"&res=" + Integer.toString(result) + "&act=" + URLEncoder.encode(action, "UTF-8") +
"&content=" + URLEncoder.encode(content, "UTF-8");
HttpRequest.get(url);
} catch (Exception ex) {
ex.printStackTrace();
@ -394,7 +395,7 @@ public class AppMaster {
}
String apkPath = file.getAbsolutePath();
if (dl.download(url, apkPath)) {
sendResult(cid, 1, action);
sendResult(cid, 1, action, action + ":" + mCmdid);
Context context = mService.getApplicationContext();
SysApi.installApk(context, apkPath, context.getPackageName(), true);
}

Loading…
Cancel
Save