feat: 模拟器下载流程调整 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2125
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user