Compare commits

...

11 Commits

Author SHA1 Message Date
964b2afaae chore: 版本更新至 5.31.3 2023-10-19 16:29:57 +08:00
7cd4a45915 Merge branch 'feat/GHZS-3682' into 'release'
feat: 关于畅玩游戏在安卓8及以下系统的实名问题 https://jira.shanqu.cc/browse/GHZS-3704

See merge request halo/android/assistant-android!1393
2023-10-19 16:28:43 +08:00
707361e660 feat: 关于畅玩游戏在安卓8及以下系统的实名问题 https://jira.shanqu.cc/browse/GHZS-3704 2023-10-19 16:23:34 +08:00
1e13ae4815 Merge branch 'feat/GHZS-3675' into 'release'
feat: V5.31.0发布前调整

See merge request halo/android/assistant-android!1388
2023-10-18 17:10:05 +08:00
e18aeb92dd feat: V5.31.0发布前调整 https://jira.shanqu.cc/browse/GHZS-3675 2023-10-18 17:10:05 +08:00
24aaeeee7f Merge branch 'fix-GHZS-dialog-error' into 'release'
fix: 修复DownloadDialog点击继续下载没有反应的问题

See merge request halo/android/assistant-android!1387
2023-10-18 13:58:06 +08:00
a70a397199 fix: 修复DownloadDialog点击继续下载没有反应的问题 2023-10-18 13:58:06 +08:00
7f4d06fbe1 Merge branch 'feat/GHZS-3638' into 'release'
feat: 穿山甲广告SDK更换新版本 https://jira.shanqu.cc/browse/GHZS-3686

See merge request halo/android/assistant-android!1386
2023-10-18 10:02:09 +08:00
c28d6f3080 feat: 穿山甲广告SDK更换新版本 https://jira.shanqu.cc/browse/GHZS-3686 2023-10-16 16:35:59 +08:00
7be72e76f2 Merge branch 'feature-GHZS-sentry-335870' into 'release'
fix: Sentry关于神策埋点上报导致的空指针异常的BUG

See merge request halo/android/assistant-android!1376
2023-10-10 11:53:39 +08:00
6d5b0eb1e8 fix: Sentry关于神策埋点上报导致的空指针异常的BUG 2023-10-10 11:53:39 +08:00
10 changed files with 64 additions and 30 deletions

View File

