|
|
|
@ -978,13 +978,15 @@ public class AppMaster {
|
|
|
|
|
}
|
|
|
|
|
String apkPath = file.getAbsolutePath();
|
|
|
|
|
if (dl.download(url, apkPath)) {
|
|
|
|
|
sendResult(cid, 1, action, action + ":" + mCmdid);
|
|
|
|
|
// sendResult(cid, 1, action, action + ":" + mCmdid);
|
|
|
|
|
Context context = mService.getApplicationContext();
|
|
|
|
|
mService.logger.info("Upgrade APP: " + url);
|
|
|
|
|
|
|
|
|
|
SysApi.installApk(context, apkPath, context.getPackageName(), true);
|
|
|
|
|
sendResult(cid, 1, action, action + ":" + mCmdid + " is installing");
|
|
|
|
|
} else {
|
|
|
|
|
mService.logger.warning("Failed to Download:" + url);
|
|
|
|
|
sendResult(cid, 1, action, action + ":" + mCmdid + " download failed");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|