Commit e012c1a4 by pye52

由于TPS设备没有root权限,采取常规installApp方法需要用户介入操作,现已替换成静默安装方案

parent 5892c2a9
......@@ -5,6 +5,7 @@ import com.bgycc.smartcanteen.api.SCRetrofit;
import com.bgycc.smartcanteen.entity.Command;
import com.bgycc.smartcanteen.entity.CommandResponse;
import com.bgycc.smartcanteen.entity.CommandUpdate;
import com.bgycc.smartcanteen.utils.DangerousUtils;
import com.blankj.utilcode.util.AppUtils;
import com.blankj.utilcode.util.FileIOUtils;
import com.blankj.utilcode.util.FileUtils;
......@@ -68,7 +69,7 @@ public class UpdateCommandHandler extends CommandHandler {
(info.getPackageName().equals(BuildConfig.APPLICATION_ID) && info.getVersionCode() < BuildConfig.VERSION_CODE)) {
return failed("不允许安装低版本");
} else {
AppUtils.installApp(updateApk);
DangerousUtils.installAppSilent(updateApk);
return success("安装更新包");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment