feat: 使用独立的数据库来存已安装的畅玩游戏
This commit is contained in:
@ -31,6 +31,8 @@ import com.gh.gamecenter.entity.ApkEntity;
|
||||
import com.gh.gamecenter.entity.GameEntity;
|
||||
import com.gh.gamecenter.entity.GameUpdateEntity;
|
||||
import com.gh.gamecenter.manager.PackagesManager;
|
||||
import com.gh.vspace.VHelper;
|
||||
import com.gh.vspace.db.VGameEntity;
|
||||
import com.halo.assistant.HaloApp;
|
||||
import com.lightgame.download.DownloadEntity;
|
||||
import com.lightgame.utils.Utils;
|
||||
@ -127,12 +129,14 @@ public class PackageUtils {
|
||||
|
||||
// 畅玩游戏根据 md5 是否一致确定是否需要更新
|
||||
if (gameEntity.isVGame()) {
|
||||
DownloadEntity entity = DownloadManager.getInstance().getDownloadEntitySnapshotByPackageName(apkEntity.getPackageName());
|
||||
if (entity != null) {
|
||||
String md5FromInstalledVGame = ExtensionsKt.getMetaExtra(entity, Constants.APK_MD5);
|
||||
VGameEntity vGameEntity = VHelper.getVGameSnapshot(apkEntity.getPackageName());
|
||||
if (vGameEntity != null) {
|
||||
String md5FromInstalledVGame = ExtensionsKt.getMetaExtra(vGameEntity.getDownloadEntity(), Constants.APK_MD5);
|
||||
String md5FromRequest = apkEntity.getMd5();
|
||||
|
||||
shouldShowUpdate = md5FromRequest != null && !md5FromRequest.equals(md5FromInstalledVGame);
|
||||
} else {
|
||||
shouldShowUpdate = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user