尝试缓存下载队列状态,避免下载按钮直接访问数据库
This commit is contained in:
@ -105,7 +105,7 @@ public class GameUtils {
|
||||
}
|
||||
}
|
||||
|
||||
downloadEntity = DownloadManager.getInstance(context).getDownloadEntityByUrl(apkEntity.getUrl());
|
||||
downloadEntity = DownloadManager.getInstance(context).getDownloadEntitySnapshotByUrl(apkEntity.getUrl());
|
||||
if (downloadEntity != null) {
|
||||
if (downloadEntity.getStatus().equals(DownloadStatus.done)) {
|
||||
doneCount++;
|
||||
@ -191,7 +191,7 @@ public class GameUtils {
|
||||
}
|
||||
}
|
||||
|
||||
downloadEntity = DownloadManager.getInstance(context).getDownloadEntityByUrl(apkEntity.getUrl());
|
||||
downloadEntity = DownloadManager.getInstance(context).getDownloadEntitySnapshotByUrl(apkEntity.getUrl());
|
||||
if (downloadEntity != null) {
|
||||
if (downloadEntity.getStatus().equals(DownloadStatus.done)) {
|
||||
doneCount++;
|
||||
|
||||
Reference in New Issue
Block a user