80,351
社区成员
发帖
与我相关
我的任务
分享
//for update
@DefaultBoolean(value = false)
boolean isUpdate();
/**
* get update
*/
public Boolean getPrefUpdate() {
return avcPrefs.isUpdate().get();
}
/**
* set update
*/
public void setPrefUpdate(boolean bUpdate) {
avcPrefs.isUpdate().put(bUpdate);
}
/**
* install apk thread
*/
private class installApkThread extends Thread {
@Override
public void run() {
if ((downLoadStorageFileDir!=null) && (apkName!=null)) {
String filePath = downLoadStorageFileDir + File.separatorChar + apkName;
AvcLog.printW(TAG, "start install apk : " + filePath);
AvcApp.the().getCore().setPrefUpdate(true);
int iRet = installSlientEx(filePath);
AvcLog.printW(TAG, "finish install apk : the result is " + iRet);
} else {
AvcLog.printW(TAG, "installApkThread : path is null");
}
}
};
private void initData() {
Boolean bUpdate = avcCore.getPrefUpdate();
if (bUpdate) {
avcCore.setPrefUpdate(false);
AvcLog.printW(TAG, "Has do a update, reboot...");
avcCore.onReboot();
}
}