This commit is contained in:
郭涛
2022-10-27 14:40:06 +08:00
parent ea51827ed6
commit da8717693d
30 changed files with 797 additions and 110 deletions

View File

@ -89,7 +89,7 @@ public class GameUtils {
int installCount = 0; // 已安装数量
boolean isRelatedEmulatorInstalled = false; // 若该游戏是模拟器游戏时其对应的模拟器是否已经安装
boolean isInstalledNewSimulator = false;// 是否安装新模拟器
DownloadEntity downloadEntity = null;
Object gh_id;
apkFor:
@ -138,6 +138,7 @@ public class GameUtils {
}
}
if (SimulatorGameManager.isSimulatorGame(gameEntity)) {
isInstalledNewSimulator = SimulatorGameManager.isNewSimulatorInstalled(context);
DownloadEntity simulatorDownloadEntity = SimulatorGameManager.findDownloadEntityByUrl(apkEntity.getUrl());
if (simulatorDownloadEntity != null && gameEntity.getSimulator() != null) {
boolean isInstalled = PackageUtils.isInstalledFromAllPackage(context, gameEntity.getSimulator().getApk().getPackageName());
@ -150,8 +151,7 @@ public class GameUtils {
}
}
}
if (isRelatedEmulatorInstalled && doneCount != 0) {
if ((isRelatedEmulatorInstalled || isInstalledNewSimulator) && doneCount != 0) {
return context.getString(R.string.launch);
}