已下载的模拟器游戏显示在 已安装、玩过的游戏 等位置

This commit is contained in:
张玉久
2020-10-19 10:35:04 +08:00
parent 66fb57f708
commit d18eeaf346
6 changed files with 49 additions and 9 deletions

View File

@ -516,6 +516,17 @@ public class DownloadManager implements DownloadStatusListener {
return all != null ? all : new ArrayList<>();
}
public List<DownloadEntity> getAllSimulatorDownloadEntity() {
List<DownloadEntity> downloadEntityList = mDownloadDao.getAll();
ArrayList<DownloadEntity> filteredDownloadEntityList = new ArrayList<>();
for (DownloadEntity downloadEntity : downloadEntityList) {
if (ExtensionsKt.isSimulatorGame(downloadEntity) && downloadEntity.getStatus() == DownloadStatus.done) {
filteredDownloadEntityList.add(downloadEntity);
}
}
return filteredDownloadEntityList;
}
/**
* 获取所有下载列表中的任务排除静默更新
*/