接口limit改为page_size,修复游戏列表下载与详情下载安装判断不一致问题,安装游戏删除addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)

This commit is contained in:
kehaoyuan
2018-04-26 17:09:16 +08:00
parent 29faea14c6
commit 684fa318ec
9 changed files with 26 additions and 43 deletions

View File

@ -156,15 +156,19 @@ public class DownloadItemUtils {
holder.gameDownloadBtn.setText(R.string.update);
holder.gameDownloadBtn.setBackgroundResource(R.drawable.game_item_btn_download_style);
} else {
Object gh_id = PackageUtils.getMetaData(context, packageName, "gh_id");
if (gameEntity.getTag() != null && gameEntity.getTag().size() != 0
&& !TextUtils.isEmpty(apkEntity.getGhVersion())
&& !PackageUtils.isSignature(context, packageName)) {
holder.gameDownloadBtn.setText(R.string.pluggable);
setwhat(context, holder, apkEntity, packageName);
} else {
} else if (gh_id == null || gh_id.equals(gameEntity.getId())) {
holder.gameDownloadBtn.setText(R.string.launch);
holder.gameDownloadBtn.setTextColor(ContextCompat.getColor(context, R.color.theme));
holder.gameDownloadBtn.setBackgroundResource(R.drawable.detail_downloading_normal_style);
} else {
holder.gameDownloadBtn.setText(R.string.download);
holder.gameDownloadBtn.setBackgroundResource(R.drawable.game_item_btn_download_style);
}
}
} else {