补充启动(畅玩)的判断代码

This commit is contained in:
juntao
2022-05-25 15:11:05 +08:00
parent 88842de6c7
commit 8e0dcd74e5
2 changed files with 21 additions and 11 deletions

View File

@ -18,6 +18,7 @@ import com.gh.gamecenter.entity.GameUpdateEntity;
import com.gh.gamecenter.entity.PluginLocation;
import com.gh.gamecenter.entity.SettingsEntity;
import com.gh.gamecenter.manager.PackagesManager;
import com.gh.vspace.VHelper;
import com.lightgame.download.DownloadEntity;
import com.lightgame.download.DownloadStatus;
@ -89,7 +90,7 @@ public class GameUtils {
boolean isRelatedEmulatorInstalled = false; // 若该游戏是模拟器游戏时其对应的模拟器是否已经安装
DownloadEntity downloadEntity;
DownloadEntity downloadEntity = null;
Object gh_id;
apkFor:
for (ApkEntity apkEntity : gameEntity.getApk()) {
@ -149,8 +150,11 @@ public class GameUtils {
}
if (gameEntity.isVGame()) {
// 如果 doneCount 为 0 表明本地并没有此游戏的数据库数据,需要重新下载
if (doneCount == 0) {
// 如果 doneCount 为 0 或者数据库为空
// 表明本地并没有此游戏的数据库数据,需要重新下载
if (doneCount == 0
|| downloadEntity == null
|| !VHelper.isInstalled(downloadEntity.getPackageName())) {
installCount = 0;
} else {
doneCount = 0;