1.多app安装超过安装数量限制时或非法app安装失败进入无限安装的死循环,导致launcher偶尔性死机或设备热保护重启

This commit is contained in:
2026-04-14 15:59:13 +08:00
parent b7f20918f5
commit 0f390ca8d0

View File

@@ -757,13 +757,23 @@ public class AppManager {
tmpFile.renameTo(file); tmpFile.renameTo(file);
//tmpFile.delete(); //tmpFile.delete();
if(list!=null&&list.size()>0){ if(list!=null&&list.size()>0){
boolean flag = PakageInstallUtil.silentInstall(mContext, file.getAbsolutePath()); new Thread(new Runnable() {
LogUtils.loge("no task and restart sys apk back to tmp install result="+flag); @Override
public void run() {
boolean flag = PakageInstallUtil.silentInstall(mContext, file.getAbsolutePath());
LogUtils.loge("no task and restart sys apk back to tmp install result="+flag);
}
}).start();
} }
}else if(file.exists()&&file.length()==adsInfoBean.getAppSize()){ }else if(file.exists()&&file.length()==adsInfoBean.getAppSize()){
if(list!=null&&list.size()>0){ if(list!=null&&list.size()>0){
boolean flag = PakageInstallUtil.silentInstall(mContext, file.getAbsolutePath()); new Thread(new Runnable() {
LogUtils.loge("no task and restart sys apk not install result="+flag); @Override
public void run() {
boolean flag = PakageInstallUtil.silentInstall(mContext, file.getAbsolutePath());
LogUtils.loge("no task and restart sys apk not install result="+flag);
}
}).start();
} }
} }
} }