fix: 【光环助手】求版本下载跳转问题 https://jira.shanqu.cc/browse/GHZSCY-6651

This commit is contained in:
曾祥俊
2024-09-18 10:51:36 +08:00
parent dca0fc7261
commit 013398d14b
3 changed files with 14 additions and 4 deletions

View File

@ -72,6 +72,7 @@ android_build:
only:
- dev
- release
- feat/GHZSCY-6651
# 代码检查
sonarqube_analysis:
@ -157,3 +158,4 @@ oss-upload&send-email:
only:
- dev
- release
- feat/GHZSCY-6651

View File

@ -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<GamePlatform>? = 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)
}

View File

@ -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";