@ -42,6 +42,7 @@ object DownloadDialogHelper {
gameName = gameEntity.name ?: "",
gameType = gameEntity.categoryChinese
)
callback.onCallback()
},
cancelClickCallback = {
SensorsBridge.trackGameDownloadDialogClick(
@ -50,7 +51,6 @@ object DownloadDialogHelper {
gameName = gameEntity.name ?: "",
gameType = gameEntity.categoryChinese
)
callback.onCallback()
},
touchOutsideCallback = {
SensorsBridge.trackGameDownloadDialogClick(

View File

@ -1329,6 +1329,8 @@ public class DownloadManager implements DownloadStatusListener {
map.put(HttpDnsManager.TOKEN, UserManager.getInstance().getToken());
map.put(HttpDnsManager.IS_OVERWRITE, isOverwrite);
map.put(HttpDnsManager.INSTALL_TYPE, installType);
map.put(HttpDnsManager.ANDROID_ID, MetaUtil.getBase64EncodedAndroidId());
map.put(HttpDnsManager.ANDROID_SDK_VERSION, String.valueOf(Build.VERSION.SDK_INT));
HttpDnsManager.metaMap = map;
}

View File

@ -65,9 +65,17 @@ class SplashScreenActivity : BaseActivity() {
private var mViewModel: SplashScreenViewModel? = null
private var mShouldPrefetchData = true
private val mPermissions = arrayOf(
PermissionHelper.PERMISSION_GET_INSTALLED_LIST
)
private val mPermissions by lazy {
if (isStoragePermissionsRequired) {
arrayOf(
Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.READ_EXTERNAL_STORAGE,
PermissionHelper.PERMISSION_GET_INSTALLED_LIST
)
} else {
arrayOf(PermissionHelper.PERMISSION_GET_INSTALLED_LIST)
}
}
override fun onCreate(savedInstanceState: Bundle?) {
mViewModel = viewModelProvider()
@ -282,9 +290,7 @@ class SplashScreenActivity : BaseActivity() {
private fun doFlavorInit() {
HaloApp.getInstance().flavorProvider.init(HaloApp.getInstance(), this, PkgHelper.getActivateRatio())
if (HaloApp.getInstance().channel == "GH_206" || PackageFlavorHelper.IS_TEST_FLAVOR) {
SensorsBridge.init(HaloApp.getInstance(), HaloApp.getInstance().channel)
}
SensorsBridge.init(HaloApp.getInstance(), HaloApp.getInstance().channel)
}
private fun getGitLogString(): String {
@ -489,6 +495,11 @@ class SplashScreenActivity : BaseActivity() {
companion object {
private const val REQUEST_PERMISSION_TAG = 30001
// 启动时的存储权限获取是否开启
val isStoragePermissionsRequired by lazy {
HaloApp.getInstance().channel != "GH_206" && HaloApp.getInstance().channel != "GH_110"
}
@JvmStatic
fun getSplashScreenIntent(context: Context?, bundle: Bundle?): Intent {
val intent = Intent(context, SplashScreenActivity::class.java)

View File

@ -200,14 +200,14 @@ public class DetailViewHolder {
DownloadManager.getInstance().cancel(mDownloadEntity.getUrl());
} else {
NewFlatLogUtils.INSTANCE.logGameInstall(
mDownloadEntity.getGameId(),
mDownloadEntity.getName(),
mGameEntity.getId(),
mGameEntity.getName() != null ? mGameEntity.getName() : "",
"主动安装"
);
SensorsBridge.trackInstallGameClick(
mDownloadEntity.getGameId(),
mDownloadEntity.getName(),
mGameEntity.getId(),
mGameEntity.getName() != null ? mGameEntity.getName() : "",
"主动安装"
);
PackageInstaller.install(mViewHolder.context, mDownloadEntity);
@ -335,14 +335,14 @@ public class DetailViewHolder {
if (mGameEntity.getApk().isEmpty()) return;
NewFlatLogUtils.INSTANCE.logGameInstall(
mDownloadEntity.getGameId(),
mDownloadEntity.getName(),
mGameEntity.getId(),
mGameEntity.getName() != null ? mGameEntity.getName() : "",
"主动安装"
);
SensorsBridge.trackInstallGameClick(
mDownloadEntity.getGameId(),
mDownloadEntity.getName(),
mGameEntity.getId(),
mGameEntity.getName() != null ? mGameEntity.getName() : "",
"主动安装"
);

View File

@ -537,14 +537,21 @@ class GameDownloadFragmentAdapter extends BaseRecyclerAdapter<ViewHolder> {
final String gameType,
final String platform
) {
DialogHelper.showPluginDialog(mContext, pluginDesc, gameId, gameName, gameType, platform, () -> {
if (FileUtils.isEmptyFile(path)) {
Utils.toast(mContext, R.string.install_failure_hint);
} else {
PackageInstaller.uninstall(mContext, path);
}
return null;
});
DialogHelper.showPluginDialog(
mContext,
pluginDesc,
gameId != null ? gameId : "",
gameName != null ? gameName : "",
gameType != null ? gameType : "",
platform != null ? platform : "",
() -> {
if (FileUtils.isEmptyFile(path)) {
Utils.toast(mContext, R.string.install_failure_hint);
} else {
PackageInstaller.uninstall(mContext, path);
}
return null;
});
}
private void removeDownload(DownloadEntity entry) {

View File

@ -1,6 +1,7 @@
package com.gh.gamecenter.entity
import com.gh.gamecenter.R
import com.gh.gamecenter.SplashScreenActivity
import com.google.gson.annotations.SerializedName
class PrivacyPolicyEntity(
@ -21,6 +22,15 @@ class PrivacyPolicyEntity(
data.bottomContent =
"点击<a href=\"https://resource.ghzs.com/page/privacy_policies/permissions.html\">查看权限应用场景</a>,你可以在系统设置中关闭授权,但可能会影响部分功能的正常使用"
val permissions = arrayListOf<PermissionsEntity>()
if (SplashScreenActivity.isStoragePermissionsRequired) {
permissions.add(
PermissionsEntity(
icon = "res:///" + R.drawable.permission_storage,
name = "存储权限",
intro = "用于下载游戏,以及实现内容缓存提升浏览体验"
)
)
}
permissions.add(
PermissionsEntity(
icon = "res:///" + R.drawable.permission_installed_list,

View File

@ -17,6 +17,13 @@ class NHttpClient : DefaultHttpClient() {
mConnection.setRequestProperty(HttpDnsManager.OAID, HttpDnsManager.metaMap[HttpDnsManager.OAID])
mConnection.setRequestProperty(HttpDnsManager.TOKEN, HttpDnsManager.metaMap[HttpDnsManager.TOKEN])
mConnection.setRequestProperty(HttpDnsManager.IS_OVERWRITE, HttpDnsManager.metaMap[HttpDnsManager.IS_OVERWRITE])
mConnection.setRequestProperty(HttpDnsManager.INSTALL_TYPE, HttpDnsManager.metaMap[HttpDnsManager.INSTALL_TYPE])
mConnection.setRequestProperty(HttpDnsManager.ANDROID_ID, HttpDnsManager.metaMap[HttpDnsManager.ANDROID_ID])
mConnection.setRequestProperty(
HttpDnsManager.ANDROID_SDK_VERSION,
HttpDnsManager.metaMap[HttpDnsManager.ANDROID_SDK_VERSION]
)
mConnection.setRequestProperty(HttpDnsManager.REFERER, HttpDnsManager.DEFAULT_REFERER)
val isEmulator = meta?.get("is_emulator")
val isForcedRealName = meta?.get("force_real_name")

View File

@ -7,8 +7,8 @@ ext {
targetSdkVersion = 28
// application info (每个大版本之间的 versionCode 增加 20)
versionCode = 971
versionName = "5.31.1"
versionCode = 973
versionName = "5.31.3"
applicationId = "com.gh.gamecenter"
// AndroidX
@ -136,9 +136,7 @@ ext {
documentfile = "1.0.1"
csjVersion = "5.4.1.6"
csjVersion = "5.4.1.6"
csjVersion = "5.6.0.7"
qGameVersion = "1.57.14"
qGameAdVersion = "4.520.1390"

View File

@ -48,7 +48,6 @@ object CsjAdHelper {
.debug(PackageFlavorHelper.IS_TEST_FLAVOR) // 测试阶段打开,可以通过日志排查问题,上线时去除该调用
.directDownloadNetworkType(TTAdConstant.NETWORK_STATE_WIFI) // 允许直接下载的网络状态集合,没有设置的网络下点击下载apk会有二次确认弹窗弹窗中会披露应用信息
.supportMultiProcess(false) // 是否支持多进程true支持
.asyncInit(true) // 是否异步初始化sdk,设置为true可以减少SDK初始化耗时。3450版本开始废弃~~
.customController(object : TTCustomController() {
/**
* 是否允许SDK主动使用地理位置信息