Compare commits
16 Commits
feature-ci
...
v5.19.4-73
| Author | SHA1 | Date | |
|---|---|---|---|
| e4d2036cc2 | |||
| 0600daadde | |||
| c4b1be9925 | |||
| b2a6393afd | |||
| b5c15940a1 | |||
| 3f6f55b265 | |||
| ba666da059 | |||
| fa29e00864 | |||
| 1b412bf081 | |||
| b1abadc145 | |||
| 05da2c3da4 | |||
| e83ece5520 | |||
| 08a86c778d | |||
| b216d33d6b | |||
| 4fe062ea40 | |||
| 7d678085d5 |
@ -1265,7 +1265,8 @@ public class DownloadManager implements DownloadStatusListener {
|
||||
*/
|
||||
public static void updateDownloadMetaMap() {
|
||||
String isOverwrite;
|
||||
if (LunchType.UPDATE.name().equals(SPUtils.getString(Constants.SP_INSTALL_TYPE))) {
|
||||
String installType = SPUtils.getString(Constants.SP_INSTALL_TYPE);
|
||||
if (LunchType.UPDATE.name().equals(installType)) {
|
||||
isOverwrite = "true";
|
||||
} else {
|
||||
isOverwrite = "false";
|
||||
@ -1280,6 +1281,7 @@ public class DownloadManager implements DownloadStatusListener {
|
||||
map.put(HttpDnsManager.IMEI, MetaUtil.getBase64EncodedIMEI());
|
||||
map.put(HttpDnsManager.TOKEN, UserManager.getInstance().getToken());
|
||||
map.put(HttpDnsManager.IS_OVERWRITE, isOverwrite);
|
||||
map.put(HttpDnsManager.INSTALL_TYPE, installType);
|
||||
|
||||
HttpDnsManager.metaMap = map;
|
||||
}
|
||||
|
||||
@ -408,7 +408,7 @@ class GameDetailFragment : ToolbarFragment(), IScrollable {
|
||||
savedInstanceState?.let { mDestinationTab = it.getInt(LAST_SELECTED_POSITION) }
|
||||
mBinding.reuseNoneData.reuseNoneDataTv.text = "页面不见了"
|
||||
mBodyBinding.gamedetailVp.setScrollable(true)
|
||||
mBodyBinding.gamedetailVp.offscreenPageLimit = 3
|
||||
mBodyBinding.gamedetailVp.offscreenPageLimit = 5
|
||||
|
||||
mMaxWidth = resources.displayMetrics.widthPixels - DisplayUtils.dip2px(40f)
|
||||
|
||||
@ -939,7 +939,7 @@ class GameDetailFragment : ToolbarFragment(), IScrollable {
|
||||
for (i in 0 until mBodyBinding.tabLayout.tabCount) {
|
||||
val tab = mBodyBinding.tabLayout.getTabAt(i) ?: continue
|
||||
val tabTitle = if (tab.text != null) tab.text.toString() else ""
|
||||
if (data.showArchive && i == INDEX_ARCHIVE) {
|
||||
if (data.showArchive && i == getTabPositionFromTabName(getString(R.string.game_detail_cloud_archive))) {
|
||||
tab.customView = getArchiveTabView(tabTitle)
|
||||
tab.view.run {
|
||||
clipChildren = false
|
||||
@ -1799,6 +1799,9 @@ class GameDetailFragment : ToolbarFragment(), IScrollable {
|
||||
}
|
||||
|
||||
private fun logTabClick(position: Int) {
|
||||
// 特殊处理延时选中 tab 时可能 fragment 已被移除的情况
|
||||
if (!isAdded) return
|
||||
|
||||
val entrance = if (mEntrance.contains("论坛详情")) "论坛" else "游戏"
|
||||
mGameEntity?.run {
|
||||
when (getTabContentForReal(position)) {
|
||||
@ -1836,7 +1839,7 @@ class GameDetailFragment : ToolbarFragment(), IScrollable {
|
||||
/**
|
||||
* 获取真实的 tab 内容类型
|
||||
* @param position tab 的位置
|
||||
* @return 真实的
|
||||
* @return 真实的 tab 类型
|
||||
*/
|
||||
private fun getTabContentForReal(position: Int): String {
|
||||
return when (mTabTitleList[position]) {
|
||||
@ -1855,6 +1858,15 @@ class GameDetailFragment : ToolbarFragment(), IScrollable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取 tab 的位置
|
||||
* @param tabName tab 名字
|
||||
* @return tab 的真实位置
|
||||
*/
|
||||
private fun getTabPositionFromTabName(tabName: String): Int {
|
||||
return mTabTitleList.indexOf(tabName)
|
||||
}
|
||||
|
||||
private fun handleTabTouchEvent(title: String) {
|
||||
if (title == mTabClickEvent.second && System.currentTimeMillis() - mTabClickEvent.first < 300) {
|
||||
val fragment = mFragmentsList[mBodyBinding.gamedetailVp.currentItem]
|
||||
@ -2088,7 +2100,8 @@ class GameDetailFragment : ToolbarFragment(), IScrollable {
|
||||
|
||||
private fun updateArchiveTabUI() {
|
||||
mBodyBinding.tabLayout.run {
|
||||
getTabAt(INDEX_ARCHIVE)?.customView?.findViewById<ImageView>(R.id.newIv)?.visibility = View.VISIBLE
|
||||
val archivePosition = getTabPositionFromTabName(getString(R.string.game_detail_cloud_archive))
|
||||
getTabAt(archivePosition)?.customView?.findViewById<ImageView>(R.id.newIv)?.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -106,15 +106,17 @@ object VHelper {
|
||||
|
||||
if (!isVSpace || !isVIsUsed()) return@PackageChangeListener
|
||||
|
||||
if (it.type == "安装") {
|
||||
if (it.type == EBPackage.TYPE_INSTALLED) {
|
||||
// 即时调用大概率调不起来,我也不知道为什么,只能延迟大法了
|
||||
AppExecutor.uiExecutor.executeWithDelay({
|
||||
connectService()
|
||||
}, 500)
|
||||
} else if (it.type == "卸载") {
|
||||
} else if (it.type == EBPackage.TYPE_UNINSTALLED) {
|
||||
// 执行卸载逻辑
|
||||
mIsServiceConnected = false
|
||||
mInstalledInfoList.clear()
|
||||
} else if (it.type == EBPackage.TYPE_REPLACED) {
|
||||
connectService()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -164,6 +166,7 @@ object VHelper {
|
||||
* 连接服务
|
||||
*/
|
||||
fun connectService(shouldCheckUpdate: Boolean = false, callbackClosure: (() -> Unit)? = null) {
|
||||
Utils.log(LOG_TAG, "尝试连接 V 服务")
|
||||
toastIfServiceConnectTimeout()
|
||||
|
||||
mPendingAction = callbackClosure
|
||||
@ -599,7 +602,9 @@ object VHelper {
|
||||
packageName,
|
||||
downloadEntity?.gameId ?: "unknown",
|
||||
MetaUtil.getBase64EncodedAndroidId(),
|
||||
HaloApp.getInstance().gid)
|
||||
HaloApp.getInstance().gid,
|
||||
com.gh.gamecenter.BuildConfig.VERSION_NAME,
|
||||
HaloApp.getInstance().channel)
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
context.startActivity(intent)
|
||||
|
||||
|
||||
@ -7,8 +7,8 @@ ext {
|
||||
targetSdkVersion = 28
|
||||
|
||||
// application info (每个大版本之间的 versionCode 增加 20)
|
||||
versionCode = 731
|
||||
versionName = "5.19.1"
|
||||
versionCode = 734
|
||||
versionName = "5.19.4"
|
||||
applicationId = "com.gh.gamecenter"
|
||||
|
||||
// AndroidX
|
||||
|
||||
Submodule libraries/LGLibrary updated: b722530e2b...9de633eae8
@ -7,6 +7,7 @@ import com.gh.gamecenter.core.AppExecutor.ioExecutor
|
||||
import com.gh.gamecenter.core.AppExecutor.lightWeightIoExecutor
|
||||
import com.gh.gamecenter.core.AppExecutor.logExecutor
|
||||
import com.gh.gamecenter.core.AppExecutor.uiExecutor
|
||||
import com.gh.gamecenter.core.utils.SentryHelper
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
import java.util.concurrent.*
|
||||
|
||||
@ -81,7 +82,14 @@ fun runOnIoThread(
|
||||
) {
|
||||
when {
|
||||
isLightWeightTask -> lightWeightIoExecutor.execute(f)
|
||||
isHeavyWightTask -> heavyWeightIoExecutor.execute(f)
|
||||
isHeavyWightTask -> {
|
||||
try {
|
||||
heavyWeightIoExecutor.execute(f)
|
||||
} catch (e: RejectedExecutionException) {
|
||||
SentryHelper.onEvent("HEAVY_TASK_REJECTED", "digest", e.localizedMessage)
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
else -> ioExecutor.execute(f)
|
||||
}
|
||||
}
|
||||
|
||||
Submodule vspace-bridge updated: 53a4a515f5...83c993dd97
Reference in New Issue
Block a user