From 013398d14bbde04bea844d7553709fcdf836920b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=BE=E7=A5=A5=E4=BF=8A?= Date: Wed, 18 Sep 2024 10:51:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=80=90=E5=85=89=E7=8E=AF=E5=8A=A9?= =?UTF-8?q?=E6=89=8B=E3=80=91=E6=B1=82=E7=89=88=E6=9C=AC=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E9=97=AE=E9=A2=98=20https://jira.shanqu.cc/b?= =?UTF-8?q?rowse/GHZSCY-6651?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 4 +++- .../java/com/gh/download/dialog/DownloadDialog.kt | 13 ++++++++++--- .../gamecenter/common/constant/EntranceConsts.java | 1 + 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 84193153a7..76a8576f1e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -72,6 +72,7 @@ android_build: only: - dev - release + - feat/GHZSCY-6651 # 代码检查 sonarqube_analysis: @@ -156,4 +157,5 @@ oss-upload&send-email: - /usr/local/bin/python /ci-android-mail-jira-comment.py only: - dev - - release \ No newline at end of file + - release + - feat/GHZSCY-6651 \ No newline at end of file diff --git a/app/src/main/java/com/gh/download/dialog/DownloadDialog.kt b/app/src/main/java/com/gh/download/dialog/DownloadDialog.kt index b7b5535e60..5c057893a0 100644 --- a/app/src/main/java/com/gh/download/dialog/DownloadDialog.kt +++ b/app/src/main/java/com/gh/download/dialog/DownloadDialog.kt @@ -53,6 +53,7 @@ class DownloadDialog : BaseDraggableDialogFragment() { private var mAdapter: DownloadDialogAdapter? = null private var mTraceEvent: ExposureEvent? = null + private var mPlatformListAutoDownload: Boolean = true private var mPlatformList: List? = null private var mParentBundle: Bundle? = null @@ -99,10 +100,15 @@ class DownloadDialog : BaseDraggableDialogFragment() { super.onCreate(savedInstanceState) mParentBundle = requireActivity().intent.extras?.getBundle(ToolBarActivity.NORMAL_FRAGMENT_BUNDLE) - mPlatformList = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { - mParentBundle?.getParcelableArrayList(EntranceConsts.KEY_PLATFORMS, GamePlatform::class.java) + mPlatformListAutoDownload = mParentBundle?.getBoolean(EntranceConsts.KEY_PLATFORMS_AUTO_DOWNLOAD, true) ?: true + mPlatformList = if (mPlatformListAutoDownload) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + mParentBundle?.getParcelableArrayList(EntranceConsts.KEY_PLATFORMS, GamePlatform::class.java) + } else { + mParentBundle?.getParcelableArrayList(EntranceConsts.KEY_PLATFORMS) + } } else { - mParentBundle?.getParcelableArrayList(EntranceConsts.KEY_PLATFORMS) + emptyList() } mGameEntity = requireArguments().getParcelable(GameEntity::class.java.simpleName)!! mEntrance = requireArguments().getString(EntranceConsts.KEY_ENTRANCE) ?: "" @@ -223,6 +229,7 @@ class DownloadDialog : BaseDraggableDialogFragment() { mParentBundle?.putString(EntranceConsts.KEY_PLATFORM, "") mParentBundle?.putString(EntranceConsts.KEY_PACKAGENAME, "") } + mParentBundle?.putBoolean(EntranceConsts.KEY_PLATFORMS_AUTO_DOWNLOAD, false) }, 200) } diff --git a/module_common/src/main/java/com/gh/gamecenter/common/constant/EntranceConsts.java b/module_common/src/main/java/com/gh/gamecenter/common/constant/EntranceConsts.java index 86863f9f93..2288176822 100644 --- a/module_common/src/main/java/com/gh/gamecenter/common/constant/EntranceConsts.java +++ b/module_common/src/main/java/com/gh/gamecenter/common/constant/EntranceConsts.java @@ -118,6 +118,7 @@ public class EntranceConsts { public static final String KEY_GAME_NAME = "game_name"; public static final String KEY_PLATFORMS = "platforms"; + public static final String KEY_PLATFORMS_AUTO_DOWNLOAD = "platform_auto_download"; public static final String KEY_GAME_INFO = "game_info"; public static final String KEY_GAME_TYPE = "game_type";