Compare commits

...

764 Commits

Author SHA1 Message Date
e4d2036cc2 chore: 版本更新至 5.19.4 2023-03-01 19:12:38 +08:00
0600daadde Merge branch 'feature-add_download_header' into 'release'
feat: 添加新的 download header 供后端接口使用

See merge request halo/android/assistant-android!752
2023-03-01 17:55:07 +08:00
c4b1be9925 feat: 添加新的 download header 供后端接口使用 2023-03-01 13:43:37 +08:00
b2a6393afd Merge branch 'hotfix-v5.19.3-733-vspace_update_issue' into 'release'
fix: 修复畅玩组件更新后因为服务连接延迟导致的游戏游戏状态显示异常

See merge request halo/android/assistant-android!750
2023-03-01 13:38:46 +08:00
b5c15940a1 Merge branch 'hotfix-v5.19.3-733-archive_tab_error' into 'release'
fix: 修复游戏详情隐藏专区 tab 且显示云存档 tab 时,云存档红点错位的问题

See merge request halo/android/assistant-android!751
2023-03-01 13:38:01 +08:00
3f6f55b265 fix: 修复畅玩组件更新后因为服务连接延迟导致的游戏游戏状态显示异常 2023-03-01 11:19:27 +08:00
ba666da059 fix: 修复游戏详情隐藏专区 tab 且显示云存档 tab 时,云存档红点错位的问题 2023-03-01 11:16:33 +08:00
fa29e00864 Merge branch 'hotfix-v5.19.3-733-gamedetail_tab' into 'release'
fix: 修复游戏详情页超过 3 个 tab 时,页面变空白的问题

See merge request halo/android/assistant-android!748
2023-02-28 16:27:36 +08:00
1b412bf081 fix: 修复游戏详情页超过 3 个 tab 时,页面变空白的问题 2023-02-28 16:13:52 +08:00
b1abadc145 chore: 版本更新至 5.19.3 2023-02-27 16:21:22 +08:00
05da2c3da4 Merge branch 'hotfix-v5.19.2-732-crashes' into 'release'
fix: 修复闪退

See merge request halo/android/assistant-android!742
2023-02-27 15:35:18 +08:00
e83ece5520 fix: 捕抓游戏详情页上报视频相关日志时的闪退 https://sentry.shanqu.cc/organizations/lightgame/issues/272842/?project=22&query=release%3Acom.gh.gamecenter%405.19.2%2B732+error.unhandled%3Atrue&sort=freq 2023-02-27 15:26:59 +08:00
08a86c778d fix: 修复游戏详情延迟选中时的闪退 https://sentry.shanqu.cc/organizations/lightgame/issues/272842/?project=22&query=release%3Acom.gh.gamecenter%405.19.2%2B732+error.unhandled%3Atrue&sort=freq 2023-02-27 14:57:03 +08:00
b216d33d6b chore: 版本更新至 5.19.2 2023-02-24 16:00:21 +08:00
4fe062ea40 Merge branch 'feature-GHZS-1386' into 'release'
feat: 启动畅玩游戏时添加光环版本和渠道 https://jira.shanqu.cc/browse/GHZS-1386

See merge request halo/android/assistant-android!739
2023-02-24 11:14:43 +08:00
7d678085d5 feat: 启动畅玩游戏时添加光环版本和渠道 https://jira.shanqu.cc/browse/GHZS-1386 2023-02-24 11:09:57 +08:00
d2238de04f Merge branch 'hotfix-v5.19.1-731-vspace_uninstall' into 'release'
fix: 畅玩组件被卸载时清空已安装的畅玩游戏列表

See merge request halo/android/assistant-android!732
2023-02-22 09:19:25 +08:00
43334a91ef fix: 畅玩组件被卸载时清空已安装的畅玩游戏列表 2023-02-22 09:19:25 +08:00
e10207452a Merge branch 'hotfix-v5.19.1-731-vspace_log' into 'release'
fix: 畅玩启动时传递游戏 id 等数据,避免日志上报异常

See merge request halo/android/assistant-android!731
2023-02-21 17:34:01 +08:00
b9532a7b2d fix: 畅玩启动时传递游戏 id 等数据,避免日志上班异常 2023-02-21 17:27:38 +08:00
3f84ad3a96 Merge branch 'hotfix-v5.19.1-731-wrong_download_time' into 'release'
fix: 修复小文件下载过快,统计的下载累计时间为 0 的问题

See merge request halo/android/assistant-android!729
2023-02-20 17:51:38 +08:00
74ed0080c3 fix: 修复小文件下载过快,统计的下载累计时间为 0 的问题 2023-02-20 17:40:27 +08:00
826c6a896f Merge branch 'hotfix-v5.19.1-731-mypost_crash' into 'release'
fix: 修复我的发布页面跳转时回调的闪退问题

See merge request halo/android/assistant-android!725
2023-02-20 10:36:00 +08:00
90f386e84b fix: 修复我的发布页面跳转时回调的闪退问题 2023-02-20 09:58:28 +08:00
cd158d380b Merge branch 'hotfix-v5.19.1-731-game_detail_crash' into 'release'
fix: 修复游戏详情更新toolbar时出现的闪退问题

See merge request halo/android/assistant-android!716
2023-02-16 14:33:07 +08:00
63ca94509f fix: 修复游戏详情更新toolbar时出现的闪退问题 2023-02-16 14:23:36 +08:00
b395b6f049 chore: 版本更新至 5.19.1 2023-02-16 09:49:52 +08:00
bb6f5e4367 Merge branch 'hotfix-v5.19.0-730-download_log_crash' into 'release'
fix: 修复下载时长为 0 时的闪退问题

See merge request halo/android/assistant-android!714
2023-02-16 09:48:36 +08:00
e9bd2b3b59 fix: 修复下载时长为 0 时的闪退问题 2023-02-16 09:43:31 +08:00
739526e9fa Merge branch 'fix-GHZS-1247' into 'release'
fix: 【光环助手】多线程下载相关数据埋点补充-0214测试 https://jira.shanqu.cc/browse/GHZS-1247

See merge request halo/android/assistant-android!709
2023-02-15 10:44:20 +08:00
cbabfe72f7 fix: 【光环助手】多线程下载相关数据埋点补充-0214测试 https://jira.shanqu.cc/browse/GHZS-1247 2023-02-15 10:37:11 +08:00
f21368c761 Merge branch 'hotfix-gamedetail_jump_tab_error' into 'release'
fix: 修改游戏详情点击tab跳转错误问题

See merge request halo/android/assistant-android!706
2023-02-14 09:23:42 +08:00
2a020fb269 fix: 修改游戏详情点击tab跳转错误问题 2023-02-13 18:44:54 +08:00
89b463f40b Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	dependencies.gradle
2023-02-13 17:29:50 +08:00
32a6dff6cc feat: 【光环助手】多线程下载相关数据埋点补充 https://jira.shanqu.cc/browse/GHZS-1213 2023-02-13 17:28:28 +08:00
f4018172e3 Merge branch 'feature-GHZS-1213' into 'dev'
【光环助手】多线程下载相关数据埋点补充 https://jira.shanqu.cc/browse/GHZS-1213

See merge request halo/android/assistant-android!705
2023-02-13 17:26:09 +08:00
4745cede61 【光环助手】多线程下载相关数据埋点补充 https://jira.shanqu.cc/browse/GHZS-1213 2023-02-13 17:26:09 +08:00
1b5be46d53 Merge branch 'fix-GHZS-1200' into 'dev'
fix: 修改版块内容列表-发现页下载按钮不更新的问题

See merge request halo/android/assistant-android!703
2023-02-13 15:32:26 +08:00
97b7b6bcaa fix: 修改版块内容列表-发现页下载按钮不更新的问题 2023-02-13 15:30:29 +08:00
d76539c46a Merge branch 'fix-vgame_backup_clear_issue' into 'dev'
fix: 修复卸载所有畅玩游戏时没有正确清理数据库文件备份的问题

See merge request halo/android/assistant-android!702
2023-02-10 19:19:46 +08:00
a8a8f6835a fix: 修复卸载所有畅玩游戏时没有正确清理数据库文件备份的问题 2023-02-10 19:14:47 +08:00
656213153d Merge branch 'fix-webview_check_crash' into 'dev'
fix: 修复部分设备上检测 webview 类型时触发的闪退问题

See merge request halo/android/assistant-android!701
2023-02-10 17:53:42 +08:00
4a70dfed06 fix: 修复部分设备上检测 webview 类型时触发的闪退问题 2023-02-10 17:27:47 +08:00
4306f25b5e Merge branch 'fix-vgame_launch_issue' into 'dev'
fix: 保证在主线程启动畅玩游戏

See merge request halo/android/assistant-android!700
2023-02-10 16:43:43 +08:00
608b0d1c3a fix: 保证在主线程启动畅玩游戏 2023-02-10 16:41:15 +08:00
9071675fae Merge branch 'fix-GHZS-1221' into 'dev'
fix: 【游戏工具】原神悬浮窗登录问题 https://jira.shanqu.cc/browse/GHZS-1221

See merge request halo/android/assistant-android!698
2023-02-10 10:06:36 +08:00
21dc906600 fix: 【游戏工具】原神悬浮窗登录问题 https://jira.shanqu.cc/browse/GHZS-1221 2023-02-10 10:02:52 +08:00
4b90b43d0f Merge branch 'fix-GHZS-1229' into 'dev'
fix: 修复畅玩管理相关问题(1, 2, 4) https://jira.shanqu.cc/browse/GHZS-1229

See merge request halo/android/assistant-android!697
2023-02-10 09:14:05 +08:00
a03016a70c fix: 修复畅玩管理相关问题(1, 2, 4) https://jira.shanqu.cc/browse/GHZS-1229 2023-02-09 18:08:20 +08:00
0957ad65a3 Merge branch 'fix-vgame_database_issue' into 'dev'
fix: 修复畅玩游戏因为安装完成插入数据库异常而导致的显示问题

See merge request halo/android/assistant-android!696
2023-02-09 15:34:23 +08:00
13b004a78d fix: 修复畅玩游戏因为安装完成插入数据库异常而导致的显示问题 2023-02-09 15:28:18 +08:00
6d4c16e1a9 Merge branch 'fix-vspace_installed_status' into 'dev'
fix: 修复畅玩组件没有图标时的检测安装问题

See merge request halo/android/assistant-android!695
2023-02-08 15:30:12 +08:00
efcff725ee fix: 修复畅玩组件没有图标时的检测安装问题 2023-02-08 15:24:05 +08:00
6076ad971f Merge branch 'feature-GHZS-1191' into 'dev'
fix: 【光环助手】模拟器banner图展示不完整 https://jira.shanqu.cc/browse/GHZS-1191

See merge request halo/android/assistant-android!694
2023-02-08 14:59:37 +08:00
44b497a697 fix: 【光环助手】模拟器banner图展示不完整 https://jira.shanqu.cc/browse/GHZS-1191 2023-02-08 14:59:37 +08:00
f7b86ef23c Merge branch 'fix-GHZS-1207' into 'dev'
fix: 修复评价详情回复列表内容高亮可复制文本不生效的问题 https://jira.shanqu.cc/browse/GHZS-1207

See merge request halo/android/assistant-android!692
2023-02-08 14:32:39 +08:00
3972b6fa17 fix: 修复评价详情回复列表内容高亮可复制文本不生效的问题 https://jira.shanqu.cc/browse/GHZS-1207 2023-02-08 14:26:21 +08:00
ead6e13ae5 Merge branch 'feature-GHZS-1187' into 'dev'
fix: 镜像设置相关功能优化—0206测试 https://jira.shanqu.cc/browse/GHZS-1187

See merge request halo/android/assistant-android!691
2023-02-08 13:54:36 +08:00
0588d072bc fix: 镜像设置相关功能优化—0206测试 https://jira.shanqu.cc/browse/GHZS-1187 2023-02-08 12:24:58 +08:00
f39010f2cb Merge branch 'feature-GHZS-1200' into 'dev'
fix: 【光环助手】首页/版块内容列表-发现页 下载问题 https://jira.shanqu.cc/browse/GHZS-1200

See merge request halo/android/assistant-android!690
2023-02-08 11:37:13 +08:00
fdc6907e93 fix: 【光环助手】首页/版块内容列表-发现页 下载问题 https://jira.shanqu.cc/browse/GHZS-1200 2023-02-08 11:28:54 +08:00
63ef4bd9df Merge branch 'fix-vspace_without_icon_error' into 'dev'
fix: 修复畅玩组件没有桌面图标时的检测安装问题

See merge request halo/android/assistant-android!688
2023-02-08 10:38:15 +08:00
eb6f078654 fix: 修复畅玩组件没有图标时的检测安装问题 2023-02-08 10:34:11 +08:00
8d4b8bdd01 Merge branch 'fix-horizontal_subject_click_issue' into 'dev'
fix: 修复横向固定专题跳转游戏详情下载按钮为空的问题

See merge request halo/android/assistant-android!687
2023-02-07 17:50:52 +08:00
ef7b8a7d79 fix: 修复横向固定专题跳转游戏详情下载按钮为空的问题 2023-02-07 17:43:37 +08:00
125640c22d Merge branch 'fix-GHZS-1167' into 'dev'
fix: 修复解压异常导致任务无法被删除的问题 https://jira.shanqu.cc/browse/GHZS-1167

See merge request halo/android/assistant-android!686
2023-02-07 16:57:29 +08:00
f4d7fd8715 fix: 修复解压异常导致任务无法被删除的问题 https://jira.shanqu.cc/browse/GHZS-1167 2023-02-07 16:51:53 +08:00
04cf28fc66 Merge branch 'feature-GHZS-1155' into 'dev'
fix:【光环助手】游戏评分在模拟器无法发布回复问题 https://jira.shanqu.cc/browse/GHZS-1155

See merge request halo/android/assistant-android!685
2023-02-06 17:39:04 +08:00
f2874d6b03 fix:【光环助手】游戏评分在模拟器无法发布回复问题 https://jira.shanqu.cc/browse/GHZS-1155 2023-02-06 17:09:53 +08:00
d21b5492c0 Merge branch 'fix-GHZS-1167' into 'dev'
fix: 修复浏览器安装模式下XAPK无法安装问题 https://jira.shanqu.cc/browse/GHZS-1167

See merge request halo/android/assistant-android!684
2023-02-06 16:00:39 +08:00
9aa21d6649 fix: 修复浏览器安装模式下XAPK无法安装问题 https://jira.shanqu.cc/browse/GHZS-1167 2023-02-06 15:56:05 +08:00
f6b40a02e7 Merge branch 'feature-GHZS-1157' into 'dev'
fix: 游戏镜像相关数据埋点补充—客户端 https://jira.shanqu.cc/browse/GHZS-1157

See merge request halo/android/assistant-android!682
2023-02-03 14:00:12 +08:00
f1d7ecda57 fix: 游戏镜像相关数据埋点补充—客户端 https://jira.shanqu.cc/browse/GHZS-1157 2023-02-03 13:56:33 +08:00
5c80bdaf51 Merge branch 'fix-wrong_log' into 'dev'
fix: 修复游戏详情 tab 点击上报异常 https://jira.shanqu.cc/browse/GHZS-1164

See merge request halo/android/assistant-android!681
2023-02-03 11:43:14 +08:00
4b70b03c0d fix: 修复游戏详情 tab 点击上报异常 https://jira.shanqu.cc/browse/GHZS-1164 2023-02-03 11:38:28 +08:00
7e6d227bdd Merge branch 'feature-GHZS-1161' into 'dev'
fix: 镜像设置相关功能优化—客户端 https://jira.shanqu.cc/browse/GHZS-1161

See merge request halo/android/assistant-android!680
2023-02-03 11:32:59 +08:00
a241ea4ad3 fix: 镜像设置相关功能优化—客户端 https://jira.shanqu.cc/browse/GHZS-1161 2023-02-03 11:28:17 +08:00
7cb88445af Merge branch 'feature-GHZS-1161' into 'dev'
fix: 镜像设置相关功能优化—客户端 https://jira.shanqu.cc/browse/GHZS-1161

See merge request halo/android/assistant-android!679
2023-02-03 09:58:57 +08:00
c895717393 fix: 镜像设置相关功能优化—客户端 https://jira.shanqu.cc/browse/GHZS-1161 2023-02-03 09:55:43 +08:00
23bd96bbb2 Merge branch 'feature-GHZS-1149' into 'dev'
fix: 【光环助手】自定义栏目-正文说明 显示问题 https://jira.shanqu.cc/browse/GHZS-1149

See merge request halo/android/assistant-android!678
2023-02-03 09:16:46 +08:00
3308f18133 fix: 【光环助手】自定义栏目-正文说明 显示问题 https://jira.shanqu.cc/browse/GHZS-1149 2023-02-02 18:41:02 +08:00
7d1298f306 Merge branch 'feature-GHZS-1147' into 'dev'
fix: 【光环助手】游戏详情-大家都在玩 相关问题(2) https://jira.shanqu.cc/browse/GHZS-1147

See merge request halo/android/assistant-android!677
2023-02-02 16:13:42 +08:00
61d48fe392 fix: 【光环助手】游戏详情-大家都在玩 相关问题(2) https://jira.shanqu.cc/browse/GHZS-1147 2023-02-02 16:10:06 +08:00
02f871f95f Merge branch 'feature-GHZS-1148' into 'dev'
fix:【光环助手】首页/版块内容列表-安利墙显示问题 https://jira.shanqu.cc/browse/GHZS-1148

See merge request halo/android/assistant-android!676
2023-02-02 15:50:19 +08:00
8a0c7c9992 fix:【光环助手】首页/版块内容列表-安利墙显示问题 https://jira.shanqu.cc/browse/GHZS-1148 2023-02-02 15:06:45 +08:00
99049af27b chore: 版本更新到 5.17.4 (旧提交好像丢失了?) 2023-01-31 15:02:44 +08:00
d3565f105a Merge branch 'feature-GHZS-1074' into 'release'
feat:【光环助手】快手SDK对接需求—客户端 https://jira.shanqu.cc/browse/GHZS-1074

See merge request halo/android/assistant-android!668
2023-01-31 14:52:43 +08:00
7e004c5bbd feat:【光环助手】快手SDK对接需求—客户端 https://jira.shanqu.cc/browse/GHZS-1074 2023-01-31 14:52:43 +08:00
99c318c571 chore: 版本更新到 5.19.0 2023-01-31 10:24:44 +08:00
e77542abef Merge branch 'feature-GHZS-1020' into 'dev'
fix: 游戏镜像&游戏屏蔽优化汇总—0113补充  https://jira.shanqu.cc/browse/GHZS-1020

See merge request halo/android/assistant-android!667
2023-01-31 09:29:28 +08:00
2a5b189d36 Merge branch 'fix-discover_card_crash' into 'dev'
fix: 修复首页发现页卡片闪退问题

See merge request halo/android/assistant-android!666
2023-01-30 10:52:36 +08:00
8a6ac74b87 fix: 修复首页发现页卡片闪退问题 2023-01-30 10:46:03 +08:00
e8b185cb0f Merge branch 'feature-GHZS-1040' into 'dev'
fix: 游戏广告管理功能(第二期)—0118测试(2) https://jira.shanqu.cc/browse/GHZS-1040

See merge request halo/android/assistant-android!665
2023-01-18 15:01:03 +08:00
e4dc0d9cda fix: 游戏广告管理功能(第二期)—0118测试(2) https://jira.shanqu.cc/browse/GHZS-1040 2023-01-18 14:54:34 +08:00
44bee7bb4b Merge branch 'hotfix-v5.17.4-694-wechat_share_callback' into 'release'
fix: 修复部分机型不回调网页微信分享结果的问题

See merge request halo/android/assistant-android!664
2023-01-18 11:28:50 +08:00
22ff99e6e3 fix: 修复部分机型不回调网页微信分享结果的问题 2023-01-18 11:08:16 +08:00
f70f574e6d fix: 游戏镜像&游戏屏蔽优化汇总—0113补充 https://jira.shanqu.cc/browse/GHZS-1020 2023-01-17 15:14:07 +08:00
b6db8fa99f Merge branch 'feature-GHZS-998' into 'dev'
fix: 游戏镜像&游戏屏蔽优化汇总-0112测试(2(2)) https://jira.shanqu.cc/browse/GHZS-998

See merge request halo/android/assistant-android!663
2023-01-16 16:38:30 +08:00
2e113314ba fix: 游戏镜像&游戏屏蔽优化汇总-0112测试(2(2)) https://jira.shanqu.cc/browse/GHZS-998 2023-01-16 16:33:55 +08:00
d84f208de4 Merge branch 'feature-GHZS-988' into 'dev'
feat: 优化 GameEntity 高频调用方法的性能

See merge request halo/android/assistant-android!662
2023-01-16 10:41:29 +08:00
09ae826e3c feat: 优化 GameEntity 高频调用方法的性能 https://jira.shanqu.cc/browse/GHZS-968 2023-01-15 14:38:19 +08:00
18a04aac52 Merge branch 'fix-home_discover_item_dislocation' into 'dev'
fix: 修复首页发现页Item提交不喜欢错位问题

See merge request halo/android/assistant-android!661
2023-01-13 16:52:19 +08:00
cec418d484 fix: 修复首页发现页Item提交不喜欢错位问题 2023-01-13 16:42:30 +08:00
4dfed562d4 Merge branch 'feature-GHZS-956' into 'dev'
feat: 完善首页列表的子项数据比对代码 https://jira.shanqu.cc/browse/GHZS-956

See merge request halo/android/assistant-android!656
2023-01-13 15:51:36 +08:00
479b243136 feat: 完善首页列表的子项数据比对代码 https://jira.shanqu.cc/browse/GHZS-956 2023-01-13 15:51:36 +08:00
392bdf9715 Merge branch 'feature-GHZS-998' into 'dev'
fix: 游戏镜像&游戏屏蔽优化汇总-0112测试 https://jira.shanqu.cc/browse/GHZS-998

See merge request halo/android/assistant-android!660
2023-01-13 11:47:04 +08:00
39a4dcbe34 fix: 游戏镜像&游戏屏蔽优化汇总-0112测试 https://jira.shanqu.cc/browse/GHZS-998 2023-01-13 11:47:04 +08:00
3104db7c10 Merge branch 'fix_missing_material_button_crash' into 'dev'
fix: 修复 compose 包切换渠道时的闪退问题

See merge request halo/android/assistant-android!659
2023-01-13 10:25:16 +08:00
0f9cff90f8 fix: 修复 compose 包切换渠道时的闪退问题 2023-01-13 10:20:21 +08:00
197e650e81 Merge remote-tracking branch 'origin/release' into dev 2023-01-13 09:53:09 +08:00
f60c907978 Merge branch 'hotfix-vspace_launch_error' into 'release'
修复畅玩游戏安装异常

See merge request halo/android/assistant-android!658
2023-01-12 20:46:00 +08:00
3f21d7d37c 修复畅玩游戏安装异常 2023-01-12 20:46:00 +08:00
e622d6a8ee Merge branch 'hotfix-v5.17.3-693-crashes' into 'release'
fix: 全量捕抓畅玩云存档下载的数据库异常

See merge request halo/android/assistant-android!657
2023-01-12 17:13:42 +08:00
e911588569 fix: 全量捕抓畅玩云存档下载的数据库异常 2023-01-12 17:04:36 +08:00
92d006e018 Merge branch 'feature-GHZS-982' into 'dev'
fix: 处理部分页面深色模式下的显示异常 https://jira.shanqu.cc/browse/GHZS-982

See merge request halo/android/assistant-android!655
2023-01-12 14:15:07 +08:00
a04c9bb7c2 Merge branch 'fix-dark_mode' into 'dev'
处理部分界面切换深色模式出现的异常

See merge request halo/android/assistant-android!652
2023-01-12 14:14:36 +08:00
f0093f3ff5 fix: 处理部分页面深色模式下的显示异常 https://jira.shanqu.cc/browse/GHZS-982 2023-01-12 13:55:32 +08:00
8b1c046475 Merge branch 'hotfix-v5.17.3-693-fix_vgame_update' into 'release'
fix: 修复畅玩游戏更新功能

See merge request halo/android/assistant-android!654
2023-01-12 09:21:06 +08:00
984a1ba517 fix: 修复畅玩游戏更新功能 2023-01-12 09:21:05 +08:00
d5021e139d Merge branch 'fix-data_compare_issue' into 'dev'
fix: 还原部分列表 data class,避免列表比较时的异常

See merge request halo/android/assistant-android!653
2023-01-11 16:59:54 +08:00
d43613b259 fix: 还原部分列表 data class,避免列表比较时的异常 2023-01-11 16:54:14 +08:00
8c2eb3d2be fix: 修复礼包中心右上角管理菜单显示时标题不居中的问题 2023-01-11 11:49:56 +08:00
3e55f2e1a1 fix: 修复礼包中心存号箱tab没有兼容深色模式的问题 2023-01-11 11:48:45 +08:00
2424521d0f fix: 修复部分带Tab界面Tab切换深色模式不变色的问题 2023-01-11 11:48:06 +08:00
e42b060e85 Merge branch 'feature-GHZS-953' into 'dev'
fix: 游戏镜像&游戏屏蔽优化汇总—客户端 https://jira.shanqu.cc/browse/GHZS-953

See merge request halo/android/assistant-android!651
2023-01-11 11:18:28 +08:00
e29a787c73 fix: 游戏镜像&游戏屏蔽优化汇总—客户端 https://jira.shanqu.cc/browse/GHZS-953 2023-01-11 11:18:28 +08:00
362ac1415c Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	dependencies.gradle
2023-01-11 11:11:02 +08:00
a5cdc5b432 Merge branch 'feature-GHZS-973' into 'dev'
fix: 【光环助手】内容卡片-镜像游戏显示优化 https://jira.shanqu.cc/browse/GHZS-973

See merge request halo/android/assistant-android!650
2023-01-11 09:23:41 +08:00
1d3ef08bb3 fix: 【光环助手】内容卡片-镜像游戏显示优化 https://jira.shanqu.cc/browse/GHZS-973 2023-01-10 21:38:13 +08:00
a337494d22 chore: 版本更新到 5.17.3 2023-01-10 16:00:58 +08:00
6c5f9f2689 Merge branch 'hotfix-v5.17.2-692-crashes' into 'release'
修复闪退和畅玩连接异常

See merge request halo/android/assistant-android!649
2023-01-10 16:00:12 +08:00
7ad73b84f9 fix: 修复畅玩 contentProvider 写入闪退,修复畅玩服务断连后首次安装失败的问题 2023-01-10 15:53:34 +08:00
ad683b66d7 fix: 修复检查设备 webview 状态时 webview 列表为空时的闪退 2023-01-10 15:51:12 +08:00
fb719577cf chore: 版本更新到 5.17.2 2023-01-09 18:17:16 +08:00
7770f16565 Merge branch 'hotfix-v5.17.1-691-crashes' into 'release'
fix: 修复存储满了的闪退问题,尝试修复畅玩游戏写入数据时的闪退问题,捕抓畅玩时启动安装 activity 的闪退

See merge request halo/android/assistant-android!647
2023-01-09 18:16:37 +08:00
43fdd0d8d3 Merge branch 'revert-fbd61f37' into 'release'
Revert "Merge branch 'hotfix-v5.17.1-691-home_list_crash' into 'release'"

See merge request halo/android/assistant-android!648
2023-01-09 18:09:37 +08:00
0067ef2c40 Revert "Merge branch 'hotfix-v5.17.1-691-home_list_crash' into 'release'"
This reverts merge request !640
2023-01-09 18:08:07 +08:00
03a7f2bd89 fix: 修复存储满了的闪退问题,尝试修复畅玩游戏写入数据时的闪退问题,捕抓畅玩时启动安装 activity 的闪退 2023-01-09 17:57:47 +08:00
07d4865593 Merge branch 'feature-GHZS-954' into 'release'
fix: 部分机型帖子展示空白 https://jira.shanqu.cc/browse/GHZS-954

See merge request halo/android/assistant-android!646
2023-01-09 12:02:32 +08:00
ba49c9aa25 fix: 部分机型帖子展示空白 https://jira.shanqu.cc/browse/GHZS-954 2023-01-09 12:02:32 +08:00
d972023a6a Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	app/src/main/java/com/gh/base/GlobalActivityLifecycleObserver.kt
#	app/src/main/java/com/gh/common/provider/AppProviderImpl.kt
#	app/src/main/java/com/gh/gamecenter/gamedetail/rating/edit/RatingEditActivity.kt
#	app/src/main/java/com/halo/assistant/HaloApp.java
#	dependencies.gradle
#	module_core/src/main/java/com/gh/gamecenter/core/provider/IAppProvider.kt
#	module_login/src/main/java/com/gh/gamecenter/login/user/UserRepository.java
2023-01-09 11:00:20 +08:00
f19a687eee Merge branch 'hotfix-v5.17.1-691-activity_floating_window_display_issue' into 'release'
fix: 修复返回活动悬浮窗在部分页面隐藏并禁用的问题(旧活动需要,但旧活动已下线)

See merge request halo/android/assistant-android!645
2023-01-09 10:27:03 +08:00
3fbec365a0 fix: 修复活动悬浮窗在部分页面隐藏自动禁用的问题(旧活动需要,但旧活动已下线) 2023-01-09 10:20:55 +08:00
53987d29b0 Merge branch 'feature-GHZS-940' into 'dev'
fix: 整理 DialogUtils 的历史弹窗并改为新的弹窗-0106UI测试 https://jira.shanqu.cc/browse/GHZS-940

See merge request halo/android/assistant-android!644
2023-01-09 10:10:15 +08:00
1999663cc8 fix: 整理 DialogUtils 的历史弹窗并改为新的弹窗-0106UI测试 https://jira.shanqu.cc/browse/GHZS-940 2023-01-09 10:03:02 +08:00
d1dba07b6b Merge branch 'fix-GHZS-947' into 'release'
fix: 修复回到活动悬浮窗显示异常

See merge request halo/android/assistant-android!642
2023-01-06 20:39:03 +08:00
a53239afd8 Merge branch 'fix-vspace_install_issue' into 'release'
fix: 修复畅玩游戏安装时,因为没有成功或失败回调结果导致无法再次安装的问题

See merge request halo/android/assistant-android!643
2023-01-06 20:39:01 +08:00
26f2b161bd fix: 修复畅玩游戏安装时,因为没有成功或失败回调结果导致无法再次安装的问题 2023-01-06 20:31:40 +08:00
8b28b8de44 fix: 修复回到活动悬浮窗显示异常 2023-01-06 19:20:39 +08:00
81ab27d02a Merge branch 'hotfix-v5.17.1-691-vector_crash' into 'release'
fix: 修复5.0以下系统矢量图相关的闪退问题

See merge request halo/android/assistant-android!641
2023-01-06 17:07:46 +08:00
544c67c316 fix: 修复5.0以下系统矢量图相关的闪退问题 2023-01-06 17:02:27 +08:00
fbd61f3783 Merge branch 'hotfix-v5.17.1-691-home_list_crash' into 'release'
fix: 修复横向专题和多列横向专题数据变更时因为 DiffUtils 没有正确分发数据变更引起的闪退问题...

See merge request halo/android/assistant-android!640
2023-01-06 15:22:39 +08:00
5f4c0ab2df fix: 修复横向专题和多列横向专题数据变更时因为 DiffUtils 没有正确分发数据变更引起的闪退问题 https://sentry.shanqu.cc/organizations/lightgame/issues/34950/?project=22&query=is%3Aunresolved&statsPeriod=24h 2023-01-06 14:43:07 +08:00
3b731bdbf9 Merge branch 'feature-GHZS-931' into 'dev'
fix: 【光环助手】发现页提交不喜欢错位问题 https://jira.shanqu.cc/browse/GHZS-931

See merge request halo/android/assistant-android!639
2023-01-06 14:26:13 +08:00
589e433676 fix: 【光环助手】发现页提交不喜欢错位问题 https://jira.shanqu.cc/browse/GHZS-931 2023-01-06 14:16:51 +08:00
424aed9630 Merge branch 'feature-GHZS-922' into 'dev'
fix: 处理 sonar 新变动代码的异味 https://jira.shanqu.cc/browse/GHZS-922

See merge request halo/android/assistant-android!637
2023-01-05 17:56:03 +08:00
b9093ee846 fix: 处理 sonar 新变动代码的异味 https://jira.shanqu.cc/browse/GHZS-922 2023-01-05 17:56:02 +08:00
ff245ad516 chore: 版本更新到 5.17.1 2023-01-05 15:59:11 +08:00
315523a27f Merge branch 'fix_vspace_wrong_install_status' into 'release'
fix: 修复畅玩游戏卸载再安装时会错误调用安装的问题

See merge request halo/android/assistant-android!638
2023-01-05 15:31:36 +08:00
a3ae5ecb7b fix: 修复畅玩游戏卸载再安装时会错误调用安装的问题 2023-01-05 15:27:35 +08:00
dfc7c918d7 Merge branch 'fix-vgame_backup' into 'release'
修复畅玩游戏备份问题

See merge request halo/android/assistant-android!633
2023-01-05 14:59:54 +08:00
d396deb94b 修复畅玩游戏备份问题 2023-01-05 14:59:54 +08:00
f0866d1a4c Merge branch 'feature-GHZS-853' into 'dev'
feat: 整理 DialogUtils 的历史弹窗并改为新的弹窗 https://jira.shanqu.cc/browse/GHZS-853

See merge request halo/android/assistant-android!636
2023-01-05 11:07:31 +08:00
bb86bf313b feat: 整理 DialogUtils 的历史弹窗并改为新的弹窗 https://jira.shanqu.cc/browse/GHZS-853 2023-01-05 11:00:41 +08:00
52bf1a85c5 Merge branch 'fix-horizontal_list_crash' into 'release'
fix: 尝试修复横向游戏专题数据变动触发的闪退问题

See merge request halo/android/assistant-android!635
2023-01-05 10:52:51 +08:00
685e938de3 Merge branch 'feature-GHZS-917' into 'dev'
build: 更新 sentry 版本 https://jira.shanqu.cc/browse/GHZS-917

See merge request halo/android/assistant-android!634
2023-01-05 10:52:44 +08:00
3c70daf23c build: 更新 sentry 版本 https://jira.shanqu.cc/browse/GHZS-917 2023-01-05 10:52:44 +08:00
762bed1ed5 fix: 尝试修复横向游戏专题数据变动触发的闪退问题 2023-01-05 10:45:55 +08:00
1109f1bc57 Merge branch 'feature-GHZS-923' into 'dev'
fix: 处理 sonar 新变动代码的异味 https://jira.shanqu.cc/browse/GHZS-923

See merge request halo/android/assistant-android!632
2023-01-05 10:12:27 +08:00
bd918b5896 fix: 处理 sonar 新变动代码的异味 https://jira.shanqu.cc/browse/GHZS-923 2023-01-05 09:43:26 +08:00
f3e9d55707 Merge branch 'fix-remove_unused_resources' into 'dev'
fix: 移除无用资源

See merge request halo/android/assistant-android!631
2023-01-04 17:35:30 +08:00
cb7f84a461 fix: 移除无用资源 2023-01-04 17:27:32 +08:00
59c6c493ec Merge branch 'feature-GHZS-920' into 'dev'
fix: 处理 sonar 新变动代码的异味 https://jira.shanqu.cc/browse/GHZS-920

See merge request halo/android/assistant-android!627
2023-01-04 16:49:43 +08:00
7d77ca9b35 Merge branch 'hotfix-rating_draft_not_display' into 'release'
fix: 修复进入编辑评论页有概率没有显示已保存草稿的问题

See merge request halo/android/assistant-android!630
2023-01-04 16:46:36 +08:00
c8329c786b Merge branch 'feature-GHZS-921' into 'dev'
fix: 处理 sonar 新变动代码的异味 https://jira.shanqu.cc/browse/GHZS-921

See merge request halo/android/assistant-android!629
2023-01-04 16:39:30 +08:00
cd7e3c7777 fix: 修复进入编辑评论页有概率没有显示已保存草稿的问题 2023-01-04 16:37:21 +08:00
44c6c5ad08 Merge branch 'feature-GHZS-885' into 'release'
feat: 云存档Tab标签—客户端 https://jira.shanqu.cc/browse/GHZS-885

See merge request halo/android/assistant-android!628
2023-01-04 16:16:03 +08:00
fca02bcb0b feat: 云存档Tab标签—客户端 https://jira.shanqu.cc/browse/GHZS-885 2023-01-04 16:16:03 +08:00
bf016c6404 fix: 处理 sonar 新变动代码的异味 https://jira.shanqu.cc/browse/GHZS-921 2023-01-04 16:14:35 +08:00
b395f7c96a fix: 处理 sonar 新变动代码的异味 https://jira.shanqu.cc/browse/GHZS-920 2023-01-04 15:54:52 +08:00
a4d3368567 Merge branch 'feature-update_tea' into 'release'
feat: 【光环助手】头条SDK更新及投放渠道重打包任务—客户端 https://jira.shanqu.cc/browse/GHZS-541

See merge request halo/android/assistant-android!626
2023-01-04 14:42:20 +08:00
210f2240a3 feat: 【光环助手】头条SDK更新及投放渠道重打包任务—客户端 https://jira.shanqu.cc/browse/GHZS-541 2023-01-04 14:42:20 +08:00
a03a829980 Merge branch 'feature-GHZS-916' into 'dev'
fix: 移除无用的数据库相关代码 https://jira.shanqu.cc/browse/GHZS-916

See merge request halo/android/assistant-android!625
2023-01-04 14:29:20 +08:00
9101ed4d47 fix: 移除无用的数据库相关代码 https://jira.shanqu.cc/browse/GHZS-916 2023-01-04 14:25:33 +08:00
47fef0065d Merge remote-tracking branch 'origin/release' into dev 2023-01-04 13:53:24 +08:00
a6a2012e66 Merge branch 'fix-vspace_connect_no_response' into 'release'
fix: 修复畅玩启动无响应的问题

See merge request halo/android/assistant-android!624
2023-01-04 13:49:00 +08:00
d5ef24b1cc fix: 修复畅玩启动无响应的问题 2023-01-04 13:35:52 +08:00
a77d37ea68 Merge branch 'fix-compile' into 'dev'
邮件包启用 compose 实现的设置界面

See merge request halo/android/assistant-android!623
2023-01-04 11:22:56 +08:00
d38a071e4d 邮件包启用 compose 实现的设置界面 2023-01-04 11:22:56 +08:00
7d2f16e2d6 Merge remote-tracking branch 'origin/dev' into dev 2023-01-03 17:53:43 +08:00
0e395bb68f fix: 处理合并冲突 2023-01-03 17:53:18 +08:00
6eaaea046e Merge branch 'dev-fix-compose_setting' into 'dev'
fix:compose设置模块同步设置模块的修改,修复部分机型设置项的描述文字显示不全的问题

See merge request halo/android/assistant-android!622
2023-01-03 17:45:44 +08:00
9075fae76f fix:compose设置模块同步设置模块的修改,修复部分机型设置项的描述文字显示不全的问题 2023-01-03 17:39:13 +08:00
4ecd007f07 Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/adapter/ImagePagerAdapter.java
#	app/src/main/java/com/gh/gamecenter/game/rank/RankGameItemUi.kt
#	app/src/main/java/com/gh/gamecenter/gamecollection/publish/GameCollectionEditActivity.kt
#	app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyAdapter.kt
#	app/src/main/java/com/gh/gamecenter/qa/video/detail/ForumVideoDetailFragment.kt
#	app/src/main/java/com/gh/gamecenter/video/detail/VideoAdapter.kt
#	app/src/main/res/layout/game_horizontal_simple_item.xml
#	app/src/main/res/layout/game_test_item.xml
#	app/src/main/res/layout/layout_video_detail_surface.xml
#	vspace-bridge
2023-01-03 17:32:11 +08:00
92b658c304 fix: 更新畅玩服务依赖 2023-01-03 16:29:13 +08:00
8271126bf9 Merge branch 'fix-gamedetail_top_video' into 'release'
fix: 游戏详情是否显示顶部视频取消videoId为空的判断

See merge request halo/android/assistant-android!621
2023-01-03 09:44:15 +08:00
13bc07b0be fix: 游戏详情是否显示顶部视频取消videoId为空的判断 2023-01-03 09:41:10 +08:00
e19fcf5077 Merge branch 'feature-GHZS-877' into 'release'
feat: 视频类型的轮播图加上视频标识—客户端 https://jira.shanqu.cc/browse/GHZS-877

See merge request halo/android/assistant-android!620
2022-12-30 17:17:10 +08:00
dba49b090a feat: 视频类型的轮播图加上视频标识—客户端 https://jira.shanqu.cc/browse/GHZS-877 2022-12-30 17:03:40 +08:00
b964472619 Merge branch 'feature-GHZS-820' into 'release'
fix: 【光环助手】畅玩游戏下载文案问题 https://jira.shanqu.cc/browse/GHZS-820

See merge request halo/android/assistant-android!619
2022-12-30 15:27:47 +08:00
733be9e441 fix: 【光环助手】畅玩游戏下载文案问题 https://jira.shanqu.cc/browse/GHZS-820 2022-12-30 15:27:47 +08:00
c9d4bfadcf Merge branch 'feature-GHZS-857' into 'release'
fix:【畅玩助手】GID体系不一致问题 https://jira.shanqu.cc/browse/GHZS-857

See merge request halo/android/assistant-android!610
2022-12-30 15:22:22 +08:00
cd54c0967c fix:【畅玩助手】GID体系不一致问题 https://jira.shanqu.cc/browse/GHZS-857 2022-12-30 15:22:22 +08:00
d2bf534ca4 Merge branch 'hotfix-v5.17.0-690-game_server_type' into 'release'
fix:修复首页游戏开服标签与游戏名称之间存在空白的问题

See merge request halo/android/assistant-android!618
2022-12-30 14:57:25 +08:00
ff350e268a fix:修复首页游戏开服标签与游戏名称之间存在空白的问题 2022-12-30 14:46:01 +08:00
79cd610e41 Merge branch 'feature-GHZS-844' into 'release'
fix: 【光环助手】前端小编标识展示问题 https://jira.shanqu.cc/browse/GHZS-844

See merge request halo/android/assistant-android!617
2022-12-30 14:26:44 +08:00
4af47a71b7 fix: 【光环助手】前端小编标识展示问题 https://jira.shanqu.cc/browse/GHZS-844 2022-12-30 14:23:34 +08:00
aceb49eaa9 Merge branch 'fix-compile' into 'dev'
fix: 处理编译问题(还原 build src AGP 版本)

See merge request halo/android/assistant-android!616
2022-12-30 11:45:16 +08:00
8af404f3c3 fix: 处理编译问题(还原后处理的 AGP 版本) 2022-12-30 11:37:45 +08:00
d3a7929810 Merge branch 'feature-GHZS-872' into 'dev'
fix:【光环助手】发现页相关测试问题-第2点 https://jira.shanqu.cc/browse/GHZS-872

See merge request halo/android/assistant-android!615
2022-12-30 10:48:51 +08:00
c46401c763 fix:【光环助手】发现页相关测试问题-第2点 https://jira.shanqu.cc/browse/GHZS-872 2022-12-30 10:44:32 +08:00
aa03595a47 Merge branch 'feature-GHZS-848' into 'dev'
fix:细化游戏单 proguard 保留的粒度 https://jira.shanqu.cc/browse/GHZS-848

See merge request halo/android/assistant-android!614
2022-12-30 10:25:29 +08:00
e04de2c9ed fix:细化游戏单 proguard 保留的粒度 https://jira.shanqu.cc/browse/GHZS-848 2022-12-30 10:12:44 +08:00
6297849db2 Merge branch 'feature-module_setting_compose_rebase' into 'dev'
将 feature-module_setting_compose 分支的代码 rebase 到 dev-5.18.0 https://jira.shanqu.cc/browse/GHZS-828

See merge request halo/android/assistant-android!607
2022-12-30 09:46:35 +08:00
2f1f061c87 将 feature-module_setting_compose 分支的代码 rebase 到 dev-5.18.0 https://jira.shanqu.cc/browse/GHZS-828 2022-12-30 09:46:35 +08:00
6acb88be74 Merge branch 'feature-GHZS-854' into 'dev'
feat: 清理 data class 冗余方法 https://jira.shanqu.cc/browse/GHZS-854

See merge request halo/android/assistant-android!613
2022-12-30 09:39:11 +08:00
bff8916a7e Merge branch 'feature-GHZS-870' into 'dev'
fix: 【光环助手】开测表-开测标签显示问题 https://jira.shanqu.cc/browse/GHZS-870

See merge request halo/android/assistant-android!612
2022-12-29 17:07:54 +08:00
a99b4ab224 feat: 清理 data class 冗余方法 https://jira.shanqu.cc/browse/GHZS-854 2022-12-29 17:06:10 +08:00
a43f6c5ce0 fix: 【光环助手】开测表-开测标签显示问题 https://jira.shanqu.cc/browse/GHZS-870 2022-12-29 17:00:23 +08:00
9fed52ca0a Merge branch 'feature-GHZS-858' into 'release'
feat: 游戏单活动:游戏单征集计划vol.2—客户端-埋点文档19 https://jira.shanqu.cc/browse/GHZS-858

See merge request halo/android/assistant-android!611
2022-12-29 15:32:09 +08:00
f3c0e16cff feat: 游戏单活动:游戏单征集计划vol.2—客户端-埋点文档19 https://jira.shanqu.cc/browse/GHZS-858 2022-12-29 15:27:59 +08:00
4bb39d220c Merge branch 'fix-exclude_packages' into 'dev'
fix:  exclude光环没有用到的 material 组件

See merge request halo/android/assistant-android!609
2022-12-29 11:31:39 +08:00
f03be94877 fix: exclude光环没有用到的 material 组件 2022-12-29 11:29:10 +08:00
22909500c3 Merge branch 'feature-GHZS-852' into 'dev'
fix: 尝试 exclude 光环没有用到的 material 组件 https://jira.shanqu.cc/browse/GHZS-852

See merge request halo/android/assistant-android!608
2022-12-29 10:18:36 +08:00
a6a0da45fc fix: 尝试 exclude 光环没有用到的 material 组件 https://jira.shanqu.cc/browse/GHZS-852 2022-12-28 17:49:03 +08:00
a4ba5f25d2 Merge branch 'feature-GHZS-847' into 'dev'
feat: 使用 TimeElapsedHelper 统计活动时间 https://jira.shanqu.cc/browse/GHZS-847

See merge request halo/android/assistant-android!606
2022-12-28 16:16:47 +08:00
198b06c9ce feat: 使用 TimeElapsedHelper 统计活动时间 https://jira.shanqu.cc/browse/GHZS-847 2022-12-28 15:58:53 +08:00
0ee5c106c6 Merge branch 'hotfix-v5.17.0-690-download_button' into 'release'
fix:修复部分专题样式、首页视频、视频贴详情下载按钮显示异常的问题

See merge request halo/android/assistant-android!604
2022-12-28 14:53:17 +08:00
abc52f622c fix:修复部分专题样式、首页视频、视频贴详情下载按钮显示异常的问题 2022-12-28 14:45:36 +08:00
7eed44165c Merge branch 'feature-GHZS-846' into 'dev'
feat: 精简字体库 https://jira.shanqu.cc/browse/GHZS-846

See merge request halo/android/assistant-android!605
2022-12-28 14:37:38 +08:00
b918fa5b9b feat: 精简字体库 https://jira.shanqu.cc/browse/GHZS-846 2022-12-28 14:37:38 +08:00
8ba82698d7 fix:修复部分专题样式、首页视频、视频贴详情下载按钮显示异常的问题 2022-12-28 14:19:39 +08:00
7fd1b2e40a Merge branch 'feature-GHZS-845' into 'dev'
feat: 移除部分活动的相关代码及资源 https://jira.shanqu.cc/browse/GHZS-845

See merge request halo/android/assistant-android!603
2022-12-28 13:58:20 +08:00
bf99b61603 feat: 移除部分活动的相关代码及资源 https://jira.shanqu.cc/browse/GHZS-845 2022-12-28 13:58:20 +08:00
f39bc39821 Merge branch 'feature-GHZS-851' into 'dev'
fix: 移除 GameDetailEntity 已经没用的字段 https://jira.shanqu.cc/browse/GHZS-851

See merge request halo/android/assistant-android!602
2022-12-28 11:36:15 +08:00
3f8e220181 fix: 移除 GameDetailEntity 已经没用的字段 https://jira.shanqu.cc/browse/GHZS-851 2022-12-28 11:36:15 +08:00
e74e700bcf fix:【光环助手】开服表的多版本下载按钮显示问题 https://jira.shanqu.cc/browse/GHZS-717 2022-12-28 11:01:43 +08:00
5d06646786 Merge remote-tracking branch 'origin/dev-5.18.0' into dev-5.18.0 2022-12-28 10:38:20 +08:00
37f1aeef5c Merge branch 'hotfix-remove_useless_data_class' into 'dev-5.18.0'
fix: 移除部分没用的实体类

See merge request halo/android/assistant-android!600
2022-12-28 10:33:42 +08:00
2210ed31fb Merge remote-tracking branch 'origin/dev' into dev-5.18.0
# Conflicts:
#	app/src/main/java/com/gh/common/DefaultUrlHandler.kt
#	vspace-bridge
2022-12-28 10:31:57 +08:00
abb4c40499 Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	dependencies.gradle
2022-12-28 10:28:18 +08:00
33a32c707e Merge branch 'feature-GHZS-850' into 'dev-5.18.0'
fix: 细化视频详情 proguard 保留的粒度 https://jira.shanqu.cc/browse/GHZS-850

See merge request halo/android/assistant-android!601
2022-12-28 10:25:39 +08:00
c3bbbe3d17 fix: 细化视频详情 proguard 保留的粒度 https://jira.shanqu.cc/browse/GHZS-850 2022-12-28 10:19:32 +08:00
90540b1475 Merge branch 'feature-GHZS-837' into 'dev-5.18.0'
feat: 整理静态类代码 https://jira.shanqu.cc/browse/GHZS-837

See merge request halo/android/assistant-android!599
2022-12-28 09:24:03 +08:00
2812cdde01 fix: 移除部分没用的实体类 2022-12-27 16:17:51 +08:00
f63d5eb30a feat: 整理静态类代码 https://jira.shanqu.cc/browse/GHZS-837
1. 移除远古时代的光环3.0数据同步代码
2. 清理部分无用的弹窗构建代码
3. 将默认头像修改完全放置到网络数据中 (原来是本地 drawable,但提交固定 url 的形式)
4. 移除部分没有引用的代码
5. 合并重复的日志类
6. 移除已经没有入口的玩过的游戏 activity
7. 整理部分含有无用入参的方法
8. 重命名部分不合规范的命名
2022-12-27 15:20:23 +08:00
a798250357 Merge branch 'feature-GHZS-824' into 'dev-5.18.0'
fix:处理部分页面深色模式显示异常 https://jira.shanqu.cc/browse/GHZS-824

See merge request halo/android/assistant-android!597
2022-12-27 14:13:20 +08:00
2e34102d9a fix:处理部分页面深色模式显示异常 https://jira.shanqu.cc/browse/GHZS-824 2022-12-27 14:13:20 +08:00
743332179b Merge branch 'feature-GHZS-826' into 'dev-5.18.0'
feat: 统一整理日志相关工具类反复出现的字符串 https://jira.shanqu.cc/browse/GHZS-826

See merge request halo/android/assistant-android!598
2022-12-27 11:24:40 +08:00
044270f79b feat: 统一整理日志相关工具类反复出现的字符串 https://jira.shanqu.cc/browse/GHZS-826 2022-12-27 10:52:38 +08:00
5624efe693 Merge branch 'feature-GHZS-750' into 'dev-5.18.0'
feat: 游戏评分相关数据埋点补充—客户端 https://jira.shanqu.cc/browse/GHZS-750

See merge request halo/android/assistant-android!596
2022-12-27 10:34:17 +08:00
6f94c2158a feat: 游戏评分相关数据埋点补充—客户端 https://jira.shanqu.cc/browse/GHZS-750 2022-12-27 10:34:17 +08:00
664b0f7a72 Merge branch 'feature-GHZS-825' into 'dev-5.18.0'
feat: 全量检查并修改 kotlin 部分静态类初始化变量问题 https://jira.shanqu.cc/browse/GHZS-825

See merge request halo/android/assistant-android!595
2022-12-26 14:33:24 +08:00
2a84590f70 feat: 全量检查并修改 kotlin 部分静态类初始化变量问题 https://jira.shanqu.cc/browse/GHZS-825 2022-12-26 14:30:49 +08:00
446acb8176 Merge branch 'feature-GHZS-825' into 'dev-5.18.0'
feat: 全量检查并修改 kotlin 部分静态类初始化变量问题 https://jira.shanqu.cc/browse/GHZS-825

See merge request halo/android/assistant-android!594
2022-12-26 14:19:40 +08:00
dc7db3d09f feat: 全量检查并修改 kotlin 部分静态类初始化变量问题 https://jira.shanqu.cc/browse/GHZS-825 2022-12-26 13:52:12 +08:00
df79970eae chore: 版本更新至 5.16.1 2022-12-26 11:35:38 +08:00
d8775429d1 fix: 修复畅玩连接断开时可能的闪退 2022-12-26 11:32:52 +08:00
e9263b0a22 Merge branch 'feature-GHZS-823' into 'dev-5.18.0'
fix: 社区 1x1 长图缩略图显示优化 https://jira.shanqu.cc/browse/GHZS-823

See merge request halo/android/assistant-android!592
2022-12-26 11:31:57 +08:00
7fd7ac3523 Merge remote-tracking branch 'origin/legacy-release' into release
# Conflicts:
#	module_setting/src/main/java/com/gh/gamecenter/setting/view/GameDownloadSettingFragment.kt
#	vspace-bridge
2022-12-26 11:29:21 +08:00
1729f3d688 Merge branch 'hotfix-game_download_setting_page_crash' into 'legacy-release'
fix: 修复游戏下载设置页获取文件uri时的闪退问题

See merge request halo/android/assistant-android!593
2022-12-26 10:59:25 +08:00
5c1498a8fd Merge branch 'hotfix-v5.15.3-653-vloading_crash' into 'legacy-release'
fix: 修复进入畅玩加载页面闪退

See merge request halo/android/assistant-android!591
2022-12-26 10:57:42 +08:00
fcc6b10e35 fix: 社区 1x1 长图缩略图显示优化 https://jira.shanqu.cc/browse/GHZS-823 2022-12-26 10:50:41 +08:00
9268181751 Merge branch 'hotfix-v5.15.3-653-forum_article_list_crash' into 'legacy-release'
fix:修复论坛帖子列表页切换深色模式出现空指针闪退的问题

See merge request halo/android/assistant-android!590
2022-12-26 10:46:29 +08:00
2d97319931 fix: 修复进入畅玩加载页面闪退 https://sentry.shanqu.cc/organizations/lightgame/issues/248161/?project=22&query=dist%3A653+NullPointerException&statsPeriod=14d 2022-12-26 10:43:50 +08:00
9930673792 fix:修复论坛帖子列表页切换深色模式出现空指针闪退的问题 2022-12-26 10:40:12 +08:00
d7219431e6 fix: 修复游戏下载设置页获取文件uri时的闪退问题 2022-12-26 10:36:43 +08:00
d9311fcce0 Merge branch 'hotfix-quick_login_crash' into 'legacy-release'
fix: 修复一键登录跳转验证码登录因context为空导致的闪退问题

See merge request halo/android/assistant-android!589
2022-12-26 10:32:02 +08:00
88035b65ce fix: 修复畅玩连接断开时可能的闪退 2022-12-26 10:30:45 +08:00
e63e50f828 fix: 修复一键登录跳转验证码登录因context为空导致的闪退问题 2022-12-26 10:21:55 +08:00
9433e071b9 Merge branch 'fix-modify-dependencies' into 'dev-5.18.0'
处理编译的一些问题

See merge request halo/android/assistant-android!588
2022-12-23 09:22:56 +08:00
c4f1894504 fix: 处理 databinding 编译问题 2022-12-22 18:04:27 +08:00
c7cda3f64f build: 将aar单独放到一个模块里,避免多个地方重复拷贝 2022-12-22 16:17:44 +08:00
3a6dba580b Merge branch 'feature-GHZS-797' into 'dev-5.18.0'
feat: 组件化帮助与反馈功能 https://jira.shanqu.cc/browse/GHZS-797

See merge request halo/android/assistant-android!586
2022-12-22 13:50:18 +08:00
1a653b551e feat: 组件化帮助与反馈功能 https://jira.shanqu.cc/browse/GHZS-797 2022-12-22 13:50:18 +08:00
e080d8ab6d Merge branch 'feature-GHZS-802' into 'dev'
feat:春节活动—集“萌兔福签”,得新年好礼—客户端 https://jira.shanqu.cc/browse/GHZS-802

See merge request halo/android/assistant-android!587
2022-12-22 13:50:02 +08:00
1dacab2000 feat:春节活动—集“萌兔福签”,得新年好礼—客户端 https://jira.shanqu.cc/browse/GHZS-802 2022-12-22 13:50:02 +08:00
eef2ae3dbe Merge branch 'feature-GHZS-796' into 'dev-5.18.0'
feat:优化设置模块 https://jira.shanqu.cc/browse/GHZS-796

See merge request halo/android/assistant-android!585
2022-12-21 15:05:14 +08:00
011f8cc2b7 feat:优化设置模块 https://jira.shanqu.cc/browse/GHZS-796 2022-12-21 15:05:14 +08:00
3eb002ece1 chore: 版本更新至 5.18.0 2022-12-21 14:36:17 +08:00
754750a330 Merge branch 'hotfix-v5.16.0-670-varchive_database_add_game_version' into 'release'
fix: 添加云存档数据库游戏版本字段

See merge request halo/android/assistant-android!584
2022-12-21 12:32:31 +08:00
401f1c176a fix: 添加云存档数据库游戏版本字段 2022-12-21 12:32:31 +08:00
ead95968ec Merge remote-tracking branch 'origin/dev' into dev-5.18.0 2022-12-21 10:28:57 +08:00
b10fac1371 Merge remote-tracking branch 'origin/release' into dev 2022-12-21 10:28:25 +08:00
f750682bff Merge remote-tracking branch 'origin/legacy-release' into release
# Conflicts:
#	dependencies.gradle
2022-12-21 10:28:02 +08:00
c7094a0476 chore: 版本更新至 5.15.3 2022-12-21 09:56:23 +08:00
c5019a90f7 Merge branch 'feature-GHZS-779' into 'dev-5.18.0'
feat: 畅玩助手问题反馈相关优化—客户端 https://jira.shanqu.cc/browse/GHZS-779

See merge request halo/android/assistant-android!582
2022-12-20 17:59:54 +08:00
e7bc17c29f feat: 畅玩助手问题反馈相关优化—客户端 https://jira.shanqu.cc/browse/GHZS-779 2022-12-20 17:53:38 +08:00
f8cedcf737 Merge branch 'hotfix-5.15.2-652-list_not_display' into 'legacy-release'
fix: 修改选择活动标签弹窗列表不显示问题

See merge request halo/android/assistant-android!581
2022-12-20 17:10:06 +08:00
d1e04a5743 fix: 修改选择活动标签弹窗列表不显示问题 2022-12-20 16:57:31 +08:00
6cf154268a Merge branch 'feature-fix_rejected_task_error' into 'dev-5.18.0'
简单处理线程池不足以运行更多任务的问题 https://jira.shanqu.cc/browse/GHZS-801

See merge request halo/android/assistant-android!580
2022-12-20 16:40:13 +08:00
395bfc744e 简单处理线程池不足以运行更多任务的问题 https://jira.shanqu.cc/browse/GHZS-801 2022-12-20 16:40:13 +08:00
9892e891e2 Merge branch 'dev' into 'dev-5.18.0'
fix: 更新畅玩 module 依赖

See merge request halo/android/assistant-android!579
2022-12-19 11:21:58 +08:00
4659ebe064 Merge branch 'release' into 'dev'
fix: 更新畅玩 module 依赖

See merge request halo/android/assistant-android!578
2022-12-19 11:20:57 +08:00
9eded4d0ce fix: 更新畅玩 module 依赖 2022-12-19 09:46:58 +08:00
9d9d620d98 Merge branch 'feature-GHZS-578' into 'dev-5.18.0'
fix:【光环助手】夜间模式测试问题汇总(3-4) https://jira.shanqu.cc/browse/GHZS-578

See merge request halo/android/assistant-android!577
2022-12-16 16:58:36 +08:00
6f28b640dd Merge branch 'feature-GHZS-766' into 'dev-5.18.0'
feat: 埋点事件补充—客户端 https://jira.shanqu.cc/browse/GHZS-766

See merge request halo/android/assistant-android!575
2022-12-16 16:45:24 +08:00
eaae32a06a Merge branch 'feature-GHZS-798' into 'dev-5.18.0'
fix: 移除热门卡牌专题的相关代码 https://jira.shanqu.cc/browse/GHZS-798

See merge request halo/android/assistant-android!576
2022-12-16 16:37:22 +08:00
c2f32aafff fix:【光环助手】夜间模式测试问题汇总(3-4) https://jira.shanqu.cc/browse/GHZS-578 2022-12-16 15:37:40 +08:00
f9d2c875b8 fix: 移除热门卡牌专题的相关代码 https://jira.shanqu.cc/browse/GHZS-798 2022-12-16 15:19:52 +08:00
72634a877e feat: 埋点事件补充—客户端 https://jira.shanqu.cc/browse/GHZS-766 2022-12-16 14:38:50 +08:00
7c76753815 Merge branch 'feature-GHZS-717' into 'dev-5.18.0'
fix:【光环助手】开服表的多版本下载按钮显示问题 https://jira.shanqu.cc/browse/GHZS-717

See merge request halo/android/assistant-android!573
2022-12-16 13:44:40 +08:00
a36d905e27 Merge branch 'feature-GHZS-800' into 'dev-5.18.0'
fix: 解决多线程调用 DownloadManager.initMap() 造成的问题 https://jira.shanqu.cc/browse/GHZS-800

See merge request halo/android/assistant-android!574
2022-12-16 12:02:35 +08:00
ab7e417b42 fix: 解决多线程调用 DownloadManager.initMap() 造成的问题 https://jira.shanqu.cc/browse/GHZS-800 2022-12-16 11:36:04 +08:00
e93d95dc0d Merge branch 'dev' into 'dev-5.17.0'
fix: 更新畅玩 module 依赖

See merge request halo/android/assistant-android!572
2022-12-15 18:35:16 +08:00
5a7c316a2d fix: 更新畅玩 module 依赖 2022-12-15 18:34:34 +08:00
198eb0d961 fix:【光环助手】开服表的多版本下载按钮显示问题 https://jira.shanqu.cc/browse/GHZS-717 2022-12-15 17:55:41 +08:00
f55448a264 Merge branch 'hotfix-interested_game_type_dialog_ui' into 'dev-5.17.0'
fix: 微调游戏偏好-分类弹窗UI

See merge request halo/android/assistant-android!571
2022-12-15 17:11:23 +08:00
1c20bf9e02 fix: 微调游戏偏好-分类弹窗UI 2022-12-15 17:10:13 +08:00
69cb4865b2 Merge branch 'feature-GHZS-788' into 'dev-5.17.0'
fix: 【光环助手V5.17.0】APP闪退问题 https://jira.shanqu.cc/browse/GHZS-788

See merge request halo/android/assistant-android!570
2022-12-15 17:08:08 +08:00
d5e9e9f092 fix: 【光环助手V5.17.0】APP闪退问题 https://jira.shanqu.cc/browse/GHZS-788 2022-12-15 17:04:50 +08:00
20a60fb2b5 Merge branch 'hotfix-discovery_card_drak_mode' into 'dev-5.17.0'
fix: 首页发现页卡片和游戏偏好页适配深色模式

See merge request halo/android/assistant-android!569
2022-12-15 16:21:01 +08:00
deac181261 fix: 首页发现页卡片和游戏偏好页适配深色模式 2022-12-15 16:17:28 +08:00
5a4eb2ed65 Merge branch 'fix-GHZS-774' into 'dev-5.17.0'
fix: 【V5.17.0】游戏评价活动:光环星推官挑战赛—1214测试-第10点 (为网页下载添加畅玩游戏支持) https://jira.shanqu.cc/browse/GHZS-774

See merge request halo/android/assistant-android!567
2022-12-15 16:17:18 +08:00
634e897511 Merge branch 'dev' into 'dev-5.17.0'
fix: 更新畅玩 module 依赖

See merge request halo/android/assistant-android!568
2022-12-15 16:17:11 +08:00
305c6792f2 fix: 更新畅玩 module 依赖 2022-12-15 16:04:57 +08:00
0ae726d6b1 fix: 【V5.17.0】游戏评价活动:光环星推官挑战赛—1214测试-第10点 (为网页下载添加畅玩游戏支持) https://jira.shanqu.cc/browse/GHZS-774 2022-12-15 16:02:28 +08:00
6be4412ac6 Merge branch 'dev-fix-game_subtitle' into 'dev-5.17.0'
fix:修复首页游戏副标题超长时遮挡游戏图标的问题

See merge request halo/android/assistant-android!566
2022-12-15 15:56:52 +08:00
586e3deb9e fix:修复首页游戏副标题超长时遮挡游戏图标的问题 2022-12-15 15:45:09 +08:00
f02219b83b fix:【V5.17.0】发现页相关功能优化(第一期)—1212测试-第2点(游戏列表过滤已安装游戏) https://jira.shanqu.cc/browse/GHZS-650 2022-12-15 14:11:00 +08:00
1391ab730d Merge branch 'feature-GHZS-763' into 'dev-5.17.0'
fix:【V5.17.0】发现页相关功能优化(第一期)—1215UI测试 https://jira.shanqu.cc/browse/GHZS-763

See merge request halo/android/assistant-android!565
2022-12-15 11:46:43 +08:00
9eca2ab660 fix:【V5.17.0】发现页相关功能优化(第一期)—1215UI测试 https://jira.shanqu.cc/browse/GHZS-763 2022-12-15 11:38:08 +08:00
b58daea96f Merge branch 'feature-GHZS-700' into 'dev-5.17.0'
fix:【V5.17.0】发现页相关功能优化(第一期)-1214测试 https://jira.shanqu.cc/browse/GHZS-700

See merge request halo/android/assistant-android!564
2022-12-15 11:29:29 +08:00
f958787f9e fix:【V5.17.0】发现页相关功能优化(第一期)-1214测试 https://jira.shanqu.cc/browse/GHZS-700 2022-12-15 11:13:10 +08:00
5fbeff3158 Merge branch 'feature-GHZS-682' into 'dev-5.17.0'
fix:【V5.17.0】发现页相关功能优化(第一期)—1214UI测试 https://jira.shanqu.cc/browse/GHZS-682

See merge request halo/android/assistant-android!563
2022-12-14 15:34:13 +08:00
c03fcc7fde fix:【V5.17.0】发现页相关功能优化(第一期)—1214UI测试 https://jira.shanqu.cc/browse/GHZS-682 2022-12-14 15:27:22 +08:00
ce4c6c1ca3 Merge remote-tracking branch 'origin/dev' into dev-5.17.0 2022-12-14 15:21:45 +08:00
1294a13933 fix: 更新畅玩 submodule 依赖 2022-12-14 15:21:15 +08:00
1b07c28956 Merge branch 'hotfix-get_discovery_card_data_optimize' into 'dev-5.17.0'
fix:处理首页/板块首次今日会多次调用获取发现页数据接口的问题

See merge request halo/android/assistant-android!562
2022-12-14 14:41:13 +08:00
c0b2eb622c fix:处理首页/板块首次今日会多次调用获取发现页数据接口的问题 2022-12-14 14:27:51 +08:00
c4bed719f9 Merge branch 'feature-GHZS-691' into 'dev-5.17.0'
fix: 【V5.17.0】游戏详情-详情tab页面优化-专题游戏单推荐-1213测试-第1点 https://jira.shanqu.cc/browse/GHZS-691

See merge request halo/android/assistant-android!561
2022-12-14 11:56:26 +08:00
d022f03ef8 fix: 【V5.17.0】游戏详情-详情tab页面优化-专题游戏单推荐-1213测试-第1点 https://jira.shanqu.cc/browse/GHZS-691 2022-12-14 11:49:00 +08:00
7ab8f2c4c5 Merge branch 'feature-GHZS-657' into 'dev-5.17.0'
fix:【V5.17.0】发现页相关功能优化(第一期)—1213UI测试(修改分类弹窗遮罩) https://jira.shanqu.cc/browse/GHZS-657

See merge request halo/android/assistant-android!560
2022-12-14 11:03:30 +08:00
4f0480c7b4 fix:【V5.17.0】发现页相关功能优化(第一期)—1213UI测试(修改分类弹窗遮罩) https://jira.shanqu.cc/browse/GHZS-657 2022-12-14 10:58:03 +08:00
12818c322c Merge branch 'feature-GHZS-660' into 'dev-5.17.0'
fix: 【V5.17.0】发现页相关功能优化(第一期)—1212测试-第1点 https://jira.shanqu.cc/browse/GHZS-660

See merge request halo/android/assistant-android!559
2022-12-14 09:20:56 +08:00
92f08d1bb8 fix: 【V5.17.0】发现页相关功能优化(第一期)—1212测试-第1点 https://jira.shanqu.cc/browse/GHZS-660 2022-12-13 18:01:52 +08:00
db5fbded43 Merge branch 'feature-GHZS-650' into 'dev-5.17.0'
fix:【V5.17.0】发现页相关功能优化(第一期)—1212测试-第2/6点 https://jira.shanqu.cc/browse/GHZS-650

See merge request halo/android/assistant-android!558
2022-12-13 17:53:41 +08:00
e554b1681e fix:【V5.17.0】发现页相关功能优化(第一期)—1212测试-第2/6点 https://jira.shanqu.cc/browse/GHZS-650 2022-12-13 17:47:37 +08:00
8ae846df88 Merge branch 'feature-GHZS-656' into 'dev-5.17.0'
fix: 【V5.17.0】游戏详情-详情tab页面优化-大家都在玩-1212测试-第2点 https://jira.shanqu.cc/browse/GHZS-656

See merge request halo/android/assistant-android!557
2022-12-13 17:09:28 +08:00
10e7047eec fix: 【V5.17.0】游戏详情-详情tab页面优化-大家都在玩-1212测试-第2点 https://jira.shanqu.cc/browse/GHZS-656 2022-12-13 17:04:49 +08:00
32eefa9003 Merge branch 'feature-GHZS-417' into 'dev-5.17.0'
feat: 【V5.17.0】游戏评价活动:光环星推官挑战赛—大数据(补充网页来源) https://jira.shanqu.cc/browse/GHZS-417

See merge request halo/android/assistant-android!556
2022-12-13 16:59:56 +08:00
f95b091c58 feat: 【V5.17.0】游戏评价活动:光环星推官挑战赛—大数据(补充网页来源) https://jira.shanqu.cc/browse/GHZS-417 2022-12-13 16:55:50 +08:00
e810369ee2 Merge branch 'feature-GHZS-657' into 'dev-5.17.0'
fix:【V5.17.0】发现页相关功能优化(第一期)—1213UI测试 https://jira.shanqu.cc/browse/GHZS-657

See merge request halo/android/assistant-android!555
2022-12-13 16:51:24 +08:00
b090e7863f fix:【V5.17.0】发现页相关功能优化(第一期)—1213UI测试 https://jira.shanqu.cc/browse/GHZS-657 2022-12-13 16:34:30 +08:00
1fb27ab467 Merge branch 'feature-GHZS-606' into 'dev-5.17.0'
【V5.17.0】发帖图片限制相关优化—1207测试 https://jira.shanqu.cc/browse/GHZS-606

See merge request halo/android/assistant-android!553
2022-12-13 15:42:25 +08:00
772abccae5 【V5.17.0】发帖图片限制相关优化—1207测试 https://jira.shanqu.cc/browse/GHZS-606 2022-12-13 15:42:25 +08:00
b64bb8bcd8 Merge branch 'feature-GHZS-652' into 'dev-5.17.0'
fix:【V5.17.0】发现页相关功能优化(第一期)—1212测试-第3/4/5/7点 https://jira.shanqu.cc/browse/GHZS-652

See merge request halo/android/assistant-android!554
2022-12-13 15:31:03 +08:00
699f55313c fix:【V5.17.0】发现页相关功能优化(第一期)—1212测试-第3/4/5/7点 https://jira.shanqu.cc/browse/GHZS-652 2022-12-13 13:46:52 +08:00
32b51e899e Merge branch 'feature-GHZS-446' into 'dev-5.17.0'
增加游戏详情专题游戏单推荐"换一批"功能

See merge request halo/android/assistant-android!552
2022-12-13 09:42:16 +08:00
719caf99cd 增加游戏详情专题游戏单推荐"换一批"功能 2022-12-13 09:42:15 +08:00
ac49180f98 Merge branch 'feature-add_url_scheme' into 'dev-5.17.0'
feat: 添加跳转到用户主页-游戏相关子选项的 urlscheme

See merge request halo/android/assistant-android!551
2022-12-12 18:00:23 +08:00
356acc053e feat: 添加跳转到用户主页-游戏相关子选项的 urlscheme 2022-12-12 17:47:16 +08:00
78366cd647 Merge branch 'feature-GHZS-649' into 'dev-5.17.0'
fix:【V5.17.0】发现页相关功能优化(第一期)—1212UI测试 https://jira.shanqu.cc/browse/GHZS-649

See merge request halo/android/assistant-android!550
2022-12-12 17:34:57 +08:00
926e917a1a fix:【V5.17.0】发现页相关功能优化(第一期)—1212UI测试 https://jira.shanqu.cc/browse/GHZS-649 2022-12-12 17:31:03 +08:00
b5eb376055 Merge branch 'dev-fix-game_download_tips_crash' into 'dev'
fix:修复gameDownloadTips为空导致发现页无法显示的问题

See merge request halo/android/assistant-android!549
2022-12-12 14:00:11 +08:00
4a321a6884 fix:修复gameDownloadTips为空导致发现页无法显示的问题 2022-12-12 13:54:24 +08:00
208ee23676 Merge branch 'feature-GHZS-420' into 'dev-5.17.0'
feat:【V5.17.0】发现页相关功能优化(第一期)—客户端 (游戏偏好页增加登录判断) https://jira.shanqu.cc/browse/GHZS-420

See merge request halo/android/assistant-android!548
2022-12-12 13:44:53 +08:00
a3f6464b1a feat:【V5.17.0】发现页相关功能优化(第一期)—客户端 (游戏偏好页增加登录判断) https://jira.shanqu.cc/browse/GHZS-420 2022-12-12 13:39:08 +08:00
8d4fbed5d9 Merge branch 'hotfix-forum_search_rank_icon' into 'dev'
fix:修复论坛搜索页-榜单显示多余缺省图标的问题

See merge request halo/android/assistant-android!547
2022-12-12 12:01:46 +08:00
93a8c24ad3 fix:修复论坛搜索页-榜单显示多余缺省图标的问题 2022-12-12 11:51:38 +08:00
4014572130 Merge branch 'feature-GHZS-432' into 'dev-5.17.0'
feat: 【V5.17.0】游戏详情-详情tab页面优化-数据埋点—客户端 https://jira.shanqu.cc/browse/GHZS-432

See merge request halo/android/assistant-android!546
2022-12-12 10:49:34 +08:00
3bf6a6eaf3 feat: 【V5.17.0】游戏详情-详情tab页面优化-数据埋点—客户端 https://jira.shanqu.cc/browse/GHZS-432 2022-12-12 10:46:07 +08:00
6397b4cfdd Merge branch 'feature-GHZS-420' into 'dev-5.17.0'
fix:【V5.17.0】发现页相关功能优化(第一期)—客户端(1.修改发现卡片类型值;2.微调UI;3.处理因gameDownloadTips为空的报错问...

See merge request halo/android/assistant-android!545
2022-12-09 17:05:02 +08:00
544e9458ee fix:【V5.17.0】发现页相关功能优化(第一期)—客户端(1.修改发现卡片类型值;2.微调UI;3.处理因gameDownloadTips为空的报错问题) https://jira.shanqu.cc/browse/GHZS-420 2022-12-09 17:02:42 +08:00
1b5b19fa76 Merge branch 'feature-GHZS-420' into 'dev-5.17.0'
feat:【V5.17.0】发现页相关功能优化(第一期)—客户端(增加埋点) https://jira.shanqu.cc/browse/GHZS-420

See merge request halo/android/assistant-android!544
2022-12-09 15:53:55 +08:00
00436dd3b9 Merge branch 'feature-GHZS-446' into 'dev-5.17.0'
feat: 【V5.17.0】游戏详情-详情tab页面优化-专题游戏单推荐—客户端 https://jira.shanqu.cc/browse/GHZS-446

See merge request halo/android/assistant-android!543
2022-12-09 15:50:49 +08:00
64b4a6bef0 feat: 【V5.17.0】游戏详情-详情tab页面优化-专题游戏单推荐—客户端 https://jira.shanqu.cc/browse/GHZS-446 2022-12-09 15:37:18 +08:00
b330ccc54d feat:【V5.17.0】发现页相关功能优化(第一期)—客户端(增加埋点) https://jira.shanqu.cc/browse/GHZS-420 2022-12-09 15:23:24 +08:00
7f460ac3df Merge branch 'feature-GHZS-420' into 'dev-5.17.0'
feat:【V5.17.0】发现页相关功能优化(第一期)—客户端 https://jira.shanqu.cc/browse/GHZS-420

See merge request halo/android/assistant-android!542
2022-12-09 11:57:07 +08:00
19fa7436c3 feat:【V5.17.0】发现页相关功能优化(第一期)—客户端 https://jira.shanqu.cc/browse/GHZS-420 2022-12-09 11:54:35 +08:00
9a5e529eeb Merge branch 'dev-5.17.0' into 'feature-GHZS-420'
# Conflicts:
#   app/src/main/java/com/gh/gamecenter/retrofit/service/ApiService.java
2022-12-09 03:16:53 +00:00
faac45e719 feat:【V5.17.0】发现页相关功能优化(第一期)—客户端 https://jira.shanqu.cc/browse/GHZS-420 2022-12-09 11:09:18 +08:00
17e4624909 Merge branch 'feature-GHZS-603' into 'dev-5.17.0'
fix: 【V5.17.0】游戏详情-详情tab页面优化-游戏单推荐—1207UI测试 https://jira.shanqu.cc/browse/GHZS-603

See merge request halo/android/assistant-android!541
2022-12-09 09:20:47 +08:00
6cf3786799 fix: 【V5.17.0】游戏详情-详情tab页面优化-游戏单推荐—1207UI测试 https://jira.shanqu.cc/browse/GHZS-603 2022-12-09 09:20:46 +08:00
d6e713fd60 Merge branch 'feature-GHZS-390' into 'dev-5.17.0'
feat:【V5.17.0】论坛详情页-问答帖新增排序方式切换—客户端 https://jira.shanqu.cc/browse/GHZS-390

See merge request halo/android/assistant-android!540
2022-12-08 17:28:03 +08:00
830715f44b Merge branch 'feature-issues95_99' into 'dev-5.17.0'
refactor:整理副标题相关代码 https://git.shanqu.cc/halo/android/assistant-android/-/issues/95

See merge request halo/android/assistant-android!539
2022-12-08 14:51:14 +08:00
73470771fe refactor:整理副标题相关代码 https://git.shanqu.cc/halo/android/assistant-android/-/issues/95 2022-12-08 14:21:59 +08:00
b62ce00f7a fix:全局处理 Color.parseColor() 方法异常 https://git.shanqu.cc/halo/android/assistant-android/-/issues/99 2022-12-08 14:11:02 +08:00
963f7f9ee0 Merge branch 'feature-GHZS-415' into 'dev-5.17.0'
feat: 【V5.17.0】游戏评价活动:光环星推官挑战赛—客户端 https://jira.shanqu.cc/browse/GHZS-415

See merge request halo/android/assistant-android!538
2022-12-08 11:39:43 +08:00
5c606f8eb3 feat: 【V5.17.0】游戏评价活动:光环星推官挑战赛—客户端 https://jira.shanqu.cc/browse/GHZS-415 2022-12-08 11:22:13 +08:00
6fed28da75 Merge branch 'feature-GHZS-604' into 'dev-5.17.0'
fix: 【V5.17.0】游戏详情-详情tab页面优化-相关游戏—1207UI测试 https://jira.shanqu.cc/browse/GHZS-604

See merge request halo/android/assistant-android!537
2022-12-07 17:07:40 +08:00
823060320f fix: 【V5.17.0】游戏详情-详情tab页面优化-相关游戏—1207UI测试 https://jira.shanqu.cc/browse/GHZS-604 2022-12-07 17:07:39 +08:00
d0bf32db06 Merge branch 'feature-GHZS-386' into 'dev-5.17.0'
feat:【V5.17.0】发帖草稿箱相关优化—客户端 https://jira.shanqu.cc/browse/GHZS-386

See merge request halo/android/assistant-android!536
2022-12-07 16:27:18 +08:00
d7fb0c86bb feat:【V5.17.0】发帖草稿箱相关优化—客户端 https://jira.shanqu.cc/browse/GHZS-386 2022-12-07 16:20:39 +08:00
c69ececcb7 Merge branch 'hotfix-dev-cloud_archive_list_page' into 'dev'
fix:修复游戏详情-云存档列表未设置分页问题

See merge request halo/android/assistant-android!535
2022-12-07 15:27:51 +08:00
ec4eeb0219 fix:修复游戏详情-云存档列表未设置分页问题 2022-12-07 15:25:23 +08:00
35aabd0fd3 Merge branch 'dev' into 'dev-5.17.0'
合并累积修复

See merge request halo/android/assistant-android!534
2022-12-07 14:00:39 +08:00
e626eb193f Merge branch 'feature-GHZS-436' into 'dev-5.17.0'
feat: 【V5.17.0】游戏详情-详情tab页面优化-大家都在玩—客户端 https://jira.shanqu.cc/browse/GHZS-436

See merge request halo/android/assistant-android!533
2022-12-07 11:29:18 +08:00
51d42c96d3 feat: 【V5.17.0】游戏详情-详情tab页面优化-大家都在玩—客户端 https://jira.shanqu.cc/browse/GHZS-436 2022-12-07 11:29:18 +08:00
ea32d5a798 Merge branch 'feature-GHZS-308' into 'dev-5.17.0'
feat: 【光环助手V5.17.0】发帖图片限制相关优化 https://jira.shanqu.cc/browse/GHZS-308

See merge request halo/android/assistant-android!532
2022-12-06 12:00:11 +08:00
59a5ea9600 feat: 【光环助手V5.17.0】发帖图片限制相关优化 https://jira.shanqu.cc/browse/GHZS-308 2022-12-06 11:50:46 +08:00
8ff62a9f5e Merge branch 'fix-vgame_wrong_database_backup' into 'dev'
fix: 修复畅玩游戏因为跨数据库版本备份造成的闪退问题

See merge request halo/android/assistant-android!531
2022-12-06 11:02:59 +08:00
203c8db840 fix: 修复畅玩游戏因为跨数据库版本备份造成的闪退问题 2022-12-06 10:48:48 +08:00
90ab76aa48 chore: 版本更新至 5.17.0 2022-12-06 09:55:45 +08:00
f1e3a21191 Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/search/SearchGameIndexItemViewHolder.kt
#	dependencies.gradle
2022-12-05 17:02:14 +08:00
cae48cb2b7 Merge remote-tracking branch 'origin/legacy-release' into release
# Conflicts:
#	dependencies.gradle
2022-12-05 17:00:22 +08:00
b91fa853ca Merge branch 'feature-GHZS-473' into 'dev-5.17.0'
feat:【V5.17.0】副标题客户端使用场景补充—客户端 https://jira.shanqu.cc/browse/GHZS-473

See merge request halo/android/assistant-android!529
2022-12-05 14:22:13 +08:00
0f0900033c feat:【V5.17.0】副标题客户端使用场景补充—客户端 https://jira.shanqu.cc/browse/GHZS-473 2022-12-05 14:16:47 +08:00
4fbc80ca38 Merge branch 'feature-GHZS-372' into 'dev-5.17.0'
feat:【光环助手V5.17.0】游戏列表-游戏卡片显示优化 https://jira.shanqu.cc/browse/GHZS-372

See merge request halo/android/assistant-android!528
2022-12-05 13:53:42 +08:00
7fbe32d2af feat:【光环助手V5.17.0】游戏列表-游戏卡片显示优化 https://jira.shanqu.cc/browse/GHZS-372 2022-12-05 13:53:42 +08:00
988b931170 chore: 版本更新到 5.14.8 2022-12-05 10:57:48 +08:00
50acd6998e Merge branch 'hotfix-v5.14.7-637-crash' into 'legacy-release'
fix: 临时修复跳转内容为空时的闪退...

See merge request halo/android/assistant-android!527
2022-12-05 10:56:15 +08:00
84faf3e0d5 Merge branch 'feature-GHZS-565' into 'dev'
fix:【光环助手V5.16.0】游戏广告管理功能(前端部分)-1202测试 https://jira.shanqu.cc/browse/GHZS-565

See merge request halo/android/assistant-android!526
2022-12-05 10:50:49 +08:00
d84c1f1f25 fix:【光环助手V5.16.0】游戏广告管理功能(前端部分)-1202测试 https://jira.shanqu.cc/browse/GHZS-565 2022-12-05 10:37:49 +08:00
52b6a429bc fix: 临时修复跳转内容为空时的闪退 https://sentry.shanqu.cc/organizations/lightgame/issues/237240/?project=22&query=skip&sort=freq&statsPeriod=14d 2022-12-05 10:28:42 +08:00
6492b41ad1 Merge branch 'feature-issues92' into 'dev'
fix:修复游戏单详情评论列表的滑动卡顿问题 https://git.shanqu.cc/halo/android/assistant-android/-/issues/92

See merge request halo/android/assistant-android!524
2022-12-02 15:37:12 +08:00
3e4faca388 fix:修复游戏单详情评论列表的滑动卡顿问题 https://git.shanqu.cc/halo/android/assistant-android/-/issues/92 2022-12-02 15:37:12 +08:00
15b3f7df2a Merge branch 'feature-GHZS-440' into 'dev-5.17.0'
feat: 【V5.17.0】游戏详情-详情tab页面优化-游戏单推荐—客户端 https://jira.shanqu.cc/browse/GHZS-440

See merge request halo/android/assistant-android!525
2022-12-02 15:34:16 +08:00
937109224c feat: 【V5.17.0】游戏详情-详情tab页面优化-游戏单推荐—客户端 https://jira.shanqu.cc/browse/GHZS-440 2022-12-02 15:30:14 +08:00
cd1609a3ef chore: 版本更新至 5.15.2 2022-12-02 15:18:22 +08:00
4fd9c7b36e Merge branch 'hotfix-v5.15.1-651-game_ratting_error' into 'release'
fix: 修改游戏评论闪退问题

See merge request halo/android/assistant-android!523
2022-12-02 14:29:22 +08:00
2bd8e0f96b fix: 修改游戏评论闪退问题 2022-12-02 14:25:06 +08:00
2d64f19f98 Merge branch 'hotfix-v5.15.1-651-simulator_crash' into 'release'
fix: 修复模拟器安装时的闪退

See merge request halo/android/assistant-android!521
2022-12-02 13:49:44 +08:00
15de55ceae fix: 修复模拟器安装时的闪退 2022-12-02 13:45:42 +08:00
2316bd1e18 Merge branch 'hotfix-v5.15.1-651-search_subject_crash' into 'release'
fix:修复搜索专题显示空白的问题

See merge request halo/android/assistant-android!520
2022-12-02 12:21:04 +08:00
6a4726650c fix:修复搜索专题显示空白的问题 2022-12-02 11:45:10 +08:00
e79e6f8ec8 Merge branch 'feature-GHZS-554' into 'dev'
fix:【光环助手V5.16.0】光环下载进度条优化-1201测试 https://jira.shanqu.cc/browse/GHZS-554

See merge request halo/android/assistant-android!519
2022-12-02 10:43:34 +08:00
894d962836 Merge branch 'feature-GHZS-549' into 'dev'
fix:【光环助手V5.16.0】游戏广告管理功能(前端部分)-1201测试- (2(2)、4) https://jira.shanqu.cc/browse/GHZS-549

See merge request halo/android/assistant-android!518
2022-12-02 10:42:29 +08:00
f48767c4bf fix:【光环助手V5.16.0】光环下载进度条优化-1201测试 https://jira.shanqu.cc/browse/GHZS-554 2022-12-02 10:32:17 +08:00
b5a64d1c36 fix:【光环助手V5.16.0】游戏广告管理功能(前端部分)-1201测试- (2(2)、4) https://jira.shanqu.cc/browse/GHZS-549 2022-12-02 09:55:25 +08:00
fb4936a553 feat:【V5.17.0】论坛详情页-问答帖新增排序方式切换—客户端 https://jira.shanqu.cc/browse/GHZS-390 2022-12-01 16:30:44 +08:00
001d062207 chore: 版本更新至 5.15.1 2022-12-01 16:27:31 +08:00
d4b1b822f4 Merge branch 'legacy-release' into 'release'
合并 5.14.X 闪退修复

See merge request halo/android/assistant-android!517
2022-12-01 16:26:32 +08:00
732765118e Merge branch 'hotfix-v5.14.7-637-crashes' into 'legacy-release'
修复一些线上闪退

See merge request halo/android/assistant-android!516
2022-12-01 16:25:36 +08:00
eeacae1fd2 fix: 修复历史游戏列表因为历史副标题颜色不存在引起的闪退 2022-12-01 16:08:17 +08:00
e982ae9125 fix: 修复双列通用合集专题因为获取到错误的位置造成的闪退 2022-12-01 16:03:20 +08:00
a7ee0c754b fix: 捕抓畅玩因为存储空间不足造成的闪退 2022-12-01 16:01:27 +08:00
b042b3433d Merge branch 'feature-GHZS-534' into 'dev'
fix:【光环助手V5.16.0】光环下载进度条优化-1130测试2 https://jira.shanqu.cc/browse/GHZS-534

See merge request halo/android/assistant-android!515
2022-12-01 15:05:24 +08:00
8ba70f4a7d fix:【光环助手V5.16.0】光环下载进度条优化-1130测试2 https://jira.shanqu.cc/browse/GHZS-534 2022-12-01 14:59:04 +08:00
094a85bfa4 Merge branch 'feature-GHZS-538' into 'release'
fix: 模拟器下载流程问题修改  https://jira.shanqu.cc/browse/GHZS-538

See merge request halo/android/assistant-android!514
2022-12-01 13:52:27 +08:00
54f0fa8dd8 fix: 模拟器下载流程问题修改 https://jira.shanqu.cc/browse/GHZS-538 2022-12-01 13:49:01 +08:00
30f4bcc422 Merge branch 'feature-GHZS-431' into 'dev-5.17.0'
feat: 【V5.17.0】游戏详情-详情tab页面优化-相关游戏—客户端 https://jira.shanqu.cc/browse/GHZS-431

See merge request halo/android/assistant-android!513
2022-12-01 11:44:00 +08:00
39820b2c8a feat: 【V5.17.0】游戏详情-详情tab页面优化-相关游戏—客户端 https://jira.shanqu.cc/browse/GHZS-431 2022-12-01 11:40:20 +08:00
1f331a20fa Merge branch 'feature-GHZS-538' into 'release'
fix: 模拟器下载流程问题  https://jira.shanqu.cc/browse/GHZS-538

See merge request halo/android/assistant-android!512
2022-12-01 11:40:15 +08:00
ad58699d2f fix: 模拟器下载流程问题 https://jira.shanqu.cc/browse/GHZS-538 2022-12-01 11:30:21 +08:00
ecb73f9636 Merge branch 'feature-GHZS-373' into 'dev-5.17.0'
feat:【光环助手V5.17.0】游戏详情-分享面板文案更换 https://jira.shanqu.cc/browse/GHZS-373

See merge request halo/android/assistant-android!511
2022-12-01 10:46:35 +08:00
55e80c00de Merge branch 'fix-GHZS-535' into 'dev'
fix: 云存档第一期-测试问题-2022\11\30-第6点 https://jira.shanqu.cc/browse/GHZS-535

See merge request halo/android/assistant-android!510
2022-12-01 10:34:41 +08:00
172b8cfa4c fix: 云存档第一期-测试问题-2022\11\30-第6点 https://jira.shanqu.cc/browse/GHZS-535 2022-12-01 10:24:40 +08:00
bf6b1f05b0 Merge branch 'feature-GHZS-531' into 'dev'
fix:【V5.16.0】游戏广告管理功能(前端部分)-1130测试(4) https://jira.shanqu.cc/browse/GHZS-531

See merge request halo/android/assistant-android!509
2022-12-01 10:15:14 +08:00
5e69aa2362 feat:【光环助手V5.17.0】游戏详情-分享面板文案更换 https://jira.shanqu.cc/browse/GHZS-373 2022-12-01 10:12:17 +08:00
a28ba2773e fix:【V5.16.0】游戏广告管理功能(前端部分)-1130测试(4) https://jira.shanqu.cc/browse/GHZS-531 2022-12-01 09:45:44 +08:00
a19b2c5dc8 Merge branch 'fix-wrong_backup' into 'dev'
fix: 修复云存档会被自动备份影响到下一次安装使用的问题

See merge request halo/android/assistant-android!508
2022-11-30 21:25:30 +08:00
a70156e272 fix: 修复云存档会被自动备份影响到下一次安装使用的问题 2022-11-30 21:21:47 +08:00
583e8c8eb8 Merge branch 'feature-GHZS-520' into 'dev'
fix:【光环助手V5.16.0】光环下载进度条优化-1130测试(1-3、5) https://jira.shanqu.cc/browse/GHZS-520

See merge request halo/android/assistant-android!505
2022-11-30 19:44:58 +08:00
b08b6bda3b fix:【光环助手V5.16.0】光环下载进度条优化-1130测试(1-3、5) https://jira.shanqu.cc/browse/GHZS-520 2022-11-30 19:44:58 +08:00
ef1d32b330 Merge branch 'feature-GHZS-513' into 'dev'
fix:【V5.16.0】云存档第一期—云存档管理-1130UI测试(4) https://jira.shanqu.cc/browse/GHZS-513

See merge request halo/android/assistant-android!506
2022-11-30 19:43:12 +08:00
98deb6c702 fix:【V5.16.0】云存档第一期—云存档管理-1130UI测试(4) https://jira.shanqu.cc/browse/GHZS-513 2022-11-30 19:43:12 +08:00
1aa23aeeae Merge branch 'fix-GHZS-524' into 'dev'
fix: 云存档第一期-测试问题-2022\11\30-第5点 https://jira.shanqu.cc/browse/GHZS-524

See merge request halo/android/assistant-android!507
2022-11-30 18:54:13 +08:00
dd4f9918c9 fix: 云存档第一期-测试问题-2022\11\30-第5点 https://jira.shanqu.cc/browse/GHZS-524 2022-11-30 18:51:54 +08:00
da1d7b23c3 Merge branch 'fix-GHZS-489' into 'dev'
fix: 云存档第一期-测试问题-2022\11\30-第4点 https://jira.shanqu.cc/browse/GHZS-489

See merge request halo/android/assistant-android!504
2022-11-30 18:29:24 +08:00
8fc324cbc3 fix: 云存档第一期-测试问题-2022\11\30-第4点 https://jira.shanqu.cc/browse/GHZS-489 2022-11-30 18:21:12 +08:00
cd83c0a267 Merge branch 'feature-GHZS-511' into 'dev'
fix:【V5.16.0】云存档第一期—游戏详情-1130UI测试(6) https://jira.shanqu.cc/browse/GHZS-511

See merge request halo/android/assistant-android!503
2022-11-30 18:20:46 +08:00
d61eb01461 fix:【V5.16.0】云存档第一期—游戏详情-1130UI测试(6) https://jira.shanqu.cc/browse/GHZS-511 2022-11-30 18:18:26 +08:00
546d692151 Merge branch 'feature-GHZS-511' into 'dev'
fix:【V5.16.0】云存档第一期—游戏详情-1130UI测试(5) https://jira.shanqu.cc/browse/GHZS-511

See merge request halo/android/assistant-android!502
2022-11-30 17:50:50 +08:00
bc313422e2 fix:【V5.16.0】云存档第一期—游戏详情-1130UI测试(5) https://jira.shanqu.cc/browse/GHZS-511 2022-11-30 17:50:14 +08:00
acc5bd6e8c Merge branch 'hotfix_game_detail_archive_ui' into 'dev'
fix: 游戏详情-云存档tab-用户icon去掉边框

See merge request halo/android/assistant-android!501
2022-11-30 17:09:01 +08:00
15c3aed5ba fix: 游戏详情-云存档tab-用户icon去掉边框 2022-11-30 17:07:42 +08:00
afc8f15048 Merge branch 'fix-GHZS-489' into 'dev'
fix: 云存档第一期-测试问题-2022\11\30-第4点 https://jira.shanqu.cc/browse/GHZS-489

See merge request halo/android/assistant-android!500
2022-11-30 16:48:54 +08:00
de02ea7312 fix: 云存档第一期-测试问题-2022\11\30-第4点 https://jira.shanqu.cc/browse/GHZS-489 2022-11-30 16:44:23 +08:00
420b112576 Merge branch 'feature-GHZS-521' into 'dev'
fix: 云存档第一期-测试问题-2022\11\30-第2点 https://jira.shanqu.cc/browse/GHZS-521

See merge request halo/android/assistant-android!499
2022-11-30 16:38:46 +08:00
f6a67350b4 fix: 云存档第一期-测试问题-2022\11\30-第2点 https://jira.shanqu.cc/browse/GHZS-521 2022-11-30 16:35:45 +08:00
5482322c28 Merge branch 'feature-GHZS-515' into 'dev'
fix: 云存档第一期-测试问题-2022\11\30-第3点 https://jira.shanqu.cc/browse/GHZS-515

See merge request halo/android/assistant-android!498
2022-11-30 16:15:24 +08:00
08236d4ddc fix: 云存档第一期-测试问题-2022\11\30-第3点 https://jira.shanqu.cc/browse/GHZS-515 2022-11-30 16:15:24 +08:00
9558c0b123 Merge branch 'feature-GHZS-511' into 'dev'
fix:【V5.16.0】云存档第一期—游戏详情-1130UI测试 https://jira.shanqu.cc/browse/GHZS-511

See merge request halo/android/assistant-android!497
2022-11-30 15:03:07 +08:00
f68df0fce5 fix:【V5.16.0】云存档第一期—游戏详情-1130UI测试 https://jira.shanqu.cc/browse/GHZS-511 2022-11-30 14:59:50 +08:00
03401e5649 Merge branch 'feature-GHZS-503' into 'dev'
fix:【V5.16.0】游戏活动模板功能(第二期)-1124测试-第2点 https://jira.shanqu.cc/browse/GHZS-503

See merge request halo/android/assistant-android!496
2022-11-30 14:53:36 +08:00
86f6b0c108 fix:【V5.16.0】游戏活动模板功能(第二期)-1124测试-第2点 https://jira.shanqu.cc/browse/GHZS-503 2022-11-30 14:43:00 +08:00
fc9eea7a4e Merge branch 'feature-GHZS-513' into 'dev'
fix:【V5.16.0】云存档第一期—云存档管理-1130UI测试 https://jira.shanqu.cc/browse/GHZS-513

See merge request halo/android/assistant-android!494
2022-11-30 14:29:15 +08:00
bff56dc114 fix:【V5.16.0】云存档第一期—云存档管理-1130UI测试 https://jira.shanqu.cc/browse/GHZS-513 2022-11-30 14:29:15 +08:00
fddf52b0c3 Merge branch 'feature-GHZS-443' into 'dev'
fix:【V5.16.0】游戏广告管理功能(前端部分)-1128测试(3) https://jira.shanqu.cc/browse/GHZS-443

See merge request halo/android/assistant-android!495
2022-11-30 14:28:55 +08:00
5eb804d9d4 fix:【V5.16.0】游戏广告管理功能(前端部分)-1128测试(3) https://jira.shanqu.cc/browse/GHZS-443 2022-11-30 14:28:55 +08:00
d04e2b59e5 Merge branch 'feature_GHZS_93' into 'dev'
fix:修复已安装游戏tab-游戏卡片列表顶部(首个游戏上方)需增加8dp间距  https://jira.shanqu.cc/browse/GHZS-514

See merge request halo/android/assistant-android!493
2022-11-30 14:05:21 +08:00
558f4409af fix:修复已安装游戏tab-游戏卡片列表顶部(首个游戏上方)需增加8dp间距 https://jira.shanqu.cc/browse/GHZS-514 2022-11-30 14:05:21 +08:00
c21040f8f1 Merge branch 'feature-GHZS-488' into 'dev'
fix:【光环助手V5.16.0】游戏礼包优化(第三期)-1129测试-第2点 https://jira.shanqu.cc/browse/GHZS-488

See merge request halo/android/assistant-android!491
2022-11-30 14:00:26 +08:00
2f577c7ef1 Merge branch 'feature-GHZS-92' into 'dev'
feat:【V5.16.0】云存档第一期-云存档管理—客户端(添加使用帮助文章跳转) https://jira.shanqu.cc/browse/GHZS-92

See merge request halo/android/assistant-android!492
2022-11-30 13:51:28 +08:00
56ddf9a83b feat:【V5.16.0】云存档第一期-云存档管理—客户端(添加使用帮助文章跳转) https://jira.shanqu.cc/browse/GHZS-92 2022-11-30 13:51:28 +08:00
50e8071a31 fix:【光环助手V5.16.0】游戏礼包优化(第三期)-1129测试-第2点 https://jira.shanqu.cc/browse/GHZS-488 2022-11-30 13:05:41 +08:00
ca073c128d Merge branch 'fix-GHZS-483' into 'dev'
fix: 畅玩流程优化-测试问题 https://jira.shanqu.cc/browse/GHZS-483

See merge request halo/android/assistant-android!490
2022-11-30 10:45:35 +08:00
6e0dd3831b fix: 畅玩流程优化-测试问题 https://jira.shanqu.cc/browse/GHZS-483 2022-11-30 10:40:55 +08:00
a22e26aec3 Merge branch 'feature-GHZS-478' into 'dev'
fix:【光环助手V5.16.0】光环下载进度条优化-1128测试 https://jira.shanqu.cc/browse/GHZS-478

See merge request halo/android/assistant-android!488
2022-11-30 10:31:42 +08:00
fa33fe3d71 fix:【光环助手V5.16.0】光环下载进度条优化-1128测试 https://jira.shanqu.cc/browse/GHZS-478
fix:【光环助手V5.16.0】光环下载进度条优化-测试问题-2022\\11\\29 https://jira.shanqu.cc/browse/GHZS-484
fix:【光环助手V5.16.0】光环下载进度条优化-1129测试 https://jira.shanqu.cc/browse/GHZS-486
2022-11-30 10:31:42 +08:00
f9e16d1f32 Merge branch 'feature_GHZS_93' into 'dev'
fix:更换游戏存档-推荐游戏接口

See merge request halo/android/assistant-android!489
2022-11-30 09:55:18 +08:00
8584e12a7e fix:更换游戏存档-推荐游戏接口 2022-11-30 09:55:18 +08:00
5ffd28de1b Merge branch 'feature_GHZS_93' into 'dev'
fix:添加筛选云存档的游戏接口

See merge request halo/android/assistant-android!487
2022-11-29 16:22:17 +08:00
fff91052ff fix:添加筛选云存档的游戏接口 2022-11-29 16:22:17 +08:00
0e0812c00e Merge branch 'feature-GHZS-310' into 'dev'
feat:【光环助手V5.16.0】云存档第一期—数据埋点—客户端-1-10 https://jira.shanqu.cc/browse/GHZS-310

See merge request halo/android/assistant-android!485
2022-11-29 10:44:06 +08:00
efe0efa0f8 feat:【光环助手V5.16.0】云存档第一期—数据埋点—客户端-1-10 https://jira.shanqu.cc/browse/GHZS-310 2022-11-28 18:22:52 +08:00
bdb7336d16 Merge remote-tracking branch 'origin/release' into dev 2022-11-28 17:03:28 +08:00
2ee01a0819 Merge remote-tracking branch 'origin/legacy-release' into release
# Conflicts:
#	app/src/main/java/com/gh/common/history/HistoryDatabase.kt
#	app/src/main/java/com/gh/gamecenter/entity/AmwayCommentEntity.kt
#	app/src/main/java/com/gh/gamecenter/entity/HistoryGameEntity.kt
#	dependencies.gradle
2022-11-28 16:53:02 +08:00
d322c0c500 Merge branch 'hotfix-dev-game_detail_bbs_tab_click' into 'dev'
fix: 游戏详情页-跳转论坛Tab增加是否存在云存档Tab的判断

See merge request halo/android/assistant-android!484
2022-11-28 16:46:03 +08:00
be43470066 fix: 游戏详情页-跳转论坛Tab增加是否存在云存档Tab的判断 2022-11-28 16:41:15 +08:00
ade40c49ef Merge branch 'merge-from_dev_to_feature-GHZS-78' into 'dev'
合并云存档代码至 dev

See merge request halo/android/assistant-android!483
2022-11-28 16:24:27 +08:00
31d23a3a02 Merge remote-tracking branch 'origin/dev' into feature-GHZS-78
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailFragment.kt
2022-11-28 15:34:57 +08:00
22e56e838a Merge branch 'feature-GHZS-380' into 'dev'
fix: 【V5.16.0】启动广告图-1125测试结果反馈-第1/4点 https://jira.shanqu.cc/browse/GHZS-380

See merge request halo/android/assistant-android!480
2022-11-28 14:27:29 +08:00
2242de5f83 chore: 版本更新至 5.14.7-637 2022-11-28 14:26:48 +08:00
b684fff4f1 Merge branch 'hotfix-v5.14.6-636-subtitle' into 'legacy-release'
fix: 补充遗漏的副标题(游戏动态页) https://jira.shanqu.cc/browse/GHZS-344

See merge request halo/android/assistant-android!479
2022-11-28 14:22:37 +08:00
001a472b8e fix: 【V5.16.0】启动广告图-1125测试结果反馈-第1/4点 https://jira.shanqu.cc/browse/GHZS-380 2022-11-28 14:17:18 +08:00
0b0f575c41 fix: 补充遗漏的副标题(游戏动态页) https://jira.shanqu.cc/browse/GHZS-344 2022-11-28 14:05:15 +08:00
da25541147 fix:添加我的光环-游戏存档入口 2022-11-28 11:57:18 +08:00
e57ba6ed71 feat:【光环助手V5.16.0】云存档第一期—数据埋点—客户端-11-20 (12、19) https://jira.shanqu.cc/browse/GHZS-314 2022-11-28 11:37:44 +08:00
fad7083a2c Merge branch 'feature-GHZS-344' into 'legacy-release'
feat: 【光环助手】副标题遗漏场景补充 https://jira.shanqu.cc/browse/GHZS-344

See merge request halo/android/assistant-android!477
2022-11-28 11:25:05 +08:00
9254c9ef7d Merge branch 'feature_GHZS_93' into 'feature-GHZS-78'
feat:添加我的光环-游戏存档https://jira.shanqu.cc/browse/GHZS-93

See merge request halo/android/assistant-android!478
2022-11-28 10:41:47 +08:00
d3042b9199 feat:添加我的光环-游戏存档https://jira.shanqu.cc/browse/GHZS-93 2022-11-28 10:41:47 +08:00
0893a34dff feat:【光环助手V5.16.0】云存档第一期—数据埋点—客户端-11-20 (除12、19) https://jira.shanqu.cc/browse/GHZS-314 2022-11-25 16:49:27 +08:00
da22540af3 feat: 【光环助手】副标题遗漏场景补充 https://jira.shanqu.cc/browse/GHZS-344 2022-11-25 16:23:06 +08:00
fffc27e779 fix:【V5.16.0】云存档第一期-云存档管理—客户端(修改编辑存档接口,处理一些细节问题) https://jira.shanqu.cc/browse/GHZS-92 2022-11-25 15:00:58 +08:00
2f246da269 Merge branch 'feature-GHZS-348' into 'dev'
fix:【V5.16.0】游戏搜索-热门榜单功能优化-1124UI测试 https://jira.shanqu.cc/browse/GHZS-348

See merge request halo/android/assistant-android!476
2022-11-25 14:40:04 +08:00
c6137fc3c9 fix:【V5.16.0】游戏搜索-热门榜单功能优化-1124UI测试 https://jira.shanqu.cc/browse/GHZS-348 2022-11-25 14:36:23 +08:00
518eb222b9 fix:处理切换普通/深色模式时LazyListFragment页面变量未初始化导致的闪退问题 2022-11-25 14:26:43 +08:00
8bf7c61690 Merge branch 'fix-gamedetail_tab_error' into 'dev'
fix: 修改游戏详情tab跳转错误问题

See merge request halo/android/assistant-android!475
2022-11-25 14:11:05 +08:00
a28169eeae fix: 修改游戏详情tab跳转错误问题 2022-11-25 14:07:04 +08:00
fb1968b402 fix:处理合并遗漏 2022-11-25 13:56:54 +08:00
f479c789e9 Merge remote-tracking branch 'origin/dev' into feature-GHZS-78
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailFragment.kt
#	app/src/main/java/com/gh/gamecenter/retrofit/service/ApiService.java
2022-11-25 13:40:34 +08:00
67fb1948b4 feat:【V5.16.0】云存档第一期-云存档管理—客户端 https://jira.shanqu.cc/browse/GHZS-92 2022-11-24 17:51:14 +08:00
cd39a497e9 Merge branch 'feature-GHZS-336' into 'dev'
fix:【光环助手V5.16.0】游戏评分相关优化-1124UI测试 https://jira.shanqu.cc/browse/GHZS-336

See merge request halo/android/assistant-android!473
2022-11-24 17:49:13 +08:00
2398795438 fix:【光环助手V5.16.0】游戏评分相关优化-1124UI测试 https://jira.shanqu.cc/browse/GHZS-336 2022-11-24 17:45:50 +08:00
2d41122c1c Merge branch 'feature-GHZS-334' into 'dev'
fix:【光环助手V5.16.0】游戏评分相关优化-1124测试-第1点 https://jira.shanqu.cc/browse/GHZS-334

See merge request halo/android/assistant-android!472
2022-11-24 17:22:13 +08:00
ec576900e8 fix:【光环助手V5.16.0】游戏评分相关优化-1124测试-第1点 https://jira.shanqu.cc/browse/GHZS-334 2022-11-24 17:15:49 +08:00
47549d788b fix:【光环助手V5.16.0】游戏评分相关优化-1124测试-第1点 https://jira.shanqu.cc/browse/GHZS-334 2022-11-24 16:51:48 +08:00
34f1dd057c feat:【V5.16.0】云存档第一期-游戏详情—客户端(创建下载按钮辅助类)https://jira.shanqu.cc/browse/GHZS-80 2022-11-24 15:41:31 +08:00
20e8fa451c Merge branch 'feature-GHZS-282' into 'dev'
fix:【V5.16.0】游戏搜索-热门榜单功能优化-1118UI测试(修复动图设置圆角无效问题) https://jira.shanqu.cc/browse/GHZS-282

See merge request halo/android/assistant-android!471
2022-11-24 15:07:11 +08:00
f92fb6a1c7 fix:【V5.16.0】游戏搜索-热门榜单功能优化-1118UI测试(修复动图设置圆角无效问题) https://jira.shanqu.cc/browse/GHZS-282 2022-11-24 15:07:10 +08:00
0e71b917c5 Merge branch 'feature-GHZS-340' into 'dev'
fix:【光环助手V5.16.0】光环下载进度条优化-1124UI测试 https://jira.shanqu.cc/browse/GHZS-340

See merge request halo/android/assistant-android!470
2022-11-24 15:00:52 +08:00
d48947b256 fix:【光环助手V5.16.0】光环下载进度条优化-1124UI测试 https://jira.shanqu.cc/browse/GHZS-340 2022-11-24 14:46:47 +08:00
7f5605a1a7 Merge branch 'merge-dev_to_dev-5.16.0' into 'dev-5.16.0'
Merge dev to dev 5.16.0

See merge request halo/android/assistant-android!469
2022-11-24 13:43:42 +08:00
f0ed0ae612 fix: 处理合并冲突 2022-11-24 11:15:58 +08:00
2c7997aa57 Merge remote-tracking branch 'origin/dev' into dev-5.16.0
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/game/GameItemViewHolder.kt
#	app/src/main/java/com/gh/gamecenter/game/vertical/GameVerticalAdapter.kt
#	app/src/main/java/com/gh/gamecenter/simulatorgame/SimulatorGameListAdapter.kt
#	app/src/main/java/com/gh/vspace/VDownloadManagerAdapter.kt
#	module_common/src/main/java/com/gh/gamecenter/common/view/DrawableView.kt
2022-11-24 11:06:06 +08:00
0bc638a2f9 Merge branch 'merge-release_to_dev' into 'dev'
Merge release to dev

See merge request halo/android/assistant-android!468
2022-11-24 10:50:10 +08:00
1ae64c35b9 Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/game/GameItemViewHolder.kt
#	dependencies.gradle
2022-11-24 10:38:48 +08:00
252566837a chore: 版本更新至 5.14.6 2022-11-24 10:06:24 +08:00
4cfa723a0e feat:【V5.16.0】云存档第一期-游戏详情—客户端(处理下载按钮)https://jira.shanqu.cc/browse/GHZS-80 2022-11-23 18:00:20 +08:00
6c74096302 Merge branch 'fix-wrong-activity_dependency_version' into 'dev-5.16.0'
fix: activity-ktx 回滚到够用的 1.2.3 (依赖版本升太高增加了 100K 压缩后的代码)

See merge request halo/android/assistant-android!467
2022-11-23 17:49:45 +08:00
53075a2eff fix: activity-ktx 回滚到够用的 1.2.3 (依赖版本升太高增加了 100K 压缩后的代码) 2022-11-23 17:48:30 +08:00
94d249312b Merge branch 'hotfix-v5.13.7-617-try_catch_subtitle_crash' into 'release'
fix:捕获游戏详情副标题的异常

See merge request halo/android/assistant-android!466
2022-11-23 17:03:28 +08:00
4855dda839 fix:捕获游戏详情副标题的异常 2022-11-23 17:03:28 +08:00
c5519fb160 Merge branch 'hotfix-v5.14.5-635-subtitle' into 'release'
fix: 修复模拟器上部分副标题不显示的问题,为分类页面和开服表页面添加副标题支持 https://jira.shanqu.cc/browse/GHZS-319

See merge request halo/android/assistant-android!463
2022-11-23 16:26:09 +08:00
5cd9197d0f fix: 修复模拟器上部分副标题不显示的问题,为分类页面和开服表页面添加副标题支持 https://jira.shanqu.cc/browse/GHZS-319 2022-11-23 16:26:09 +08:00
28a97b0441 Merge branch 'feature-issues93' into 'dev-5.16.0'
feat: 移除冗余的 Splitties 依赖

See merge request halo/android/assistant-android!464
2022-11-23 16:03:25 +08:00
d0cd3b4ac2 Merge branch 'feature-GHZS-144' into 'dev-5.16.0'
feat:【V5.16.0】游戏评分相关优化—客户端(草稿功能由本地改为使用接口) https://jira.shanqu.cc/browse/GHZS-144

See merge request halo/android/assistant-android!462
2022-11-23 11:44:21 +08:00
f87e0dfe3c feat:【V5.16.0】游戏评分相关优化—客户端(草稿功能由本地改为使用接口) https://jira.shanqu.cc/browse/GHZS-144 2022-11-23 11:44:21 +08:00
c838f1dc24 feat: 移除冗余的 Splitties 依赖 2022-11-23 11:26:22 +08:00
584512c2ae Merge branch 'merge-release_to_dev' into 'dev'
合并 release 变更至 dev

See merge request halo/android/assistant-android!461
2022-11-23 10:43:24 +08:00
22cfe03a30 Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/entity/PrivacyPolicyEntity.kt
#	dependencies.gradle
2022-11-23 10:36:10 +08:00
3b178c0bbe chore: 版本更新至 5.14.5 2022-11-23 10:20:30 +08:00
6270f9fb98 Merge branch 'hotfix-v5.14.4-634-vgame_feedback' into 'release'
fix: 修复畅玩游戏反馈无法正常跳转的问题 https://jira.shanqu.cc/browse/GHZS-309

See merge request halo/android/assistant-android!460
2022-11-23 10:19:40 +08:00
0306caadb5 fix: 修复畅玩游戏反馈无法正常跳转的问题 https://jira.shanqu.cc/browse/GHZS-309 2022-11-23 10:19:40 +08:00
9c1e2f18fd fix: 修复数据升级异常 2022-11-22 17:17:56 +08:00
305ab1d0e2 fix: 统一方法描述 2022-11-22 16:49:38 +08:00
ad208538f6 feat: 提供创建游戏存档结果回调 2022-11-22 16:47:38 +08:00
308cf4b627 feat: 调整存档路径的可见性 2022-11-22 16:38:34 +08:00
4fd4086023 Merge branch 'feature-GHZS-282' into 'dev-5.16.0'
fix:【V5.16.0】游戏搜索-热门榜单功能优化-1118UI测试 https://jira.shanqu.cc/browse/GHZS-282

See merge request halo/android/assistant-android!459
2022-11-22 15:43:11 +08:00
858f213b19 fix:【V5.16.0】游戏搜索-热门榜单功能优化-1118UI测试 https://jira.shanqu.cc/browse/GHZS-282 2022-11-22 15:41:28 +08:00
5efb343599 feat: 提供根据 md5 删除对应存档的方法,调整部分变量命名 2022-11-22 15:10:40 +08:00
842f120de4 feat: 提供根据 md5 获取存档文件的方法 2022-11-22 15:04:14 +08:00
adf7795877 Merge branch 'feature-GHZS-28' into 'dev-5.16.0'
fix:【V5.16.0】游戏广告管理功能(前端部分)—客户端 (安利墙广场改为支持任意位置放置专题) https://jira.shanqu.cc/browse/GHZS-28

See merge request halo/android/assistant-android!458
2022-11-22 14:56:06 +08:00
095e533269 fix:【V5.16.0】游戏广告管理功能(前端部分)—客户端 (安利墙广场改为支持任意位置放置专题) https://jira.shanqu.cc/browse/GHZS-28 2022-11-22 14:48:36 +08:00
364e7d0588 Merge branch 'feature-GHZS-112' into 'dev-5.16.0'
feat:【V5.16.0】违规整合优化(第二期)—客户端 https://jira.shanqu.cc/browse/GHZS-112

See merge request halo/android/assistant-android!457
2022-11-22 14:28:41 +08:00
d3ce4b00ab feat: 提供简单的畅玩下载存档、保存存档、应用存档逻辑 2022-11-22 14:23:07 +08:00
bde4baa0d1 feat:【V5.16.0】违规整合优化(第二期)—客户端 https://jira.shanqu.cc/browse/GHZS-112 2022-11-22 14:12:18 +08:00
1fdb1bd24a Merge branch 'feature-GHZS-144' into 'dev-5.16.0'
feat:【V5.16.0】游戏评分相关优化—客户端 https://jira.shanqu.cc/browse/GHZS-144

See merge request halo/android/assistant-android!455
2022-11-22 10:11:08 +08:00
4cba936bf2 Merge branch 'feature-GHZS-273' into 'dev-5.16.0'
fix: 【V5.16.0】游戏详情-内容卡片优化-1118测试-第1点 https://jira.shanqu.cc/browse/GHZS-273

See merge request halo/android/assistant-android!456
2022-11-22 10:04:42 +08:00
f33b5e1609 fix: 【V5.16.0】游戏详情-内容卡片优化-1118测试-第1点 https://jira.shanqu.cc/browse/GHZS-273 2022-11-22 10:00:15 +08:00
5881f70a9e feat:【V5.16.0】游戏评分相关优化—客户端 https://jira.shanqu.cc/browse/GHZS-144 2022-11-21 17:57:23 +08:00
d56a63236e Merge branch 'dev-5.16.0' into feature-GHZS-78 2022-11-21 17:33:08 +08:00
714da89e9c Merge branch 'fix-startup_button_background' into 'dev-5.16.0'
fix: 修改启动广告图底部按钮背景

See merge request halo/android/assistant-android!454
2022-11-21 16:17:27 +08:00
5781629898 fix: 修改启动广告图底部按钮背景 2022-11-21 16:14:28 +08:00
00e6fc54ce Merge branch 'feature-GHZS-276' into 'dev-5.16.0'
fix: 【V5.16.0】多版本下载面板-求版本优化-1118测试 https://jira.shanqu.cc/browse/GHZS-276

See merge request halo/android/assistant-android!453
2022-11-21 15:48:37 +08:00
cf68f11cc7 fix: 【V5.16.0】多版本下载面板-求版本优化-1118测试 https://jira.shanqu.cc/browse/GHZS-276 2022-11-21 15:46:14 +08:00
50c77dfd11 Merge branch 'feature-GHZS-84' into 'dev-5.16.0'
feat:【V5.16.0】光环下载进度条优化—客户端 https://jira.shanqu.cc/browse/GHZS-84

See merge request halo/android/assistant-android!447
2022-11-21 15:28:01 +08:00
8564bc95e9 feat:【V5.16.0】光环下载进度条优化—客户端 https://jira.shanqu.cc/browse/GHZS-84 2022-11-21 15:28:01 +08:00
6244387c79 Merge branch 'feature-GHZS-285' into 'dev-5.16.0'
fix: 【V5.16.0】游戏开服类标签UI优化-1118测试 https://jira.shanqu.cc/browse/GHZS-285

See merge request halo/android/assistant-android!452
2022-11-21 14:17:38 +08:00
b3cbe02e40 fix: 【V5.16.0】游戏开服类标签UI优化-1118测试 https://jira.shanqu.cc/browse/GHZS-285 2022-11-21 14:16:05 +08:00
68a8933f62 Merge branch 'feature-GHZS-286' into 'dev-5.16.0'
fix: 【V5.16.0】启动广告图—1118UI测试 https://jira.shanqu.cc/browse/GHZS-286

See merge request halo/android/assistant-android!451
2022-11-21 14:03:44 +08:00
63a38f0dc6 fix: 【V5.16.0】启动广告图—1118UI测试 https://jira.shanqu.cc/browse/GHZS-286 2022-11-21 14:01:39 +08:00
ecbdbf57db Merge branch 'feature-GHZS-277' into 'dev-5.16.0'
fix: 【V5.16.0】猜你喜欢-发现页优化—1118UI测试 https://jira.shanqu.cc/browse/GHZS-277

See merge request halo/android/assistant-android!450
2022-11-21 11:55:01 +08:00
ba1a7d874f fix: 【V5.16.0】猜你喜欢-发现页优化—1118UI测试 https://jira.shanqu.cc/browse/GHZS-277 2022-11-21 11:52:17 +08:00
c70f1aa267 Merge branch 'feature-GHZS-138' into 'dev-5.16.0'
fix:【V5.16.0】通用弹窗UI优化—客户端(修复引导弹窗组件适配版本号弹窗问题) https://jira.shanqu.cc/browse/GHZS-138

See merge request halo/android/assistant-android!448
2022-11-21 11:39:38 +08:00
1189619bdd Merge branch 'feature-GHZS-279' into 'dev-5.16.0'
fix: 【V5.16.0】视频分享面板UI优化—1118UI测试 https://jira.shanqu.cc/browse/GHZS-279

See merge request halo/android/assistant-android!449
2022-11-21 11:33:41 +08:00
a7898ff9bd fix: 【V5.16.0】视频分享面板UI优化—1118UI测试 https://jira.shanqu.cc/browse/GHZS-279 2022-11-21 10:55:56 +08:00
9b90f5bcab fix:【V5.16.0】通用弹窗UI优化—客户端(修复引导弹窗组件适配版本号弹窗问题) https://jira.shanqu.cc/browse/GHZS-138 2022-11-21 10:40:34 +08:00
ec4d60b9f3 Merge remote-tracking branch 'origin/dev-5.16.0' into feature-GHZS-78 2022-11-18 16:36:06 +08:00
eac296a6fd fix:修复CloudArchiveFragment页面选择器监听报错问题 2022-11-18 16:32:01 +08:00
99c3f3e735 Merge branch 'feature-GHZS-119' into 'dev-5.16.0'
【V5.16.0】畅玩流程优化—客户端 https://jira.shanqu.cc/browse/GHZS-178

See merge request halo/android/assistant-android!446
2022-11-18 16:00:32 +08:00
67400bb4cc 【V5.16.0】畅玩流程优化—客户端 https://jira.shanqu.cc/browse/GHZS-178 2022-11-18 16:00:31 +08:00
e9f1346035 Merge branch 'feature-GHZS-140' into 'dev-5.16.0'
feat:【V5.16.0】退出登录弹窗UI优化—客户端 https://jira.shanqu.cc/browse/GHZS-140

See merge request halo/android/assistant-android!444
2022-11-18 14:07:33 +08:00
4c40996a95 Merge branch 'feature-GHZS-256' into 'dev-5.16.0'
fix: 【光环助手V5.16.0】首页弹窗数据上报问题 https://jira.shanqu.cc/browse/GHZS-256

See merge request halo/android/assistant-android!445
2022-11-18 13:49:59 +08:00
bdf7c7fcc8 fix: 【光环助手V5.16.0】首页弹窗数据上报问题 https://jira.shanqu.cc/browse/GHZS-256 2022-11-18 13:47:27 +08:00
a51019ea8b feat:【V5.16.0】退出登录弹窗UI优化—客户端 https://jira.shanqu.cc/browse/GHZS-140 2022-11-18 13:38:18 +08:00
319bb3ac2c Merge branch 'feature-GHZS-231' into 'dev-5.16.0'
feat: 【V5.16.0】游戏开服类标签UI优化—客户端 https://jira.shanqu.cc/browse/GHZS-231

See merge request halo/android/assistant-android!443
2022-11-18 12:00:38 +08:00
c675cba035 feat: 【V5.16.0】游戏开服类标签UI优化—客户端 https://jira.shanqu.cc/browse/GHZS-231 2022-11-18 11:45:08 +08:00
7f1a0351a9 Merge branch 'feature-GHZS-138' into 'dev-5.16.0'
feat:【V5.16.0】通用弹窗UI优化—客户端 https://jira.shanqu.cc/browse/GHZS-138

See merge request halo/android/assistant-android!442
2022-11-18 09:57:54 +08:00
e120f22b57 feat:【V5.16.0】通用弹窗UI优化—客户端 https://jira.shanqu.cc/browse/GHZS-138 2022-11-17 18:00:34 +08:00
6d64b26e3d Revert "Merge branch 'fix-remove_duplicated_splitties' into 'dev-5.16.0'"
This reverts merge request !441
2022-11-17 17:11:22 +08:00
7ced550195 Merge branch 'fix-remove_duplicated_splitties' into 'dev-5.16.0'
fix: 移除无用的 splitties 额外依赖(仅使用 DSL 相关对的依赖)

See merge request halo/android/assistant-android!441
2022-11-17 16:09:07 +08:00
ca1b812c30 Merge branch 'feature-issues-90' into 'dev-5.16.0'
refactor: 为 TextView 添加 setDrawable extensions,整理旧代码 https://git.shanqu.cc/halo/android/assistant-android/-/issues/90

See merge request halo/android/assistant-android!440
2022-11-17 15:57:30 +08:00
d306fb185c fix: 移除无用的 splitties 额外依赖(仅使用 DSL 相关对的依赖) 2022-11-17 15:25:44 +08:00
4b10019888 Merge branch 'feature-GHZS-136' into 'dev-5.16.0'
feat:【V5.16.0】游戏搜索-搜索榜单的曝光数据修改—客户端 https://jira.shanqu.cc/browse/GHZS-136

See merge request halo/android/assistant-android!439
2022-11-17 12:01:15 +08:00
640dce271c refactor: 为 TextView 添加 setDrawable extensions,整理旧代码 https://git.shanqu.cc/halo/android/assistant-android/-/issues/90 2022-11-17 11:55:16 +08:00
b7b4ce8c83 feat:【V5.16.0】游戏搜索-搜索榜单的曝光数据修改—客户端 https://jira.shanqu.cc/browse/GHZS-136 2022-11-17 11:44:53 +08:00
f689ef6228 feat:【V5.16.0】云存档第一期-游戏详情—客户端(剩余下载按钮处理)https://jira.shanqu.cc/browse/GHZS-80 2022-11-16 18:21:59 +08:00
c9911a1a22 Merge branch 'feature-GHZS-135' into 'dev-5.16.0'
feat: 【V5.16.0】猜你喜欢-发现页优化—客户端 https://jira.shanqu.cc/browse/GHZS-135

See merge request halo/android/assistant-android!438
2022-11-16 16:47:13 +08:00
b8fb3327b5 feat: 【V5.16.0】猜你喜欢-发现页优化—客户端 https://jira.shanqu.cc/browse/GHZS-135 2022-11-16 15:02:06 +08:00
259791faf0 feat: 添加简单文件下载的相关类 2022-11-16 10:32:50 +08:00
d20866a045 Merge branch 'feature-GHZS-244' into 'dev-5.16.0'
fix: 【V5.16.0】游戏搜索-搜索榜单的曝光数据不匹配问题 https://jira.shanqu.cc/browse/GHZS-244

See merge request halo/android/assistant-android!437
2022-11-15 16:40:48 +08:00
110de25099 fix: 【V5.16.0】游戏搜索-搜索榜单的曝光数据不匹配问题 https://jira.shanqu.cc/browse/GHZS-244 2022-11-15 16:37:32 +08:00
8e863bb7cc Merge branch 'feature-GHZS-179' into 'dev-5.16.0'
feat: 【V5.16.0】数据埋点补充—客户端 https://jira.shanqu.cc/browse/GHZS-179

See merge request halo/android/assistant-android!436
2022-11-15 15:48:56 +08:00
9cf044ee2e feat: 【V5.16.0】数据埋点补充—客户端 https://jira.shanqu.cc/browse/GHZS-179 2022-11-15 15:28:46 +08:00
04886fb265 Merge branch 'feature-GHZS-142' into 'dev-5.16.0'
feat: 【V5.16.0】视频分享面板UI优化—客户端 https://jira.shanqu.cc/browse/GHZS-142

See merge request halo/android/assistant-android!435
2022-11-15 14:33:15 +08:00
ca26ccbecb feat: 【V5.16.0】视频分享面板UI优化—客户端 https://jira.shanqu.cc/browse/GHZS-142 2022-11-15 14:06:05 +08:00
30268a5cda chore: 版本更新至 5.14.4 2022-11-15 11:13:52 +08:00
5d4f489ddd Merge branch 'release-merge-legacy_release' into 'release'
合并 legacy-release 变更

See merge request halo/android/assistant-android!434
2022-11-15 11:13:03 +08:00
102d285c09 Merge remote-tracking branch 'origin/legacy-release' into release-merge-legacy_release
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/SplashScreenActivity.kt
#	dependencies.gradle
2022-11-15 10:57:41 +08:00
092092fd6f Merge branch 'hotfix-installed_framgent_duplicated_refresh' into 'dev-5.16.0'
fix: 统一安装事件字符串,修复下载管理-已安装列表多余的刷新问题

See merge request halo/android/assistant-android!433
2022-11-14 16:48:11 +08:00
97a54f1000 fix: 统一安装事件字符串,修复下载管理-已安装列表错误的刷新机制 2022-11-14 16:36:11 +08:00
6b0611e05f chore: 版本更新至 5.13.7 2022-11-14 15:29:23 +08:00
d3295f81f6 Merge branch 'feature-GHZS-132' into 'dev-5.16.0'
feat: 【V5.16.0】游戏详情-内容卡片优化—客户端 https://jira.shanqu.cc/browse/GHZS-132

See merge request halo/android/assistant-android!432
2022-11-14 15:27:19 +08:00
384469bcae Merge branch 'feature-GHZS-209' into 'legacy-release'
feat: 还原首次启动时的权限提示弹窗和权限获取 https://jira.shanqu.cc/browse/GHZS-209

See merge request halo/android/assistant-android!431
2022-11-14 15:22:06 +08:00
77a512852b feat: 【V5.16.0】游戏详情-内容卡片优化—客户端 https://jira.shanqu.cc/browse/GHZS-132 2022-11-14 14:46:54 +08:00
0aeb37a5eb feat: 还原首次启动时的权限提示弹窗和权限获取 https://jira.shanqu.cc/browse/GHZS-209 2022-11-14 14:27:10 +08:00
50b5b1d8ac feat: 添加新的下载模块 2022-11-11 17:14:21 +08:00
de08c5dc98 Merge branch 'feature-GHZS-106' into 'dev-5.16.0'
fix: 【光环助手V5.16.0】游戏搜索-历史搜索显示问题 https://jira.shanqu.cc/browse/GHZS-106

See merge request halo/android/assistant-android!430
2022-11-11 14:36:27 +08:00
c2abe5be34 fix: 【光环助手V5.16.0】游戏搜索-历史搜索显示问题 https://jira.shanqu.cc/browse/GHZS-106 2022-11-11 14:21:18 +08:00
1222b4cde4 Merge branch 'feature-GHZS-43' into 'dev-5.16.0'
feat:【V5.16.0】游戏礼包优化(第三期)—客户端 https://jira.shanqu.cc/browse/GHZS-43

See merge request halo/android/assistant-android!429
2022-11-11 11:38:13 +08:00
a3cf98196d feat:【V5.16.0】游戏礼包优化(第三期)—客户端 https://jira.shanqu.cc/browse/GHZS-43 2022-11-11 11:32:31 +08:00
4839ee4aca Merge branch 'feature-GHZS-43' into 'dev-5.16.0'
feat:【V5.16.0】游戏礼包优化(第三期)—客户端 https://jira.shanqu.cc/browse/GHZS-43

See merge request halo/android/assistant-android!428
2022-11-11 11:00:28 +08:00
115dc8ffab feat:【V5.16.0】游戏礼包优化(第三期)—客户端 https://jira.shanqu.cc/browse/GHZS-43 2022-11-10 18:03:51 +08:00
e174c882e6 Merge branch 'feature-GHZS-128' into 'dev-5.16.0'
feat: 【V5.16.0】多版本下载面板-求版本优化—客户端 https://jira.shanqu.cc/browse/GHZS-128

See merge request halo/android/assistant-android!427
2022-11-10 16:17:21 +08:00
546f7fc122 feat: 【V5.16.0】多版本下载面板-求版本优化—客户端 https://jira.shanqu.cc/browse/GHZS-128 2022-11-10 16:00:30 +08:00
900ee8e641 chore:版本更新至 5.13.6 2022-11-10 15:14:16 +08:00
bad1e32fda Merge branch 'feature-GHZS-163' into 'legacy-release'
feat:【光环助手】存储权限授权弹窗埋点补充 https://jira.shanqu.cc/browse/GHZS-163

See merge request halo/android/assistant-android!426
2022-11-10 15:11:40 +08:00
b602960882 feat:【光环助手】存储权限授权弹窗埋点补充 https://jira.shanqu.cc/browse/GHZS-163 2022-11-10 15:05:05 +08:00
6be3798b36 Merge branch 'feature-GHZS-116' into 'dev'
fix:【光环助手V5.15.0同步正式问题】登录闪退 https://jira.shanqu.cc/browse/GHZS-116

See merge request halo/android/assistant-android!424
2022-11-10 12:11:21 +08:00
5cf7ab8159 Merge branch 'dev-fix-vector_crash' into 'dev'
fix: 修复5.0以下系统矢量图的闪退问题

See merge request halo/android/assistant-android!425
2022-11-10 11:00:43 +08:00
1e7c56221a fix: 修复5.0以下系统矢量图的闪退问题 2022-11-10 10:52:09 +08:00
73a473b1c1 Merge branch 'feature-GHZS-16' into 'dev-5.16.0'
feat: 【V5.16.0】启动广告图—客户端 https://jira.shanqu.cc/browse/GHZS-16

See merge request halo/android/assistant-android!420
2022-11-10 10:25:45 +08:00
258ada53af fix: 启动广告图跳转按钮箭头改为用代码设置 2022-11-10 10:21:52 +08:00
128f0e0e82 feat: 【V5.16.0】启动广告图—客户端 https://jira.shanqu.cc/browse/GHZS-16 2022-11-09 18:00:08 +08:00
424efdafcf fix:【光环助手V5.15.0同步正式问题】登录闪退 https://jira.shanqu.cc/browse/GHZS-116 2022-11-09 17:22:59 +08:00
08e90bf923 Merge branch 'dev-5.16.0' into feature-GHZS-16
# Conflicts:
#	app/src/main/java/com/gh/common/constant/Config.java
2022-11-09 16:53:05 +08:00
60c967808d Merge branch 'dev' into 'dev-5.16.0'
合并dev分支的改动

See merge request halo/android/assistant-android!423
2022-11-09 16:43:45 +08:00
44b776a156 Merge branch 'fixes-from-release' into 'dev'
合并 release 分支的改动

See merge request halo/android/assistant-android!422
2022-11-09 16:26:24 +08:00
b17fa55f94 fix: 处理合并冲突 2022-11-09 16:06:23 +08:00
5d1bc4aedd Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	app/src/main/java/com/gh/common/constant/Config.java
#	app/src/main/java/com/gh/gamecenter/entity/NewSettingsEntity.kt
#	dependencies.gradle
#	module_common/src/main/java/com/gh/gamecenter/common/utils/Extensions.kt
2022-11-09 15:07:15 +08:00
b5c265e0d6 Merge branch 'feature-module_setting' into 'dev-5.16.0'
refactor: 组件化设置功能 https://git.shanqu.cc/halo/android/assistant-android/-/issues/87

See merge request halo/android/assistant-android!411
2022-11-09 14:35:41 +08:00
5b266c91da refactor: 组件化设置功能 https://git.shanqu.cc/halo/android/assistant-android/-/issues/87 2022-11-09 14:35:41 +08:00
fadd165e68 Merge branch 'hotfix-v5.14.3-633-setting_datas_error' into 'release'
fix: 修改设置接口数据保存错误问题

See merge request halo/android/assistant-android!421
2022-11-09 14:34:50 +08:00
255b6ea141 fix: 修改设置接口数据保存错误问题 2022-11-09 13:46:20 +08:00
7712039804 chore: 版本更新至 5.14.3 2022-11-08 15:15:57 +08:00
fee65172d1 Merge branch 'hotfix-v5.14.2-632-delete_apk_crash' into 'release'
fix: 捕抓清理安装包时的 concurrent 异常

See merge request halo/android/assistant-android!419
2022-11-08 15:13:36 +08:00
89846e04f3 Merge branch 'dev-5.16.0' into feature-GHZS-16 2022-11-08 15:07:00 +08:00
b09f0cde18 fix: 捕抓清理安装包时的 concurrent 异常 2022-11-08 15:04:12 +08:00
0e16aa7dd4 feat: 【V5.16.0】启动广告图—客户端 https://jira.shanqu.cc/browse/GHZS-16 2022-11-08 15:03:10 +08:00
cb355b2490 Merge branch 'hotfix-v5.14.2-632-wrong_dark_mode_setting' into 'release'
fix: 修复错误的深色模式切换开关配置

See merge request halo/android/assistant-android!418
2022-11-08 12:01:27 +08:00
806ceee7e7 Merge branch 'hotfix-v5.14.2-632-super_did_not_called_crash' into 'release'
fix: 修复因为混淆问题导致 onConfigurationChanged 没有调用 super.onConfigurationChanged 而造成的闪退

See merge request halo/android/assistant-android!417
2022-11-08 11:55:35 +08:00
0cc8904852 fix: 修复错误的深色模式切换开关配置 2022-11-08 11:33:33 +08:00
1ffb58feea fix: 修复因为混淆问题导致 onConfigurationChanged 没有调用 super.onConfigurationChanged 而造成的闪退 2022-11-08 11:09:32 +08:00
b0ad6ff8c5 chore: 版本更新至 5.16.0 2022-11-08 10:37:46 +08:00
ccbe6650d1 Merge branch 'feature-GHZS-28' into 'dev-5.16.0'
feat:【V5.16.0】游戏广告管理功能(前端部分)—客户端 https://jira.shanqu.cc/browse/GHZS-28

See merge request halo/android/assistant-android!416
2022-11-08 10:14:18 +08:00
f99b3af9c6 feat:【V5.16.0】游戏广告管理功能(前端部分)—客户端 https://jira.shanqu.cc/browse/GHZS-28 2022-11-08 10:14:18 +08:00
e80c8d76cd Merge branch 'dev-fix-issues2125-gt' into 'dev'
fix:修复模拟器下载流程问题 https://jira.shanqu.cc/browse/GHZS-122

See merge request halo/android/assistant-android!415
2022-11-08 09:26:58 +08:00
f47b0326f4 fix:修复模拟器下载流程问题 https://jira.shanqu.cc/browse/GHZS-122 2022-11-08 09:26:58 +08:00
a5ce8f389c Merge branch 'feature-GHZS-55' into 'dev-5.16.0'
feat:【V5.16.0】游戏搜索-热门榜单功能优化—客户端 https://jira.shanqu.cc/browse/GHZS-55

See merge request halo/android/assistant-android!414
2022-11-08 09:19:55 +08:00
8f5daed7a7 feat:【V5.16.0】游戏搜索-热门榜单功能优化—客户端 https://jira.shanqu.cc/browse/GHZS-55 2022-11-08 09:19:55 +08:00
a1aada02d6 Merge branch 'dev-fix-issues2125-gt' into 'dev'
光环助手V5.15.0同步正式问题】游戏卡片UI问题

See merge request halo/android/assistant-android!413
2022-11-07 16:19:54 +08:00
659469aabc 光环助手V5.15.0同步正式问题】游戏卡片UI问题 2022-11-07 16:19:54 +08:00
9ee743c14f Merge branch 'feature-issues91' into 'dev'
清理冗余无用资源

See merge request halo/android/assistant-android!412
2022-11-03 16:34:17 +08:00
8be8430543 fix: 清理冗余无用资源 #91 2022-11-03 16:32:00 +08:00
de2c0dc0c3 fix: 清理冗余无用资源 https://git.shanqu.cc/halo/android/assistant-android/-/issues/91 2022-11-03 14:03:32 +08:00
e961642cf7 fix: 清理冗余无用资源 https://git.shanqu.cc/halo/android/assistant-android/-/issues/91 2022-11-03 10:51:57 +08:00
fb8bd8b440 Merge branch 'fix-ci-chucker' into 'dev'
ci: 更新含 chucker 的编译脚本

See merge request halo/android/assistant-android!410
2022-11-02 17:29:30 +08:00
ed19677568 ci: 更新含 chucker 的编译脚本 2022-11-02 17:12:48 +08:00
c4cf232d35 fix: 清理冗余无用资源 https://git.shanqu.cc/halo/android/assistant-android/-/issues/91 2022-11-02 16:35:37 +08:00
5fe552ad91 fix:清理无用资源 https://git.shanqu.cc/halo/android/assistant-android/-/issues/91 2022-11-02 16:20:46 +08:00
1db87a4152 Merge branch 'dev-fix-compress_resource' into 'dev'
fix:压缩我的光环背景资源

See merge request halo/android/assistant-android!409
2022-11-02 16:16:33 +08:00
1bd741be9c fix:压缩我的光环背景资源 2022-11-02 15:28:10 +08:00
7570e3e14e Merge branch 'feature-issues89' into 'dev'
refactor: 移除废弃的旧问答相关代码和资源 https://git.shanqu.cc/halo/android/assistant-android/-/issues/89

See merge request halo/android/assistant-android!408
2022-11-02 11:29:04 +08:00
ca009fb1b2 refactor: 移除废弃的旧问答相关代码和资源 https://git.shanqu.cc/halo/android/assistant-android/-/issues/89 2022-11-02 11:29:04 +08:00
872ac7bb85 Merge branch 'feature-issuess81' into 'dev'
feat:数据解析异常以 toast 形式抛出 https://git.shanqu.cc/halo/android/assistant-android/-/issues/81

See merge request halo/android/assistant-android!400
2022-11-02 10:53:42 +08:00
8ce13fd0db feat:数据解析异常以 toast 形式抛出 https://git.shanqu.cc/halo/android/assistant-android/-/issues/81 2022-11-02 10:53:42 +08:00
3ae27ebdb6 chore: 版本更新至 5.14.2 2022-11-01 17:20:30 +08:00
aab422662a Merge branch 'hotfix-v5.14.1-631-onConfigurationChanged' into 'release'
fix: 添加 onConfigurationChanged 日志辅助闪退确定问题

See merge request halo/android/assistant-android!407
2022-11-01 17:19:23 +08:00
bb80862d19 Merge branch 'feature-issues83' into 'dev'
refactor: 整理接口 timestamp 相关的内容 https://git.shanqu.cc/halo/android/assistant-android/-/issues/83

See merge request halo/android/assistant-android!405
2022-11-01 17:09:27 +08:00
02eea04cdc Merge branch 'dev-fix-issues2065' into 'dev'
fix: 【光环助手V5.15.0】新增 猜你喜欢-发现页(1101测试问题:3) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065

See merge request halo/android/assistant-android!406
2022-11-01 17:05:21 +08:00
133b3aec96 fix: 【光环助手V5.15.0】新增 猜你喜欢-发现页(1101测试问题:3) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065 2022-11-01 17:01:10 +08:00
4b974e3278 refactor: 整理接口 timestamp 相关的内容 https://git.shanqu.cc/halo/android/assistant-android/-/issues/83 2022-11-01 16:33:14 +08:00
8193b9ec9f fix: 添加 onConfigurationChanged 日志辅助闪退确定问题 2022-11-01 16:23:54 +08:00
13929f4dc5 Merge branch 'hotfix-v5.14.1-631-webview_dark_error' into 'release'
fix: 修复web页面开启夜间模式闪退问题

See merge request halo/android/assistant-android!404
2022-11-01 16:18:12 +08:00
0ea0834140 fix: 修复web页面开启夜间模式闪退问题 2022-11-01 16:09:05 +08:00
927e0e2468 Merge branch 'dev-fix-issues2065' into 'dev'
fix: 【光环助手V5.15.0】新增 猜你喜欢-发现页(1031UI测试问题:5) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065

See merge request halo/android/assistant-android!403
2022-11-01 15:25:23 +08:00
be3d509c9c fix: 【光环助手V5.15.0】新增 猜你喜欢-发现页(1031UI测试问题:5) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065 2022-11-01 15:20:31 +08:00
40bd4a1adf Merge branch 'dev-fix-issues2065' into 'dev'
fix: 修复猜你喜欢-发现页骨架屏显示异常

See merge request halo/android/assistant-android!402
2022-11-01 11:53:25 +08:00
b6bb3bf794 fix: 修复猜你喜欢-发现页骨架屏显示异常 2022-11-01 11:05:01 +08:00
ef6ef5c584 Merge branch 'dev-fix-issues2065' into 'dev'
fix: 【光环助手V5.15.0】新增 猜你喜欢-发现页(1031UI测试问题3,4) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065

See merge request halo/android/assistant-android!401
2022-11-01 10:15:24 +08:00
a600a9f0b0 fix: 【光环助手V5.15.0】新增 猜你喜欢-发现页(1031UI测试问题3,4) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065 2022-11-01 10:12:10 +08:00
31d0ce1302 Merge branch 'feature-issues2065' into 'dev'
fix:【光环助手V5.15.0】新增 猜你喜欢-发现页(1031测试:15(3)) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065

See merge request halo/android/assistant-android!399
2022-10-31 21:03:38 +08:00
bffa36bc5d fix:【光环助手V5.15.0】新增 猜你喜欢-发现页(1031测试:15(3)) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065 2022-10-31 20:49:31 +08:00
716a32a2b5 Merge branch 'feature-issues2065' into 'dev'
fix:【光环助手V5.15.0】新增 猜你喜欢-发现页(1031测试) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065

See merge request halo/android/assistant-android!395
2022-10-31 19:56:42 +08:00
70c09648a8 fix: 规范修改 2022-10-31 19:55:44 +08:00
a7cdade878 Merge branch 'dev' into feature-issues2065 2022-10-31 19:38:43 +08:00
b479048a87 fix: 【光环助手V5.15.0】新增 猜你喜欢-发现页(1031测试问题复测:1,2,12) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065 2022-10-31 19:38:05 +08:00
714d975602 Merge branch 'dev_merge_release' into 'dev'
合并 5.14.X 发布分支的问题修复

See merge request halo/android/assistant-android!398
2022-10-31 19:35:51 +08:00
a363090e4e Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/qa/answer/BaseAnswerOrArticleItemViewHolder.kt
#	app/src/main/java/com/gh/gamecenter/simulatorgame/SimulatorGameViewModel.kt
#	dependencies.gradle
2022-10-31 19:24:55 +08:00
f07b37ff01 Merge branch 'fix-user-home-paging' into 'dev'
fix: 修复用户主页的用户历史列表分页问题

See merge request halo/android/assistant-android!396
2022-10-31 19:16:55 +08:00
d0efdccb1d fix: 修复用户主页的用户历史列表分页问题 2022-10-31 19:07:59 +08:00
7efdb5e432 Merge branch 'hotfix-v5.14.1-631-simulator_sync_error' into 'release'
fix: 修复模拟器游戏列表可能出现的服务端为空,本地不为空的问题

See merge request halo/android/assistant-android!393
2022-10-31 18:51:40 +08:00
e5d73e5c73 fix:【光环助手V5.15.0】新增 猜你喜欢-发现页(1031测试:14) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065 2022-10-31 17:23:27 +08:00
e2f5de67a7 Merge branch 'feature-issues2065' into 'dev'
fix: 【光环助手V5.15.0】新增 猜你喜欢-发现页(1031测试:1,2,4,10,12) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065

See merge request halo/android/assistant-android!394
2022-10-31 15:57:37 +08:00
c34cacb5d0 fix: 【光环助手V5.15.0】新增 猜你喜欢-发现页(1031测试:1,2,4,10,12) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065 2022-10-31 15:50:22 +08:00
681ba37c4e Merge branch 'hotfix-v5.14.1-631-simulator_sync_error' into 'release'
fix: 修复模拟器游戏列表可能出现的服务端为空,本地不为空的问题

See merge request halo/android/assistant-android!393
2022-10-31 14:23:57 +08:00
d4d71d27ce fix: 修复模拟器游戏列表可能出现的服务端为空,本地不为空的问题 2022-10-31 13:47:10 +08:00
609b2805cc Merge branch 'feature-issues2049' into 'dev'
fix:【光环助手V5.15.0】登录相关优化(埋点事件发生部分变更) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2049#note_175334

See merge request halo/android/assistant-android!391
2022-10-31 13:37:38 +08:00
987ab1ccc9 Merge branch 'hotfix-v5.14.1-631-clean_apk_crash' into 'release'
修复清理 APK 时因为原图标过大导致的闪退

See merge request halo/android/assistant-android!392
2022-10-31 12:41:56 +08:00
93a77df0dc fix:【光环助手V5.15.0】登录相关优化(埋点事件发生部分变更) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2049#note_175334 2022-10-31 11:42:01 +08:00
e1c365ffe5 Merge branch 'dev-fix-issues2132-lyr' into 'dev'
fix:【光环助手V5.15.0】前端优化汇总10月第3周(8) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2132

See merge request halo/android/assistant-android!389
2022-10-31 11:41:50 +08:00
8863b02c7a fix: 修复安装包清理遇到原始图标过大而造成的闪退问题 2022-10-31 11:41:02 +08:00
89b97d274b Merge branch 'feature-issues2065' into 'dev'
fix: 【光环助手V5.15.0】新增 猜你喜欢-发现页(1031UI测试问题1,2)

See merge request halo/android/assistant-android!390
2022-10-31 11:34:41 +08:00
bbe3f9c741 fix: 【光环助手V5.15.0】新增 猜你喜欢-发现页(1031UI测试问题1,2) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065 2022-10-31 11:28:22 +08:00
e7d0c15a0a fix:【光环助手V5.15.0】前端优化汇总10月第3周(8) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2132 2022-10-31 10:38:31 +08:00
ddfb474624 Merge branch 'feature-issues2065' into 'dev'
fix: 【光环助手V5.15.0】新增 猜你喜欢-发现页(1028测试) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065

See merge request halo/android/assistant-android!388
2022-10-31 10:18:02 +08:00
b15b8c1237 fix: 【光环助手V5.15.0】新增 猜你喜欢-发现页(1028测试) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065 2022-10-31 10:11:58 +08:00
0af8660b14 Merge branch 'feature-issues2065' into 'dev'
fix: 【光环助手V5.15.0】新增 猜你喜欢-发现页(1028测试:5) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065

See merge request halo/android/assistant-android!387
2022-10-28 17:53:14 +08:00
4ea2f8d5af fix: 【光环助手V5.15.0】新增 猜你喜欢-发现页(1028测试:5) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065 2022-10-28 17:49:28 +08:00
66c727c874 Merge branch 'dev-fix-issues2125-gt' into 'dev'
fix:去除模拟器游戏合集TextView的默认内边距

See merge request halo/android/assistant-android!386
2022-10-28 16:53:02 +08:00
619abb9805 fix:去除模拟器游戏合集TextView的默认内边距 2022-10-28 16:53:02 +08:00
a94bb4dcb5 fix: 修复模拟器运行即闪退的问题 2022-10-28 16:22:29 +08:00
195d9343eb chore: 版本更新至 5.14.1 2022-10-28 15:45:09 +08:00
5a847970b2 Merge branch 'dev-fix-issues2125-gt' into 'dev'
fix:修复模拟器下载流程20221027测试反馈  https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2125

See merge request halo/android/assistant-android!385
2022-10-28 15:43:29 +08:00
ccd70b6087 fix:修复模拟器下载流程20221027测试反馈 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2125 2022-10-28 15:43:29 +08:00
bd9fea1551 Merge branch 'dev-fix-issues2114-zyj' into 'dev'
fix: 【光环助手V5.15.0】前端优化汇总10月第1周(1025测试:第2点(2))

See merge request halo/android/assistant-android!384
2022-10-28 15:07:09 +08:00
f8c7bf5f64 Merge branch 'dev' into dev-fix-issues2114-zyj 2022-10-28 15:02:53 +08:00
7b71adc3fa Merge branch 'dev-fix-issues2132-yzw' into 'dev'
fix:【光环助手V5.15.0】前端优化汇总10月第3周(7)(修改分隔线实现方式)

See merge request halo/android/assistant-android!383
2022-10-28 14:56:31 +08:00
1882707e56 fix:【光环助手V5.15.0】前端优化汇总10月第3周(7)(修改分隔线实现方式) 2022-10-28 14:56:31 +08:00
49cafeb8bd fix: 【光环助手V5.15.0】前端优化汇总10月第1周(1025测试:第2点(2)) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2114 2022-10-28 14:52:31 +08:00
072cf65af4 Merge branch 'fix-emulator_crash' into 'dev'
fix: 修复模拟器运行即闪退的问题

See merge request halo/android/assistant-android!381
2022-10-28 11:41:17 +08:00
2f7277e410 fix: 修复模拟器运行即闪退的问题 2022-10-28 11:11:36 +08:00
f10a88a5a4 Merge branch 'feature-issues2049' into 'dev'
fix:【光环助手V5.15.0】前端优化汇总10月第2周(1024UI测试问题-第6点补充问题) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2049#note_175728

See merge request halo/android/assistant-android!380
2022-10-28 11:00:13 +08:00
45b5030ab5 fix:【光环助手V5.15.0】前端优化汇总10月第2周(1024UI测试问题-第6点补充问题) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2049#note_175728 2022-10-28 10:59:08 +08:00
fa35d98d5b Merge branch 'feature-issues2049' into 'dev'
fix:【光环助手V5.15.0】前端优化汇总10月第2周(1024UI测试问题-遗留第6点) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2121#note_175635

See merge request halo/android/assistant-android!379
2022-10-28 10:29:51 +08:00
d4e79a7b47 fix:【光环助手V5.15.0】前端优化汇总10月第2周(1024UI测试问题-遗留第6点) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2121#note_175635 2022-10-28 10:28:59 +08:00
d9fb9bcc2f Merge branch 'feature-issues2121' into 'dev'
fix:【光环助手V5.15.0】前端优化汇总10月第2周(发布手机埋点统一添加前缀publish_) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2121#note_175635

See merge request halo/android/assistant-android!377
2022-10-28 09:37:19 +08:00
13f7ca9f7d Merge branch 'dev-fix-issues2114-zyj' into 'dev'
fix: 【光环助手V5.15.0】前端优化汇总10月第1周(1025测试:第2点(1)(2))...

See merge request halo/android/assistant-android!378
2022-10-28 09:17:17 +08:00
cabe3055cb Merge branch 'dev' into dev-fix-issues2114-zyj 2022-10-27 20:46:38 +08:00
64e45521a6 fix: 【光环助手V5.15.0】前端优化汇总10月第1周(1025测试:第2点(1)(2)) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2114 2022-10-27 20:44:43 +08:00
b6d035f3a9 fix:【光环助手V5.15.0】前端优化汇总10月第2周(发布手机埋点统一添加前缀publish_) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2121#note_175635 2022-10-27 17:55:14 +08:00
313ed74939 Merge branch 'feature-issues2049' into 'dev'
fix:【光环助手V5.15.0】登录相关优化(1027UI测试问题) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2049#note_175516

See merge request halo/android/assistant-android!376
2022-10-27 17:49:54 +08:00
c79e5edc7a fix:【光环助手V5.15.0】登录相关优化(1027UI测试问题) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2049#note_175516 2022-10-27 17:47:44 +08:00
b4ccdcb8fa Merge branch 'feature-update_chucker' into 'dev'
build: 将 chucker 依赖从 jitpack 搬回自有 nexus

See merge request halo/android/assistant-android!375
2022-10-27 17:45:17 +08:00
1ed50c2626 build: 将 chucker 依赖从 jitpack 搬回自有 nexus 2022-10-27 17:35:22 +08:00
7ad6395bab Merge branch 'feature-issues2065' into 'dev'
feat: 【光环助手V5.15.0】新增 猜你喜欢-发现页 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065

See merge request halo/android/assistant-android!374
2022-10-27 17:04:43 +08:00
28d2a9442c fix: 规范修改 2022-10-27 16:38:15 +08:00
997bfdf93d Merge branch 'hotfix-v5.14.0-630-vector_crash' into 'release'
fix:修复5.0以下系统部分矢量图加载出错导致无法显示的问题

See merge request halo/android/assistant-android!373
2022-10-27 15:34:53 +08:00
8eceb571ca Merge branch 'dev' into feature-issues2065
# Conflicts:
#	app/src/main/java/com/gh/common/util/NewFlatLogUtils.kt
2022-10-27 15:27:02 +08:00
68f8619d09 feat: 【光环助手V5.15.0】新增 猜你喜欢-发现页(数据埋点) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065 2022-10-27 15:06:30 +08:00
de712065f5 Merge branch 'hotfix-v5.14.0-630-soft_keyboard' into 'release'
fix: 修复评论页面发表评论内容跳转登录页面返回时软键盘消失的问题

See merge request halo/android/assistant-android!372
2022-10-27 14:56:33 +08:00
511449c709 fix:修复5.0以下系统部分矢量图加载出错导致无法显示的问题 2022-10-27 14:50:24 +08:00
e79d5d1dfb Merge branch 'feature-issues2125' into 'dev'
feat: 模拟器下载流程调整 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2125

See merge request halo/android/assistant-android!368
2022-10-27 14:40:07 +08:00
da8717693d feat: 模拟器下载流程调整 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2125 2022-10-27 14:40:06 +08:00
03095b682b fix: 修复评论页面发表评论内容跳转登录页面返回时软键盘消失的问题 2022-10-27 14:32:48 +08:00
8437bfe1e3 Merge branch 'hotfix-v5.14.0-630-soft_keyboard' into 'release'
fix: 修复评论页面发表评论内容跳转登录页面返回时软键盘消失的问题

See merge request halo/android/assistant-android!369
2022-10-27 11:34:54 +08:00
a169ce1989 fix: 修复评论页面发表评论内容跳转登录页面返回时软键盘消失的问题 2022-10-27 10:48:14 +08:00
c327fcaf99 fix: 【光环助手V5.15.0】新增 猜你喜欢-发现页(UI优化) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065 2022-10-26 17:05:51 +08:00
b032f054f9 feat: 【光环助手V5.15.0】新增 猜你喜欢-发现页(完成UI、接口对接) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2065 2022-10-26 12:06:00 +08:00
9690429e95 Merge branch 'hotfix-v5.14.0-630-banned_vote_error' into 'release'
【光环助手V5.15.0】违规整合-正式环境运营验收问题(19) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2129

See merge request halo/android/assistant-android!367
2022-10-25 16:58:08 +08:00
b1dff15234 fix: 【光环助手V5.15.0】违规整合-正式环境运营验收问题(19) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2129 2022-10-25 15:45:48 +08:00
1721 changed files with 33877 additions and 19640 deletions

3
.gitmodules vendored
View File

@ -8,3 +8,6 @@
[submodule "module_common/src/debug/assets/assistant-android-mock"]
path = module_common/src/debug/assets/assistant-android-mock
url = git@git.shanqu.cc:halo/android/assistant-android-mock.git
[submodule "ndownload"]
path = ndownload
url = git@git.shanqu.cc:android/ndownload.git

View File

@ -127,7 +127,7 @@ android {
variantFilter { variant ->
def names = variant.flavors*.name
def isDebugType = variant.buildType.name == "debug"
if ((names.contains("tea")) && isDebugType) {
if ((names.contains("tea") || name.contains("kuaishou")) && isDebugType) {
setIgnore(true)
}
}
@ -144,6 +144,9 @@ android {
tea {
java.srcDirs = ['src/main/java', 'src/tea/java']
}
kuaishou {
java.srcDirs = ['src/main/java', 'src/kuaishou/java']
}
}
productFlavors {
@ -181,6 +184,16 @@ android {
manifestPlaceholders.put("APPLOG_SCHEME", "rangersapplog.byAx6uYt".toLowerCase())
}
kuaishou {
dimension "env"
buildConfigField "String", "DEV_API_HOST", "\"${API_HOST}\""
buildConfigField "String", "NEW_DEV_API_HOST", "\"${NEW_API_HOST}\""
buildConfigField "String", "DEV_VAPI_HOST", "\"${VAPI_HOST}\""
buildConfigField "String", "QUICK_LOGIN_APPID", "\"${QUICK_LOGIN_APPID}\""
buildConfigField "String", "QUICK_LOGIN_APPKEY", "\"${QUICK_LOGIN_APPKEY}\""
}
}
}
@ -195,6 +208,7 @@ dependencies {
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
teaImplementation fileTree(include: ['*.jar', '*.aar'], dir: 'src/tea/libs')
kuaishouImplementation fileTree(include: ['*.jar', '*.aar'], dir: 'src/kuaishou/libs')
testImplementation 'junit:junit:4.12'
debugImplementation "com.squareup.leakcanary:leakcanary-android:${leakcanary}"
@ -260,6 +274,7 @@ dependencies {
compileOnly "com.github.axen1314.lancet:lancet-base:${lancet_version}"
kapt "com.alibaba:arouter-compiler:$arouterVersion"
implementation project(':ndownload')
implementation project(':vspace-bridge:vspace')
implementation (project(':module_common')) {
@ -268,6 +283,18 @@ dependencies {
implementation(project(':module_login')) {
exclude group: 'androidx.swiperefreshlayout'
}
implementation(project(':module_setting')) {
exclude group: 'androidx.swiperefreshlayout'
}
// implementation(project(':module_setting_compose')) {
// exclude group: 'androidx.swiperefreshlayout'
// }
implementation(project(':module_core_feature')){
exclude group: 'androidx.swiperefreshlayout'
}
implementation(project(':module_feedback')) {
exclude group: 'androidx.swiperefreshlayout'
}
// 默认不接入光能模块,提高编译速度
// debugImplementation(project(':module_energy')) {
// exclude group: 'androidx.swiperefreshlayout'
@ -391,7 +418,6 @@ andResGuard {
"R.drawable.suggest_type_function_suggest",
"R.drawable.suggest_type_article_collect",
"R.drawable.suggest_type_copyright",
"R.drawable.help_result_empty",
"R.drawable.news_comment_detail_read",
"R.drawable.news_comment_detail_comment",
"R.drawable.news_comment_detail_share",

View File

@ -17,15 +17,30 @@
-dontwarn com.j256.**
### app models
-keep class com.gh.common.view.* {*;}
-keep class com.gh.gamecenter.db.info.* {*;}
-keep class com.gh.gamecenter.entity.* {*;}
-keep class com.gh.gamecenter.qa.entity.* {*;}
-keep class com.gh.gamecenter.entity.** {<fields>;}
-keep class com.gh.gamecenter.qa.entity.** {<fields>;}
-keep class com.gh.gamecenter.BR
-keep class com.gh.gamecenter.retrofit.* {*;}
-keep class com.gh.gamecenter.eventbus.* {*;}
-keep class com.gh.gamecenter.video.detail.* {*;}
-keep class com.gh.gamecenter.home.gamecollection.* {*;}
-keep class com.gh.gamecenter.home.gamecollection.GameCollectionStackLayout {*;}
-keep class com.gh.gamecenter.home.gamecollection.GameCollectionStackAnimation {*;}
# Prevent R8 from leaving Data object members always null
-keepclassmembers,allowobfuscation class * {
@com.google.gson.annotations.SerializedName <fields>;
}
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * extends com.google.gson.TypeAdapter
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer
# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher.
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
# TODO What's this ?
-ignorewarnings
@ -39,7 +54,7 @@
-dontwarn com.shuyu.gsyvideoplayer.utils.**
-keep class tv.danmaku.ijk.* { *; }
-dontwarn tv.danmaku.ijk.**
-keep public class * extends android.view.View{
-keep public class * extends android.view.View {
*** get*();
void set*(***);
public <init>(android.content.Context);
@ -54,15 +69,4 @@
-keep class com.lzf.easyfloat.* {*;}
### dokit
-keep class com.didichuxing.** {*;}
# Flutter模块
-keep class com.gh.common.util.DirectUtils {
public static void directToQa(...);
public static void directToQaCollection(...);
public static void directToGift(...);
public static void directToConcernInfo(...);
public static void directToFeedback(...);
public static void directToSuggestion(...);
}
-keep class com.didichuxing.** {*;}

View File

@ -1,14 +1,16 @@
package com.gh.gamecenter.provider
import android.app.Activity
import android.app.Application
import android.text.TextUtils
import com.gh.gamecenter.common.constant.Config
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.common.utils.PackageFlavorHelper
import com.gh.gamecenter.core.provider.IFlavorProvider
import com.gh.gamecenter.core.utils.SPUtils
import com.leon.channel.helper.ChannelReaderUtil
class ChannelProviderImp : ChannelProvider {
class FlavorProviderImp : IFlavorProvider {
override fun getChannelStr(application: Application): String {
var channel = ChannelReaderUtil.getChannel(application)
if (channel == null || TextUtils.isEmpty(channel.trim())) {
@ -23,4 +25,12 @@ class ChannelProviderImp : ChannelProvider {
}
return channel
}
override fun init(application: Application, activity: Activity) {
// do nothing
}
override fun logEvent(content: String) {
// do nothing
}
}

View File

@ -0,0 +1,30 @@
package com.gh.gamecenter
import android.content.Context
import com.kwai.monitor.log.TurboAgent
import com.kwai.monitor.log.TurboConfig
object KuaishouHelper {
private const val APP_ID = "80655"
private const val APP_NAME = "guanghuanzhushou_1"
@JvmStatic
fun init(context: Context, channel: String) {
TurboAgent.init(
TurboConfig.TurboConfigBuilder.create(context)
.setAppId(APP_ID)
.setAppName(APP_NAME)
.setAppChannel(channel)
.build()
)
}
@JvmStatic
fun onEvent(type: String) {
when (type) {
"EVENT_ACTIVE" -> TurboAgent.onAppActive()
"active_register" -> TurboAgent.onRegister()
"EVENT_NEXTDAY_STAY" -> TurboAgent.onNextDayStay()
}
}
}

View File

@ -0,0 +1,48 @@
package com.gh.gamecenter.provider
import android.app.Activity
import android.app.Application
import android.text.TextUtils
import com.gh.gamecenter.KuaishouHelper
import com.gh.gamecenter.core.provider.IFlavorProvider
import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.core.utils.TimeUtils
import com.halo.assistant.HaloApp
import com.leon.channel.helper.ChannelReaderUtil
class FlavorProviderImp : IFlavorProvider {
override fun init(application: Application, activity: Activity) {
KuaishouHelper.init(application, getChannelStr(application))
if (HaloApp.getInstance().isBrandNewInstall) {
logEvent("EVENT_ACTIVE")
SPUtils.setLong("TIME_OF_BRAND_NEW_INSTALL", System.currentTimeMillis() / 1000)
} else {
val shouldSendRetentionLogEvent =
SPUtils.getBoolean("SHOULD_SEND_RETENTION_EVENT", true)
val installTimeNotToday =
!TimeUtils.isToday(SPUtils.getLong("TIME_OF_BRAND_NEW_INSTALL", System.currentTimeMillis() / 1000))
if (shouldSendRetentionLogEvent && installTimeNotToday) {
logEvent("EVENT_NEXTDAY_STAY")
SPUtils.setBoolean("SHOULD_SEND_RETENTION_EVENT", false)
}
}
}
override fun getChannelStr(application: Application): String {
var channel = ChannelReaderUtil.getChannel(application)
if (channel == null || TextUtils.isEmpty(channel.trim())) {
channel = KUAISHOU_CHANNEL
}
return channel
}
override fun logEvent(content: String) {
KuaishouHelper.onEvent(content)
}
companion object {
private const val KUAISHOU_CHANNEL = "KS-GHZS-01"
}
}

Binary file not shown.

View File

@ -6,6 +6,11 @@
<queries>
<package android:name="com.gh.gamecenter" />
</queries>
<queries>
<package android:name="com.lg.vspace" />
</queries>
<!-- 允许应用程序访问网络连接 -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- 允许应用程序写入外部存储如SD卡上写文件 -->
@ -51,7 +56,27 @@
com.google.android.exoplayer2,
tv.danmaku.ijk.media.exo2,
pl.droidsonroids.gif,
com.lzf.easyfloat" />
com.lzf.easyfloat,
com.airbnb.lottie.compose,
androidx.compose.ui.platform,
androidx.compose.material.icons,
androidx.activity.compose,
androidx.compose.ui.tooling,
androidx.compose.ui.tooling.data,
androidx.compose.material.ripple,
androidx.compose.foundation,
androidx.compose.animation,
androidx.compose.foundation.layout,
androidx.compose.ui.text,
androidx.compose.ui.graphics,
androidx.compose.ui.unit,
androidx.compose.ui.util,
androidx.compose.ui.geometry,
androidx.compose.runtime.saveable,
androidx.compose.animation.core,
androidx.constraintlayout.compose,
androidx.compose.ui.test.manifest,
androidx.compose.ui.tooling.preview"/>
<!-- 去掉 SDK 一些流氓权限 -->
<uses-permission
@ -148,10 +173,6 @@
android:name="com.gh.gamecenter.NewsDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.SettingActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.ConcernActivity"
android:screenOrientation="portrait" />
@ -219,18 +240,6 @@
android:name="com.gh.gamecenter.SelectUserIconActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.AboutActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.security.SecurityActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.security.BindPhoneActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.CommentDetailActivity"
android:screenOrientation="portrait"
@ -245,9 +254,6 @@
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.SuggestionActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.VoteActivity"
android:screenOrientation="portrait"
@ -344,10 +350,6 @@
android:name="com.gh.gamecenter.amway.AmwayActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.NetworkDiagnosisActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.personalhome.fans.FansActivity"
android:screenOrientation="portrait" />
@ -435,10 +437,6 @@
android:name="com.gh.gamecenter.qa.editor.LocalMediaActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.mygame.PlayedGameActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.servers.GameServersActivity"
android:screenOrientation="portrait" />
@ -455,15 +453,6 @@
android:name="com.halo.assistant.fragment.user.UserPortraitCropImageActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.HelpAndFeedbackActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="com.gh.gamecenter.help.HelpDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.qa.comment.CommentActivity"
android:theme="@style/Theme.Transparent"
@ -487,10 +476,6 @@
android:name="com.gh.gamecenter.gamedetail.fuli.kaifu.ServersCalendarActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.QaActivity"
android:screenOrientation="portrait" />
<activity
android:name=".qa.answer.draft.AnswerDraftActivity"
android:screenOrientation="portrait" />
@ -586,14 +571,6 @@
android:name=".qa.video.publish.VideoPublishActivity"
android:screenOrientation="portrait" />
<activity
android:name=".setting.GameDownloadSettingActivity"
android:screenOrientation="portrait" />
<activity
android:name=".setting.VideoSettingActivity"
android:screenOrientation="portrait" />
<activity
android:name=".qa.video.detail.ForumVideoDetailActivity"
android:screenOrientation="portrait" />
@ -733,6 +710,23 @@
android:name=".BbsCertificationActivity"
android:screenOrientation="portrait" />
<activity
android:name=".discovery.DiscoveryActivity"
android:screenOrientation="portrait" />
<activity
android:name=".cloudarchive.CloudArchiveManagerActivity"
android:screenOrientation="portrait" />
<activity
android:name=".savegame.GameArchiveListActivity"
android:screenOrientation="portrait" />
<activity
android:name=".discovery.interestedgame.InterestedGameActivity"
android:screenOrientation="portrait" />
<!-- <activity-->
<!-- android:name="${applicationId}.douyinapi.DouYinEntryActivity"-->
<!-- android:launchMode="singleTask"-->
@ -755,6 +749,26 @@
android:enabled="true"
android:exported="true" />
<provider
android:name="com.gh.vspace.VFileProvider"
android:authorities="${applicationId}.virtual_file_provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
</provider>
<service
android:name=".aidl.CommunicationService"
android:enabled="true"
android:exported="true" >
<intent-filter>
<action android:name="com.gh.gamecenter.aidl.CommunicationService"/>
</intent-filter>
</service>
<!-- <provider-->
<!-- android:name="androidx.startup.InitializationProvider"-->
<!-- android:authorities="${applicationId}.androidx-startup"-->

Binary file not shown.

View File

@ -0,0 +1 @@
{"v":"5.9.1","fr":60,"ip":0,"op":100,"w":64,"h":64,"nm":"多版本下载提示_dark","ddd":0,"assets":[{"id":"comp_0","nm":"arrow 合成_dark","fr":60,"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"arrow","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.333],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[0]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":24,"s":[100]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.667],"y":[0]},"t":76,"s":[100]},{"t":100,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.333,"y":1},"o":{"x":0.364,"y":0},"t":0,"s":[28,-12,0],"to":[0,6.382,0],"ti":[0,-0.284,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"t":24,"s":[28,28,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.667,"y":0},"t":76,"s":[28,28,0],"to":[0,6.667,0],"ti":[0,-6.667,0]},{"t":100,"s":[28,68,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[0,2],[0,-2]],"c":false},"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-2,0],[0,2]],"c":false},"ix":2},"nm":"路径 2","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[2,0],[0,2]],"c":false},"ix":2},"nm":"路径 3","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.333,0.333],"y":[1,1]},"o":{"x":[0.333,0.333],"y":[0,0]},"t":0,"s":[80,120]},{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.667,0.667],"y":[0,0]},"t":24,"s":[100,100]},{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.667,0.667],"y":[0,0]},"t":76,"s":[100,100]},{"t":100,"s":[80,120]}],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"组 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.156862750649,0.533333361149,0.878431379795,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":1,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"stroke","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[400,400],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"Vector 97","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":100,"st":0,"bm":0}]}],"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"arrow 合成_dark","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[32,32,0],"ix":2,"l":2},"a":{"a":0,"k":[28,28,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"w":56,"h":56,"ip":0,"op":100,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"base","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[32,32,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[15,15],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.156862750649,0.533333361149,0.878431379795,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":1,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"stroke","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.137254908681,0.137254908681,0.137254908681,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"filling","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[400,400],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"Ellipse 44","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":100,"st":0,"bm":0}],"markers":[]}

View File

@ -0,0 +1 @@
{"v":"5.9.1","fr":60,"ip":0,"op":100,"w":64,"h":64,"nm":"多版本下载提示_light","ddd":0,"assets":[{"id":"comp_0","nm":"arrow 合成_light","fr":60,"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"arrow","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.333],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[0]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":24,"s":[100]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.667],"y":[0]},"t":76,"s":[100]},{"t":100,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.333,"y":1},"o":{"x":0.364,"y":0},"t":0,"s":[28,-12,0],"to":[0,6.382,0],"ti":[0,-0.284,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"t":24,"s":[28,28,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.667,"y":0},"t":76,"s":[28,28,0],"to":[0,6.667,0],"ti":[0,-6.667,0]},{"t":100,"s":[28,68,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[0,2],[0,-2]],"c":false},"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-2,0],[0,2]],"c":false},"ix":2},"nm":"路径 2","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[2,0],[0,2]],"c":false},"ix":2},"nm":"路径 3","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.333,0.333],"y":[1,1]},"o":{"x":[0.333,0.333],"y":[0,0]},"t":0,"s":[80,120]},{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.667,0.667],"y":[0,0]},"t":24,"s":[100,100]},{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.667,0.667],"y":[0,0]},"t":76,"s":[100,100]},{"t":100,"s":[80,120]}],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"组 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.141176477075,0.588235318661,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":1,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"stroke","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[400,400],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"Vector 97","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":100,"st":0,"bm":0}]}],"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"arrow 合成_light","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[32,32,0],"ix":2,"l":2},"a":{"a":0,"k":[28,28,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"w":56,"h":56,"ip":0,"op":100,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"base","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[32,32,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[15,15],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.141176477075,0.588235318661,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":1,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"stroke","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"filling","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[400,400],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"Ellipse 44","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":100,"st":0,"bm":0}],"markers":[]}

View File

@ -1 +0,0 @@
{"v":"5.6.9","fr":60,"ip":0,"op":36,"w":120,"h":66,"nm":"开关动画-关闭","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"按钮手柄","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.667,"y":0},"t":0,"s":[87,33,0],"to":[7.682,0,0],"ti":[-13.443,0,0]},{"i":{"x":0.333,"y":1},"o":{"x":0.333,"y":0},"t":18,"s":[31,33,0],"to":[2.306,0,0],"ti":[-1.318,0,0]},{"t":24,"s":[33,33,0]}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[16,16],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[300,300],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"椭圆形","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":37,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"指示器-on","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.667],"y":[0]},"t":0,"s":[100]},{"t":18,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[33,33,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.667,0.667],"y":[0,0]},"t":0,"s":[6.5,6.5]},{"t":18,"s":[4.5,4.5]}],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.966666666667,0.966666666667,0.966666666667,0.420000005762],"ix":3},"o":{"a":0,"k":40,"ix":4},"w":{"a":0,"k":1.5,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[300,300],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"椭圆形","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":37,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"指示器-off","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[87,33,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.667,0.667],"y":[0,0]},"t":0,"s":[1.5,4]},{"t":18,"s":[1.5,6]}],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0.75,"ix":4},"nm":"矩形路径 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0,0,1],"ix":4},"o":{"a":0,"k":5,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[300,300],"ix":3},"r":{"a":0,"k":90,"ix":6},"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.667],"y":[0]},"t":0,"s":[0]},{"t":18,"s":[100]}],"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"矩形","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":37,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"按钮背景","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[60,33,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"sy":[{"c":{"a":0,"k":[0,0,0,1],"ix":2},"o":{"a":0,"k":5,"ix":3},"a":{"a":0,"k":120,"ix":5},"s":{"a":0,"k":1,"ix":8},"d":{"a":0,"k":0,"ix":6},"ch":{"a":0,"k":100,"ix":7},"bm":{"a":0,"k":5,"ix":1},"no":{"a":0,"k":0,"ix":9},"ty":2,"nm":"内阴影"}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[40,22],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":12,"ix":4},"nm":"矩形路径 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.667],"y":[0]},"t":0,"s":[0.141176477075,0.588235318661,1,1]},{"t":18,"s":[0.933333337307,0.933333337307,0.933333337307,1]}],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"filling","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0.118,0.006],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[300,300],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"矩形","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":37,"st":0,"bm":0}],"markers":[]}

View File

@ -6,6 +6,7 @@ import android.app.Activity
import android.content.ClipboardManager
import android.content.Context
import android.content.Intent
import android.graphics.Color
import android.os.Bundle
import android.text.TextUtils
import android.view.View
@ -25,9 +26,10 @@ import com.gh.gamecenter.core.AppExecutor
import com.gh.gamecenter.core.runOnIoThread
import com.gh.gamecenter.core.utils.*
import com.gh.gamecenter.entity.*
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.gamecenter.qa.editor.*
import com.gh.gamecenter.qa.entity.AnswerEntity
import com.gh.gamecenter.qa.entity.ArticleEntity
import com.gh.gamecenter.feature.entity.AnswerEntity
import com.gh.gamecenter.feature.entity.ArticleEntity
import com.gh.gamecenter.qa.entity.EditorInsertEntity
import com.gh.gamecenter.video.poster.PosterEditActivity
import com.gh.gamecenter.video.upload.UploadManager
@ -214,6 +216,8 @@ abstract class BaseRichEditorActivity<VM : BaseRichEditorViewModel> : ToolBarAct
mKeyboardHeightProvider = KeyboardHeightProvider(this)
mRichEditor.post { mKeyboardHeightProvider?.start() }
mRichEditor.enableForceDark(DarkModeUtils.isDarkModeOn(this))
mRichEditor.setEditorBackgroundColor(R.color.background_white.toColor(this))
mRichEditor.setEditorFontColor(if (mIsDarkModeOn) Color.parseColor("#C2C2C2") else Color.parseColor("#4A4A4A"))
// 防止个别手机在Js里无法获取粘贴内容
mRichEditor.addJavascriptInterface(OnPasteListener(), "onPasteListener")
mRichEditor.addJavascriptInterface(OnCursorChangeListener(), "OnCursorChangeListener")
@ -473,14 +477,14 @@ abstract class BaseRichEditorActivity<VM : BaseRichEditorViewModel> : ToolBarAct
private fun chooseImage() {
MtaHelper.onEvent(mtaEventName(), "插入图片", "插入图片")
val imageCount = mViewModel.quoteCountEntity.imageCount
if (imageCount >= MAX_MEDIA_COUNT) {
if (imageCount >= MAX_IMAGE_COUNT) {
toast(R.string.answer_edit_max_img_hint)
return
}
try {
PermissionHelper.checkStoragePermissionBeforeAction(this, object : EmptyCallback {
override fun onCallback() {
val maxChooseCount = if (imageCount + 10 <= MAX_MEDIA_COUNT) 10 else MAX_MEDIA_COUNT - imageCount
val maxChooseCount = if (imageCount + 10 <= MAX_IMAGE_COUNT) 10 else MAX_IMAGE_COUNT - imageCount
val intent = LocalMediaActivity.getIntent(
this@BaseRichEditorActivity,
LocalMediaActivity.ChooseType.IMAGE,
@ -750,6 +754,8 @@ abstract class BaseRichEditorActivity<VM : BaseRichEditorViewModel> : ToolBarAct
super.onDarkModeChanged()
updateStatusBarColor(R.color.background_white, R.color.background_white)
mRichEditor.enableForceDark(DarkModeUtils.isDarkModeOn(this))
mRichEditor.setEditorBackgroundColor(R.color.background_white.toColor(this))
mRichEditor.setEditorFontColor(if (mIsDarkModeOn) Color.parseColor("#C2C2C2") else Color.parseColor("#4A4A4A"))
}
companion object {
@ -770,6 +776,7 @@ abstract class BaseRichEditorActivity<VM : BaseRichEditorViewModel> : ToolBarAct
const val INSERT_VIDEO_CODE = 415
const val MAX_INPUT_TEXT_NUM = 10000
const val MAX_MEDIA_COUNT = 20
const val MAX_IMAGE_COUNT = 35
const val REQUEST_CODE_IMAGE = 120
const val INSERT_MEDIA_VIDEO_CODE = 121

View File

@ -9,16 +9,17 @@ import android.text.TextUtils
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.MediatorLiveData
import androidx.lifecycle.MutableLiveData
import com.gh.gamecenter.common.base.fragment.WaitingDialogFragment
import com.gh.gamecenter.core.runOnUiThread
import com.gh.gamecenter.R
import com.gh.gamecenter.common.base.fragment.WaitingDialogFragment
import com.gh.gamecenter.common.retrofit.Response
import com.gh.gamecenter.common.utils.*
import com.gh.gamecenter.core.utils.*
import com.gh.gamecenter.entity.ErrorEntity
import com.gh.gamecenter.core.runOnUiThread
import com.gh.gamecenter.core.utils.MD5Utils
import com.gh.gamecenter.core.utils.ToastUtils
import com.gh.gamecenter.common.entity.ErrorEntity
import com.gh.gamecenter.entity.LocalVideoEntity
import com.gh.gamecenter.entity.QuoteCountEntity
import com.gh.gamecenter.qa.BbsType
import com.gh.gamecenter.common.retrofit.Response
import com.gh.gamecenter.retrofit.RetrofitManager
import com.gh.gamecenter.retrofit.service.ApiService
import com.gh.gamecenter.video.upload.OnUploadListener
@ -32,20 +33,12 @@ import okhttp3.ResponseBody
import retrofit2.HttpException
import java.io.File
import java.io.FileOutputStream
import java.util.*
import kotlin.collections.HashMap
import kotlin.collections.LinkedHashMap
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.collections.find
import kotlin.collections.forEach
import kotlin.collections.set
// TODO: 移动到module_bbs模块
abstract class BaseRichEditorViewModel(application: Application) : AndroidViewModel(application) {
val mApi: ApiService = RetrofitManager.getInstance().api
val processDialog = MediatorLiveData<WaitingDialogFragment.WaitingDialogData>()
val uploadingImage = ArrayList<LinkedHashMap<String, String>>()
val chooseImagesUpload = MutableLiveData<LinkedHashMap<String, String>>()
val chooseImagesUploadSuccess = MutableLiveData<LinkedHashMap<String, String>>()
var uploadImageSubscription: Disposable? = null
@ -70,7 +63,10 @@ abstract class BaseRichEditorViewModel(application: Application) : AndroidViewMo
//检查图片是否符合规则并上传图片
fun uploadPic(data: Intent) {
val uris = Matisse.obtainResult(data)
val pictureList = ArrayList<String>()
val rawImgUrlList = ArrayList<String>() // 需要上传图片的原始地址列表
val uploadingImgList = ArrayList<String>() // 正在上传图片的地址列表(已压缩处理)
val compressedImgUrlList = ArrayList<String>() // 压缩处理后图片的地址列表
for (uri in uris) {
val picturePath = PathUtils.getPath(getApplication(), uri)
if (picturePath != null) {
@ -84,12 +80,12 @@ abstract class BaseRichEditorViewModel(application: Application) : AndroidViewMo
continue
}
Utils.log("picturePath = $picturePath")
pictureList.add(picturePath)
rawImgUrlList.add(picturePath)
} else {
Utils.log("picturePath is null")
}
}
if (pictureList.size == 0) return
if (rawImgUrlList.size == 0) return
val imageType = when (getRichType()) {
RichType.ARTICLE -> UploadImageUtils.UploadType.community_article
RichType.QUESTION -> UploadImageUtils.UploadType.question
@ -97,7 +93,7 @@ abstract class BaseRichEditorViewModel(application: Application) : AndroidViewMo
}
uploadImageSubscription = UploadImageUtils.compressAndUploadImageList(
imageType,
pictureList,
rawImgUrlList,
false,
object : UploadImageUtils.OnUploadImageListListener {
override fun onProgress(total: Long, progress: Long) {}
@ -107,87 +103,108 @@ abstract class BaseRichEditorViewModel(application: Application) : AndroidViewMo
imageUrls.forEach {
chooseImageMd5Map[MD5Utils.getUrlMD5(it)] = ""
}
uploadingImage.add(chooseImageMd5Map)
uploadingImgList.addAll(imageUrls)
compressedImgUrlList.addAll(imageUrls)
chooseImagesUpload.postValue(chooseImageMd5Map)
}
override fun onSingleSuccess(imageUrl: Map<String, String>) {
val map = LinkedHashMap<String, String>()
for (key in imageUrl.keys) {
map[MD5Utils.getUrlMD5(key)] = FILE_HOST + key.decodeURI()
mapImages[TextUtils.htmlEncode(key).decodeURI()] = imageUrl[key] ?: ""
override fun onSingleSuccess(imageUrlMap: Map<String, String>) {
imageUrlMap.forEach {
if (uploadingImgList.contains(it.key)) {
uploadingImgList.remove(it.key)
}
}
chooseImagesUploadSuccess.postValue(map)
val map = LinkedHashMap<String, String>()
for (key in imageUrlMap.keys) {
map[MD5Utils.getUrlMD5(key)] = FILE_HOST + key.decodeURI()
mapImages[TextUtils.htmlEncode(key).decodeURI()] = imageUrlMap[key] ?: ""
}
chooseImagesUploadSuccess.value = map
}
override fun onSuccess(
imageUrl: LinkedHashMap<String, String>,
errorMap: Map<String, Exception>
) {
val uploadMap = uploadingImage.find {
it.containsKey(
MD5Utils.getUrlMD5(
imageUrl.entries.iterator().next().key
)
)
}
uploadMap?.let {
uploadingImage.remove(uploadMap)
}
val errorSize = pictureList.size - imageUrl.size
if (errorSize > 0) {
val map = LinkedHashMap<String, String>()
for (key in errorMap.keys) {
map[MD5Utils.getUrlMD5(key)] = ""
override fun onSuccess(imageUrlMap: LinkedHashMap<String, String>, errorMap: Map<String, Exception>) {
imageUrlMap.forEach {
if (uploadingImgList.contains(it.key)) {
uploadingImgList.remove(it.key)
}
//value为空会删除PlaceholderImage
chooseImagesUploadSuccess.postValue(map)
}
for (error in errorMap.values) {
if (error is HttpException && error.code() == 403) {
Utils.toast(getApplication(), errorSize.toString() + "张违规图片上传失败")
return
var errorSize = compressedImgUrlList.size - imageUrlMap.size
if (errorSize > 0 || uploadingImgList.isNotEmpty()) {
val errorImageMap = LinkedHashMap<String, String>()
for (key in errorMap.keys) {
errorImageMap[MD5Utils.getUrlMD5(key)] = ""
}
for (rawImgUrl in compressedImgUrlList) {
if (!imageUrlMap.containsKey(rawImgUrl)) {
errorImageMap[MD5Utils.getUrlMD5(rawImgUrl)] = ""
}
}
Utils.toast(getApplication(), errorSize.toString() + "张图片上传失败")
errorSize = if (errorMap.isEmpty()) {
errorImageMap.size
} else {
errorMap.size + errorImageMap.size
}
// value为空会删除PlaceholderImage
chooseImagesUploadSuccess.value = errorImageMap
if (handleUploadError(errorSize, errorMap)) return
if (errorSize > 0) {
ToastUtils.showToast(errorSize.toString() + "张图片上传失败")
}
}
}
override fun onError(errorMap: Map<String, Exception>) {
val errorSize = errorMap.size
if (errorSize > 0) {
val errorSize = uploadingImgList.size
if (uploadingImgList.size > 0) {
val map = LinkedHashMap<String, String>()
for (key in errorMap.keys) {
for (key in uploadingImgList) {
map[MD5Utils.getUrlMD5(key)] = ""
}
//value为空会删除PlaceholderImage
chooseImagesUploadSuccess.postValue(map)
// value为空会删除PlaceholderImage
chooseImagesUploadSuccess.value = map
}
for (error in errorMap.values) {
if (error is HttpException && error.code() == 403) {
val e = error.response()?.errorBody()?.string()?.toObject<ErrorEntity>()
if (e != null && e.code == 403017) {
Utils.toast(
getApplication(),
errorSize.toString() + "张图片的宽或高超过限制,请裁剪后上传"
)
} else {
Utils.toast(getApplication(), errorSize.toString() + "张违规图片上传失败")
}
return
}
}
if (handleUploadError(errorSize, errorMap)) return
if (errorSize == 0) return
if (errorSize == 1) {
Utils.toast(getApplication(), "图片上传失败")
ToastUtils.showToast("图片上传失败")
} else {
Utils.toast(getApplication(), errorSize.toString() + "张图片上传失败")
ToastUtils.showToast(errorSize.toString() + "张图片上传失败")
}
}
})
}
/**
* 处理上传错误 (包括超时 cancel 的异常)
* @return 如果 toast 过了就返回 true
*/
private fun handleUploadError(
errorSize: Int,
errorMap: Map<String, Exception>
): Boolean {
for (error in errorMap.values) {
if (error is HttpException && error.code() == 403) {
val e = error.response()?.errorBody()?.string()?.toObject<ErrorEntity>()
if (e != null && e.code == 403017) {
ToastUtils.showToast(errorSize.toString() + "张图片的宽或高超过限制,请裁剪后上传")
} else {
ToastUtils.showToast(errorSize.toString() + "张违规图片上传失败")
}
return true
}
}
return false
}
fun uploadPoster(picturePath: String) {
processDialog.postValue(WaitingDialogFragment.WaitingDialogData("封面上传中...", true))
uploadImageSubscription =

View File

@ -6,14 +6,9 @@ import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.gh.common.util.FloatingBackViewManager
import com.gh.download.DownloadManager
import com.gh.gamecenter.MainActivity
import com.gh.gamecenter.SingletonWebActivity
import com.gh.gamecenter.SplashScreenActivity
import com.gh.gamecenter.common.utils.PackageFlavorHelper
import com.gh.gamecenter.forum.detail.ForumDetailActivity
import com.gh.gamecenter.forum.list.ForumListActivity
import com.gh.gamecenter.qa.article.detail.ArticleDetailActivity
import com.gh.gamecenter.qa.questions.newdetail.NewQuestionDetailActivity
import com.gh.gamecenter.qa.video.detail.ForumVideoDetailActivity
import com.gh.vspace.VHelper
import com.halo.assistant.HaloApp
@ -35,7 +30,7 @@ class GlobalActivityLifecycleObserver : Application.ActivityLifecycleCallbacks {
&& FloatingBackViewManager.getType() == FloatingBackViewManager.TYPE_TASK
) {
FloatingBackViewManager.disableBackView()
} else if (!shouldShowActivityBackView(activity)
} else if (activity is SingletonWebActivity
&& FloatingBackViewManager.getType() == FloatingBackViewManager.TYPE_ACTIVITY
) {
FloatingBackViewManager.disableBackView()
@ -65,15 +60,6 @@ class GlobalActivityLifecycleObserver : Application.ActivityLifecycleCallbacks {
}
}
private fun shouldShowActivityBackView(activity: Activity): Boolean {
return (activity is MainActivity
|| activity is ArticleDetailActivity
|| activity is ForumVideoDetailActivity
|| activity is ForumDetailActivity
|| activity is ForumListActivity
|| activity is NewQuestionDetailActivity)
}
override fun onActivityPaused(activity: Activity) {
FloatingBackViewManager.dismissBackView()
if (PackageFlavorHelper.IS_TEST_FLAVOR && activity is AppCompatActivity) {

View File

@ -4,40 +4,51 @@ import android.annotation.SuppressLint
import android.app.Activity
import android.content.Context
import android.util.Base64
import android.view.View
import android.webkit.JavascriptInterface
import androidx.annotation.Keep
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.fragment.app.FragmentManager
import com.alibaba.android.arouter.launcher.ARouter
import com.gh.common.util.*
import com.gh.common.util.LogUtils
import com.gh.gamecenter.*
import com.gh.download.DownloadManager
import com.gh.download.PackageObserver
import com.gh.gamecenter.BuildConfig
import com.gh.gamecenter.ImageViewerActivity
import com.gh.gamecenter.WebActivity
import com.gh.gamecenter.common.callback.BiCallback
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.common.entity.NotificationUgc
import com.gh.gamecenter.common.loghub.LoghubUtils
import com.gh.gamecenter.common.provider.IHelpAndFeedbackProvider
import com.gh.gamecenter.common.tracker.Tracker
import com.gh.gamecenter.common.utils.*
import com.gh.gamecenter.common.view.dsbridge.CompletionHandler
import com.gh.gamecenter.core.AppExecutor
import com.gh.gamecenter.core.runOnIoThread
import com.gh.gamecenter.core.runOnUiThread
import com.gh.gamecenter.core.utils.CurrentActivityHolder
import com.gh.gamecenter.core.utils.DisplayUtils
import com.gh.gamecenter.core.utils.MtaHelper
import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.core.utils.*
import com.gh.gamecenter.energy.EnergyBridge
import com.gh.gamecenter.entity.MtaEvent
import com.gh.gamecenter.help.QaFeedbackDialogFragment
import com.gh.gamecenter.login.entity.Badge
import com.gh.gamecenter.eventbus.EBPackage
import com.gh.gamecenter.feature.entity.Badge
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.gamecenter.login.user.LoginTag
import com.gh.gamecenter.login.view.LoginActivity
import com.gh.gamecenter.login.user.UserManager
import com.gh.gamecenter.personalhome.border.AvatarBorderActivity
import com.gh.gamecenter.security.BindPhoneActivity
import com.gh.gamecenter.login.user.UserRepository
import com.gh.gamecenter.login.utils.LoginHelper
import com.gh.gamecenter.login.utils.QuickLoginHelper
import com.gh.gamecenter.login.view.LoginActivity
import com.gh.gamecenter.personalhome.border.AvatarBorderActivity
import com.gh.gamecenter.setting.SettingBridge
import com.gh.vspace.VHelper
import com.halo.assistant.HaloApp
import com.lightgame.download.DataWatcher
import com.lightgame.download.DownloadEntity
import com.lightgame.download.DownloadStatus.*
import com.lightgame.utils.Utils
import org.json.JSONObject
import java.io.BufferedOutputStream
@ -45,9 +56,18 @@ import java.io.File
import java.io.FileOutputStream
import java.util.*
class DefaultJsApi(var context: Context, val entrance: String = "") {
class DefaultJsApi(var context: Context, val entrance: String = "", private var mFragment: Fragment? = null) {
private var mLoginHandler: CompletionHandler<Any>? = null
private var mDownloadWatcher: DataWatcher? = null
private var mDownloadUrlSet: HashSet<String>? = null
private var mDownloadHandler: CompletionHandler<Any>? = null
init {
if (mFragment != null) {
autoUnregisterDownloadObserverIfNeeded(mFragment)
}
}
@JavascriptInterface
fun isGhzs(msg: Any): String {
@ -61,9 +81,7 @@ class DefaultJsApi(var context: Context, val entrance: String = "") {
@JavascriptInterface
fun logMtaEvent(event: Any) {
val mtaEvent = event.toString().toObject() ?: MtaEvent()
MtaHelper.onEvent(mtaEvent.name, mtaEvent.key, mtaEvent.value)
// do nothing, mta is deprecated
}
@JavascriptInterface
@ -164,7 +182,18 @@ class DefaultJsApi(var context: Context, val entrance: String = "") {
@JavascriptInterface
fun startApp(msg: Any) {
val packageName = msg.toString()
PackageUtils.launchApplicationByPackageName(HaloApp.getInstance().application, packageName)
val context = HaloApp.getInstance().application
runOnUiThread {
// 若畅玩列表中安装了,优先启动畅玩游戏
if (VHelper.isInstalled(packageName)) {
if (!VHelper.showDialogIfVSpaceIsNeeded(context)) {
VHelper.launch(context, packageName)
}
} else {
PackageUtils.launchApplicationByPackageName(context, packageName)
}
}
}
@JavascriptInterface
@ -267,7 +296,7 @@ class DefaultJsApi(var context: Context, val entrance: String = "") {
@JavascriptInterface
fun bindPhone(msg: Any) {
val intent = BindPhoneActivity.getNormalIntent(context, false)
val intent = SettingBridge.getBindPhoneNormalIntent(context, false)
context.startActivity(intent)
}
@ -311,7 +340,9 @@ class DefaultJsApi(var context: Context, val entrance: String = "") {
@JavascriptInterface
fun showQaFeedbackDialog(msg: Any) {
QaFeedbackDialogFragment.show(context as AppCompatActivity, msg.toString())
val mHelpAndFeedbackHelp =
ARouter.getInstance().build(RouteConsts.provider.helpAndFeedback).navigation() as? IHelpAndFeedbackProvider
mHelpAndFeedbackHelp?.showQaFeedbackDialogFragment(context as AppCompatActivity, msg.toString())
}
@JavascriptInterface
@ -358,11 +389,6 @@ class DefaultJsApi(var context: Context, val entrance: String = "") {
FloatingBackViewManager.enableBackView(FloatingBackViewManager.TYPE_ACTIVITY, msg.toString())
}
@JavascriptInterface
fun startBBSStayTimeCount(msg: Any) {
BbsStayTimeHelper.enableStayTimeCount(msg.toString().toInt())
}
@JavascriptInterface
fun saveBase64ImageToGallery(msg: Any) {
val base64StringData = msg.toString()
@ -402,18 +428,9 @@ class DefaultJsApi(var context: Context, val entrance: String = "") {
runOnUiThread { DirectUtils.directToFullScreenWebPage(context, url.toString(), true, entrance) }
}
@JavascriptInterface
fun startGameCollectionSquareBrowseTask(event: Any) {
val browseTimeEvent = event.toString().toObject() ?: BrowseTaskEvent()
GameCollectionSquareBrowseTaskHelper.enableBrowseTimeCount(
browseTimeEvent.timeout.toInt(),
browseTimeEvent.isFinished == "true"
)
}
@JavascriptInterface
fun checkUpdateGhzs(msg: Any) {
context.startActivity(AboutActivity.getIntent(context, true))
context.startActivity(SettingBridge.getAboutIntent(context, true))
}
@JavascriptInterface
@ -436,17 +453,182 @@ class DefaultJsApi(var context: Context, val entrance: String = "") {
@JavascriptInterface
fun getEntrance(msg: Any): String {
return entrance
return when {
entrance.contains("论坛-活动") -> "社区-活动tab-活动banner"
entrance.contains("启动弹窗") -> "首页_弹窗"
entrance.contains("新首页-轮播图") -> "首页banner"
entrance.contains("论坛banner") -> "社区banner"
entrance.contains("启动广告") -> "app_开屏文案"
// entrance.contains("资讯广场-轮播图") -> "资讯_活动banner"
entrance.contains("通用链接合集") -> "资讯_活动banner"
entrance.contains("视频流广告位") -> "视频流_广告位"
entrance.contains("我的光环banner") -> "我的光环_banner"
entrance.contains("论坛详情页置顶栏") -> "社区_论坛置顶"
else -> entrance
}
}
@JavascriptInterface
fun getInstallStatus(event: Any): String {
val localInstalledPackageList = PackageUtils.getAllPackageName(HaloApp.getInstance().application)
val packageNameList: ArrayList<String> = event.toString().toObject() ?: ArrayList()
val installStatusMap: HashMap<String, Boolean> = hashMapOf()
for (packageName in packageNameList) {
installStatusMap[packageName] =
localInstalledPackageList.contains(packageName) || VHelper.isInstalled(packageName)
}
return installStatusMap.toJson()
}
@JavascriptInterface
fun installDownloadedGame(event: Any) {
val url = event.toString()
val vUrl = VHelper.getVUrl(url)
val downloadEntity = DownloadManager.getInstance().getDownloadEntitySnapshot(url, null, false)
?: DownloadManager.getInstance().getDownloadEntitySnapshot(vUrl, null, false)
downloadEntity?.let {
PackageInstaller.install(context, it, showUnzipToast = false)
}
}
@JavascriptInterface
fun registerDownloadCallback(msg: Any, handler: CompletionHandler<Any>) {
val downloadUrlSet: HashSet<String> = msg.toString().toObject() ?: return
mDownloadHandler = handler
mDownloadUrlSet = downloadUrlSet
if (mDownloadWatcher == null) {
mDownloadWatcher = object : DataWatcher() {
override fun onDataInit(downloadEntity: DownloadEntity) {
onDataChanged(downloadEntity)
}
override fun onDataChanged(downloadEntity: DownloadEntity?) {
val url = VHelper.getOriginalUrl(downloadEntity?.url)
if (downloadEntity != null && mDownloadUrlSet?.contains(url) == true) {
mDownloadHandler?.setProgressData(
SimpleDownloadEntity.fromDownloadEntity(downloadEntity).toJson()
)
}
}
}
DownloadManager.getInstance().addObserver(mDownloadWatcher)
}
}
@JavascriptInterface
fun registerPackageChangesCallback(msg: Any, handler: CompletionHandler<Any>) {
PackageObserver.registerPackageChangeChangeListener(object : PackageObserver.PackageChangeListener {
override fun onChanged(data: EBPackage) {
handler.setProgressData(data.toJson())
}
})
}
@JavascriptInterface
fun startDownload(msg: Any) {
val gameEntity: GameEntity? = msg.toString().toObject()
if (gameEntity == null) {
ToastUtils.toast("下载异常,请稍后重试")
return
}
runOnUiThread {
// 用一个假的 view 来当 downloadView
val stubView = View(context)
DownloadItemUtils.setOnClickListener(
position = 0,
context = context,
downloadBtn = stubView,
gameEntity = gameEntity,
adapter = null,
entrance = "(网页活动)",
location = "",
traceEvent = null,
clickCallback = null,
refreshCallback = null,
allStateClickCallback = null
)
stubView.performClick()
}
}
@JavascriptInterface
fun resumeDownload(msg: Any) {
val url = msg.toString()
DownloadManager.getInstance().resumeDownload(url)
}
@JavascriptInterface
fun pauseDownload(msg: Any) {
val url = msg.toString()
DownloadManager.getInstance().pause(url)
}
@JavascriptInterface
fun shareText(event: Any) {
val textShareEvent = event.toString().toObject() ?: TextShareEvent()
if (textShareEvent.text.isNotEmpty() && textShareEvent.type.isNotEmpty()) {
val activity = CurrentActivityHolder.getCurrentActivity()
MessageShareUtils.getInstance(activity).shareTextFromWeb(activity, textShareEvent.text, textShareEvent.type)
}
}
private fun autoUnregisterDownloadObserverIfNeeded(fragment: Fragment?) {
fragment?.parentFragmentManager?.registerFragmentLifecycleCallbacks(
object : FragmentManager.FragmentLifecycleCallbacks() {
override fun onFragmentViewDestroyed(fm: FragmentManager, f: Fragment) {
super.onFragmentViewDestroyed(fm, f)
if (f === fragment) {
fragment.parentFragmentManager.unregisterFragmentLifecycleCallbacks(this)
if (mDownloadWatcher != null) {
DownloadManager.getInstance().removeObserver(mDownloadWatcher)
}
}
}
override fun onFragmentResumed(fm: FragmentManager, f: Fragment) {
super.onFragmentResumed(fm, f)
if (f === fragment && mDownloadWatcher != null) {
DownloadManager.getInstance().addObserver(mDownloadWatcher)
}
}
override fun onFragmentPaused(fm: FragmentManager, f: Fragment) {
super.onFragmentPaused(fm, f)
if (f === fragment && mDownloadWatcher != null) {
DownloadManager.getInstance().removeObserver(mDownloadWatcher)
}
}
}, false
)
}
@Keep
internal data class ImageEvent(var imageList: ArrayList<String> = arrayListOf(), var position: Int = 0)
internal class ImageEvent(var imageList: ArrayList<String> = arrayListOf(), var position: Int = 0)
@Keep
internal data class ImageShareEvent(var image: String = "", var type: String = "")
internal class ImageShareEvent(var image: String = "", var type: String = "")
@Keep
internal data class InviteFriendsEvent(
internal class TextShareEvent(var text: String = "", var type: String = "")
@Keep
internal class InviteFriendsEvent(
var type: String = "",
var way: String = "",
var url: String = "",
@ -454,16 +636,48 @@ class DefaultJsApi(var context: Context, val entrance: String = "") {
)
@Keep
internal data class LogEvent(var jsonString: String = "", var logStore: String = "")
internal class LogEvent(var jsonString: String = "", var logStore: String = "")
@Keep
internal data class BrowseTaskEvent(var timeout: String = "", var isFinished: String = "")
@Keep
data class GameActivityEvent(
class GameActivityEvent(
var gameId: String = "",
var activityTitle: String = "",
var activityId: String = "",
var platform: String = ""
)
@Keep
class SimpleDownloadEntity(
var url: String = "",
var progress: Float = 0F,
var status: String = "" // DOWNLOADING, PAUSED, DOWNLOADED, ERROR, UNKNOWN
) {
companion object {
fun fromDownloadEntity(downloadEntity: DownloadEntity): SimpleDownloadEntity {
val status: String = when (downloadEntity.status) {
add,
download,
downloading -> "DOWNLOADING"
done -> "DOWNLOADED"
pause,
resume,
subscribe,
waiting -> "PAUSED"
cancel,
delete -> "UNKNOWN"
else -> "ERROR"
}
return SimpleDownloadEntity(
url = VHelper.getOriginalUrl(downloadEntity.url),
progress = downloadEntity.percent.toFloat(),
status = status
)
}
}
}
}

View File

@ -15,25 +15,29 @@ import com.gh.common.util.DirectUtils.directToGameVideo
import com.gh.common.util.DirectUtils.directToLegacyVideoDetail
import com.gh.common.util.DirectUtils.directToLinkPage
import com.gh.common.util.DirectUtils.directToQa
import com.gh.gamecenter.*
import com.gh.gamecenter.core.utils.GsonUtils.gson
import com.gh.gamecenter.LibaoDetailActivity
import com.gh.gamecenter.MainActivity
import com.gh.gamecenter.NewsDetailActivity
import com.gh.gamecenter.WebActivity
import com.gh.gamecenter.common.constant.EntranceConsts
import com.gh.gamecenter.common.entity.CommunityEntity
import com.gh.gamecenter.common.entity.LinkEntity
import com.gh.gamecenter.common.eventbus.EBReuse
import com.gh.gamecenter.common.entity.SimpleGameEntity
import com.gh.gamecenter.core.AppExecutor
import com.gh.gamecenter.common.utils.DialogHelper
import com.gh.gamecenter.common.utils.EnvHelper
import com.gh.gamecenter.core.utils.ToastUtils
import com.gh.gamecenter.entity.*
import com.gh.gamecenter.eventbus.EBSkip
import com.gh.gamecenter.fragment.MainWrapperFragment
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.gamecenter.feature.utils.PlatformUtils
import com.gh.gamecenter.gamecollection.publish.GameCollectionEditActivity
import com.gh.gamecenter.qa.BbsType
import com.gh.gamecenter.qa.video.publish.VideoPublishActivity
import com.gh.gamecenter.subject.SubjectActivity
import com.gh.gamecenter.video.detail.VideoDetailContainerViewModel
import com.lightgame.utils.Utils
import org.greenrobot.eventbus.EventBus
import java.nio.charset.Charset
object DefaultUrlHandler {
@ -185,10 +189,12 @@ object DefaultUrlHandler {
EntranceConsts.HOST_USERHOME -> {
val position = uri.getQueryParameter("position")
val subtype = uri.getQueryParameter("sub_type") ?: ""
val subGameType = uri.getQueryParameter("sub_game_type") ?: "game_collection"
DirectUtils.directToHomeActivity(
context,
id,
subtype,
subGameType,
if (position.isNullOrEmpty()) -1 else position.toInt(),
entrance,
""
@ -260,21 +266,6 @@ object DefaultUrlHandler {
EntranceConsts.HOST_COLUMN -> {
DirectUtils.directToSubject(context, id, uri.getQueryParameter(EntranceConsts.KEY_NAME), entrance)
}
EntranceConsts.HOST_COMMUNITY_QUESTION_LABEL_DETAIL -> {
val community = CommunityEntity()
community.id = uri.getQueryParameter("community_id") ?: ""
community.name = uri.getQueryParameter("community_name") ?: ""
val tag = uri.getQueryParameter("tag") ?: ""
DirectUtils.directAskColumnLabelDetail(context, tag, community, entrance, "")
}
EntranceConsts.HOST_COMMUNITY_COLUMN_DETAIL -> {
val community = CommunityEntity()
community.id = uri.getQueryParameter("community_id") ?: ""
community.name = uri.getQueryParameter("community_name") ?: ""
val columnId = uri.getQueryParameter("column_id") ?: ""
DirectUtils.directAskColumnDetail(context, columnId, community, entrance, "")
}
EntranceConsts.HOST_BLOCK -> {
val name = uri.getQueryParameter("name")
?: ""
@ -490,6 +481,18 @@ object DefaultUrlHandler {
)
}
EntranceConsts.HOST_GAME_LIBRARY -> {
DirectUtils.directToMainActivity(context)
EventBus.getDefault().post(EBSkip(MainActivity.EB_SKIP_MAIN, MainWrapperFragment.INDEX_GAME))
}
EntranceConsts.HOST_HOME_GAME_COLLECTION_SQUARE -> {
DirectUtils.directToMainActivity(context)
EventBus.getDefault()
.post(EBSkip(MainActivity.EB_SKIP_MAIN, MainWrapperFragment.INDEX_HOME))
EventBus.getDefault().post(EBReuse(host))
}
else -> {
if (bringAppToFront) {
DirectUtils.directToMainActivity(context)

View File

@ -2,14 +2,15 @@ package com.gh.common
import com.gh.common.exposure.ExposureManager
import com.gh.common.filter.RegionSettingHelper
import com.gh.gamecenter.common.loghub.LoghubUtils
import com.gh.gamecenter.common.utils.doOnMainProcessOnly
import com.gh.gamecenter.common.utils.tryCatchInRelease
import com.gh.common.util.AdHelper
import com.gh.common.videolog.VideoRecordUtils
import com.gh.download.DownloadDataHelper
import com.gh.gamecenter.entity.TimeEntity
import com.gh.gamecenter.common.loghub.LoghubUtils
import com.gh.gamecenter.common.retrofit.Response
import com.gh.gamecenter.common.utils.doOnMainProcessOnly
import com.gh.gamecenter.common.utils.tryCatchInRelease
import com.gh.gamecenter.core.runOnUiThread
import com.gh.gamecenter.entity.TimeEntity
import com.gh.gamecenter.retrofit.RetrofitManager
import com.halo.assistant.HaloApp
import io.reactivex.schedulers.Schedulers
@ -20,11 +21,12 @@ object FixedRateJobHelper {
private const val TIME_PERIOD: Long = 600 * 1000L
private const val LOGHUB_PERIOD: Long = 120 * 1000L
private const val EXPOSURE_PERIOD: Long = 300 * 1000L
private const val REGION_SETTING_PERIOD: Long = 300 * 1000L
private const val REGION_SETTING_PERIOD: Long = 30 * 1000L
private const val VIDEO_RECORD_PERIOD: Long = 60 * 1000L
private const val DOWNLOAD_HEARTBEAT_PERIOD: Long = 60 * 1000L
private const val DOWNLOAD_HEARTBEAT_SHEET_PERIOD: Long = 15 * 1000L
private const val STARTUP_AD: Long = 30 * 60 * 1000L
private var mExecuteCount: Int = 0
@ -82,6 +84,11 @@ object FixedRateJobHelper {
VideoRecordUtils.commitVideoRecord()
}
// 获取启动广告
if ((mExecuteCount * CHECKER_PERIOD) % STARTUP_AD == 0L) {
AdHelper.getSettingAdCache()
}
// ExposureUtils.logADownloadCompleteExposureEvent(GameEntity(id = mExecuteCount.toString(), name = "测试曝光上传"), platform = "", trace = null, downloadType = ExposureUtils.DownloadType.DOWNLOAD)
mExecuteCount++
}

View File

@ -3,7 +3,7 @@ package com.gh.common.chain
import android.content.Context
import com.gh.download.server.BrowserInstallHelper
import com.gh.gamecenter.core.utils.EmptyCallback
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.feature.entity.GameEntity
class BrowserInstallHandler : ChainHandler() {

View File

@ -2,7 +2,7 @@ package com.gh.common.chain
import android.content.Context
import com.gh.common.dialog.CertificationDialog
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.feature.entity.GameEntity
class CertificationHandler : ChainHandler() {

View File

@ -1,7 +1,7 @@
package com.gh.common.chain
import android.content.Context
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.feature.entity.GameEntity
abstract class ChainHandler {
private var next: ChainHandler? = null

View File

@ -3,7 +3,7 @@ package com.gh.common.chain
import android.content.Context
import com.gh.common.util.DialogUtils
import com.gh.gamecenter.common.utils.safelyGetInRelease
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.feature.entity.GameEntity
class CheckDownloadHandler : ChainHandler() {

View File

@ -3,7 +3,7 @@ package com.gh.common.chain
import android.content.Context
import com.gh.gamecenter.common.utils.PermissionHelper
import com.gh.gamecenter.core.utils.EmptyCallback
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.feature.entity.GameEntity
class CheckStoragePermissionHandler : ChainHandler() {

View File

@ -4,7 +4,7 @@ import android.content.Context
import com.gh.common.util.DownloadDialogHelper
import com.gh.gamecenter.common.utils.safelyGetInRelease
import com.gh.gamecenter.core.utils.EmptyCallback
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.feature.entity.GameEntity
class DownloadDialogHelperHandler : ChainHandler() {

View File

@ -2,7 +2,7 @@ package com.gh.common.chain
import android.content.Context
import androidx.appcompat.app.AppCompatActivity
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.gamecenter.gamedetail.dialog.GamePermissionDialogFragment
class GamePermissionHandler : ChainHandler() {

View File

@ -2,7 +2,7 @@ package com.gh.common.chain
import android.content.Context
import com.gh.common.util.DialogUtils
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.feature.entity.GameEntity
class OverseaDownloadHandler : ChainHandler() {

View File

@ -3,7 +3,7 @@ package com.gh.common.chain
import android.content.Context
import androidx.appcompat.app.AppCompatActivity
import com.gh.common.dialog.PackageCheckDialogFragment
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.feature.entity.GameEntity
class PackageCheckHandler : ChainHandler() {

View File

@ -0,0 +1,35 @@
package com.gh.common.chain
import android.content.Context
import com.gh.common.simulator.NewSimulatorGameManager
import com.gh.common.simulator.SimulatorGameManager
import com.gh.gamecenter.feature.entity.GameEntity
class UpdateNewSimulatorHandler: ChainHandler() {
override fun handleRequest(context: Context, gameEntity: GameEntity) {
if (SimulatorGameManager.isSimulatorGame(gameEntity)) {
if (NewSimulatorGameManager.shouldShowUpdateNewSimulatorAlert(context)) {
NewSimulatorGameManager.showUpdateNewsSimulator(context) {
if (hasNext()) {
getNext()?.handleRequest(context, gameEntity)
} else {
processEndCallback?.invoke(null)
}
}
}
else{
if (hasNext()) {
getNext()?.handleRequest(context, gameEntity)
}
}
}
else{
if (hasNext()) {
getNext()?.handleRequest(context, gameEntity)
}
}
}
}

View File

@ -1,13 +1,13 @@
package com.gh.common.chain
import android.content.Context
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.vspace.VHelper
class ValidateVSpaceHandler : ChainHandler() {
override fun handleRequest(context: Context, gameEntity: GameEntity) {
VHelper.validateVSpaceBeforeAction(context, gameEntity, true) {
VHelper.validateVSpaceBeforeAction(context, gameEntity) {
if (hasNext()) {
getNext()?.handleRequest(context, gameEntity)
} else {

View File

@ -1,18 +1,33 @@
package com.gh.common.chain
import android.content.Context
import com.gh.common.util.DialogUtils
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.R
import com.gh.gamecenter.common.utils.DialogHelper
import com.gh.gamecenter.common.utils.toResString
import com.gh.gamecenter.feature.entity.GameEntity
class VersionNumberHandler : ChainHandler() {
override fun handleRequest(context: Context, gameEntity: GameEntity) {
DialogUtils.showVersionNumberDialog(context, gameEntity) {
val confirmCallback = {
if (hasNext()) {
getNext()?.handleRequest(context, gameEntity)
} else {
processEndCallback?.invoke(null)
}
}
if (!gameEntity.isShowVersionNumber()) {
confirmCallback.invoke()
} else {
DialogHelper.showGuideDialog(
context,
"温馨提示",
gameEntity.getVersionNumberString(),
"继续下载",
R.string.cancel.toResString(),
{ confirmCallback.invoke() },
extraConfig = DialogHelper.Config(titleIcon = R.drawable.ic_dialog_tips)
)
}
}
}

View File

@ -8,23 +8,26 @@ import android.text.TextUtils;
import androidx.annotation.Nullable;
import com.gh.gamecenter.common.utils.DarkModeUtils;
import com.gh.gamecenter.common.utils.EnvHelper;
import com.gh.gamecenter.common.constant.Constants;
import com.gh.gamecenter.core.utils.GsonUtils;
import com.gh.common.util.AdHelper;
import com.gh.common.util.PackageHelper;
import com.gh.common.util.PackageUtils;
import com.gh.gamecenter.BuildConfig;
import com.gh.gamecenter.SuggestionActivity;
import com.gh.gamecenter.core.utils.SPUtils;
import com.gh.gamecenter.entity.GameGuidePopupEntity;
import com.gh.gamecenter.entity.NewSettingsEntity;
import com.gh.gamecenter.entity.NewsEntity;
import com.gh.gamecenter.entity.SettingsEntity;
import com.gh.gamecenter.common.constant.CommonConsts;
import com.gh.gamecenter.common.constant.Constants;
import com.gh.gamecenter.common.eventbus.EBReuse;
import com.gh.gamecenter.entity.VSetting;
import com.gh.gamecenter.common.retrofit.BiResponse;
import com.gh.gamecenter.common.retrofit.Response;
import com.gh.gamecenter.common.utils.DarkModeUtils;
import com.gh.gamecenter.common.utils.EnvHelper;
import com.gh.gamecenter.core.utils.GsonUtils;
import com.gh.gamecenter.core.utils.SPUtils;
import com.gh.gamecenter.entity.GameGuidePopupEntity;
import com.gh.gamecenter.entity.NewApiSettingsEntity;
import com.gh.gamecenter.entity.NewSettingsEntity;
import com.gh.gamecenter.entity.VSetting;
import com.gh.gamecenter.feature.entity.NewsEntity;
import com.gh.gamecenter.feature.entity.SettingsEntity;
import com.gh.gamecenter.feature.entity.SimulatorEntity;
import com.gh.gamecenter.retrofit.RetrofitManager;
import com.gh.vspace.VHelper;
import com.halo.assistant.HaloApp;
@ -63,8 +66,10 @@ public class Config {
private static SettingsEntity mSettingsEntity;
private static NewSettingsEntity mNewSettingsEntity;
private static NewApiSettingsEntity mNewApiSettingsEntity;
private static NewSettingsEntity.NightMode mNightModeSetting;
private static NewApiSettingsEntity.NightMode mNightModeSetting;
private static SimulatorEntity mNewSimulatorEntity;
private static VSetting mVSetting;
private static GameGuidePopupEntity mGameGuidePopupEntity;
private static SharedPreferences mDefaultSharedPreferences;
@ -202,7 +207,7 @@ public class Config {
PackageHelper.initList();
// 初始化畅玩相关的东西
VHelper.init(HaloApp.getInstance());
VHelper.init(HaloApp.getInstance(), false);
}
@Nullable
@ -220,17 +225,37 @@ public class Config {
return mSettingsEntity;
}
//新模拟器
@Nullable
public static NewSettingsEntity.NightMode getNightModeSetting() {
if (mNightModeSetting != null) {
return mNightModeSetting;
} else if (mNewSettingsEntity != null && mNewSettingsEntity.getNightMode() != null) {
return mNewSettingsEntity.getNightMode();
public static SimulatorEntity getNewSimulatorEntitySetting() {
if (mNewSimulatorEntity != null) {
return mNewSimulatorEntity;
} else if (mNewApiSettingsEntity != null && mNewApiSettingsEntity.getSimulator() != null) {
return mNewApiSettingsEntity.getSimulator();
} else {
return null;
}
}
@Nullable
public static NewApiSettingsEntity.NightMode getNightModeSetting() {
if (mNightModeSetting != null) {
return mNightModeSetting;
} else if (mNewApiSettingsEntity != null && mNewApiSettingsEntity.getNightMode() != null) {
return mNewApiSettingsEntity.getNightMode();
} else {
return null;
}
}
public static boolean getUserInterestedGame() {
if (mNewApiSettingsEntity != null) {
return mNewApiSettingsEntity.getUserInterestedGame();
} else {
return false;
}
}
@Nullable
public static NewSettingsEntity getNewSettingsEntity() {
if (mNewSettingsEntity == null) {
@ -246,6 +271,26 @@ public class Config {
return mNewSettingsEntity;
}
@Nullable
public static NewApiSettingsEntity getNewApiSettingsEntity() {
if (mNewApiSettingsEntity == null) {
try {
String json = SPUtils.getString(Constants.SP_NEW_API_SETTINGS);
if (!TextUtils.isEmpty(json)) {
mNewApiSettingsEntity = GsonUtils.fromJson(json, NewApiSettingsEntity.class);
}
} catch (Exception e) {
e.printStackTrace();
}
}
return mNewApiSettingsEntity;
}
public static void updateNewApiSettings(NewApiSettingsEntity settingsEntity) {
mNewApiSettingsEntity = settingsEntity;
SPUtils.setString(Constants.SP_NEW_API_SETTINGS, GsonUtils.toJson(settingsEntity));
}
@Nullable
public static VSetting getVSettingEntity() {
if (mVSetting == null) {
@ -295,26 +340,6 @@ public class Config {
return mDefaultSharedPreferences;
}
public static boolean isExistHideFunction() {
SharedPreferences preferences = getPreferences();
if (!preferences.getBoolean(FIX_DOWNLOAD_KEY, false)) return true;
if (!preferences.getBoolean(FIX_PLUGIN_KEY, false)) return true;
if (!preferences.getBoolean(FIX_COMMUNITY_KEY, false)) return true;
if (!preferences.getBoolean(FIX_ARTICLE_KEY, false)) return true;
return false;
}
public static void fixHideFunction() {
SharedPreferences preferences = PreferenceManager.
getDefaultSharedPreferences(HaloApp.getInstance().getApplication());
SharedPreferences.Editor editor = preferences.edit();
editor.putBoolean(Config.FIX_DOWNLOAD_KEY, true);
editor.putBoolean(Config.FIX_ARTICLE_KEY, true);
editor.putBoolean(Config.FIX_COMMUNITY_KEY, true);
editor.putBoolean(Config.FIX_PLUGIN_KEY, true);
editor.apply();
}
@SuppressLint("CheckResult")
public static void getGhzsSettings() {
String channel = HaloApp.getInstance().getChannel();
@ -329,7 +354,7 @@ public class Config {
// 意见反馈
SharedPreferences.Editor edit = getPreferences().edit();
edit.putString(SuggestionActivity.SUGGESTION_HINT_TYPE,
edit.putString(CommonConsts.SUGGESTION_HINT_TYPE,
GsonUtils.toJson(response.getSuggestion()));
edit.apply();
@ -350,9 +375,6 @@ public class Config {
@Override
public void onSuccess(NewSettingsEntity data) {
mNewSettingsEntity = data;
if (mNightModeSetting != null) {
mNewSettingsEntity.setNightMode(mNightModeSetting);
}
SPUtils.setString(Constants.SP_NEW_SETTINGS, GsonUtils.toJson(data));
}
});
@ -370,25 +392,23 @@ public class Config {
});
}
if (mNightModeSetting == null) {
if (mNewApiSettingsEntity == null) {
RetrofitManager.getInstance()
.getNewApi().getNewSettings(PackageUtils.getGhVersionName(), channel)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new BiResponse<NewSettingsEntity>() {
.subscribe(new BiResponse<NewApiSettingsEntity>() {
@Override
public void onSuccess(NewSettingsEntity data) {
public void onSuccess(NewApiSettingsEntity data) {
mNewApiSettingsEntity = data;
mNightModeSetting = data.getNightMode();
mNewSimulatorEntity = data.getSimulator();
if (HaloApp.getInstance().isNewForThisVersion && mNightModeSetting != null && mNightModeSetting.getInstall()) {
DarkModeUtils.INSTANCE.updateFollowSystemDarkModeToSp(true);
DarkModeUtils.INSTANCE.updateAppDarkModeStatusToSp(true);
DarkModeUtils.INSTANCE.initDarkMode();
}
if (mNewSettingsEntity != null) {
mNewSettingsEntity.setNightMode(mNightModeSetting);
SPUtils.setString(Constants.SP_NEW_SETTINGS, GsonUtils.toJson(data));
}
AdHelper.prefetchStartUpAd(mNewApiSettingsEntity);
SPUtils.setString(Constants.SP_NEW_API_SETTINGS, GsonUtils.toJson(data));
}
});
}

View File

@ -21,7 +21,7 @@ import com.gh.gamecenter.R
import com.gh.gamecenter.databinding.KaifuAddItemBinding
import com.gh.gamecenter.databinding.LayoutAddKaifuPopupBinding
import com.gh.gamecenter.databinding.LayoutPopupContainerBinding
import com.gh.gamecenter.entity.ServerCalendarEntity
import com.gh.gamecenter.feature.entity.ServerCalendarEntity
import com.gh.gamecenter.servers.add.AddKaiFuPopupAdapter
import java.text.SimpleDateFormat
import java.util.*

View File

@ -31,7 +31,7 @@ import com.gh.common.chain.PackageCheckHandler;
import com.gh.common.chain.ValidateVSpaceHandler;
import com.gh.common.chain.VersionNumberHandler;
import com.gh.common.constant.Config;
import com.gh.common.exposure.ExposureEvent;
import com.gh.gamecenter.feature.exposure.ExposureEvent;
import com.gh.common.filter.RegionSetting;
import com.gh.common.filter.RegionSettingHelper;
import com.gh.common.history.HistoryHelper;
@ -46,10 +46,11 @@ import com.gh.common.util.LogUtils;
import com.gh.common.util.NewsUtils;
import com.gh.common.util.PackageInstaller;
import com.gh.common.util.PackageUtils;
import com.gh.common.util.PlatformUtils;
import com.gh.gamecenter.feature.utils.PlatformUtils;
import com.gh.common.util.ReservationHelper;
import com.gh.common.view.DownloadButton;
import com.gh.common.view.GameIconView;
import com.gh.gamecenter.feature.view.DownloadButton;
import com.gh.gamecenter.feature.view.GameIconView;
import com.gh.gamecenter.common.view.NoEllipsizeSpaceTextView;
import com.gh.download.DownloadManager;
import com.gh.download.dialog.DownloadDialog;
import com.gh.gamecenter.DownloadManagerActivity;
@ -65,17 +66,17 @@ import com.gh.gamecenter.core.utils.DisplayUtils;
import com.gh.gamecenter.core.utils.MtaHelper;
import com.gh.gamecenter.core.utils.NumberUtils;
import com.gh.gamecenter.databinding.KaifuDetailItemRowBinding;
import com.gh.gamecenter.entity.ApkEntity;
import com.gh.gamecenter.entity.GameEntity;
import com.gh.gamecenter.feature.entity.ApkEntity;
import com.gh.gamecenter.feature.entity.GameEntity;
import com.gh.gamecenter.common.entity.LinkEntity;
import com.gh.gamecenter.entity.PluginLocation;
import com.gh.gamecenter.entity.ServerCalendarEntity;
import com.gh.gamecenter.entity.TagStyleEntity;
import com.gh.gamecenter.entity.TestEntity;
import com.gh.gamecenter.feature.entity.PluginLocation;
import com.gh.gamecenter.feature.entity.ServerCalendarEntity;
import com.gh.gamecenter.feature.entity.TagStyleEntity;
import com.gh.gamecenter.feature.entity.TestEntity;
import com.gh.gamecenter.common.eventbus.EBReuse;
import com.gh.gamecenter.gamedetail.dialog.GamePermissionDialogFragment;
import com.gh.gamecenter.manager.PackagesManager;
import com.gh.gamecenter.qa.entity.CommunityVideoEntity;
import com.gh.gamecenter.feature.entity.CommunityVideoEntity;
import com.gh.vspace.VDownloadManagerActivity;
import com.gh.vspace.VHelper;
import com.lightgame.download.DownloadEntity;
@ -784,7 +785,7 @@ public class BindingAdapters {
}
}
public static void setGameName(TextView view, GameEntity game, boolean isShowPlatform, @Nullable Boolean isShowSuffix) {
public static void setGameName(NoEllipsizeSpaceTextView view, GameEntity game, boolean isShowPlatform, @Nullable Boolean isShowSuffix) {
if (isShowSuffix == null) isShowSuffix = true; // 默认显示
if (isShowPlatform && game.getApk().size() > 0) {
view.setText(String.format("%s - %s", !isShowSuffix ? game.getNameWithoutSuffix() : game.getName(),
@ -842,7 +843,7 @@ public class BindingAdapters {
int start = index;
int end = start + tag.getName().length() + ((i != showCount - 1) ? 1 : 0);
index = end;
span.setSpan(new ForegroundColorSpan(Color.parseColor("#" + tag.getColor())),
span.setSpan(new ForegroundColorSpan(ExtensionsKt.hexStringToIntColor("#" + tag.getColor(), Color.WHITE)),
start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
}
view.setText(span);
@ -850,11 +851,11 @@ public class BindingAdapters {
public static void setVideoData(TextView view, int count) {
if (count > 0) {
view.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(view.getContext(), R.drawable.ic_video_data_up), null, null, null);
ExtensionsKt.setDrawableStart(view, ContextCompat.getDrawable(view.getContext(), R.drawable.ic_video_data_up), null, null);
view.setTextColor(ContextCompat.getColor(view.getContext(), R.color.text_EA3333));
view.setText(count + "");
} else {
view.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null);
ExtensionsKt.removeDrawable(view);
view.setTextColor(ContextCompat.getColor(view.getContext(), R.color.text_subtitleDesc));
view.setText("-");
}

View File

@ -24,9 +24,9 @@ import com.gh.gamecenter.common.callback.ConfirmListener
import com.gh.gamecenter.common.constant.EntranceConsts
import com.gh.gamecenter.core.utils.GsonUtils
import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.entity.AuthDialogEntity
import com.gh.gamecenter.entity.AuthDialogLevel
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.feature.entity.AuthDialogEntity
import com.gh.gamecenter.feature.entity.AuthDialogLevel
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.gamecenter.login.user.UserManager
import com.google.gson.reflect.TypeToken
import com.halo.assistant.fragment.user.UserInfoEditFragment

View File

@ -18,19 +18,18 @@ import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import androidx.viewpager2.widget.ViewPager2
import com.facebook.drawee.view.SimpleDraweeView
import com.gh.gamecenter.common.constant.Constants
import com.gh.download.DownloadManager
import com.gh.gamecenter.R
import com.gh.gamecenter.core.utils.GsonUtils
import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.common.utils.ImageUtils
import com.gh.gamecenter.common.utils.countDownTimer
import com.gh.gamecenter.core.utils.DisplayUtils
import com.gh.gamecenter.common.utils.ImageUtils
import com.gh.gamecenter.core.utils.GsonUtils
import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.databinding.DialogDeviceRemindBinding
import com.gh.gamecenter.entity.DeviceDialogEntity
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.feature.entity.GameEntity
import com.google.gson.reflect.TypeToken
import com.gh.gamecenter.setting.GameDownloadSettingFragment.Companion.AUTO_INSTALL_SP_KEY
import com.lightgame.download.DataWatcher
import com.lightgame.download.DownloadEntity
import com.lightgame.download.DownloadStatus
@ -53,7 +52,7 @@ class DeviceRemindDialog(context: Context, val entity: DeviceDialogEntity, val g
private val dataWatcher = object : DataWatcher() {
override fun onDataChanged(downloadEntity: DownloadEntity) {
if (downloadEntity.status == DownloadStatus.done && downloadEntity.name == gameEntity.name) {
val autoInstall = SPUtils.getBoolean(AUTO_INSTALL_SP_KEY, true)
val autoInstall = SPUtils.getBoolean(Constants.SP_AUTO_INSTALL, true)
if (autoInstall) {
dismiss()
}

View File

@ -16,7 +16,7 @@ import com.gh.gamecenter.common.utils.dip2px
import com.gh.gamecenter.common.utils.toColor
import com.gh.gamecenter.R
import com.gh.gamecenter.databinding.DialogGameOffServiceBinding
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.feature.entity.GameEntity
// 游戏关闭下载弹窗
class GameOffServiceDialogFragment : BaseDialogFragment() {

View File

@ -13,13 +13,11 @@ import androidx.fragment.app.FragmentActivity
import androidx.fragment.app.FragmentTransaction
import com.gh.common.util.DirectUtils
import com.gh.gamecenter.R
import com.gh.gamecenter.WebActivity
import com.gh.gamecenter.common.base.fragment.BaseDialogFragment
import com.gh.gamecenter.common.utils.dip2px
import com.gh.gamecenter.common.view.CustomLinkMovementMethod
import com.gh.gamecenter.databinding.DialogPrivacyProtocolNewBinding
import com.gh.gamecenter.entity.DialogEntity
import splitties.bundle.put
class NewPrivacyPolicyDialogFragment : BaseDialogFragment() {
@ -161,7 +159,7 @@ class NewPrivacyPolicyDialogFragment : BaseDialogFragment() {
}
}
privacyDialogFragment.arguments = Bundle().apply {
put(KEY_DATA, privacyPolicyEntity)
putParcelable(KEY_DATA, privacyPolicyEntity)
}
privacyDialogFragment.show(
activity.supportFragmentManager,

View File

@ -31,9 +31,9 @@ import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.core.utils.SpanBuilder
import com.gh.gamecenter.databinding.FragmentPackageCheckBinding
import com.gh.gamecenter.databinding.PackageCheckItemBinding
import com.gh.gamecenter.entity.DetectionObjectEntity
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.entity.PackageDialogEntity
import com.gh.gamecenter.feature.entity.DetectionObjectEntity
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.gamecenter.feature.entity.PackageDialogEntity
import com.gh.gamecenter.eventbus.EBPackage
import com.halo.assistant.HaloApp
import com.lightgame.adapter.BaseRecyclerAdapter
@ -303,7 +303,7 @@ class PackageCheckDialogFragment : BaseDialogFragment() {
//安装、卸载事件
@Subscribe(threadMode = ThreadMode.MAIN)
fun onEventMainThread(busFour: EBPackage) {
if ("安装" == busFour.type || "卸载" == busFour.type) {
if (busFour.isInstalledOrUninstalled()) {
mAllInstalledPackages = PackageUtils.getInstalledPackages(HaloApp.getInstance().application, 0)
mAdapter?.notifyDataSetChanged()
}

View File

@ -23,7 +23,6 @@ import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.databinding.DialogPrivacyProtocolBinding
import com.gh.gamecenter.entity.DialogEntity
import com.lightgame.utils.AppManager
import splitties.bundle.put
class PrivacyPolicyDialogFragment : BaseDialogFragment() {
@ -184,7 +183,7 @@ class PrivacyPolicyDialogFragment : BaseDialogFragment() {
}
}
privacyDialogFragment.arguments = Bundle().apply {
put(KEY_DATA, privacyPolicyEntity)
putParcelable(KEY_DATA, privacyPolicyEntity)
}
privacyDialogFragment.show(
activity.supportFragmentManager,

View File

@ -15,7 +15,7 @@ import com.gh.gamecenter.R
import com.gh.gamecenter.common.view.FixLinearLayoutManager
import com.gh.gamecenter.databinding.DialogReserveBinding
import com.gh.gamecenter.databinding.DialogReserveItemBinding
import com.gh.gamecenter.entity.SimpleGameEntity
import com.gh.gamecenter.common.entity.SimpleGameEntity
import com.gh.gamecenter.mygame.MyGameActivity
import com.lightgame.adapter.BaseRecyclerAdapter

View File

@ -4,6 +4,7 @@ import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.gh.gamecenter.feature.exposure.ExposureEvent
import io.reactivex.functions.Consumer
/**

View File

@ -5,6 +5,7 @@ import com.gh.gamecenter.BuildConfig
import com.gh.gamecenter.common.loghub.LoghubHelper
import com.gh.gamecenter.common.utils.FixedSizeLinkedHashSet
import com.gh.gamecenter.common.utils.toJson
import com.gh.gamecenter.feature.exposure.ExposureEvent
import com.lightgame.utils.Utils
/**

View File

@ -1,16 +1,20 @@
package com.gh.common.exposure
import com.gh.gamecenter.feature.exposure.ExposureEvent
object ExposureTraceUtils {
fun appendTrace(event: ExposureEvent?): List<ExposureEvent> {
val traceList = arrayListOf<ExposureEvent>()
event?.let {
if (event.eTrace == null) {
traceList.add(event)
//这里使用deepCopy是为了防止循环引用调用hashCode方法触发StackOverflowError错误
val deepCopy = it.deepCopy()
if (deepCopy.eTrace == null) {
traceList.add(deepCopy)
} else {
traceList.addAll(event.eTrace!!)
traceList.add(flattenTrace(event))
traceList.addAll(deepCopy.eTrace!!)
traceList.add(flattenTrace(deepCopy))
}
}

View File

@ -5,8 +5,10 @@ import com.g00fy2.versioncompare.Version
import com.gh.common.util.PackageUtils
import com.gh.gamecenter.common.utils.FixedSizeLinkedHashSet
import com.gh.gamecenter.common.utils.toObject
import com.gh.gamecenter.entity.ApkEntity
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.feature.entity.ApkEntity
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.gamecenter.feature.exposure.ExposureEvent
import com.gh.gamecenter.feature.exposure.ExposureType
import com.gh.gamecenter.manager.PackagesManager
import com.halo.assistant.HaloApp
import com.lightgame.download.DownloadEntity
@ -22,7 +24,7 @@ object ExposureUtils {
traceEvent: ExposureEvent?,
downloadType: DownloadType
): ExposureEvent {
val gameEntity = entity.clone()
val gameEntity = entity.copy()
gameEntity.id = if (entity.id.contains(DownloadEntity.GAME_ID_DIVIDER)) {
entity.id.split(DownloadEntity.GAME_ID_DIVIDER).toTypedArray()[0]
} else {
@ -49,11 +51,12 @@ object ExposureUtils {
entity: GameEntity,
platform: String?,
trace: String?,
speed: Long,
host: String? = "unknown",
path: String? = "unknown",
downloadType: DownloadType
) {
val gameEntity = entity.clone()
val gameEntity = entity.copy()
gameEntity.platform = platform
gameEntity.downloadCompleteType = downloadType.toString()
val traceEvent = trace?.toObject<ExposureEvent>()
@ -75,6 +78,8 @@ object ExposureUtils {
)
exposureEvent.payload.host = host
exposureEvent.payload.path = path
exposureEvent.payload.speed = speed
ExposureManager.log(exposureEvent)
ExposureManager.commitSavedExposureEvents(forcedUpload = true)
}

View File

@ -1,5 +1,7 @@
package com.gh.common.exposure
import com.gh.gamecenter.feature.exposure.ExposureEvent
/**
* 统计曝光的列表的 adapter 需要实现这个接口
*/

View File

@ -1,15 +0,0 @@
package com.gh.common.exposure.time
import com.gh.common.FixedRateJobHelper
object TimeUtil {
fun currentTimeMillis(): Long {
return FixedRateJobHelper.timeDeltaBetweenServerAndClient + System.currentTimeMillis()
}
fun currentTime(): Int {
return ((FixedRateJobHelper.timeDeltaBetweenServerAndClient + System.currentTimeMillis()) / 1000).toInt()
}
}

View File

@ -1,10 +1,11 @@
package com.gh.common.filter
import androidx.annotation.Keep
import com.gh.gamecenter.feature.entity.IpInfo
import com.google.gson.annotations.SerializedName
@Keep
data class RegionSetting(
class RegionSetting(
@SerializedName("game_mirror")
var mirrorGameIdSet: HashSet<String>,
@SerializedName("game_block")
@ -14,11 +15,13 @@ data class RegionSetting(
@SerializedName("game_h5_download")
var gameH5DownloadList: List<GameH5Download>,
@SerializedName("game_special_download")
var gameSpecialDownloadInfoList: List<GameSpecialDownloadInfo>
var gameSpecialDownloadInfoList: List<GameSpecialDownloadInfo>,
@SerializedName("ip_info")
var ipInfo: IpInfo? = null
) {
@Keep
data class ChannelControl(
class ChannelControl(
@SerializedName("game_category")
var gameCategory: String,
@SerializedName("effect")
@ -26,7 +29,7 @@ data class RegionSetting(
)
@Keep
data class GameH5Download(
class GameH5Download(
@SerializedName("game_id")
var gameId: String,// 游戏id
@SerializedName("h5_link")
@ -37,7 +40,7 @@ data class RegionSetting(
var buttonText: String,// 按钮文案
)
data class GameSpecialDownloadInfo(
class GameSpecialDownloadInfo(
@SerializedName("game_id")
var gameId: String = "",
@SerializedName("bbs_id")

View File

@ -1,14 +1,16 @@
package com.gh.common.filter
import android.annotation.SuppressLint
import com.gh.gamecenter.R
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.common.retrofit.BiResponse
import com.gh.gamecenter.common.utils.debounceActionWithInterval
import com.gh.gamecenter.common.utils.toJson
import com.gh.gamecenter.common.utils.toObject
import com.gh.gamecenter.R
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.common.retrofit.BiResponse
import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.gamecenter.feature.entity.IpInfo
import com.gh.gamecenter.feature.entity.SimpleGame
import com.gh.gamecenter.retrofit.RetrofitManager
import com.halo.assistant.HaloApp
import io.reactivex.functions.Function
@ -21,8 +23,10 @@ object RegionSettingHelper {
private var mDisplayMirrorIfoGameIdSet: HashSet<String>? = hashSetOf()
private var mGameH5DownloadList: List<RegionSetting.GameH5Download>? = listOf()
private var mGameSpecialDownloadInfoList: List<RegionSetting.GameSpecialDownloadInfo>? = listOf()
private var mIpInfo: IpInfo? = null
private const val SP_SETTING = "region_setting"
const val SP_SETTING_FAILURE = "region_setting_failure"
fun shouldThisGameDisplayMirrorInfo(gameId: String): Boolean {
return mDisplayMirrorIfoGameIdSet?.contains(gameId) ?: false
@ -39,6 +43,8 @@ object RegionSettingHelper {
@JvmStatic
fun getGameSpecialDownloadInfo(gameId: String) = mGameSpecialDownloadInfoList?.find { it.gameId == gameId }
fun getIpInfo(): IpInfo? = mIpInfo
@JvmStatic
fun filterGame(list: List<GameEntity>?): ArrayList<GameEntity> {
if (list == null) return arrayListOf()
@ -52,6 +58,19 @@ object RegionSettingHelper {
return listCopy
}
@JvmStatic
fun filterSimpleGame(list: List<SimpleGame>?): ArrayList<SimpleGame> {
if (list == null) return arrayListOf()
if (mFilterGameIdSet?.isEmpty() == true) {
if (list is ArrayList) return list
}
val listCopy: ArrayList<SimpleGame> = if (list is ArrayList) list else ArrayList(list)
listCopy.removeAll { mFilterGameIdSet?.contains(it.id) ?: false }
return listCopy
}
@JvmField
var filterGame = Function { list: List<GameEntity> ->
filterGame(list)
@ -88,9 +107,10 @@ object RegionSettingHelper {
}
override fun onFailure(exception: Exception) {
SPUtils.getString(SP_SETTING)?.toObject<RegionSetting>()?.let {
SPUtils.getString(SP_SETTING).toObject<RegionSetting>()?.let {
updateSettingsInMemory(it)
}
SPUtils.setBoolean(SP_SETTING_FAILURE, true)
}
})
}
@ -102,6 +122,7 @@ object RegionSettingHelper {
mChannelControl = data.channelControl
mGameH5DownloadList = data.gameH5DownloadList
mGameSpecialDownloadInfoList = data.gameSpecialDownloadInfoList
mIpInfo = data.ipInfo
}
/**

View File

@ -9,16 +9,17 @@ import androidx.sqlite.db.SupportSQLiteDatabase
import com.gh.gamecenter.entity.GamesCollectionEntity
import com.gh.gamecenter.entity.HistoryGameEntity
import com.gh.gamecenter.entity.MyVideoEntity
import com.gh.gamecenter.entity.NewsEntity
import com.gh.gamecenter.qa.entity.AnswerEntity
import com.gh.gamecenter.qa.entity.ArticleEntity
import com.gh.gamecenter.feature.entity.NewsEntity
import com.gh.gamecenter.feature.entity.AnswerEntity
import com.gh.gamecenter.feature.entity.ArticleEntity
import com.gh.gamecenter.feature.room.converter.*
import com.gh.gamecenter.room.converter.*
import com.gh.gamecenter.room.dao.*
import com.halo.assistant.HaloApp
@Database(
entities = [AnswerEntity::class, ArticleEntity::class, NewsEntity::class, HistoryGameEntity::class, MyVideoEntity::class, GamesCollectionEntity::class],
version = 11,
version = 12,
exportSchema = false
)
@TypeConverters(
@ -28,6 +29,7 @@ import com.halo.assistant.HaloApp
AnswerUserConverter::class,
ThumbnailConverter::class,
TagStyleListConverter::class,
TagStyleConverter::class,
StringArrayListConverter::class,
ListStringConverter::class,
CommunityVideoConverter::class,
@ -127,6 +129,13 @@ abstract class HistoryDatabase : RoomDatabase() {
}
}
val MIGRATION_11_12: Migration = object : Migration(11, 12) {
override fun migrate(database: SupportSQLiteDatabase) {
database.execSQL("Alter TABLE HistoryGameEntity add subtitle TEXT NOT NULL DEFAULT ''")
database.execSQL("Alter TABLE HistoryGameEntity add subtitleStyle TEXT")
}
}
val instance by lazy {
Room.databaseBuilder(
HaloApp.getInstance().application,
@ -142,6 +151,7 @@ abstract class HistoryDatabase : RoomDatabase() {
.addMigrations(MIGRATION_8_9)
.addMigrations(MIGRATION_9_10)
.addMigrations(MIGRATION_10_11)
.addMigrations(MIGRATION_11_12)
.build()
}
}

View File

@ -6,10 +6,12 @@ import com.gh.gamecenter.common.utils.removeVideoContent
import com.gh.gamecenter.common.utils.tryCatchInRelease
import com.gh.gamecenter.core.runOnIoThread
import com.gh.gamecenter.entity.*
import com.gh.gamecenter.feature.entity.AnswerEntity
import com.gh.gamecenter.feature.entity.ArticleEntity
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.gamecenter.feature.entity.NewsEntity
import com.gh.gamecenter.qa.entity.AnswerDetailEntity
import com.gh.gamecenter.qa.entity.AnswerEntity
import com.gh.gamecenter.qa.entity.ArticleDetailEntity
import com.gh.gamecenter.qa.entity.ArticleEntity
object HistoryHelper {
@ -71,6 +73,8 @@ object HistoryHelper {
historyGame.name = gameEntity.name
historyGame.tagStyle = gameEntity.tagStyle
historyGame.tag = gameEntity.getTag()
historyGame.subtitle = gameEntity.subtitle
historyGame.subtitleStyle = gameEntity.subtitleStyle
return historyGame
}

View File

@ -0,0 +1,19 @@
package com.gh.common.provider
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.common.util.AdHelper
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.feature.entity.SettingsEntity
import com.gh.gamecenter.feature.provider.IAdHelperProvider
@Route(path = RouteConsts.provider.adHelper, name = "AdHelper暴露服务")
class AdHelperProviderImpl : IAdHelperProvider {
override fun getSuggestionFunctionAd(): SettingsEntity.AD? {
return AdHelper.getAd(AdHelper.LOCATION_SUGGESTION_FUNCTION)
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -5,6 +5,7 @@ import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.gamecenter.R
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IAppProvider
import com.gh.gamecenter.core.provider.IFlavorProvider
import com.halo.assistant.HaloApp
@Route(path = RouteConsts.provider.app, name = "Application暴露服务")
@ -33,6 +34,10 @@ class AppProviderImpl : IAppProvider {
return HaloApp.getInstance().channel ?: ""
}
override fun setChannel(channel: String) {
HaloApp.getInstance().channel = channel
}
override fun getUserAgent(): String {
return HaloApp.getInstance().userAgent ?: ""
}
@ -52,4 +57,16 @@ class AppProviderImpl : IAppProvider {
override fun isUserAcceptPrivacyPolicy(context: Context): Boolean {
return HaloApp.isUserAcceptPrivacyPolicy(context)
}
override fun put(key: String, any: Any) {
HaloApp.put(key, any)
}
override fun get(key: String, isRemove: Boolean): Any? {
return HaloApp.get(key, isRemove)
}
override fun getFlavorProvider(): IFlavorProvider {
return HaloApp.getInstance().flavorProvider
}
}

View File

@ -0,0 +1,30 @@
package com.gh.common.provider
import android.content.Context
import android.widget.LinearLayout
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.common.databind.BindingAdapters
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.common.view.NoEllipsizeSpaceTextView
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.gamecenter.feature.provider.IBindingAdaptersProvider
@Route(path = RouteConsts.provider.bindingAdapters, name = "BindingAdapters暴露服务")
class BindingAdaptersProviderImpl : IBindingAdaptersProvider {
override fun setGameName(
view: NoEllipsizeSpaceTextView,
game: GameEntity,
isShowPlatform: Boolean,
isShowSuffix: Boolean
) {
BindingAdapters.setGameName(view, game, isShowPlatform, isShowSuffix)
}
override fun setGameTags(layout: LinearLayout, gameEntity: GameEntity) {
BindingAdapters.setGameTags(layout, gameEntity)
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -0,0 +1,23 @@
package com.gh.common.provider
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.download.server.BrowserInstallHelper
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IBrowserInstallHelperProvider
@Route(path = RouteConsts.provider.browserInstallHelper, name = "BrowserInstallHelper暴露服务")
class BrowserInstallHelperProviderImpl : IBrowserInstallHelperProvider {
override fun isUseBrowserToInstallEnabled(): Boolean = BrowserInstallHelper.isUseBrowserToInstallEnabled()
override fun shouldUseBrowserToInstall(): Boolean = BrowserInstallHelper.shouldUseBrowserToInstall()
override fun logSwitchInstallSettingEvent() {
BrowserInstallHelper.logOrdinaryBrowserEvent(BrowserInstallHelper.Type.SWITCH_INSTALL_SETTING)
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -60,6 +60,14 @@ class ConfigProviderImpl : IConfigProvider {
return Config.getSettings()?.support?.qq ?: ""
}
override fun getQQun(): String {
return Config.getSettings()?.support?.qQun ?: ""
}
override fun getQQunKey(): String {
return Config.getSettings()?.support?.qQunKey ?: ""
}
override fun getQuickLoginAppId(): String {
return Config.QUICK_LOGIN_APPID
}
@ -72,6 +80,14 @@ class ConfigProviderImpl : IConfigProvider {
return Config.WEIBO_APPKEY
}
override fun getNightModeSetting(): Boolean {
return Config.getNightModeSetting()?.setting ?: false
}
override fun isShowPlugin(gameId: String): Boolean {
return Config.isShowPlugin(gameId)
}
override fun init(context: Context?) {
// Do nothing
}

View File

@ -1,5 +1,6 @@
package com.gh.common.provider
import android.app.Dialog
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.common.util.DialogUtils
@ -22,6 +23,29 @@ class DialogUtilsProviderImpl : IDialogUtilsProvider {
})
}
override fun showWaitDialog(context: Context, string: String): Dialog = DialogUtils.showWaitDialog(context, string)
override fun showUsageStatsDialog(context: Context, confirm: () -> Unit, cancel: () -> Unit) {
DialogUtils.showUsageStatsDialog(context,
{ confirm.invoke() }, object :CancelListener{
override fun onCancel() {
cancel.invoke()
}
})
}
override fun showNoticeDialog(
context: Context,
title: String,
content: String,
confirm: () -> Unit
) {
DialogUtils.showNoticeDialog(context, title, content
) { confirm.invoke() }
}
override fun showBindPhoneDialog(context: Context, confirm: () -> Unit): Dialog = DialogUtils.showBindPhoneDialog(context) { confirm.invoke() }
override fun init(context: Context?) {
// Do nothing
}

View File

@ -49,6 +49,26 @@ class DirectProviderImpl : IDirectProvider {
DirectUtils.directToLotteryParadisePage(context)
}
override fun directDouyin(context: Context, userId: String) {
DirectUtils.directDouyin(context, userId)
}
override fun directToSuggestionFromDiagnosis(context: Context, diagnosis: String) {
DirectUtils.directToSuggestion(context, diagnosis = diagnosis)
}
override fun directToQa(context: Context, text: String?, id: String) {
DirectUtils.directToQa(context, text, id)
}
override fun directToHelpAndFeedback(context: Context, position: Int) {
DirectUtils.directToHelpAndFeedback(context, position)
}
override fun directToQqGroup(context: Context, groupNumber: String?): Boolean {
return DirectUtils.directToQqGroup(context, groupNumber)
}
override fun init(context: Context?) {
// Do nothing
}

View File

@ -0,0 +1,18 @@
package com.gh.common.provider
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.common.FixedRateJobHelper
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IFixedRateJobHelperProvider
@Route(path = RouteConsts.provider.fixedRateJobHelper, name = "FixedRateJobHelper暴露服务")
class FixedRateJobHelperProviderImpl : IFixedRateJobHelperProvider {
override fun getTimeDeltaBetweenServerAndClient(): Long {
return FixedRateJobHelper.timeDeltaBetweenServerAndClient
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -0,0 +1,46 @@
package com.gh.common.provider
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.gamecenter.GameDetailActivity
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.gamecenter.feature.exposure.ExposureEvent
import com.gh.gamecenter.feature.provider.IGameDetailProvider
@Route(path = RouteConsts.provider.gameDetail, name = "GameDetailActivity暴露服务")
class GameDetailProviderImpl : IGameDetailProvider {
override fun startGameDetailActivity(
context: Context,
gameId: String,
entrance: String?,
traceEvent: ExposureEvent?
) {
GameDetailActivity.startGameDetailActivity(context, gameId, entrance, traceEvent)
}
override fun startGameDetailActivity(
context: Context,
gameEntity: GameEntity?,
entrance: String,
defaultTab: Int,
isSkipGameComment: Boolean,
scrollToLibao: Boolean,
scrollToServer: Boolean,
traceEvent: ExposureEvent?
) {
GameDetailActivity.startGameDetailActivity(
context,
gameEntity,
entrance,
defaultTab,
isSkipGameComment,
scrollToLibao,
scrollToServer,
traceEvent
)
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -3,13 +3,13 @@ package com.gh.common.provider
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.common.filter.RegionSettingHelper
import com.gh.common.util.ApkActiveUtils
import com.gh.gamecenter.feature.utils.ApkActiveUtils
import com.gh.download.DownloadManager
import com.gh.gamecenter.common.constant.EntranceConsts
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.common.utils.countOccurrences
import com.gh.gamecenter.core.provider.IHandleGameResponseProvider
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.feature.entity.GameEntity
@Route(path = RouteConsts.provider.handleGameResponse, name = "处理游戏类型返回")
class HandleGameResponseProviderImpl : IHandleGameResponseProvider {

View File

@ -0,0 +1,18 @@
package com.gh.common.provider
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.common.history.HistoryHelper
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IHistoryHelperProvider
@Route(path = RouteConsts.provider.historyHelper, name = "HistoryHelper暴露服务")
class HistoryHelperProviderImpl : IHistoryHelperProvider {
override fun emptyDatabase() {
HistoryHelper.emptyDatabase()
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -5,6 +5,8 @@ import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.common.util.DirectUtils
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.common.entity.LinkEntity
import com.gh.gamecenter.common.entity.SimpleGameEntity
import com.gh.gamecenter.common.entity.SuggestType
import com.gh.gamecenter.common.provider.ILinkDirectUtilsProvider
@Route(path = RouteConsts.provider.linkDirectUtils, name = "DirectUtils暴露服务主要是暴露directToLinkPage方法")
@ -19,6 +21,35 @@ class LinkDirectUtilsProviderImpl : ILinkDirectUtilsProvider {
DirectUtils.directToLinkPage(context, linkEntity, entrance, path)
}
override fun directToSuggestion(context: Context, type: SuggestType, requestCode: Int?) {
DirectUtils.directToSuggestion(context, type, requestCode)
}
override fun directToSuggestion(
context: Context,
type: SuggestType,
suggestHintType: String?,
content: String?,
isQaFeedback: Boolean,
qaContentId: String
) {
DirectUtils.directToSuggestion(context, type, suggestHintType, content, isQaFeedback, qaContentId)
}
override fun directToSuggestion(
context: Context,
type: SuggestType,
suggestHintType: String?,
content: String?,
game: SimpleGameEntity,
platform: String
) {
DirectUtils.directToSuggestion(context, type, suggestHintType, content, game, platform)
}
override fun directToSuggestion(context: Context, type: SuggestType, hiddenHint: String) {
DirectUtils.directToSuggestion(context, type, hiddenHint)
}
override fun init(context: Context?) {
// Do nothing

View File

@ -0,0 +1,18 @@
package com.gh.common.provider
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.gamecenter.MainActivity
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IMainProvider
@Route(path = RouteConsts.provider.mainActivity, name = "MainActivity暴露服务")
class MainProviderImpl : IMainProvider {
override fun skipToMainActivity(context: Context, position: Int) {
MainActivity.skipToMainActivity(context, position)
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -0,0 +1,18 @@
package com.gh.common.provider
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IPackagesManagerProvider
import com.gh.gamecenter.manager.PackagesManager
@Route(path = RouteConsts.provider.packagesManager, name = "PackagesManager暴露服务")
class PackagesManagerProviderImpl: IPackagesManagerProvider {
override fun isCanPluggable(gameId: String?, packageName: String?): Boolean {
return PackagesManager.isCanPluggable(gameId, packageName)
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -0,0 +1,32 @@
package com.gh.common.provider
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.common.filter.RegionSettingHelper
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.gamecenter.feature.entity.IpInfo
import com.gh.gamecenter.feature.provider.IRegionSettingHelperProvider
@Route(path = RouteConsts.provider.regionSettingHelper, name = "RegionSettingHelper暴露服务")
class RegionSettingHelperProviderImpl : IRegionSettingHelperProvider {
override fun shouldThisGameDisplayMirrorInfo(gameId: String): Boolean {
return RegionSettingHelper.shouldThisGameDisplayMirrorInfo(gameId)
}
override fun shouldThisGameShowSpecialDownload(gameId: String): Boolean {
return RegionSettingHelper.shouldThisGameShowSpecialDownload(gameId)
}
override fun filterGame(list: List<GameEntity>): ArrayList<GameEntity> {
return RegionSettingHelper.filterGame(list)
}
override fun getIpInfo(): IpInfo? {
return RegionSettingHelper.getIpInfo()
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -0,0 +1,19 @@
package com.gh.common.provider
import android.content.Context
import android.content.Intent
import android.os.Parcelable
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.gamecenter.ShellActivity
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IShellProvider
@Route(path = RouteConsts.provider.shellActivity, name = "ShellActivity暴露服务")
class ShellProviderImpl : IShellProvider {
override fun getSwitchInstallMethodIntent(context: Context, extraParcelable: Parcelable?): Intent =
ShellActivity.getIntent(context, ShellActivity.Type.SWITCH_INSTALL_METHOD, extraParcelable)
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -2,7 +2,7 @@ package com.gh.common.provider
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.common.exposure.time.TimeUtil
import com.gh.gamecenter.feature.exposure.time.TimeUtil
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.ITimeUtilProvider

View File

@ -0,0 +1,19 @@
package com.gh.common.provider
import android.content.Context
import android.os.Handler
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IUpdateManagerProvider
import com.gh.gamecenter.manager.UpdateManager
@Route(path = RouteConsts.provider.updateManager, name = "UpdateManager暴露服务")
class UpdateManagerProviderImpl: IUpdateManagerProvider {
override fun checkUpdate(context: Context, isAutoCheck: Boolean, handler: Handler) {
UpdateManager.getInstance(context).checkUpdate(isAutoCheck, handler)
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -0,0 +1,22 @@
package com.gh.common.provider
import android.content.Context
import android.os.Build
import androidx.annotation.RequiresApi
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.common.util.UsageStatsHelper
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IUsageStatsHelperProvider
@Route(path = RouteConsts.provider.usageStatsHelper, name = "UsageStatsHelper暴露服务")
class UsageStatsHelperProviderImpl : IUsageStatsHelperProvider {
@RequiresApi(Build.VERSION_CODES.LOLLIPOP_MR1)
override fun checkForPermission(): Boolean = UsageStatsHelper.checkForPermission()
override fun skipToUsageStats(context: Context, requestCode: Int) {
UsageStatsHelper.skipToUsageStats(context, requestCode)
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -0,0 +1,26 @@
package com.gh.common.provider
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IVHelperProvider
import com.gh.vspace.VHelper
@Route(path = RouteConsts.provider.vhelper, name = "VHelper暴露服务")
class VHelperProviderImpl: IVHelperProvider {
override fun getPlatformV(): String {
return VHelper.PLATFORM_V
}
override fun getVUrl(originUrl: String?): String {
return VHelper.getVUrl(originUrl)
}
override fun isVGameOn(): Boolean {
return VHelper.isVGameOn()
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -17,6 +17,24 @@ class WebProviderImpl : IWebProvider {
return WebActivity.getWebIntent(context, title, url)
}
override fun getBindWechatIntent(context: Context): Intent {
return WebActivity.getBindWechatIntent(context)
}
override fun getSecurityCertificationIntent(context: Context): Intent {
return WebActivity.getSecurityCertificationIntent(context)
}
override fun getQAIntent(
context: Context?,
url: String?,
title: String?,
isWebPageHandleBackPressed: Boolean,
qaType: Int
): Intent {
return WebActivity.getQAIntent(context, url, title, isWebPageHandleBackPressed, qaType)
}
override fun init(context: Context?) {
// Do nothing
}

View File

@ -8,8 +8,10 @@ import com.gh.gamecenter.core.provider.IWechatBindHelperProvider
@Route(path = RouteConsts.provider.wechatHelper, name = "WechatHelper暴露服务")
class WechatHelperProviderImpl : IWechatBindHelperProvider {
override fun getWechatConfig() {
WechatBindHelper.getWechatConfig()
override fun getWechatConfig(callback: (() -> Unit)?) {
WechatBindHelper.getWechatConfig {
callback?.invoke()
}
}
override fun init(context: Context?) {

View File

@ -1,57 +0,0 @@
package com.gh.common.repository
import com.gh.common.filter.RegionSettingHelper
import com.gh.common.util.ApkActiveUtils
import com.gh.gamecenter.core.utils.RandomUtils
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.retrofit.RetrofitManager
import io.reactivex.Observable
// 热门卡牌的仓库
object RemenkapaiRepository {
var remenkapaiList = arrayListOf<GameEntity>()
@JvmStatic
fun getRemenkapai(size: Int): Observable<List<GameEntity>> {
return if (remenkapaiList.isEmpty()) {
RetrofitManager.getInstance().api.remenkapai
.map(RegionSettingHelper.filterGame)
.map { gameList -> filterEntityWithoutApk(gameList) }
.map { pickRandomSizeEntity(size) }
.map(ApkActiveUtils.filterMapperList)
} else {
Observable.create { emitter -> emitter.onNext(pickRandomSizeEntity(size)) }
}
}
/**
* 选择随机数量的热门卡牌
*/
private fun pickRandomSizeEntity(size: Int): List<GameEntity> {
if (size > remenkapaiList.size) return remenkapaiList
val randomGameList = arrayListOf<GameEntity>()
val randomArray = RandomUtils.getRandomArray(size, remenkapaiList.size)
for (i in randomArray) {
randomGameList.add(remenkapaiList[i])
}
return randomGameList
}
/**
* 过滤没有 Apk 的实体
*/
private fun filterEntityWithoutApk(gameList: List<GameEntity>): List<GameEntity> {
val realGameList = arrayListOf<GameEntity>()
for (gameEntity in gameList) {
val apk = gameEntity.getApk()
if (apk.size != 0) {
realGameList.add(gameEntity)
}
}
remenkapaiList = realGameList
return remenkapaiList
}
}

View File

@ -0,0 +1,162 @@
package com.gh.common.simulator
import android.annotation.SuppressLint
import android.content.ActivityNotFoundException
import android.content.Context
import android.content.Intent
import android.graphics.Bitmap
import android.view.Gravity
import androidx.core.content.FileProvider
import com.gh.common.constant.Config
import com.gh.common.util.LogUtils
import com.gh.common.util.NewFlatLogUtils
import com.gh.gamecenter.BuildConfig
import com.gh.gamecenter.R
import com.gh.gamecenter.common.utils.*
import com.gh.gamecenter.core.utils.EmptyCallback
import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.core.utils.TimeUtils
import com.gh.gamecenter.core.utils.ToastUtils
import com.gh.gamecenter.feature.entity.GameEntity
import com.halo.assistant.HaloApp
import com.lightgame.download.DownloadEntity
import com.lightgame.utils.AppManager
import io.reactivex.Single
import java.io.ByteArrayOutputStream
import java.io.File
object NewSimulatorGameManager {
private const val KEY_GAME_ICON = "GAME_ICON"
private const val KEY_GAME_ID = "GAME_ID"
private const val KEY_GAME_NAME = "GAME_NAME"
private const val KEY_GAME_PACKAGE_NAME = "GAME_PACKAGE_NAME"
private const val KEY_GAME_PACKAGE_PATH = "GAME_PACKAGE_PATH"
private const val KEY_GAME_PACKAGE_LAST_MODIFICATION = "GAME_PACKAGE_LAST_MODIFICATION"
private const val KEY_GAME_PACKAGE_EXTENSION = "GAME_PACKAGE_EXTENSION"
private const val KEY_GAME_PACKAGE_SDCARD_PATH = "GAME_PACKAGE_SDCARD_PATH" // boolean 是否sdcard文件路径
private const val KEY_GAME_EMU_SYSTEM = "GAME_EMU_SYSTEM"
private const val KEY_EMU_ID = "EMU_ID"
private const val KEY_EMU_NAME = "EMU_NAME"
private const val KEY_USE_DEBUG_API = "USE_DEBUG_API"
private const val KEY_META = "META"
// private const val GH_RETRO_EMU_APP_PACKAGE_NAME = "com.gh.retroemu"
private const val GH_RETRO_EMU_APP_LAUNCHER_ACTIVITY_NAME = "com.gh.retroemu.ui.SplashActivity"
private const val NEW_SIMULATOR_SHOW_ALERT_TAG = "-news-simulator-show-alert"
/**
* 后台模拟器管理上传新版本模拟器(显示状态),且检测用户有安装旧版本模拟器 每日弹出一次更新弹框
*/
@JvmStatic
fun shouldShowUpdateNewSimulatorAlert(context: Context): Boolean {
val isUploadNewsSimulator = Config.getNewSimulatorEntitySetting()?.active ?: false
val isInstallOld = SimulatorGameManager.isOldSimulatorInstalled(context)
val showAlertTag = SPUtils.getString(NEW_SIMULATOR_SHOW_ALERT_TAG, "")
val todayIsShow = showAlertTag == TimeUtils.getToday()//当天是否弹出过一次
val isInstalledNewSimulator = SimulatorGameManager.isNewSimulatorInstalled(context)
return (isUploadNewsSimulator && !todayIsShow && isInstallOld && !isInstalledNewSimulator)
}
/**
* 弹出更新弹框
*/
@JvmStatic
fun showUpdateNewsSimulator(context: Context, callback: EmptyCallback? = null){
NewFlatLogUtils.logSimulatorUpdateAlertShow()
DialogHelper.showDialog(
context,
"更新提示",
"光环助手近期对模拟器进行升级,优化游戏体验!\n但更新后可能会导致原先的游戏存档数据无法使用(可在模拟器管理中安装新版本模拟器)",
"更新",
"取消",
confirmClickCallback = {
NewFlatLogUtils.logSimulatorUpdateAlertClick("更新")
val simulator = Config.getNewSimulatorEntitySetting()
if (simulator != null) {
SimulatorDownloadManager.getInstance().showDownloadingDialog(context, simulator)
}
},
cancelClickCallback = {
callback?.onCallback()
NewFlatLogUtils.logSimulatorUpdateAlertClick("取消")
},
uiModificationCallback = { binding ->
binding.contentTv.gravity = Gravity.START
binding.contentTv.setTextColor(R.color.text_subtitle.toColor(context))
},
extraConfig = DialogHelper.Config(centerTitle = true, centerContent = true)
)
SPUtils.setString(NEW_SIMULATOR_SHOW_ALERT_TAG, TimeUtils.getToday())
}
/**
* 通过模拟器启动游戏
*/
@SuppressLint("CheckResult")
@JvmStatic
fun launchGameViaSimulator(downloadEntity: DownloadEntity, gameEntity: GameEntity) {
val newSimulator = Config.getNewSimulatorEntitySetting() ?: return
val gameIcon = gameEntity.icon ?: gameEntity.rawIcon ?: ""
Single.just(ImageUtils.getCachedUrl(gameIcon))
.flatMap {
SimulatorGameManager.getBitmapFormCache(it)
}.map {
BitmapUtils.compressBitmap(it, 100)
}.map {
val baos = ByteArrayOutputStream()
it.compress(Bitmap.CompressFormat.WEBP, 90, baos)
baos.toByteArray()
}
.compose(singleToMain())
.subscribe({
val gamePackageFileUri = FileProvider.getUriForFile(
HaloApp.getInstance(),
BuildConfig.APPLICATION_ID,
File(downloadEntity.path)
)
HaloApp.getInstance().grantUriPermission(
SimulatorGameManager.NEW_SIMULATOR_PACKAGE_NAME,
gamePackageFileUri,
Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION or
Intent.FLAG_GRANT_READ_URI_PERMISSION or
Intent.FLAG_GRANT_WRITE_URI_PERMISSION // 冗余,以备不时之需
)
val intent = Intent()
intent.setClassName(SimulatorGameManager.NEW_SIMULATOR_PACKAGE_NAME, GH_RETRO_EMU_APP_LAUNCHER_ACTIVITY_NAME)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
intent.data = gamePackageFileUri
gameEntity.getApk().safelyGetInRelease(0)?.let { apk ->
intent.putExtra(KEY_GAME_PACKAGE_NAME, apk.packageName)
intent.putExtra(KEY_GAME_PACKAGE_EXTENSION, apk.format)
}
intent.putExtra(KEY_GAME_NAME, downloadEntity.name)
intent.putExtra(KEY_GAME_ICON, it)
intent.putExtra(KEY_GAME_PACKAGE_PATH, downloadEntity.path) // 游戏包文件路径,冗余参数)
intent.putExtra(KEY_GAME_PACKAGE_SDCARD_PATH, true)
intent.putExtra(KEY_GAME_PACKAGE_LAST_MODIFICATION, File(downloadEntity.path).lastModified()) // 游戏包文件修改时间
intent.putExtra(KEY_GAME_EMU_SYSTEM, gameEntity.simulatorType) // 模拟器类型
intent.putExtra(KEY_GAME_ID, gameEntity.id)
// TODO 补充光环模拟器的游戏 id
intent.putExtra(KEY_EMU_ID, newSimulator.apk?.id) // 光环模拟器.apk gameId
intent.putExtra(KEY_EMU_NAME, "光环模拟器") // 光环模拟器.apk name
intent.putExtra(KEY_USE_DEBUG_API, EnvHelper.isDevEnv) // // 游戏来源是否为dev后台 (是否来源于测试环境)
intent.putExtra(KEY_META, LogUtils.getMetaObject().toString())
try {
AppManager.getInstance().recentActiveActivity?.startActivity(intent)
} catch (e: ActivityNotFoundException) {
ToastUtils.showToast("模拟器安装错误")
}
SimulatorGameManager.recordPlaySimulatorGames(gameEntity.id)
}, {
ToastUtils.showToast("跳转失败")
})
}
}

View File

@ -8,8 +8,8 @@ import android.widget.ProgressBar
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import androidx.constraintlayout.widget.ConstraintLayout
import com.g00fy2.versioncompare.Version
import com.gh.common.util.LogUtils
import com.gh.common.util.NewFlatLogUtils
import com.gh.common.util.PackageInstaller
import com.gh.common.util.PackageUtils
import com.gh.download.DownloadManager
@ -19,8 +19,8 @@ import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.common.utils.*
import com.gh.gamecenter.core.AppExecutor.uiExecutor
import com.gh.gamecenter.core.utils.*
import com.gh.gamecenter.entity.ApkEntity
import com.gh.gamecenter.entity.SimulatorEntity
import com.gh.gamecenter.feature.entity.ApkEntity
import com.gh.gamecenter.feature.entity.SimulatorEntity
import com.gh.gamecenter.entity.TrackableEntity
import com.halo.assistant.HaloApp
import com.lightgame.download.*
@ -138,7 +138,6 @@ class SimulatorDownloadManager private constructor() {
) {
if (context == null) return
mContextRef = WeakReference(context)
this.simulatorLocation = location
this.simulator = simulator
this.gameId = gameId
@ -146,26 +145,46 @@ class SimulatorDownloadManager private constructor() {
PermissionHelper.checkGetInstalledAppsListBeforeAction(context, object : EmptyCallback {
override fun onCallback() {
//判断是否隐藏
if (simulator?.active == false) {
val isInstalledNewSimulator =
SimulatorGameManager.isNewSimulatorInstalled(HaloApp.getInstance().application)
//当没有安装新版本模拟器时候 判断是否隐藏
if (simulator?.active == false && !isInstalledNewSimulator) {
showNoneEmulatorDialog(context)
return
}
val isInstalled = PackageUtils.isInstalledFromAllPackage(context, simulator?.apk?.packageName)
val versionFromInstalledApp = PackageUtils.getVersionNameByPackageName(simulator?.apk?.packageName)
val shouldShowUpdate = Version(simulator?.apk?.version).isHigherThan(versionFromInstalledApp)
var isInstalled = PackageUtils.isInstalledFromAllPackage(
context,
simulator?.apk?.packageName
)
//模拟器管理界面还是用之前的逻辑
if (isInstalledNewSimulator && location != SimulatorLocation.SIMULATOR_MANAGE) {
isInstalled = isInstalledNewSimulator
}
// val versionFromInstalledApp = PackageUtils.getVersionNameByPackageName(simulator?.apk?.packageName)
val shouldShowUpdate =
PackageUtils.isInstalledApkMatchedMd5(simulator?.apk?.packageName, simulator?.apk?.md5)
val showAlertTag = SPUtils.getString(SimulatorGameManager.SIMULATOR_UPDATE_SHOW_ALERT_TAG, "") //当天是否弹过
val todayIsShow = showAlertTag == TimeUtils.getToday()
downloadType = if (shouldShowUpdate && isInstalled) "update" else "download"
if (downloadType == "update" && todayIsShow && location != SimulatorLocation.SIMULATOR_MANAGE) {
return
}
if (downloadType == "download" && isInstalled) {
return
}
val title = if (shouldShowUpdate && isInstalled) "更新模拟器" else "安装模拟器"
val message = if (shouldShowUpdate && isInstalled) "检测到模拟器存在更高版本,是否前往更新" else "模拟器游戏需要先下载安装对应的模拟器,才可以运行"
val positiveText =
if (shouldShowUpdate && isInstalled) "更新(${simulator?.apk?.size}" else "下载(${simulator?.apk?.size}"
val negativeText = if (shouldShowUpdate && isInstalled) "下次再说" else "取消"
downloadType = if (shouldShowUpdate && isInstalled) "update" else "download"
val trackableEntity = TrackableEntity(
"模拟器下载",
key = if (shouldShowUpdate && isInstalled) "更新弹窗" else "下载弹窗",
logShowEvent = true
)
if (shouldShowUpdate && isInstalled) {
NewFlatLogUtils.logSimulatorUpdateAlertShow()
}
DialogHelper.showDialog(
context,
title,
@ -176,11 +195,13 @@ class SimulatorDownloadManager private constructor() {
cancelClickCallback = {
if (shouldShowUpdate && isInstalled) {
cancelCallback?.invoke()
NewFlatLogUtils.logSimulatorUpdateAlertClick("取消")
MtaHelper.onEvent(trackableEntity.event, trackableEntity.key, "点击下次再说")
}
},
confirmClickCallback = {
showDownloadingDialog(context, simulator)
NewFlatLogUtils.logSimulatorUpdateAlertClick("更新")
MtaHelper.onEvent(
trackableEntity.event,
trackableEntity.key,
@ -190,11 +211,15 @@ class SimulatorDownloadManager private constructor() {
mtaEvent = trackableEntity.event, mtaKey = trackableEntity.key,
extraConfig = DialogHelper.Config(centerTitle = true, centerContent = true)
)
if (downloadType == "update" && location != SimulatorLocation.SIMULATOR_MANAGE) {
SPUtils.setString(SimulatorGameManager.SIMULATOR_UPDATE_SHOW_ALERT_TAG, TimeUtils.getToday())
}
}
})
}
private fun showDownloadingDialog(context: Context, simulator: SimulatorEntity?) {
fun showDownloadingDialog(context: Context, simulator: SimulatorEntity?) {
mContextRef = WeakReference(context)
val msg = FileUtils.isCanDownload(context, simulator?.apk?.size)
if (!msg.isNullOrEmpty()) {
Utils.toast(context, msg)

View File

@ -2,12 +2,13 @@ package com.gh.common.simulator
import android.annotation.SuppressLint
import android.content.ActivityNotFoundException
import android.content.Context
import android.content.Intent
import android.graphics.Bitmap
import android.net.Uri
import android.text.TextUtils
import com.g00fy2.versioncompare.Version
import com.gh.common.util.ApkActiveUtils
import com.gh.common.constant.Config
import com.gh.gamecenter.feature.utils.ApkActiveUtils
import com.gh.common.util.LogUtils
import com.gh.common.util.PackageUtils
import com.gh.download.DownloadManager
@ -17,10 +18,12 @@ import com.gh.gamecenter.common.retrofit.BiResponse
import com.gh.gamecenter.common.retrofit.EmptyResponse
import com.gh.gamecenter.common.retrofit.Response
import com.gh.gamecenter.common.utils.*
import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.core.utils.TimeUtils
import com.gh.gamecenter.core.utils.ToastUtils
import com.gh.gamecenter.core.utils.UrlFilterUtils
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.entity.SimulatorGameRecordEntity
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.gamecenter.feature.entity.SimulatorGameRecordEntity
import com.gh.gamecenter.login.user.UserManager
import com.gh.gamecenter.retrofit.RetrofitManager
import com.gh.gamecenter.room.AppDatabase
@ -36,13 +39,48 @@ import okhttp3.ResponseBody
import org.json.JSONArray
import java.io.ByteArrayOutputStream
import java.io.File
import java.util.*
object SimulatorGameManager {
private val gamePath by lazy { FileUtils.getDownloadPath(HaloApp.getInstance().application, "emulator_game") }
private val mGamePath by lazy { FileUtils.getDownloadPath(HaloApp.getInstance().application, "emulator_game") }
const val SIMULATOR_UPDATE_SHOW_ALERT_TAG = "simulator-update-show-alert"
private val mSimulatorPackageNames by lazy {
listOf(
"com.gh.fbnemu",
"com.gh.mame4droid",
"com.gh.nesemu",
"com.gh.ppsspp",
"com.gh.gbaemu",
"com.gh.gbcemu",
"com.gh.snes9xplus"
)
}
const val NEW_SIMULATOR_PACKAGE_NAME = "com.gh.retroemu" //新版本模拟器包名
@JvmStatic
fun getPathByType(type: String) = "${gamePath}/${type}"
//是否安装了新模拟器
fun isNewSimulatorInstalled(context: Context?): Boolean {
return PackageUtils.isInstalledFromAllPackage(context, NEW_SIMULATOR_PACKAGE_NAME)
}
@JvmStatic
//是否安装了旧模拟器
fun isOldSimulatorInstalled(context: Context?): Boolean {
for (packageName in mSimulatorPackageNames) {
if (PackageUtils.isInstalledFromAllPackage(context, packageName)) {
return true
}
}
return false
}
@JvmStatic
fun getPathByType(type: String) = "${mGamePath}/${type}"
@JvmStatic
fun deleteLocalGames(names: List<String>) {
@ -90,16 +128,33 @@ object SimulatorGameManager {
@JvmStatic
fun launchSimulatorGame(downloadEntity: DownloadEntity, gameEntity: GameEntity) {
val versionFromInstalledApp = PackageUtils.getVersionNameByPackageName(gameEntity.simulator?.apk?.packageName)
val shouldShowUpdate = Version(gameEntity.simulator?.apk?.version).isHigherThan(versionFromInstalledApp)
val isInstalledNewSimulator = isNewSimulatorInstalled(HaloApp.getInstance().application)
var packageName = gameEntity.simulator?.apk?.packageName
var simulator = gameEntity.simulator
if (isInstalledNewSimulator) {
packageName = NEW_SIMULATOR_PACKAGE_NAME
if (Config.getNewSimulatorEntitySetting() == null) {
return
}
simulator = Config.getNewSimulatorEntitySetting()
}
// val version = simulator?.apk?.version
// val versionFromInstalledApp = PackageUtils.getVersionNameByPackageName(packageName)
val shouldShowUpdate = PackageUtils.isInstalledApkMatchedMd5(packageName, simulator?.apk?.md5)
updateSimulatorConfigFile(gameId = gameEntity.id)
if (shouldShowUpdate) {
SimulatorDownloadManager.getInstance().showDownloadDialog(
AppManager.getInstance().recentActiveActivity, gameEntity.simulator,
SimulatorDownloadManager.SimulatorLocation.LAUNCH, gameEntity.id, gameEntity.name
?: ""
) {
val showAlertTag = SPUtils.getString(SIMULATOR_UPDATE_SHOW_ALERT_TAG, "")
val todayIsShow = showAlertTag == TimeUtils.getToday() //当天是否弹过
if (!todayIsShow) {
SimulatorDownloadManager.getInstance().showDownloadDialog(
AppManager.getInstance().recentActiveActivity, simulator,
SimulatorDownloadManager.SimulatorLocation.LAUNCH, gameEntity.id, gameEntity.name
?: ""
) {
jumpToSimulator(downloadEntity, gameEntity)
}
} else {
jumpToSimulator(downloadEntity, gameEntity)
}
} else {
@ -109,6 +164,11 @@ object SimulatorGameManager {
@SuppressLint("CheckResult")
private fun jumpToSimulator(downloadEntity: DownloadEntity, gameEntity: GameEntity) {
val isInstalledNewSimulator = isNewSimulatorInstalled(HaloApp.getInstance().application)
if (isInstalledNewSimulator){
NewSimulatorGameManager.launchGameViaSimulator(downloadEntity,gameEntity)
return
}
val gameIcon = gameEntity.icon ?: gameEntity.rawIcon ?: ""
Single.just(ImageUtils.getCachedUrl(gameIcon))
.flatMap {
@ -152,7 +212,7 @@ object SimulatorGameManager {
})
}
private fun getBitmapFormCache(url: String): Single<Bitmap> {
fun getBitmapFormCache(url: String): Single<Bitmap> {
return Single.create {
ImageUtils.getBitmap(url, object : BiCallback<Bitmap, Boolean> {
override fun onFirst(first: Bitmap) {

View File

@ -4,25 +4,17 @@ import android.net.Uri
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.common.constant.EntranceConsts
import com.gh.gamecenter.common.utils.EnvHelper
import com.gh.gamecenter.common.utils.tryWithDefaultCatch
import com.gh.gamecenter.core.GHThreadFactory
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
/**
* 活动相关数据统计辅助类
*/
object ActivityCountHelper {
private val ACTIVITY_URL_COMMON_PREF =
if (EnvHelper.isDevEnv) Constants.ACTIVITY_DETAIL_ADDRESS_DEV else Constants.ACTIVITY_DETAIL_ADDRESS
private var mStayTimeCount = 0
private var mIsStayTimeCountEnabled = false
private var mStayTimeArray = arrayOf(5, 10, 20, 40, 80, 160)
private const val MAX_STAY_TIME = 320
private val mThreadService: ExecutorService by lazy {
Executors.newSingleThreadExecutor(GHThreadFactory("STAY_TIME_THREAD"))
private val ACTIVITY_URL_COMMON_PREF by lazy {
if (EnvHelper.isDevEnv) Constants.ACTIVITY_DETAIL_ADDRESS_DEV else Constants.ACTIVITY_DETAIL_ADDRESS
}
private var mStayTimeArray = arrayOf(5, 10, 20, 40, 80, 160)
@JvmStatic
fun postActivityPageEnter(url: String?, entrance: String) {
@ -45,34 +37,20 @@ object ActivityCountHelper {
}
}
fun startCountStayTime(url: String) {
fun handleStayTime(url: String, stayTime: Int) {
if (url.contains(ACTIVITY_URL_COMMON_PREF)) {
val uri = Uri.parse(url)
val activityId = uri.getQueryParameter("id") ?: return
mIsStayTimeCountEnabled = true
mThreadService.execute {
while (mIsStayTimeCountEnabled) {
tryWithDefaultCatch {
mStayTimeCount++
when {
mStayTimeCount % MAX_STAY_TIME == 0 -> NewFlatLogUtils.logActivityPageView(
MAX_STAY_TIME,
activityId
)
mStayTimeArray.contains(mStayTimeCount) -> NewFlatLogUtils.logActivityPageView(
mStayTimeCount,
activityId
)
}
}
Thread.sleep(1000)
}
when {
stayTime % MAX_STAY_TIME == 0 -> NewFlatLogUtils.logActivityPageView(
MAX_STAY_TIME,
activityId
)
mStayTimeArray.contains(stayTime) -> NewFlatLogUtils.logActivityPageView(
stayTime,
activityId
)
}
}
}
fun endCountStayTime() {
mIsStayTimeCountEnabled = false
mStayTimeCount = 0
}
}

View File

@ -1,15 +1,15 @@
package com.gh.common.util
import android.annotation.SuppressLint
import androidx.lifecycle.MutableLiveData
import com.gh.common.constant.Config
import com.gh.gamecenter.common.utils.NetworkUtils
import com.gh.gamecenter.entity.SettingsEntity
import com.gh.gamecenter.common.retrofit.Response
import com.gh.gamecenter.common.utils.ImageUtils
import com.gh.gamecenter.common.utils.observableToMain
import com.gh.gamecenter.core.utils.DisplayUtils
import com.gh.gamecenter.entity.NewApiSettingsEntity
import com.gh.gamecenter.entity.StartupAdEntity
import com.gh.gamecenter.common.retrofit.BiResponse
import com.gh.gamecenter.feature.entity.SettingsEntity
import com.gh.gamecenter.retrofit.RetrofitManager
import com.halo.assistant.HaloApp
import io.reactivex.schedulers.Schedulers
object AdHelper {
@ -19,24 +19,40 @@ object AdHelper {
const val LOCATION_SUGGESTION_FUNCTION = "suggestion_function"
const val LOCATION_SIMULATOR_GAME = "simulator_game"
@JvmField
var startupAd = MutableLiveData<StartupAdEntity>()
@JvmStatic
fun getStartUpAd(): StartupAdEntity? {
return Config.getNewApiSettingsEntity()?.startAd
}
@JvmStatic
@SuppressLint("CheckResult")
fun getStartUpAd() {
if (!NetworkUtils.isNetworkConnected(HaloApp.getInstance())) {
startupAd.postValue(null)
return
}
fun getStartUp(): StartupAdEntity? {
return Config.getNewApiSettingsEntity()?.startup
}
RetrofitManager.getInstance()
.api
.getSplashAd(HaloApp.getInstance().channel)
.subscribeOn(Schedulers.io())
.subscribe(object : BiResponse<StartupAdEntity>() {
override fun onSuccess(data: StartupAdEntity) {
startupAd.postValue(data)
@JvmStatic
fun prefetchStartUpAd(settingsEntity: NewApiSettingsEntity) {
if (settingsEntity.startAd != null && !settingsEntity.startAd?.img.isNullOrEmpty()) {
val screenWidth = DisplayUtils.getScreenWidth()
val transformedUrl = ImageUtils.getTransformedUrl(settingsEntity.startAd?.img, screenWidth) ?: return
ImageUtils.prefetchToDiskCache(transformedUrl)
}
}
fun getSettingAdCache() {
RetrofitManager.getInstance().newApi
.getSettingAdCache(HaloApp.getInstance().channel)
.compose(observableToMain())
.subscribe(object : Response<NewApiSettingsEntity>() {
override fun onResponse(response: NewApiSettingsEntity?) {
super.onResponse(response)
val settings = Config.getNewApiSettingsEntity()
if (settings != null) {
settings.startAd = response?.startAd
Config.updateNewApiSettings(settings)
if (response != null) {
prefetchStartUpAd(response)
}
}
}
})
}

View File

@ -0,0 +1,253 @@
package com.gh.common.util
import android.app.Dialog
import android.content.Context
import android.view.View
import android.view.Window
import android.widget.TextView
import androidx.fragment.app.Fragment
import com.gh.download.simple.AutoUnregisteredSimpleDownloadListener
import com.gh.download.simple.DownloadListener
import com.gh.gamecenter.R
import com.gh.gamecenter.common.eventbus.EBReuse
import com.gh.gamecenter.common.utils.DialogHelper
import com.gh.gamecenter.common.utils.dip2px
import com.gh.gamecenter.common.utils.roundTo
import com.gh.gamecenter.common.utils.toResString
import com.gh.gamecenter.core.runOnUiThread
import com.gh.gamecenter.core.utils.DisplayUtils
import com.gh.gamecenter.core.utils.ToastUtils
import com.gh.gamecenter.databinding.DialogArchiveLoadingBinding
import com.gh.gamecenter.entity.ArchiveEntity
import com.gh.gamecenter.retrofit.RetrofitManager
import com.gh.vspace.VArchiveHelper
import com.gh.vspace.VHelper
import com.lg.download.DownloadError
import com.lg.download.DownloadStatus
import io.reactivex.schedulers.Schedulers
import org.greenrobot.eventbus.EventBus
import splitties.systemservices.layoutInflater
/**
* 云存档下载按钮辅助类
*/
object ArchiveDownloadButtonHelper {
fun bindItem(
context: Context,
entrance: String,
fragment: Fragment,
packageName: String,
archiveEntity: ArchiveEntity,
downloadBtn: TextView,
downloadCompletedListener: (() -> Unit)? = null
) {
downloadBtn.text = if (VArchiveHelper.isArchiveDownloaded(archiveEntity.md5)) {
R.string.archive_apply.toResString()
} else {
R.string.archive_download.toResString()
}
downloadBtn.setOnClickListener {
when {
// 检查是否已安装畅玩助手
!VHelper.isVSpaceInstalled(context) -> showVspaceTipDialog(context)
// 检查是否已安装游戏
!VHelper.isInstalled(packageName) -> {
// 检查游戏是否在安装中
if (!VHelper.isInstalling(packageName)) {
showDownloadTipDialog(context)
} else {
ToastUtils.toast("游戏正在安装中,请稍候")
}
}
// 检查本地是否已下载存档
VArchiveHelper.isArchiveDownloaded(archiveEntity.md5) -> showApplyArchiveTipDialog(
context,
entrance,
packageName,
archiveEntity
)
// 检查完毕下载存档
else -> downloadArchive(
context,
entrance,
fragment,
packageName,
archiveEntity,
downloadBtn,
downloadCompletedListener
)
}
}
}
private fun showVspaceTipDialog(context: Context) {
NewFlatLogUtils.logCloudArchiveVSpaceDownloadDialogShow()
DialogHelper.showDialog(
context,
R.string.archive_dialog_title.toResString(),
R.string.archive_vspace_dialog_content.toResString(),
R.string.archive_vspace_dialog_confirm.toResString(),
R.string.cancel.toResString(),
{
NewFlatLogUtils.logCloudArchiveVSpaceDownloadDialogClick(R.string.archive_vspace_dialog_confirm.toResString())
VHelper.showVspaceDialog(context)
},
{
NewFlatLogUtils.logCloudArchiveVSpaceDownloadDialogClick(R.string.cancel.toResString())
},
extraConfig = DialogHelper.Config(centerTitle = true, centerContent = true)
)
}
private fun showDownloadTipDialog(context: Context) {
NewFlatLogUtils.logCloudArchiveGameDownloadDialogShow()
DialogHelper.showDialog(
context,
R.string.archive_dialog_title.toResString(),
R.string.archive_download_dialog_content.toResString(),
R.string.archive_download_dialog_confirm.toResString(),
R.string.cancel.toResString(),
{
NewFlatLogUtils.logCloudArchiveGameDownloadDialogClick(R.string.archive_download_dialog_confirm.toResString())
VHelper.disableLaunchGameAfterInstallation()
EventBus.getDefault().post(EBReuse("download"))
},
{
NewFlatLogUtils.logCloudArchiveGameDownloadDialogClick(R.string.cancel.toResString())
},
extraConfig = DialogHelper.Config(centerTitle = true, centerContent = true)
)
}
private fun applyArchive(
context: Context,
entrance: String,
packageName: String,
archiveEntity: ArchiveEntity
) {
VArchiveHelper.getArchiveFile(archiveEntity.md5)?.run {
RetrofitManager.getInstance().newApi
.postArchiveUsage(archiveEntity.gameId, archiveEntity.id)
.subscribeOn(Schedulers.io())
.subscribe()
VArchiveHelper.applyGameArchive(context, packageName, this) { packageName, isSuccess ->
runOnUiThread {
if (isSuccess) {
VHelper.launch(context, packageName)
} else {
ToastUtils.toast(R.string.archive_apply_fail.toResString())
}
}
}
}
NewFlatLogUtils.logCloudArchiveDownloadOrApply(archiveEntity.name, entrance)
}
private fun downloadArchive(
context: Context,
entrance: String,
fragment: Fragment,
packageName: String,
archiveEntity: ArchiveEntity,
downloadBtn: TextView,
downloadCompletedListener: (() -> Unit)? = null
) {
// 执行下载
VArchiveHelper.downloadArchive(archiveEntity)
// 下载进度弹窗
val archiveLoadingDialog = Dialog(context, R.style.DialogWindowTransparent)
val archiveLoadingBinding = DialogArchiveLoadingBinding.inflate(context.layoutInflater)
showArchiveLoadingDialog(archiveLoadingDialog, archiveLoadingBinding.root)
// 下载进度监听
AutoUnregisteredSimpleDownloadListener(archiveEntity.id, fragment, object : DownloadListener {
override fun onError(error: DownloadError) {
dismissArchiveLoadingDialog(archiveLoadingDialog)
ToastUtils.toast(R.string.archive_download_fail.toResString())
}
override fun onProgress(progress: Float) {
archiveLoadingBinding.run {
progressTv.text = "${progress.roundTo(1)}%"
progressBar.progress = progress.toInt()
}
}
override fun onSizeReceived(fileSize: Long) {
// Do nothing
}
override fun onStatusChanged(status: DownloadStatus) {
when (status) {
DownloadStatus.COMPLETED -> {
dismissArchiveLoadingDialog(archiveLoadingDialog)
downloadBtn.text = R.string.archive_apply.toResString()
showApplyArchiveTipDialog(context, entrance, packageName, archiveEntity)
downloadCompletedListener?.invoke()
}
else -> {
// Do nothing
}
}
}
override fun onSpeedChanged(speed: Float) {
// Do nothing
}
})
NewFlatLogUtils.logCloudArchiveDownloadOrApply(archiveEntity.name, entrance)
}
private fun showArchiveLoadingDialog(
archiveLoadingDialog: Dialog,
contentView: View
) {
archiveLoadingDialog.run {
setCancelable(false)
setCanceledOnTouchOutside(false)
requestWindowFeature(Window.FEATURE_NO_TITLE)
setContentView(contentView)
show()
}
archiveLoadingDialog.window?.attributes?.apply {
width = DisplayUtils.getScreenWidth() - 120F.dip2px()
archiveLoadingDialog.window?.attributes = this
}
}
private fun showApplyArchiveTipDialog(
context: Context,
entrance: String,
packageName: String,
archiveEntity: ArchiveEntity
) {
DialogHelper.showDialog(
context,
R.string.archive_dialog_title.toResString(),
R.string.archive_apply_dialog_content.toResString(),
R.string.archive_apply.toResString(),
R.string.cancel.toResString(),
{
applyArchive(context, entrance, packageName, archiveEntity)
NewFlatLogUtils.logCloudArchiveApplyDialogRelated("cloud_save_overwrite_dialog_click", "使用")
},
{ NewFlatLogUtils.logCloudArchiveApplyDialogRelated("cloud_save_overwrite_dialog_click", "取消") },
extraConfig = DialogHelper.Config(centerTitle = true)
)
NewFlatLogUtils.logCloudArchiveApplyDialogRelated("cloud_save_overwrite_dialog_show")
}
private fun dismissArchiveLoadingDialog(archiveLoadingDialog: Dialog) {
if (archiveLoadingDialog.isShowing) {
archiveLoadingDialog.dismiss()
}
}
}

View File

@ -9,19 +9,19 @@ import android.view.View
import android.view.Window
import androidx.core.widget.doOnTextChanged
import androidx.recyclerview.widget.LinearLayoutManager
import com.gh.gamecenter.core.utils.CurrentActivityHolder
import com.gh.gamecenter.common.json.json
import com.gh.gamecenter.common.view.VerticalItemDecoration
import com.gh.gamecenter.R
import com.gh.gamecenter.SuggestionActivity
import com.gh.gamecenter.adapter.ReportReasonAdapter
import com.gh.gamecenter.core.utils.ToastUtils
import com.gh.gamecenter.common.constant.CommonConsts
import com.gh.gamecenter.common.json.json
import com.gh.gamecenter.common.retrofit.BiResponse
import com.gh.gamecenter.common.utils.toColor
import com.gh.gamecenter.common.utils.toObject
import com.gh.gamecenter.common.utils.toRequestBody
import com.gh.gamecenter.common.view.VerticalItemDecoration
import com.gh.gamecenter.core.utils.CurrentActivityHolder
import com.gh.gamecenter.core.utils.ToastUtils
import com.gh.gamecenter.databinding.DialogReportReasonBinding
import com.gh.gamecenter.entity.SettingsEntity
import com.gh.gamecenter.common.retrofit.BiResponse
import com.gh.gamecenter.feature.entity.SettingsEntity
import com.gh.gamecenter.retrofit.RetrofitManager
import com.halo.assistant.HaloApp
import io.reactivex.android.schedulers.AndroidSchedulers
@ -35,7 +35,7 @@ object BbsReportHelper {
fun showReportDialog(contentId: String) {
val sp = PreferenceManager.getDefaultSharedPreferences(HaloApp.getInstance())
val suggestion: SettingsEntity.Suggestion? =
sp.getString(SuggestionActivity.SUGGESTION_HINT_TYPE, null)?.toObject()
sp.getString(CommonConsts.SUGGESTION_HINT_TYPE, null)?.toObject()
val reportList = suggestion?.report ?: return
CurrentActivityHolder.getCurrentActivity()?.apply {

View File

@ -1,131 +0,0 @@
package com.gh.common.util
import android.annotation.SuppressLint
import android.app.Activity
import android.app.Application
import android.os.Bundle
import com.gh.gamecenter.core.utils.CurrentActivityHolder
import com.gh.gamecenter.core.GHThreadFactory
import com.gh.gamecenter.MainActivity
import com.gh.gamecenter.core.utils.ToastUtils
import com.gh.gamecenter.common.utils.isPublishEnv
import com.gh.gamecenter.common.utils.tryWithDefaultCatch
import com.gh.gamecenter.forum.detail.ForumDetailActivity
import com.gh.gamecenter.qa.article.detail.ArticleDetailActivity
import com.gh.gamecenter.qa.comment.CommentActivity
import com.gh.gamecenter.qa.questions.newdetail.NewQuestionDetailActivity
import com.gh.gamecenter.qa.video.detail.ForumVideoDetailActivity
import com.gh.gamecenter.common.retrofit.BiResponse
import com.gh.gamecenter.retrofit.RetrofitManager
import com.halo.assistant.HaloApp
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import okhttp3.ResponseBody
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
object BbsStayTimeHelper {
private var mStayTimeCount = 0
private var mIsStayTimeCountEnabled = false // 论坛停留时间统计是否开启
private var mStayTimeTimeout = 30
private var mIsStayTimeCountValid = false // 论坛停留时间统计是否有效
const val IS_BBS_CONTENT_VISIBLE = "is_bbs_content_visible"
private val mThreadService: ExecutorService by lazy {
Executors.newSingleThreadExecutor(GHThreadFactory("STAY_TIME_THREAD"))
}
private val mActivityLifecycleCallbacks by lazy {
object : Application.ActivityLifecycleCallbacks {
override fun onActivityCreated(activity: Activity, savedInstanceState: Bundle?) {}
override fun onActivityStopped(activity: Activity) {}
override fun onActivitySaveInstanceState(activity: Activity, outState: Bundle) {}
override fun onActivityDestroyed(activity: Activity) {}
override fun onActivityStarted(activity: Activity) {}
override fun onActivityResumed(activity: Activity) {
if (isTopActivityBbsRelated(activity) && mIsStayTimeCountEnabled) {
resumeTimeCount()
}
}
override fun onActivityPaused(activity: Activity) {
if (isTopActivityBbsRelated(activity) && mIsStayTimeCountEnabled) {
pauseTimeCount()
}
}
}
}
fun enableStayTimeCount(timeout: Int) {
mIsStayTimeCountEnabled = true
mStayTimeTimeout = timeout
resumeTimeCount()
HaloApp.getInstance().registerActivityLifecycleCallbacks(mActivityLifecycleCallbacks)
}
fun disableStayTimeCount() {
mIsStayTimeCountEnabled = false
mStayTimeCount = 0
HaloApp.getInstance().unregisterActivityLifecycleCallbacks(mActivityLifecycleCallbacks)
}
fun resumeTimeCount() {
if (!mIsStayTimeCountEnabled) return
mIsStayTimeCountValid = true
mThreadService.execute {
while (mIsStayTimeCountEnabled && mIsStayTimeCountValid) {
val topActivity = CurrentActivityHolder.getCurrentActivity() ?: continue
if (isTopActivityBbsRelated(topActivity)) {
tryWithDefaultCatch {
mStayTimeCount++
if (mStayTimeCount >= mStayTimeTimeout) {
postExploreFinish()
}
}
}
Thread.sleep(1000)
}
}
}
fun pauseTimeCount() {
if (!mIsStayTimeCountEnabled) return
mIsStayTimeCountValid = false
}
private fun isTopActivityBbsRelated(activity: Activity): Boolean {
return (activity is MainActivity && activity.intent.extras?.getBoolean(IS_BBS_CONTENT_VISIBLE) == true)
|| activity is ForumDetailActivity
|| activity is ArticleDetailActivity
|| activity is ForumVideoDetailActivity
|| activity is CommentActivity
|| activity is NewQuestionDetailActivity
}
@SuppressLint("CheckResult")
private fun postExploreFinish() {
RetrofitManager.getInstance()
.api
.postExplorerFinish()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(object : BiResponse<ResponseBody>() {
override fun onSuccess(data: ResponseBody) {
if (!isPublishEnv()) {
ToastUtils.toast("完成了论坛停留任务(仅测试环境有这个 toast 不要慌)")
}
disableStayTimeCount()
}
})
}
}

View File

@ -1,11 +1,9 @@
package com.gh.common.util
import android.content.Context
import com.gh.gamecenter.eventbus.EBCollectionChanged
import com.gh.gamecenter.login.user.UserManager
import com.gh.gamecenter.common.retrofit.Response
import com.gh.gamecenter.retrofit.RetrofitManager
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import okhttp3.ResponseBody
@ -19,18 +17,16 @@ import retrofit2.HttpException
object CollectionUtils {
enum class CollectionType {
toolkit, article, answer, communityArticle
TOOLKIT, ARTICLE, ANSWER, COMMUNITY_ARTICLE
}
fun postCollection(context: Context, content: String, type: CollectionType, listener: OnCollectionListener) {
fun postCollection(content: String, type: CollectionType, listener: OnCollectionListener) {
val api = RetrofitManager.getInstance().api
val postCollection = when (type) {
CollectionType.article -> RetrofitManager.getInstance().getApi()
.postCollectionArticle(UserManager.getInstance().userId, content)
CollectionType.toolkit -> RetrofitManager.getInstance().getApi()
.postCollectionTools(UserManager.getInstance().userId, content)
CollectionType.answer -> RetrofitManager.getInstance().getApi()
.postCollectionAnswer(UserManager.getInstance().userId, content)
CollectionType.ARTICLE -> api.postCollectionArticle(UserManager.getInstance().userId, content)
CollectionType.TOOLKIT -> api.postCollectionTools(UserManager.getInstance().userId, content)
CollectionType.ANSWER -> api.postCollectionAnswer(UserManager.getInstance().userId, content)
else -> return
}
postCollection
@ -47,7 +43,7 @@ object CollectionUtils {
super.onFailure(e)
if (e != null) {
try {
val string = e.response()?.errorBody()?.string()
val string = e.response()?.errorBody()?.string() ?: ""
val errorBody = JSONObject(string)
if (errorBody.getInt("code") == 403009) {
listener.onSuccess()
@ -62,16 +58,13 @@ object CollectionUtils {
})
}
fun deleteCollection(context: Context, id: String, type: CollectionType, listener: OnCollectionListener) {
fun deleteCollection(id: String, type: CollectionType, listener: OnCollectionListener) {
val api = RetrofitManager.getInstance().api
val postCollection: Observable<ResponseBody>
when (type) {
CollectionType.article -> postCollection =
RetrofitManager.getInstance().getApi().deletaCollectionArticle(UserManager.getInstance().userId, id)
CollectionType.toolkit -> postCollection =
RetrofitManager.getInstance().getApi().deleteCollectionTools(UserManager.getInstance().userId, id)
CollectionType.answer -> postCollection =
RetrofitManager.getInstance().getApi().deleteCollectionAnswer(UserManager.getInstance().userId, id)
val postCollection = when (type) {
CollectionType.ARTICLE -> api.deletaCollectionArticle(UserManager.getInstance().userId, id)
CollectionType.TOOLKIT -> api.deleteCollectionTools(UserManager.getInstance().userId, id)
CollectionType.ANSWER -> api.deleteCollectionAnswer(UserManager.getInstance().userId, id)
else -> return
}
postCollection

View File

@ -10,22 +10,15 @@ import com.gh.gamecenter.CommentDetailActivity
import com.gh.gamecenter.R
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.common.json.json
import com.gh.gamecenter.common.retrofit.Response
import com.gh.gamecenter.common.utils.DialogHelper
import com.gh.gamecenter.common.utils.ifLogin
import com.gh.gamecenter.common.utils.showAutoOrientation
import com.gh.gamecenter.common.view.BugFixedPopupWindow
import com.gh.gamecenter.entity.CommentEntity
import com.gh.gamecenter.entity.MeEntity
import com.gh.gamecenter.entity.Permissions
import com.gh.gamecenter.feature.entity.Permissions
import com.gh.gamecenter.login.user.UserManager
import com.gh.gamecenter.qa.comment.OnCommentOptionClickListener
import com.gh.gamecenter.retrofit.RetrofitManager
import com.halo.assistant.HaloApp
import com.lightgame.utils.Utils
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import okhttp3.ResponseBody
import org.json.JSONObject
import retrofit2.HttpException
@ -316,200 +309,6 @@ object CommentHelper {
popupWindow.showAutoOrientation(view)
}
private fun showControlDialog(
context: Context,
answerId: String? = null,
articleId: String? = null,
communityId: String? = null,
comment: CommentEntity,
me: MeEntity
) {
val dialogOptions = arrayListOf<String>()
val highlight = "置顶评论"
val hide = "隐藏评论"
var canHighlightCommentDirectly = false
var canHideCommentDirectly = false
if (me.isModerator || me.moderatorPermissions.topAnswerComment > Permissions.GUEST
|| me.moderatorPermissions.topCommunityArticleComment > Permissions.GUEST
) {
dialogOptions.add(highlight)
if (me.moderatorPermissions.topAnswerComment > Permissions.REPORTER
|| me.moderatorPermissions.topCommunityArticleComment > Permissions.REPORTER
) {
canHighlightCommentDirectly = true
}
}
if (me.isModerator || me.moderatorPermissions.hideAnswerComment > Permissions.GUEST
|| me.moderatorPermissions.hideCommunityArticleComment > Permissions.GUEST
) {
dialogOptions.add(hide)
if (me.moderatorPermissions.hideAnswerComment > Permissions.REPORTER
|| me.moderatorPermissions.hideCommunityArticleComment > Permissions.REPORTER
) {
canHideCommentDirectly = true
}
}
val highlightDialogHintContent = if (canHighlightCommentDirectly) {
"你的操作将立即生效,确定提交吗?(你的管理权限为:高级)"
} else {
"你的操作将提交给小编审核,确定提交吗?"
}
val hideDialogHintContent = if (canHideCommentDirectly) {
"你的操作将立即生效,确定提交吗?(你的管理权限为:高级)"
} else {
"你的操作将提交给小编审核,确定提交吗?"
}
val disabledOptions = arrayListOf<String>()
if (comment.priority != 0) {
disabledOptions.add(highlight)
}
comment.me?.let {
if (it.isCommentOwner) {
disabledOptions.add(highlight)
}
}
DialogUtils.showListDialog(context, dialogOptions, disabledOptions) {
when (it) {
highlight -> {
if (comment.priority != 0) {
Utils.toast(context, "评论已经置顶")
return@showListDialog
}
comment.me?.let { me ->
if (me.isCommentOwner) {
Utils.toast(context, "不能置顶自己的评论")
return@showListDialog
}
}
val highlightObserver = object : Response<ResponseBody>() {
override fun onResponse(response: ResponseBody?) {
if (canHighlightCommentDirectly) {
Utils.toast(context, "置顶成功,请刷新列表")
} else {
Utils.toast(context, "提交成功")
}
}
override fun onFailure(e: HttpException?) {
super.onFailure(e)
e?.let { httpException ->
if (httpException.code() == 403) {
val string = e.response().errorBody()?.string()
val errorJson = JSONObject(string)
val errorCode = errorJson.getInt("code")
if (errorCode == 403059) {
Utils.toast(
HaloApp.getInstance().application,
"权限错误,请刷新后重试"
)
return
} else {
Utils.toast(HaloApp.getInstance().application, e.message())
}
}
}
}
}
if (answerId != null) {
DialogHelper.showDialog(
context, highlight, highlightDialogHintContent,
"确定", "取消", {
RetrofitManager.getInstance().api
.highlightAnswerComment(answerId, comment.id)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.subscribe(highlightObserver)
},
extraConfig = DialogHelper.Config(centerTitle = true, centerContent = true)
)
} else {
DialogHelper.showDialog(
context, highlight, highlightDialogHintContent,
"确定", "取消", {
RetrofitManager.getInstance().api
.highlightCommunityArticleComment(comment.id)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.subscribe(highlightObserver)
},
extraConfig = DialogHelper.Config(centerTitle = true, centerContent = true)
)
}
}
hide -> {
val hideObserver = object : Response<ResponseBody>() {
override fun onResponse(response: ResponseBody?) {
if (canHideCommentDirectly) {
Utils.toast(context, "隐藏成功,请刷新列表")
} else {
Utils.toast(context, "提交成功")
}
}
override fun onFailure(e: HttpException?) {
super.onFailure(e)
e?.let { httpException ->
if (httpException.code() == 403) {
val string = e.response().errorBody()?.string()
val errorJson = JSONObject(string)
val errorCode = errorJson.getInt("code")
if (errorCode == 403059) {
Utils.toast(
HaloApp.getInstance().application,
"权限错误,请刷新后重试"
)
return
} else {
Utils.toast(HaloApp.getInstance().application, e.message())
}
}
}
}
}
if (answerId != null) {
DialogHelper.showDialog(
context, hide, hideDialogHintContent,
"确定", "取消", {
RetrofitManager.getInstance().api
.hideAnswerComment(answerId, comment.id)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.subscribe(hideObserver)
},
extraConfig = DialogHelper.Config(centerTitle = true, centerContent = true)
)
} else {
DialogHelper.showDialog(
context, hide, hideDialogHintContent,
"确定", "取消", {
RetrofitManager.getInstance().api
.hideCommunityArticleComment(comment.id)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.subscribe(hideObserver)
},
extraConfig = DialogHelper.Config(centerTitle = true, centerContent = true)
)
}
}
}
}
}
private fun showReportTypeDialog(
context: Context,
reportCallback: (reportType: String) -> Unit

View File

@ -3,7 +3,6 @@ package com.gh.common.util;
import android.annotation.SuppressLint;
import android.app.Dialog;
import android.content.Context;
import android.graphics.Color;
import android.text.TextUtils;
import android.view.View;
import android.view.Window;
@ -26,7 +25,7 @@ import com.gh.gamecenter.core.utils.DisplayUtils;
import com.gh.gamecenter.core.utils.NumberUtils;
import com.gh.gamecenter.core.utils.ToastUtils;
import com.gh.gamecenter.entity.CommentEntity;
import com.gh.gamecenter.entity.MeEntity;
import com.gh.gamecenter.feature.entity.MeEntity;
import com.gh.gamecenter.login.entity.UserInfoEntity;
import com.gh.gamecenter.login.user.UserManager;
import com.gh.gamecenter.retrofit.RetrofitManager;

View File

@ -1,6 +1,5 @@
package com.gh.common.util
import android.content.Context
import android.text.TextUtils
import com.gh.gamecenter.eventbus.EBConcernChanged
import com.gh.gamecenter.login.user.UserManager
@ -8,11 +7,8 @@ import com.gh.gamecenter.common.retrofit.Response
import com.gh.gamecenter.retrofit.RetrofitManager
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import okhttp3.MediaType
import okhttp3.RequestBody
import okhttp3.ResponseBody
import org.greenrobot.eventbus.EventBus
import org.json.JSONArray
import retrofit2.HttpException
/**
@ -25,9 +21,8 @@ object ConcernUtils {
* autoConcern:是否自动关注'关联关注'
*/
fun postConcernGameId(
context: Context,
gameId: String,
listener: onConcernListener?,
listener: OnConcernListener?,
autoConcern: Boolean = false
) {
val mode = if (autoConcern) "auto" else "manual"
@ -53,7 +48,7 @@ object ConcernUtils {
})
}
fun deleteConcernData(context: Context, gameId: String, listener: onConcernListener?) {
fun deleteConcernData(gameId: String, listener: OnConcernListener?) {
RetrofitManager.getInstance().api
.deleteConcern(UserManager.getInstance().userId, gameId)
.subscribeOn(Schedulers.io())
@ -72,73 +67,7 @@ object ConcernUtils {
})
}
fun updateConcernData(context: Context, data: JSONArray) {
val body = RequestBody.create(
MediaType.parse("application/json"),
data.toString()
)
RetrofitManager.getInstance().api
.putConcern(UserManager.getInstance().userId, body)
.subscribeOn(Schedulers.io())
.observeOn(Schedulers.io())
.subscribe(object : Response<ResponseBody>() {
override fun onResponse(response: ResponseBody?) {
EventBus.getDefault().post(EBConcernChanged())
}
})
}
fun deleteConcernQuestions(context: Context, questionsId: String, listener: onConcernListener?) {
RetrofitManager.getInstance().api
.deleteConcernQuestions(UserManager.getInstance().userId, questionsId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(object : Response<ResponseBody>() {
override fun onResponse(response: ResponseBody?) {
super.onResponse(response)
listener?.onSuccess()
}
override fun onFailure(e: HttpException?) {
super.onFailure(e)
listener?.onError()
var errorString: String? = null
try {
errorString = e?.response()?.errorBody()?.string()
} catch (e1: Exception) {
e1.printStackTrace()
}
ErrorHelper.handleError(context, errorString, false)
}
})
}
fun postConcernQuestions(context: Context, questionsId: String, listener: onConcernListener?) {
RetrofitManager.getInstance().api
.postConcernQuestions(UserManager.getInstance().userId, questionsId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(object : Response<ResponseBody>() {
override fun onResponse(response: ResponseBody?) {
super.onResponse(response)
listener?.onSuccess()
}
override fun onFailure(e: HttpException?) {
super.onFailure(e)
listener?.onError()
var errorString: String? = null
try {
errorString = e?.response()?.errorBody()?.string()
} catch (e1: Exception) {
e1.printStackTrace()
}
ErrorHelper.handleError(context, errorString, false)
}
})
}
interface onConcernListener {
interface OnConcernListener {
fun onSuccess()
fun onError()
}

View File

@ -6,8 +6,9 @@ import android.os.Build;
import com.gh.gamecenter.common.constant.Constants;
import com.gh.gamecenter.common.constant.EntranceConsts;
import com.gh.gamecenter.common.utils.NetworkUtils;
import com.gh.gamecenter.entity.GameEntity;
import com.gh.gamecenter.feature.entity.GameEntity;
import com.gh.gamecenter.entity.NewsDetailEntity;
import com.gh.gamecenter.feature.utils.PlatformUtils;
import com.gh.gamecenter.manager.DataCollectionManager;
import com.gh.gamecenter.manager.PackagesManager;
import com.lightgame.download.DownloadEntity;
@ -71,16 +72,6 @@ public class DataCollectionUtils {
DataCollectionManager.onEvent(context, "click-item", map);
}
// 上传游戏数据
public static void uploadGame(Context context, GameEntity gameEntity, int seconds, String from) {
Map<String, Object> map = new HashMap<>();
map.put("game", gameEntity.getName());
map.put("game_id", gameEntity.getId());
map.put("time", seconds);
map.put("from", from);
DataCollectionManager.onEvent(context, "game", map);
}
// 上传新闻数据
public static void uploadNews(Context context, NewsDetailEntity newsDetailEntity,
GameEntity gameEntity, int seconds, String from) {
@ -116,15 +107,6 @@ public class DataCollectionUtils {
DataCollectionManager.onEvent(context, "hijack", map);
}
// 上传用户数据
public static void uploadUser(Context context) {
Map<String, Object> map = new HashMap<>();
map.put("type", Build.MODEL);
map.put("system", Build.VERSION.SDK_INT + "=" + Build.VERSION.RELEASE);
map.put("install", PackagesManager.INSTANCE.getInstalledList());
DataCollectionManager.upsert(context, "user", map);
}
// 上传搜索数据
public static void uploadSearch(Context context, String... args) {
if (args.length != 5) {

View File

@ -2,17 +2,14 @@ package com.gh.common.util;
import android.annotation.SuppressLint;
import android.app.Application;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.net.Uri;
import android.os.Build;
import android.preference.PreferenceManager;
import android.text.TextUtils;
import android.util.Log;
import com.gh.base.GlobalActivityManager;
import com.gh.gamecenter.BuildConfig;
import com.gh.gamecenter.common.base.activity.BaseActivity;
import com.gh.gamecenter.common.constant.Constants;
@ -126,6 +123,16 @@ public class DataUtils {
// 避免初始化顺序问题导致 MetaUtil 一直持有空的 gid
MetaUtil.INSTANCE.refreshMeta();
ContentValues values = new ContentValues();
values.put(GhContentProvider.KEY_GID, gid);
values.put(GhContentProvider.KEY_ANDROID_ID, MetaUtil.getBase64EncodedAndroidId());
try {
HaloApp.getInstance().getContentResolver().insert(Uri.parse("content://com.gh.gamecenter.provider/device"), values);
} catch (Exception exception) {
SentryHelper.INSTANCE.onEvent("DEVICE_INSERT_ERROR", "exception_digest", exception.getLocalizedMessage());
exception.printStackTrace();
}
}
@Override

View File

@ -8,19 +8,21 @@ import com.gh.common.filter.RegionSetting;
import com.gh.common.filter.RegionSettingHelper;
import com.gh.common.repository.ReservationRepository;
import com.gh.common.simulator.SimulatorGameManager;
import com.gh.common.view.DownloadButton;
import com.gh.gamecenter.feature.view.DownloadButton;
import com.gh.common.xapk.XapkInstaller;
import com.gh.common.xapk.XapkUnzipStatus;
import com.gh.download.DownloadManager;
import com.gh.gamecenter.R;
import com.gh.gamecenter.adapter.viewholder.DetailViewHolder;
import com.gh.gamecenter.common.constant.Constants;
import com.gh.gamecenter.core.utils.SPUtils;
import com.gh.gamecenter.common.entity.LinkEntity;
import com.gh.gamecenter.entity.PluginLocation;
import com.gh.gamecenter.common.utils.ExtensionsKt;
import com.gh.gamecenter.core.utils.SPUtils;
import com.gh.gamecenter.feature.entity.PluginLocation;
import com.gh.gamecenter.manager.PackagesManager;
import com.gh.vspace.VHelper;
import com.lightgame.download.DownloadEntity;
import com.lightgame.download.DownloadStatus;
/**
* Created by khy on 27/06/17.
@ -36,6 +38,10 @@ public class DetailDownloadUtils {
viewHolder.getOverlayTv().setVisibility(View.GONE);
}
if (viewHolder.mMultiVersionDownloadTv != null) {
viewHolder.mMultiVersionDownloadTv.setVisibility(View.GONE);
}
if (viewHolder.gameEntity != null
&& Config.isShowDownload(viewHolder.gameEntity.getId())
&& !"光环助手".equals(viewHolder.gameEntity.getName())) {
@ -171,8 +177,34 @@ public class DetailDownloadUtils {
}
viewHolder.mDownloadPb.setText(downloadText);
} else {
viewHolder.mDownloadPb.setText("选择下载你的版本" + (TextUtils.isEmpty(downloadAddWord) ? "" : "-" + downloadAddWord) + " >");
viewHolder.mMultiVersionDownloadTv.setText("选择下载你的版本" + (TextUtils.isEmpty(downloadAddWord) ? "" : "-" + downloadAddWord));
viewHolder.mMultiVersionDownloadTv.setVisibility(View.VISIBLE);
viewHolder.mDownloadPb.setText("");
viewHolder.mDownloadPb.setButtonStyle(DownloadButton.ButtonStyle.NORMAL);
DownloadEntity downloadEntity = DownloadManager.getInstance().getDownloadEntitySnapshot(viewHolder.gameEntity);
if (downloadEntity != null) {
switch (downloadEntity.getStatus()) {
case downloading:
viewHolder.mDownloadTips.setVisibility(View.VISIBLE);
ExtensionsKt.setDownloadTipsAnimation(viewHolder.mDownloadTips, true);
break;
case done:
case pause:
case waiting:
case timeout:
case subscribe:
case neterror:
case overflow:
viewHolder.mDownloadTips.setVisibility(View.VISIBLE);
ExtensionsKt.setDownloadTipsAnimation(viewHolder.mDownloadTips, false);
break;
default:
viewHolder.mDownloadTips.setVisibility(View.GONE);
break;
}
} else {
viewHolder.mDownloadTips.setVisibility(View.GONE);
}
}
if (isCheck && viewHolder.gameEntity.getApk().size() == 1) {
@ -203,10 +235,14 @@ public class DetailDownloadUtils {
if (XapkUnzipStatus.UNZIPPING.name().equals(xapkStatus)) {
String percent = downloadEntity.getMeta().get(XapkInstaller.XAPK_UNZIP_PERCENT);
viewHolder.mDownloadPb.setText("解压中" + percent + "%");
viewHolder.mDownloadPb.setText("游戏解压中 " + percent + "%");
viewHolder.mDownloadPb.setProgress((int) (Float.valueOf(percent) * 10));
viewHolder.mDownloadPb.setButtonStyle(DownloadButton.ButtonStyle.XAPK_UNZIPPING);
return;
} else if (XapkUnzipStatus.FAILURE.name().equals(xapkStatus)) {
viewHolder.mDownloadPb.setText(R.string.install);
viewHolder.mDownloadPb.setButtonStyle(DownloadButton.ButtonStyle.XAPK_FAILURE);
return;
}
viewHolder.mDownloadPb.setProgress((int) (viewHolder.downloadEntity.getPercent() * 10));
@ -220,35 +256,31 @@ public class DetailDownloadUtils {
}
switch (downloadEntity.getStatus()) {
case timeout:
case neterror:
case subscribe:
case downloading:
case redirected:
case pause:
case overflow:
if (SPUtils.getBoolean(Constants.SP_USE_BROWSER_TO_INSTALL)) {
viewHolder.mDownloadPb.setText(R.string.browser_install_downloading);
} else {
viewHolder.mDownloadPb.setText(R.string.downloading);
}
String downloadingText = "游戏加载中 " + downloadEntity.getPercent() + "%";
String resumeText = "继续加载 " + downloadEntity.getPercent() + "%";
viewHolder.mDownloadPb.setText((downloadEntity.getStatus() == DownloadStatus.downloading || downloadEntity.getStatus() == DownloadStatus.redirected) ? downloadingText : resumeText);
if (downloadEntity.isPluggable() && PackagesManager.INSTANCE.isInstalled(downloadEntity.getPackageName())) {
viewHolder.mDownloadPb.setButtonStyle(DownloadButton.ButtonStyle.DOWNLOADING_PLUGIN);
} else {
viewHolder.mDownloadPb.setButtonStyle(DownloadButton.ButtonStyle.DOWNLOADING_NORMAL);
}
break;
case timeout:
case neterror:
case waiting:
case subscribe:
viewHolder.mDownloadPb.setText(R.string.waiting);
if (downloadEntity.isPluggable() && PackagesManager.INSTANCE.isInstalled(downloadEntity.getPackageName())) {
viewHolder.mDownloadPb.setButtonStyle(DownloadButton.ButtonStyle.DOWNLOADING_PLUGIN);
} else {
viewHolder.mDownloadPb.setButtonStyle(DownloadButton.ButtonStyle.DOWNLOADING_NORMAL);
}
viewHolder.mDownloadPb.setButtonStyle(DownloadButton.ButtonStyle.WAITING);
break;
case done:
if (SimulatorGameManager.isSimulatorGame(viewHolder.gameEntity)) {
boolean isInstalled = PackageUtils.isInstalledFromAllPackage(viewHolder.context, viewHolder.gameEntity.getSimulator().getApk().getPackageName());
if (isInstalled) {
boolean isInstalledNewSimulator = SimulatorGameManager.isNewSimulatorInstalled(viewHolder.context);
if (isInstalled || isInstalledNewSimulator) {
viewHolder.mDownloadPb.setText(R.string.launch);
viewHolder.mDownloadPb.setButtonStyle(DownloadButton.ButtonStyle.LAUNCH_OR_OPEN);
} else {
@ -303,18 +335,19 @@ public class DetailDownloadUtils {
private static void updateVStyleButton(DetailViewHolder viewHolder) {
switch (viewHolder.downloadEntity.getStatus()) {
case redirected:
case downloading:
case overflow:
viewHolder.mDownloadPb.setText("游戏加载中 " + viewHolder.downloadEntity.getPercent() + "%");
viewHolder.mDownloadPb.setButtonStyle(DownloadButton.ButtonStyle.DOWNLOADING_NORMAL);
break;
case timeout:
case neterror:
case waiting:
case subscribe:
viewHolder.mDownloadPb.setText(R.string.waiting);
viewHolder.mDownloadPb.setButtonStyle(DownloadButton.ButtonStyle.DOWNLOADING_NORMAL);
break;
case overflow:
case timeout:
case neterror:
case subscribe:
case pause:
viewHolder.mDownloadPb.setText("继续加载 " + viewHolder.downloadEntity.getPercent() + "%");
viewHolder.mDownloadPb.setButtonStyle(DownloadButton.ButtonStyle.DOWNLOADING_NORMAL);

View File

@ -4,15 +4,11 @@ import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.CountDownTimer;
import android.preference.PreferenceManager;
import android.provider.Settings;
import android.text.Html;
import android.text.Spannable;
@ -24,7 +20,6 @@ import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.text.style.URLSpan;
import android.text.style.UnderlineSpan;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
@ -33,15 +28,11 @@ import android.view.Window;
import android.view.WindowManager;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
@ -52,7 +43,6 @@ import com.gh.common.constant.Config;
import com.gh.common.filter.RegionSetting;
import com.gh.gamecenter.R;
import com.gh.gamecenter.ShellActivity;
import com.gh.gamecenter.SuggestionActivity;
import com.gh.gamecenter.adapter.ReportReasonAdapter;
import com.gh.gamecenter.adapter.viewholder.PrivacyPolicyItemViewHolder;
import com.gh.gamecenter.common.base.TrackableDialog;
@ -60,6 +50,9 @@ import com.gh.gamecenter.common.callback.CancelListener;
import com.gh.gamecenter.common.callback.ConfirmListener;
import com.gh.gamecenter.common.callback.SimpleCallback;
import com.gh.gamecenter.common.databinding.DialogAlertDefaultBinding;
import com.gh.gamecenter.common.entity.SimpleGameEntity;
import com.gh.gamecenter.common.entity.SuggestType;
import com.gh.gamecenter.common.utils.DialogHelper;
import com.gh.gamecenter.common.utils.ExtensionsKt;
import com.gh.gamecenter.common.utils.ImageUtils;
import com.gh.gamecenter.common.utils.NetworkUtils;
@ -75,40 +68,32 @@ import com.gh.gamecenter.core.utils.EmptyCallback;
import com.gh.gamecenter.core.utils.MtaHelper;
import com.gh.gamecenter.core.utils.SPUtils;
import com.gh.gamecenter.core.utils.SpanBuilder;
import com.gh.gamecenter.core.utils.StringUtils;
import com.gh.gamecenter.core.utils.ToastUtils;
import com.gh.gamecenter.databinding.DialogBindPhoneBinding;
import com.gh.gamecenter.databinding.DialogOverseaConfirmationBinding;
import com.gh.gamecenter.databinding.DialogPackageParseErrorBinding;
import com.gh.gamecenter.databinding.DialogReceiveLibaoSuccessBinding;
import com.gh.gamecenter.databinding.DialogRelievePhoneBinding;
import com.gh.gamecenter.databinding.DialogReportReasonBinding;
import com.gh.gamecenter.databinding.DialogWechatReserveSuccessBinding;
import com.gh.gamecenter.databinding.ImprintContentItemBinding;
import com.gh.gamecenter.databinding.PrivacyItemBinding;
import com.gh.gamecenter.entity.ApkEntity;
import com.gh.gamecenter.entity.BadgeEntity;
import com.gh.gamecenter.entity.GameEntity;
import com.gh.gamecenter.entity.PermissionsEntity;
import com.gh.gamecenter.entity.PrivacyPolicyEntity;
import com.gh.gamecenter.entity.SettingsEntity;
import com.gh.gamecenter.entity.SimpleGameEntity;
import com.gh.gamecenter.entity.TrackableEntity;
import com.gh.gamecenter.login.entity.Badge;
import com.gh.gamecenter.security.BindPhoneActivity;
import com.gh.gamecenter.setting.GameDownloadSettingFragment;
import com.gh.gamecenter.suggest.SuggestType;
import com.gh.gamecenter.feature.entity.ApkEntity;
import com.gh.gamecenter.feature.entity.Badge;
import com.gh.gamecenter.feature.entity.GameEntity;
import com.gh.gamecenter.feature.entity.SettingsEntity;
import com.gh.gamecenter.help.HelpAndFeedbackBridge;
import com.gh.gamecenter.setting.SettingBridge;
import com.lightgame.adapter.BaseRecyclerAdapter;
import com.lightgame.download.DownloadEntity;
import com.lightgame.utils.AppManager;
import com.lightgame.utils.Util_System_Keyboard;
import com.lightgame.utils.Utils;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import kotlin.Unit;
@ -134,91 +119,15 @@ public class DialogUtils {
return dialog;
}
public static void showInstallHintDialog(Context context, final ConfirmListener cmListener) {
context = checkDialogContext(context);
final Dialog dialog = new Dialog(context);
View view = View.inflate(context, R.layout.dialog_install_hint, null);
// 标题
TextView alertdialog_title = view.findViewById(R.id.installhint_title);
alertdialog_title.setText("重要提示");
Spanned content = Html.fromHtml("如果您使用的是" + "<font color=\"#ff0000\">华为</font>" + "" +
"<font color=\"#ff0000\">OPPO</font>" + "手机,安装游戏时请选择“" +
"<font color=\"#ff0000\">继续安装</font>" +
"”(记住不要选择“官方推荐”或“软件商店安装”)");
// 内容
TextView alertdialog_content = view.findViewById(R.id.installhint_content);
alertdialog_content.setText(content);
// 确定按钮
TextView installhint_confirm = view.findViewById(R.id.installhint_confirm);
installhint_confirm.setText("知道了");
final ImageView installhint_unselect = view.findViewById(R.id.installhint_unselect);
final ImageView installhint_select = view.findViewById(R.id.installhint_select);
LinearLayout installhint_unselect_ll = view.findViewById(R.id.installhint_unselect_ll);
installhint_unselect_ll.setOnClickListener(v -> {
if (installhint_unselect.getVisibility() == View.GONE) {
installhint_unselect.setVisibility(View.VISIBLE);
installhint_select.setVisibility(View.GONE);
} else {
installhint_unselect.setVisibility(View.GONE);
installhint_select.setVisibility(View.VISIBLE);
}
});
installhint_confirm.setOnClickListener(v -> {
dialog.dismiss();
if (installhint_select.getVisibility() == View.VISIBLE) {
if (cmListener != null) {
cmListener.onConfirm();
}
}
});
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(view);
dialog.show();
}
public static void showHintDialog(Context context, String title, CharSequence msg, String confirm) {
context = checkDialogContext(context);
final Dialog dialog = new Dialog(context);
View view = View.inflate(context, R.layout.common_hintdialog, null);
TextView hintdialog_title = view.findViewById(R.id.tv_dialog_hint_title);
hintdialog_title.setText(title);
// 内容
TextView hintdialog_content = view.findViewById(R.id.tv_dialog_hint_content);
hintdialog_content.setText(msg);
TextView hintdialog_confirm = view.findViewById(R.id.tv_dialog_hint_confirm);
hintdialog_confirm.setText(confirm);
hintdialog_confirm.setOnClickListener(v -> dialog.cancel());
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(view);
dialog.show();
}
public static void checkDownload(Context context, String size, CheckDownloadCallBack callBack) {
if (!NetworkUtils.isNetworkConnected(context)) {
showNoConnectionDownloadDialog(context, null,
showNoConnectionDownloadDialog(context, () -> {
},
() -> callBack.onResponse(true));
} else if (NetworkUtils.isWifiConnected(context)
|| filter4GorSize(context, size)) {
callBack.onResponse(false);
} else if (!SPUtils.getBoolean(GameDownloadSettingFragment.getTrafficDownloadHintKey(), true)) {
} else if (!SPUtils.getBoolean(getTrafficDownloadHintKey(), true)) {
AppExecutor.getUiExecutor().executeWithDelay(() -> Utils.toast(context, "当前使用移动网络下载,请注意流量消耗"), 500);
callBack.onResponse(false);
} else {
@ -229,6 +138,10 @@ public class DialogUtils {
}
}
private static String getTrafficDownloadHintKey() {
return PackageUtils.getGhVersionName() + "traffic_download_hint";
}
private static boolean filter4GorSize(Context context, String size) {
try {
if (TextUtils.isEmpty(size)) {
@ -246,23 +159,8 @@ public class DialogUtils {
}
return false;
}
public static void checkResumeDownload(Context context, CheckDownloadCallBack callBack) {
if (!NetworkUtils.isNetworkConnected(context)) {
showNoConnectionDownloadDialog(context, null, () -> callBack.onResponse(true));
} else if (NetworkUtils.isWifiConnected(context)) {
callBack.onResponse(false);
} else {
showResumeDownloadDialog(context, () -> {
callBack.onResponse(false);
}, () -> {
callBack.onResponse(true);
});
}
}
public static void showNoConnectionDownloadDialog(Context context, ConfirmListener listener, CancelListener cancelListener) {
com.gh.gamecenter.common.utils.DialogUtils.showWarningDialog(context, "下载提示", "网络异常,请检查手机网络状态", "连上WiFi后自动下载", "关闭", listener, cancelListener);
DialogHelper.showDialog(context, "下载提示", "网络异常,请检查手机网络状态", "知道了", "WiFi自动下载", listener::onConfirm, cancelListener::onCancel, false, "", "");
}
public static void showDownloadDialog(Context context, ConfirmListener listener, CancelListener cancelListener) {
@ -290,7 +188,7 @@ public class DialogUtils {
// MtaHelper.onEvent("移动网络下载", NetworkUtils.getMobileNetworkType(finalContext), "连上WiFi后自动下载");
});
allowAlways.setOnClickListener(v -> {
SPUtils.setBoolean(GameDownloadSettingFragment.getTrafficDownloadHintKey(), false);
SPUtils.setBoolean(getTrafficDownloadHintKey(), false);
AppExecutor.getUiExecutor().executeWithDelay(() -> {
// 显示了弹窗以后,即便下面这个 toast 放在 listener.onConfirm 后调用也是显示 listener.onConfirm 里的 toast
// 喷了,延时包治疑难杂症
@ -303,363 +201,10 @@ public class DialogUtils {
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(contentView);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
dialog.show();
}
public static void showResumeDownloadDialog(Context context, ConfirmListener listener, CancelListener cancelListener) {
com.gh.gamecenter.common.utils.DialogUtils.showWarningDialog(context, "下载提示", "当前正在使用移动网络,继续下载会消耗手机流量", "连上WiFi后自动下载", "继续下载", listener, cancelListener);
}
public static void showDownloadDialog(Context context, ConfirmListener listener) {
com.gh.gamecenter.common.utils.DialogUtils.showWarningDialog(context, "下载提示", "您当前使用的网络为2G/3G/4G开始下载将会消耗移动流量确定下载", listener);
}
public static void showCancelDialog(Context context, final ConfirmListener listener, CancelListener cancelListener) {
Spanned content = Html.fromHtml(context.getString(R.string.cancel_concern_dialog));
showCancelListenerDialog(context, "取消关注", content, "确定取消", "暂不取消", listener, cancelListener);
}
/**
* ios 风格弹窗
*
* @param context
* @param title 标题
* @param message 内容
* @param negative 取消按钮文本
* @param positive 确认按钮文本
* @param clListener 取消按钮监听
* @param cmListener 确认按钮监听
*/
public static Dialog showNewAlertDialog(Context context, String title, CharSequence message
, String negative, String positive, TrackableEntity trackableEntity, int gravity, boolean shouldShowCloseBtn, final CancelListener clListener, final ConfirmListener cmListener) {
context = checkDialogContext(context);
final Dialog dialog;
if (trackableEntity != null) {
dialog = new TrackableDialog(context,
R.style.GhAlertDialog,
trackableEntity.getEvent(),
trackableEntity.getKey(),
trackableEntity.getValue(),
trackableEntity.getCancelValue(),
trackableEntity.getKeyBackValue(),
trackableEntity.getLogShowEvent());
} else {
dialog = new Dialog(context, R.style.GhAlertDialog);
}
View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_new_alert, null);
TextView titleTv = contentView.findViewById(R.id.title);
TextView contentTv = contentView.findViewById(R.id.content);
TextView cancelBtn = contentView.findViewById(R.id.cancel);
TextView confirmBtn = contentView.findViewById(R.id.confirm);
View middleLine = contentView.findViewById(R.id.middle_line);
View closeIv = contentView.findViewById(R.id.closeIv);
titleTv.setGravity(gravity);
contentTv.setGravity(gravity);
titleTv.setText(title);
contentTv.setText(message);
cancelBtn.setText(negative);
confirmBtn.setText(positive);
if (negative.isEmpty()) {
cancelBtn.setVisibility(View.GONE);
middleLine.setVisibility(View.GONE);
confirmBtn.setTextColor(ContextCompat.getColor(context, R.color.text_title));
}
if (positive.isEmpty()) {
confirmBtn.setVisibility(View.GONE);
middleLine.setVisibility(View.GONE);
}
closeIv.setVisibility(shouldShowCloseBtn ? View.VISIBLE : View.GONE);
closeIv.setOnClickListener(v -> dialog.dismiss());
cancelBtn.setOnClickListener(v -> {
if (clListener != null) clListener.onCancel();
dialog.dismiss();
});
confirmBtn.setOnClickListener(v -> {
if (cmListener != null) cmListener.onConfirm();
dialog.dismiss();
});
Window window = dialog.getWindow();
if (window != null) {
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
}
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(contentView);
dialog.show();
return dialog;
}
public static Dialog showNewAlertDialog(Context context, String title, CharSequence message
, String negative, String positive, final CancelListener clListener, final ConfirmListener cmListener) {
return showNewAlertDialog(context, title, message, negative, positive, null, Gravity.LEFT, false, clListener, cmListener);
}
public static Dialog showNewAlertDialog(Context context, String title, CharSequence message
, String negative, String positive, int gravity, boolean shouldShowCloseBtn, final CancelListener clListener, final ConfirmListener cmListener) {
return showNewAlertDialog(context, title, message, negative, positive, null, gravity, shouldShowCloseBtn, clListener, cmListener);
}
public static Dialog showDialogWithHtmlContent(Context context, String title, String content
, String positive, String negative, final ConfirmListener cmListener, final CancelListener clListener) {
context = checkDialogContext(context);
final Dialog dialog = new Dialog(context, R.style.GhAlertDialog);
View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_alert, null);
TextView contentTv = contentView.findViewById(R.id.dialog_content);
TextView titleTv = contentView.findViewById(R.id.dialog_title);
TextView negativeTv = contentView.findViewById(R.id.dialog_negative);
TextView positiveTv = contentView.findViewById(R.id.dialog_positive);
contentTv.setText(Html.fromHtml(content));
titleTv.setText(title);
negativeTv.setText(negative);
positiveTv.setText(positive);
negativeTv.setOnClickListener(view -> {
if (clListener != null) {
clListener.onCancel();
}
dialog.dismiss();
});
positiveTv.setOnClickListener(view -> {
if (cmListener != null) {
cmListener.onConfirm();
}
dialog.dismiss();
});
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(contentView);
dialog.show();
return dialog;
}
/**
* 取消按钮灰色
*
* @param context
* @param title
* @param message
* @param positive
* @param negative
* @param cmListener
*/
public static void showCancelAlertDialog(Context context, String title, CharSequence message
, String positive, String negative, final ConfirmListener cmListener, final CancelListener clListener) {
context = checkDialogContext(context);
final Dialog dialog = new Dialog(context, R.style.GhAlertDialog);
View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_alert, null);
TextView contentTv = contentView.findViewById(R.id.dialog_content);
TextView titleTv = contentView.findViewById(R.id.dialog_title);
TextView negativeTv = contentView.findViewById(R.id.dialog_negative);
TextView positiveTv = contentView.findViewById(R.id.dialog_positive);
contentTv.setText(message);
titleTv.setText(title);
negativeTv.setText(negative);
negativeTv.setTextColor(ContextCompat.getColor(context, R.color.hint));
positiveTv.setText(positive);
negativeTv.setOnClickListener(view -> {
if (clListener != null) {
clListener.onCancel();
}
dialog.dismiss();
});
positiveTv.setOnClickListener(view -> {
if (cmListener != null) {
cmListener.onConfirm();
}
dialog.dismiss();
});
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(contentView);
dialog.show();
}
/**
* 点击外部退出和取消监听绑定
*/
public static void showCancelListenerDialog(Context context, String title, CharSequence message
, String positive, String negative, final ConfirmListener cmListener, final CancelListener clListener) {
context = checkDialogContext(context);
final Dialog dialog = new Dialog(context, R.style.GhAlertDialog);
View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_alert, null);
TextView contentTv = contentView.findViewById(R.id.dialog_content);
TextView titleTv = contentView.findViewById(R.id.dialog_title);
TextView negativeTv = contentView.findViewById(R.id.dialog_negative);
TextView positiveTv = contentView.findViewById(R.id.dialog_positive);
contentTv.setText(message);
titleTv.setText(title);
negativeTv.setText(negative);
//negativeTv.setTextColor(ContextCompat.getColor(context, R.color.hint));
positiveTv.setText(positive);
negativeTv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (clListener != null) {
clListener.onCancel();
}
dialog.dismiss();
}
});
positiveTv.setOnClickListener(view -> {
if (cmListener != null) {
cmListener.onConfirm();
}
dialog.dismiss();
});
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(contentView);
dialog.setOnCancelListener(dialogInterface -> {
if (clListener != null)
clListener.onCancel();
});
dialog.show();
}
/**
* 权限弹窗
* 只能在弹窗内取消
*/
public static void showPermissionDialog(Context context, String title, CharSequence message
, String positive, String negative, final ConfirmListener cmListener, final CancelListener clListener) {
context = checkDialogContext(context);
final Dialog dialog = new Dialog(context, R.style.GhAlertDialog);
View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_alert, null);
TextView contentTv = contentView.findViewById(R.id.dialog_content);
TextView titleTv = contentView.findViewById(R.id.dialog_title);
TextView negativeTv = contentView.findViewById(R.id.dialog_negative);
TextView positiveTv = contentView.findViewById(R.id.dialog_positive);
contentTv.setText(message);
titleTv.setText(title);
negativeTv.setText(negative);
negativeTv.setTextColor(ContextCompat.getColor(context, R.color.hint));
positiveTv.setText(positive);
negativeTv.setOnClickListener(view -> {
if (clListener != null) {
clListener.onCancel();
}
dialog.dismiss();
});
positiveTv.setOnClickListener(view -> {
if (cmListener != null) {
cmListener.onConfirm();
}
dialog.dismiss();
});
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(contentView);
dialog.setCancelable(false);
dialog.show();
}
/**
* 只能在弹窗内取消
*/
public static void showForceDialog(Context context, String title, CharSequence message
, String positive, String negative, final ConfirmListener cmListener, final CancelListener clListener) {
context = checkDialogContext(context);
final Dialog dialog = new Dialog(context, R.style.GhAlertDialog);
View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_alert, null);
TextView contentTv = contentView.findViewById(R.id.dialog_content);
TextView titleTv = contentView.findViewById(R.id.dialog_title);
TextView negativeTv = contentView.findViewById(R.id.dialog_negative);
TextView positiveTv = contentView.findViewById(R.id.dialog_positive);
contentTv.setText(message);
titleTv.setText(title);
negativeTv.setText(negative);
positiveTv.setText(positive);
negativeTv.setOnClickListener(view -> {
if (clListener != null) {
clListener.onCancel();
}
dialog.dismiss();
});
positiveTv.setOnClickListener(view -> {
if (cmListener != null) {
cmListener.onConfirm();
}
dialog.dismiss();
});
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(contentView);
dialog.setCancelable(false);
dialog.show();
}
/**
* 特殊:验证手机号码
*/
public static void checkPhoneNumDialog(Context context, CharSequence message, final ConfirmListener cmListener) {
String s = message.toString();
String sub1 = s.substring(0, 3);
String sub2 = s.substring(3, 7);
String sub3 = s.substring(7, 11);
String phoneNum = StringUtils.buildString(sub1, " - ", sub2, " - ", sub3);
AlertDialog alertDialog = new AlertDialog.Builder(context, R.style.GhAlertDialog)
.setTitle("请确定手机号:")
.setMessage(phoneNum)
.setPositiveButton("确认", (dialog, which) -> {
if (cmListener != null) {
cmListener.onConfirm();
}
})
.setNegativeButton("取消", null)
.create();
alertDialog.show();
TextView mesage = (TextView) alertDialog.findViewById(android.R.id.message);
Button positiveBtn = alertDialog.getButton(android.app.AlertDialog.BUTTON_POSITIVE);
Button negativeBtn = alertDialog.getButton(android.app.AlertDialog.BUTTON_NEGATIVE);
positiveBtn.setTextSize(13);
positiveBtn.setTextColor(ContextCompat.getColor(context, R.color.theme_font));
negativeBtn.setTextSize(13);
negativeBtn.setTextColor(ContextCompat.getColor(context, R.color.theme_font));
if (mesage != null) {
mesage.setGravity(Gravity.CENTER);
mesage.setTextSize(24);
mesage.setTextColor(ContextCompat.getColor(context, R.color.title));
TextPaint tp = mesage.getPaint();
tp.setFakeBoldText(true);
}
}
public static void showSignDialog(Context context, String title, CharSequence message, CharSequence message2
, String positive, final ConfirmListener cmListener) {
context = checkDialogContext(context);
@ -675,7 +220,7 @@ public class DialogUtils {
contentTv.setText(Html.fromHtml(message.toString()));
content2Tv.setText(Html.fromHtml(message2.toString()));
titleTv.setText(title);
titleTv.setText(Html.fromHtml(title));
positiveTv.setText(positive);
negativeTv.setOnClickListener(view -> dialog.dismiss());
@ -689,92 +234,10 @@ public class DialogUtils {
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(contentView);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
dialog.show();
}
public static void showLowSystemVersionDialog(Context context) {
final Context activityContext = checkDialogContext(context);
final Dialog dialog = new Dialog(activityContext, R.style.GhAlertDialog);
View contentView = LayoutInflater.from(activityContext).inflate(R.layout.dialog_alert, null);
TextView contentTv = contentView.findViewById(R.id.dialog_content);
TextView titleTv = contentView.findViewById(R.id.dialog_title);
TextView positiveTv = contentView.findViewById(R.id.dialog_positive);
titleTv.setText("提示");
contentTv.setText("抱歉,您当前系统版本过低,暂不支持视频功能");
positiveTv.setText("我知道了");
positiveTv.setOnClickListener(view -> {
dialog.dismiss();
});
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(contentView);
dialog.show();
}
public static void showListDialog(Context context,
List<String> selectionList,
DialogInterface.OnClickListener onClickListener) {
AlertDialog.Builder builder = new AlertDialog.Builder(context);
String[] selectionArray = new String[selectionList.size()];
selectionArray = selectionList.toArray(selectionArray);
builder.setItems(selectionArray, onClickListener);
AlertDialog dialog = builder.create();
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.show();
}
/**
* @param options 供以显示的选项
* @param disabledOptions 显示为灰色的选项(是 options 的子集)
*/
public static void showListDialog(Context context,
List<String> options,
List<String> disabledOptions,
OptionCallback callback) {
context = checkDialogContext(context);
Dialog dialog = new Dialog(context);
LinearLayout container = new LinearLayout(context);
container.setOrientation(LinearLayout.VERTICAL);
container.setBackgroundColor(ContextCompat.getColor(context, R.color.background_white));
container.setPadding(0, DisplayUtils.dip2px(context, 12f), 0, DisplayUtils.dip2px(context, 12f));
for (String option : options) {
TextView reportTv = new TextView(context);
reportTv.setText(option);
reportTv.setTextSize(17f);
if (disabledOptions != null && disabledOptions.contains(option)) {
reportTv.setTextColor(ContextCompat.getColor(context, R.color.btn_gray));
} else {
reportTv.setTextColor(ContextCompat.getColor(context, R.color.title));
reportTv.setBackgroundResource(R.drawable.textview_white_style);
}
int widthPixels = context.getResources().getDisplayMetrics().widthPixels;
reportTv.setLayoutParams(new LinearLayout.LayoutParams(widthPixels * 9 / 10,
LinearLayout.LayoutParams.WRAP_CONTENT));
reportTv.setPadding(DisplayUtils.dip2px(context, 20f), DisplayUtils.dip2px(context, 12f),
0, DisplayUtils.dip2px(context, 12f));
container.addView(reportTv);
reportTv.setOnClickListener(v -> {
dialog.cancel();
callback.onClicked(reportTv.getText().toString());
});
}
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(container);
dialog.show();
}
/**
* 特殊:目前只在提交问题错误返回时弹出
*/
@ -1254,38 +717,6 @@ public class DialogUtils {
dialog.show();
}
public static void showVersionNumberDialog(Context context, GameEntity gameEntity, @NonNull ConfirmListener listener) {
context = checkDialogContext(context);
if (!gameEntity.isShowVersionNumber()) {
listener.onConfirm();
} else {
final Dialog dialog = new Dialog(context, R.style.GhAlertDialog);
View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_version_number, null);
TextView contentTv = contentView.findViewById(R.id.contentTv);
TextView cancelTv = contentView.findViewById(R.id.cancelTv);
TextView continueTv = contentView.findViewById(R.id.continueTv);
contentTv.setText(gameEntity.getVersionNumberString());
cancelTv.setOnClickListener(v -> dialog.dismiss());
continueTv.setOnClickListener(v -> {
listener.onConfirm();
dialog.dismiss();
});
Window window = dialog.getWindow();
if (window != null) {
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
}
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(contentView);
dialog.show();
}
}
// 海外下载地址弹窗
public static void showOverseaDownloadDialog(Context context, GameEntity gameEntity, @NonNull ConfirmListener listener) {
context = checkDialogContext(context);
@ -1471,30 +902,9 @@ public class DialogUtils {
}
public static void showPluggableNeverRemindDialog(Context context, String nameAndPlatform, @NonNull ConfirmListener listener) {
context = checkDialogContext(context);
final Dialog dialog = new Dialog(context, R.style.GhAlertDialog);
View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_pluggable_never_remind, null);
View cancelBtn = contentView.findViewById(R.id.cancel);
View confirmBtn = contentView.findViewById(R.id.confirm);
TextView contentTv = contentView.findViewById(R.id.content);
contentTv.setText(("助手首页将不再提示《" + nameAndPlatform + "》的所有插件化消息,确定吗?"));
cancelBtn.setOnClickListener(v -> {
dialog.dismiss();
});
confirmBtn.setOnClickListener(v -> {
listener.onConfirm();
dialog.dismiss();
});
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(contentView);
dialog.show();
String content = "助手首页将不再提示《" + nameAndPlatform + "》的所有插件化消息,确定吗?";
DialogHelper.showDialog(context, "温馨提醒", content, "确定", "取消", listener::onConfirm, () -> {
}, false, "", "");
}
public static void showRegulationTestDialog(Context context, @NonNull ConfirmListener confirmListener, @NonNull CancelListener cancelListener) {
@ -1569,7 +979,7 @@ public class DialogUtils {
confirmBtn.setOnClickListener(v -> {
dialog.dismiss();
String hint = "" + downloadEntity.getName() + "》游戏安装包解压失败,问题反馈:";
SuggestionActivity.startSuggestionActivity(activityContext, SuggestType.normal, null, hint);
HelpAndFeedbackBridge.startSuggestionActivity(activityContext, SuggestType.normal, null, hint);
});
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
@ -1604,102 +1014,6 @@ public class DialogUtils {
dialog.show();
}
public static void showVideoComplaintDialog(Context context,
List<String> options,
List<String> disabledOptions,
OptionCallback callback) {
context = checkDialogContext(context);
Dialog dialog = new Dialog(context);
View view = LayoutInflater.from(context).inflate(R.layout.dialog_video_complaint, null, false);
LinearLayout complaintContainer = view.findViewById(R.id.complaintContainer);
ConstraintLayout otherComplaintContainer = view.findViewById(R.id.otherComplaintContainer);
EditText complaintCommentEt = view.findViewById(R.id.complaintCommentEt);
TextView backTv = view.findViewById(R.id.backTv);
TextView commitTv = view.findViewById(R.id.commitTv);
Context finalContext = context;
//添加透明阴影,实现类似 clipPadding=false 效果
complaintCommentEt.setShadowLayer(complaintCommentEt.getExtendedPaddingBottom(), 0f, 0f, Color.TRANSPARENT);
ExtensionsKt.setTextChangedListener(complaintCommentEt, (s, start, before, count) -> {
commitTv.setTextColor(ContextCompat.getColor(finalContext, s.toString().trim().isEmpty() ? R.color.text_subtitleDesc : R.color.theme_font));
return null;
});
for (String option : options) {
TextView reportTv = new TextView(context);
reportTv.setText(option);
reportTv.setTextSize(16f);
if (disabledOptions != null && disabledOptions.contains(option)) {
reportTv.setTextColor(ContextCompat.getColor(context, R.color.btn_gray));
} else {
reportTv.setTextColor(ContextCompat.getColor(context, R.color.title));
reportTv.setBackgroundResource(R.drawable.textview_white_style);
}
reportTv.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT));
reportTv.setPadding(DisplayUtils.dip2px(context, 20f), DisplayUtils.dip2px(context, 17f),
DisplayUtils.dip2px(context, 20f), DisplayUtils.dip2px(context, 17f));
if (option.equals("其它")) {
Drawable drawable = ContextCompat.getDrawable(context, R.drawable.ic_complaint_arrow_right);
drawable.setBounds(0, 0, DisplayUtils.dip2px(6f), DisplayUtils.dip2px(10f));
reportTv.setCompoundDrawables(null, null, drawable, null);
}
complaintContainer.addView(reportTv);
reportTv.setOnClickListener(v -> {
if (option.equals("其它")) {
complaintContainer.setVisibility(View.GONE);
otherComplaintContainer.setVisibility(View.VISIBLE);
complaintCommentEt.requestFocus();
Util_System_Keyboard.showSoftKeyboard(finalContext, complaintCommentEt);
} else {
dialog.cancel();
JSONObject jsonObject = new JSONObject();
try {
jsonObject.put("reason", reportTv.getText().toString());
} catch (JSONException e) {
e.printStackTrace();
}
callback.onClicked(jsonObject.toString());
}
});
}
backTv.setOnClickListener(v -> {
Util_System_Keyboard.hideSoftKeyboard(finalContext, complaintCommentEt);
complaintContainer.setVisibility(View.VISIBLE);
otherComplaintContainer.setVisibility(View.GONE);
});
commitTv.setOnClickListener(v -> {
if (complaintCommentEt.getText().toString().isEmpty()) {
ToastUtils.INSTANCE.showToast("请先输入说明~");
return;
}
dialog.cancel();
JSONObject jsonObject = new JSONObject();
try {
jsonObject.put("reason", "其它");
jsonObject.put("description", complaintCommentEt.getText().toString());
} catch (JSONException e) {
e.printStackTrace();
}
callback.onClicked(jsonObject.toString());
});
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(view);
dialog.show();
Window window = dialog.getWindow();
if (window != null) {
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
WindowManager.LayoutParams params = window.getAttributes();
params.width = context.getResources().getDisplayMetrics().widthPixels - DisplayUtils.dip2px(40f);
window.setAttributes(params);
}
}
public static void showViewBadgeDialog(Context context, Badge badge, ConfirmListener listener) {
context = checkDialogContext(context);
@ -1879,7 +1193,7 @@ public class DialogUtils {
@Override
public Unit invoke() {
SimpleGameEntity entity = new SimpleGameEntity(gameId, gameName, "");
SuggestionActivity.startSuggestionActivity(finalContext, SuggestType.gameQuestion, "notfound", "模拟器安装包解析错误", entity, "-");
HelpAndFeedbackBridge.startSuggestionActivity(finalContext, SuggestType.gameQuestion, "notfound", "模拟器安装包解析错误", entity, "-");
dialog.dismiss();
return null;
}
@ -1907,13 +1221,21 @@ public class DialogUtils {
}
}
@SuppressLint("SetTextI18n")
public static void showReportReasonDialog(Context context, ArrayList<String> items, ReportReasonCallBack callBack) {
showReportReasonDialog(context, items, "", callBack);
}
@SuppressLint("SetTextI18n")
public static void showReportReasonDialog(Context context, ArrayList<String> items, String title, ReportReasonCallBack callBack) {
context = checkDialogContext(context);
final Dialog dialog = new Dialog(context, R.style.DialogWindowTransparent);
DialogReportReasonBinding binding = DialogReportReasonBinding.inflate(LayoutInflater.from(context));
if (!title.isEmpty()) {
binding.reasonTitle.setText(title);
}
ReportReasonAdapter reportReasonAdapter = new ReportReasonAdapter(context, items, reason -> {
if (reason.equals("其他原因")) {
binding.reasonTitle.setText(R.string.report_reason_other_title);
@ -1980,36 +1302,6 @@ public class DialogUtils {
return dialog;
}
public static void showReceiveLibaoSuccessDialog(Context context, String title, String des, String libaoCode, ConfirmListener listener) {
context = checkDialogContext(context);
final Dialog dialog = new Dialog(context, R.style.DialogWindowTransparent);
DialogReceiveLibaoSuccessBinding binding = DialogReceiveLibaoSuccessBinding.inflate(LayoutInflater.from(context));
binding.title.setText(title);
binding.libaoCodeTv.setText(libaoCode);
binding.desTv.setText(des);
binding.confirm.setOnClickListener(v -> {
dialog.dismiss();
listener.onConfirm();
});
binding.cancel.setOnClickListener(v -> {
dialog.dismiss();
});
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(binding.getRoot());
dialog.show();
Window window = dialog.getWindow();
if (window != null) {
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
WindowManager.LayoutParams params = window.getAttributes();
params.width = context.getResources().getDisplayMetrics().widthPixels - DisplayUtils.dip2px(60f);
window.setAttributes(params);
}
}
public static void showReserveSuccess2WechatBindDialog(Context context, ConfirmListener confirmListener, CancelListener cancelListener) {
context = checkDialogContext(context);
@ -2045,7 +1337,7 @@ public class DialogUtils {
binding.confirmTv.setText("我知道了");
binding.centerDivider.setVisibility(View.GONE);
binding.cancelTv.setVisibility(View.GONE);
binding.titleTv.setCompoundDrawablesWithIntrinsicBounds(ExtensionsKt.toDrawable(R.drawable.ic_reserve_success), null, null, null);
ExtensionsKt.setDrawableStart(binding.titleTv, R.drawable.ic_reserve_success, null, null);
binding.confirmTv.setOnClickListener(v -> dialog.dismiss());
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(binding.getRoot());
@ -2074,7 +1366,7 @@ public class DialogUtils {
binding.bindPhoneBtn.setOnClickListener(v -> {
dialog.dismiss();
Intent intent = BindPhoneActivity.getNormalIntent(finalContext, false);
Intent intent = SettingBridge.INSTANCE.getBindPhoneNormalIntent(finalContext, false);
finalContext.startActivity(intent);
});

View File

@ -9,35 +9,38 @@ import android.os.Build
import android.os.Bundle
import android.text.TextUtils
import androidx.appcompat.app.AppCompatActivity
import com.gh.gamecenter.common.base.activity.BaseActivity
import com.gh.gamecenter.common.base.activity.BaseActivity_TabLayout
import com.gh.gamecenter.common.base.activity.ToolBarActivity
import com.gh.gamecenter.common.base.fragment.BaseFragment_TabLayout
import com.gh.gamecenter.core.AppExecutor
import com.gh.common.constant.Config
import com.gh.gamecenter.common.constant.Constants
import com.gh.common.exposure.ExposureEvent
import com.gh.common.exposure.ExposureEvent.Companion.createEvent
import com.gh.common.exposure.ExposureManager.log
import com.gh.common.exposure.ExposureTraceUtils.appendTrace
import com.gh.common.exposure.ExposureType
import com.gh.gamecenter.common.constant.EntranceConsts.*
import com.gh.common.util.EntranceUtils.*
import com.gh.common.util.EntranceUtils.jumpActivity
import com.gh.gamecenter.*
import com.gh.gamecenter.amway.AmwayActivity
import com.gh.gamecenter.catalog.CatalogActivity
import com.gh.gamecenter.category.CategoryDirectoryActivity
import com.gh.gamecenter.category2.CategoryV2Activity
import com.gh.gamecenter.common.base.activity.BaseActivity
import com.gh.gamecenter.common.base.activity.BaseActivity_TabLayout
import com.gh.gamecenter.common.base.activity.ToolBarActivity
import com.gh.gamecenter.common.base.fragment.BaseFragment_TabLayout
import com.gh.gamecenter.common.constant.CommonConsts
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.common.constant.EntranceConsts
import com.gh.gamecenter.common.entity.CommunityEntity
import com.gh.gamecenter.common.entity.Display
import com.gh.gamecenter.common.entity.LinkEntity
import com.gh.gamecenter.common.constant.EntranceConsts.*
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.common.entity.*
import com.gh.gamecenter.common.retrofit.Response
import com.gh.gamecenter.common.utils.*
import com.gh.gamecenter.core.runOnIoThread
import com.gh.gamecenter.core.utils.ToastUtils
import com.gh.gamecenter.discovery.DiscoveryActivity
import com.gh.gamecenter.download.DownloadFragment.Companion.INDEX_UPDATE
import com.gh.gamecenter.entity.*
import com.gh.gamecenter.eventbus.EBSkip
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.gamecenter.feature.entity.MeEntity
import com.gh.gamecenter.feature.exposure.ExposureEvent
import com.gh.gamecenter.feature.exposure.ExposureEvent.Companion.createEvent
import com.gh.gamecenter.feature.exposure.ExposureType
import com.gh.gamecenter.forum.detail.ForumDetailActivity
import com.gh.gamecenter.forum.home.CommunityHomeFragment
import com.gh.gamecenter.fragment.MainWrapperFragment
@ -50,8 +53,8 @@ import com.gh.gamecenter.gamedetail.GameDetailFragment
import com.gh.gamecenter.gamedetail.fuli.kaifu.ServersCalendarActivity
import com.gh.gamecenter.gamedetail.history.HistoryApkListActivity
import com.gh.gamecenter.gamedetail.rating.RatingReplyActivity
import com.gh.gamecenter.help.HelpAndFeedbackBridge
import com.gh.gamecenter.login.user.UserManager
import com.gh.gamecenter.mygame.PlayedGameActivity
import com.gh.gamecenter.personalhome.UserHomeActivity
import com.gh.gamecenter.personalhome.background.PersonalityBackgroundActivity
import com.gh.gamecenter.personalhome.border.AvatarBorderActivity
@ -62,11 +65,10 @@ import com.gh.gamecenter.qa.questions.newdetail.NewQuestionDetailActivity
import com.gh.gamecenter.qa.subject.CommunitySubjectActivity
import com.gh.gamecenter.qa.video.detail.ForumVideoDetailActivity
import com.gh.gamecenter.retrofit.RetrofitManager
import com.gh.gamecenter.security.BindPhoneActivity
import com.gh.gamecenter.servers.GameServerTestActivity
import com.gh.gamecenter.servers.GameServersActivity
import com.gh.gamecenter.setting.SettingBridge
import com.gh.gamecenter.subject.SubjectActivity
import com.gh.gamecenter.suggest.SuggestType
import com.gh.gamecenter.tag.TagsActivity
import com.gh.gamecenter.toolbox.ToolBoxBlockActivity
import com.gh.gamecenter.video.data.VideoDataActivity
@ -143,6 +145,7 @@ object DirectUtils {
directToLinkPage(context, linkEntity, entrance, path, null)
}
@JvmStatic
fun directToLinkPage(
context: Context,
linkEntity: LinkEntity,
@ -181,7 +184,8 @@ object DirectUtils {
"common_collection",
"game_list",
"game_list_detail",
"bbs_video"
"bbs_video",
"explore_column"
)
fun directToLinkPage(
@ -248,11 +252,6 @@ object DirectUtils {
path
)
"community_special_column" -> directAskColumnDetail(
context, linkEntity.link
?: "", linkEntity.community!!, entrance, path
)
"web", "inurl", "web链接" -> {
when {
linkEntity.link!!.contains("v.douyin") && PackageHelper.localPackageNameSet.contains("com.ss.android.ugc.aweme") -> {
@ -283,11 +282,6 @@ object DirectUtils {
)
)
"all_community_article" -> directSimpleArticleList(
context, linkEntity.link
?: "", entrance, path
)
"category", "分类" -> directCategoryDirectory(context, linkEntity.link!!, linkEntity.text!!)
"catalog" -> directCatalog(context, linkEntity.link!!, linkEntity.text!!, entrance, path)
@ -355,7 +349,7 @@ object DirectUtils {
"mobile_bind" -> {
CheckLoginUtils.checkLogin(context, entrance) {
context.startActivity(BindPhoneActivity.getNormalIntent(context, false))
context.startActivity(SettingBridge.getBindPhoneNormalIntent(context, false))
}
}
@ -385,7 +379,7 @@ object DirectUtils {
"etiquette_exam" -> directToRegulationTestPage(context)
"setting" -> context.startActivity(SettingActivity.getIntent(context, false, entrance))
"setting" -> context.startActivity(SettingBridge.getSettingIntent(context, false, entrance))
"index_page" -> directToHomeTab(context)
@ -434,6 +428,8 @@ object DirectUtils {
"game_list_detail" -> directToGameCollectionDetail(context, linkEntity.link ?: "", entrance)
"explore_column" -> context.startActivity(DiscoveryActivity.getIntent(context, entrance))
"" -> {
// do nothing
}
@ -453,8 +449,9 @@ object DirectUtils {
@JvmStatic
fun directToQa(context: Context, text: String? = "", id: String) {
if (id.isEmpty()) return
val destination = RouteConsts.activity.qaActivity.toDestinationClass()
val bundle = Bundle()
bundle.putString(KEY_TO, QaActivity::class.java.simpleName)
bundle.putString(KEY_TO, destination?.name ?: "")
bundle.putString(KEY_NAVIGATION_TITLE, text)
bundle.putString(KEY_QA_ID, id)
jumpActivity(context, bundle)
@ -466,8 +463,9 @@ object DirectUtils {
@JvmStatic
fun directToQaCollection(context: Context, text: String, id: String) {
if (id.isEmpty()) return
val destination = RouteConsts.activity.qaActivity.toDestinationClass()
val bundle = Bundle()
bundle.putString(KEY_TO, QaActivity::class.java.simpleName)
bundle.putString(KEY_TO, destination?.name ?: "")
bundle.putString(KEY_NAVIGATION_TITLE, text)
bundle.putString(KEY_QA_COLLECTION_ID, id)
jumpActivity(context, bundle)
@ -585,19 +583,21 @@ object DirectUtils {
entrance: String? = null,
path: String? = null
) {
directToHomeActivity(context, userId, "", position, entrance, path)
directToHomeActivity(context, userId, "", "", position, entrance, path)
}
/**
* 跳转至个人主页
* @param position 定位到某个tab 0游戏 1发布
* @param type 类型
* @param type 类型 (发布)
* @param gameType 类型 (游戏)
*/
@JvmStatic
fun directToHomeActivity(
context: Context,
userId: String? = "",
type: String? = "",
gameType: String? = "",
position: Int? = 0,
entrance: String? = null,
path: String? = null
@ -610,6 +610,7 @@ object DirectUtils {
bundle.putString(KEY_ENTRANCE, BaseActivity.mergeEntranceAndPath(entrance, path))
bundle.putString(KEY_PATH, path)
bundle.putString(KEY_TYPE, UserHistoryViewModel.TYPE.fromValue(type).value)
bundle.putString(KEY_GAME, gameType)
bundle.putInt(KEY_POSITION, position ?: 0)
jumpActivity(context, bundle)
}
@ -704,11 +705,6 @@ object DirectUtils {
jumpActivity(context, bundle)
}
// 跳转至用户玩过的游戏
fun directToPlayedGame(context: Context, userId: String, entrance: String = "", path: String = "") {
context.startActivity(PlayedGameActivity.getIntent(context, userId, entrance, path))
}
// 专栏
@JvmStatic
fun directToSubject(
@ -748,7 +744,8 @@ object DirectUtils {
) {
val bundle = Bundle()
bundle.putString(KEY_ENTRANCE, entrance ?: ENTRANCE_BROWSER)
bundle.putString(KEY_TO, SuggestionActivity::class.java.simpleName)
val destination = RouteConsts.activity.suggestionActivity.toDestinationClass()
bundle.putString(KEY_TO, destination?.name ?: "")
if (isQaFeedback) {
bundle.putBoolean(KEY_IS_QA_FEEDBACK, true)
bundle.putString(KEY_QA_CONTENT_ID, qaContentId)
@ -767,6 +764,37 @@ object DirectUtils {
jumpActivity(context, bundle)
}
@JvmStatic
fun directToFeedbackCompat(
context: Context,
content: String? = null,
hintType: String? = null,
isQaFeedback: Boolean = false,
qaContentId: String? = "",
entrance: String? = null
) {
val bundle = Bundle()
bundle.putString(KEY_ENTRANCE, entrance ?: ENTRANCE_BROWSER)
val destination = RouteConsts.activity.suggestionActivity.toDestinationClass()
bundle.putString(KEY_TO, destination?.name ?: "")
if (isQaFeedback) {
bundle.putBoolean(KEY_IS_QA_FEEDBACK, true)
bundle.putString(KEY_QA_CONTENT_ID, qaContentId)
bundle.putSerializable(KEY_SUGGESTTYPE, SuggestType.normal)
} else {
bundle.putString(KEY_CONTENT, content)
if (TextUtils.isEmpty(hintType)) {
bundle.putSerializable(KEY_SUGGESTTYPE, SuggestType.gameQuestion)
bundle.putString(KEY_SUGGEST_HINT_TYPE, KEY_PLUGIN)
} else {
bundle.putSerializable(KEY_SUGGESTTYPE, SuggestType.normal)
bundle.putString(KEY_SUGGEST_HINT_TYPE, hintType)
}
}
EntranceUtils.jumpActivityCompat(context, bundle)
}
@JvmStatic
fun directToDownloadManager(context: Context, entrance: String? = null) {
val bundle = Bundle()
@ -861,15 +889,6 @@ object DirectUtils {
jumpActivity(context, bundle)
}
// 个人-系统消息
@JvmStatic
fun directToOfficialNotification(context: Context, entrance: String? = null) {
val bundle = Bundle()
bundle.putString(KEY_ENTRANCE, entrance ?: ENTRANCE_BROWSER)
bundle.putString(KEY_TO, MessageKeFuActivity::class.java.simpleName)
jumpActivity(context, bundle)
}
@JvmStatic
fun directToExternalBrowser(context: Context, url: String) {
try {
@ -1057,7 +1076,7 @@ object DirectUtils {
bundle.putString(KEY_PATH, path)
jumpActivity(context, bundle)
} else {
DialogUtils.showLowSystemVersionDialog(context)
DialogHelper.showVideoUnsupportedDialog(context)
}
}
@ -1099,7 +1118,7 @@ object DirectUtils {
bundle.putString(KEY_SECTION_NAME, sectionName)
jumpActivity(context, bundle)
} else {
DialogUtils.showLowSystemVersionDialog(context)
DialogHelper.showVideoUnsupportedDialog(context)
}
}
@ -1246,30 +1265,6 @@ object DirectUtils {
}
}
/**
* 跳转梦工厂小游戏
*/
/*@JvmStatic
fun directLetoGameCenter(context: Context) {
if (UserManager.getInstance().isLoggedIn) {
UserManager.getInstance().userInfoEntity?.run {
MgcAccountManager.syncAccount(context, if (idCard != null) idCard!!.name else name, mobile, name, icon, true,
object : SyncUserInfoListener {
override fun onSuccess(data: LoginResultBean?) {}
override fun onFail(code: String?, message: String?) {}
})
}
} else {
MgcAccountManager.exitAccount(context, object : SyncUserInfoListener {
override fun onSuccess(data: LoginResultBean?) {}
override fun onFail(code: String?, message: String?) {}
})
}
Leto.getInstance().startGameCenter(context)
}*/
/**
* 跳转分类
*/
@ -1336,47 +1331,6 @@ object DirectUtils {
jumpActivity(context, bundle)
}
/**
* 跳转到问题标签详情
*/
@JvmStatic
fun directAskColumnLabelDetail(
context: Context,
tag: String,
community: CommunityEntity,
entrance: String? = null,
path: String? = ""
) {
// val bundle = Bundle()
// bundle.putString(KEY_TO, AskColumnDetailActivity::class.java.name)
// bundle.putString(KEY_ASK_TAG, tag)
// bundle.putParcelable(KEY_COMMUNITY_DATA, community)
// bundle.putString(KEY_ENTRANCE, entrance ?: ENTRANCE_BROWSER)
// bundle.putString(KEY_PATH, path)
// jumpActivity(context, bundle)
}
/**
* 跳转到专栏详情
*/
@JvmStatic
fun directAskColumnDetail(
context: Context,
columnId: String,
community: CommunityEntity,
entrance: String? = null,
path: String? = ""
) {
// if (columnId.isEmpty()) return
// val bundle = Bundle()
// bundle.putString(KEY_TO, AskColumnDetailActivity::class.java.name)
// bundle.putString(KEY_COLUMN_ID, columnId)
// bundle.putParcelable(KEY_COMMUNITY_DATA, community)
// bundle.putString(KEY_ENTRANCE, entrance ?: ENTRANCE_BROWSER)
// bundle.putString(KEY_PATH, path)
// jumpActivity(context, bundle)
}
/**
* 跳转到板块
*/
@ -1412,20 +1366,6 @@ object DirectUtils {
jumpActivity(context, bundle)
}
/**
* 社区文章
*/
@JvmStatic
fun directSimpleArticleList(context: Context, sortType: String, entrance: String? = null, path: String? = "") {
// if (sortType.isEmpty()) return
// val bundle = Bundle()
// bundle.putString(KEY_TO, SimpleArticleListActivity::class.java.name)
// bundle.putString(KEY_TYPE, sortType)
// bundle.putString(KEY_ENTRANCE, entrance ?: ENTRANCE_BROWSER)
// bundle.putString(KEY_PATH, path)
// jumpActivity(context, bundle)
}
@JvmStatic
fun directGameZone(context: Context, gameId: String, url: String, entrance: String? = null) {
RetrofitManager.getInstance()
@ -1482,7 +1422,7 @@ object DirectUtils {
context.startActivity(intent)
// 这里换个线程操作是为了做一点延时
AppExecutor.ioExecutor.execute {
runOnIoThread {
EventBus.getDefault().post(EBSkip(MainActivity.EB_SKIP_MAIN, MainWrapperFragment.INDEX_HOME))
}
} else {
@ -1503,7 +1443,7 @@ object DirectUtils {
context.startActivity(intent)
// 这里换个线程操作是为了做一点延时
AppExecutor.ioExecutor.execute {
runOnIoThread {
EventBus.getDefault().post(EBSkip(MainActivity.EB_SKIP_MAIN, MainWrapperFragment.INDEX_BBS))
EventBus.getDefault().post(EBSkip(CommunityHomeFragment.EB_TAB, position))
}
@ -1526,7 +1466,7 @@ object DirectUtils {
context.startActivity(intent)
// 这里换个线程操作是为了做一点延时
AppExecutor.ioExecutor.execute {
runOnIoThread {
EventBus.getDefault().post(EBSkip(MainActivity.EB_SKIP_MAIN, MainWrapperFragment.INDEX_VIDEO))
}
} else {
@ -1545,7 +1485,7 @@ object DirectUtils {
context.startActivity(intent)
// 这里换个线程操作是为了做一点延时
AppExecutor.ioExecutor.execute {
runOnIoThread {
EventBus.getDefault().post(EBSkip(MainActivity.EB_SKIP_MAIN, MainWrapperFragment.INDEX_PERSONAL))
}
} else {
@ -1555,12 +1495,13 @@ object DirectUtils {
/**
* 跳转至使用帮助与反馈,请不要随意修改方法名
* @param position 使用帮助:[HelpAndFeedbackActivity.HELP_ITEM],意见反馈:[HelpAndFeedbackActivity.SUGGESTION_ITEM]
* @param position 使用帮助:[CommonConsts.TAB_MAIN],意见反馈:[CommonConsts.TAB_SUB]
*/
@JvmStatic
fun directToHelpAndFeedback(context: Context, position: Int = HelpAndFeedbackActivity.HELP_ITEM) {
fun directToHelpAndFeedback(context: Context, position: Int = CommonConsts.TAB_MAIN) {
val destination = RouteConsts.activity.helpAndFeedbackActivity.toDestinationClass()
val bundle = Bundle()
bundle.putString(KEY_TO, HelpAndFeedbackActivity::class.java.name)
bundle.putString(KEY_TO, destination?.name ?: "")
bundle.putInt(BaseActivity_TabLayout.PAGE_INDEX, position)
jumpActivity(context, bundle)
}
@ -1916,7 +1857,7 @@ object DirectUtils {
diagnosis: String = "",
requestCode: Int? = null
) {
val intent = SuggestionActivity.getIntent(
val intent = HelpAndFeedbackBridge.getIntent(
context,
type,
hiddenHint,

View File

@ -4,8 +4,8 @@ import android.content.Context
import android.os.Build
import com.gh.gamecenter.common.utils.DialogHelper
import com.gh.gamecenter.core.utils.EmptyCallback
import com.gh.gamecenter.entity.ApkEntity
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.feature.entity.ApkEntity
import com.gh.gamecenter.feature.entity.GameEntity
object DownloadDialogHelper {

View File

@ -3,8 +3,9 @@ package com.gh.common.util
import com.gh.common.filter.RegionSettingHelper
import com.gh.download.DownloadManager
import com.gh.gamecenter.common.constant.EntranceConsts
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.gamecenter.common.retrofit.Response
import com.gh.gamecenter.feature.utils.ApkActiveUtils
import com.gh.gamecenter.retrofit.RetrofitManager
import com.halo.assistant.HaloApp
import io.reactivex.schedulers.Schedulers

View File

@ -10,34 +10,34 @@ import androidx.recyclerview.widget.RecyclerView
import com.gh.common.chain.*
import com.gh.common.constant.Config
import com.gh.common.dialog.DeviceRemindDialog
import com.gh.common.exposure.ExposureEvent
import com.gh.gamecenter.feature.exposure.ExposureEvent
import com.gh.common.filter.RegionSettingHelper
import com.gh.common.history.HistoryHelper
import com.gh.common.repository.ReservationRepository
import com.gh.common.simulator.NewSimulatorGameManager
import com.gh.common.simulator.SimulatorDownloadManager
import com.gh.common.simulator.SimulatorGameManager
import com.gh.common.view.DownloadButton
import com.gh.gamecenter.feature.view.DownloadButton
import com.gh.common.xapk.XapkInstaller
import com.gh.common.xapk.XapkInstaller.cancelUnzipTask
import com.gh.common.xapk.XapkUnzipStatus
import com.gh.download.DownloadManager
import com.gh.download.dialog.DownloadDialog
import com.gh.gamecenter.DownloadManagerActivity
import com.gh.gamecenter.R
import com.gh.gamecenter.WebActivity
import com.gh.gamecenter.adapter.viewholder.GameViewHolder
import com.gh.gamecenter.common.callback.CancelListener
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.common.constant.EntranceConsts
import com.gh.gamecenter.common.entity.LinkEntity
import com.gh.gamecenter.common.utils.*
import com.gh.gamecenter.core.utils.*
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.common.entity.LinkEntity
import com.gh.gamecenter.energy.EnergyBridge
import com.gh.gamecenter.entity.PluginLocation
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.gamecenter.feature.entity.PluginLocation
import com.gh.gamecenter.gamedetail.dialog.GamePermissionDialogFragment
import com.gh.gamecenter.manager.PackagesManager
import com.gh.gamecenter.teenagermode.TeenagerModeActivity
import com.gh.vspace.VDownloadManagerActivity
import com.gh.vspace.VHelper
import com.lightgame.download.DownloadConfig
import com.lightgame.download.DownloadEntity
@ -119,13 +119,13 @@ object DownloadItemUtils {
fun updateItemWithReserveStatus(holder: GameViewHolder, gameEntity: GameEntity) {
if ("download" == gameEntity.reserveStatus) {
// 已上线
updateItem(holder.gameDes.context, gameEntity, holder, false)
updateItem(holder.gameDownloadBtn.context, gameEntity, holder, false)
} else if ("appointment" == gameEntity.reserveStatus) {
// 已预约
holder.gameDownloadBtn.text = "已预约"
holder.gameDownloadBtn.visibility = View.VISIBLE
holder.gameDownloadBtn.buttonStyle = DownloadButton.ButtonStyle.RESERVED
updateItemViewStatus(holder, false, null, null)
updateItemViewStatus(holder, null, null)
}
}
@ -165,7 +165,8 @@ object DownloadItemUtils {
) {
// 显示预约
if (gameEntity.isReservable) {
updateItemViewStatus(holder, false, briefStyle, gameEntity.columnRecommend, isShowRecommendStar)
holder.multiVersionDownloadTv?.visibility = View.GONE
updateItemViewStatus(holder, briefStyle, gameEntity.columnRecommend, isShowRecommendStar)
updateDownloadButton(
context,
holder.gameDownloadBtn,
@ -176,11 +177,16 @@ object DownloadItemUtils {
return
}
if (gameEntity.getApk().isEmpty() || gameEntity.downloadOffStatus != null) {
updateItemViewStatus(holder, false, briefStyle, gameEntity.columnRecommend, isShowRecommendStar)
holder.multiVersionDownloadTv?.visibility = View.GONE
holder.gameDownloadTips?.visibility = View.GONE
updateItemViewStatus(holder, briefStyle, gameEntity.columnRecommend, isShowRecommendStar)
} else if (gameEntity.getApk().size == 1) {
updateNormalItem(context, holder, gameEntity, isShowPlatform, briefStyle, isShowRecommendStar)
holder.multiVersionDownloadTv?.visibility = View.GONE
holder.gameDownloadTips?.visibility = View.GONE
updateNormalItem(context, holder, gameEntity, briefStyle, isShowRecommendStar)
} else {
updatePluginItem(context, holder, gameEntity, isShowPlatform, briefStyle, isShowRecommendStar)
holder.multiVersionDownloadTv?.visibility = View.VISIBLE
updatePluginItem(context, holder, gameEntity, briefStyle, isShowRecommendStar)
}
updateDownloadButton(
context,
@ -261,42 +267,58 @@ object DownloadItemUtils {
downloadEntity = VHelper.getDownloadEntitySnapshot(gameEntity.id, gameEntity.getUniquePackageName())
}
if (downloadEntity == null) {
val entryMap: ArrayMap<String, DownloadEntity> = gameEntity.getEntryMap()
val apkEntity = gameEntity.getApk()[0]
if (entryMap.isNotEmpty()) {
downloadEntity = entryMap[apkEntity.getPlatform()]
}
}
if (downloadEntity != null) {
downloadBtn.apply {
val status = downloadEntity.status
if (status == DownloadStatus.downloading) {
setText(R.string.downloading)
buttonStyle = DownloadButton.ButtonStyle.DOWNLOADING_NORMAL
} else if (status == DownloadStatus.waiting) {
setText(R.string.waiting)
buttonStyle = DownloadButton.ButtonStyle.WAITING
} else if (status == DownloadStatus.pause || status == DownloadStatus.timeout || status == DownloadStatus.neterror || status == DownloadStatus.subscribe || status == DownloadStatus.overflow) {
setText(R.string.downloading)
buttonStyle = DownloadButton.ButtonStyle.DOWNLOADING_NORMAL
} else if (status == DownloadStatus.done) {
val xapkStatus = downloadEntity.meta[XapkInstaller.XAPK_UNZIP_STATUS]
if (XapkUnzipStatus.UNZIPPING.name == xapkStatus) {
setText(R.string.unzipping)
when (downloadEntity.status) {
DownloadStatus.done -> {
if (downloadEntity.isSimulatorGame() && gameEntity.simulator != null) {
GameUtils.setDownloadBtnStatus(context, gameEntity, downloadBtn, pluginLocation)
} else if (downloadEntity.isVGame()) {
buttonStyle =
if (PackagesManager.isCanUpdate(
downloadEntity.gameId,
downloadEntity.packageName
)
) {
setText(R.string.update)
DownloadButton.ButtonStyle.NORMAL
} else {
setText(R.string.launch)
DownloadButton.ButtonStyle.LAUNCH_OR_OPEN
}
} else {
buttonStyle = DownloadButton.ButtonStyle.INSTALL_NORMAL
setText(R.string.install)
}
buttonStyle =
if (downloadEntity.isPluggable && PackagesManager.isInstalled(downloadEntity.packageName)) {
DownloadButton.ButtonStyle.PLUGIN
} else {
DownloadButton.ButtonStyle.NORMAL
}
}
DownloadStatus.pause,
DownloadStatus.timeout,
DownloadStatus.neterror,
DownloadStatus.subscribe,
DownloadStatus.overflow -> {
buttonStyle = DownloadButton.ButtonStyle.NORMAL
return
setText(R.string.resume)
}
if (downloadEntity.isSimulatorGame() && gameEntity.simulator != null) {
DownloadStatus.cancel -> {
GameUtils.setDownloadBtnStatus(context, gameEntity, downloadBtn, pluginLocation)
} else if (downloadEntity.isVGame()) {
if (PackagesManager.isCanUpdate(downloadEntity.gameId, downloadEntity.packageName)) {
setText(R.string.update)
} else {
setText(R.string.launch)
}
} else {
setText(R.string.install)
}
buttonStyle =
if (downloadEntity.isPluggable && PackagesManager.isInstalled(downloadEntity.packageName)) {
DownloadButton.ButtonStyle.PLUGIN
} else {
DownloadButton.ButtonStyle.NORMAL
}
else -> {
// do nothing
}
}
}
} else {
@ -309,192 +331,184 @@ object DownloadItemUtils {
// 更新正常的条目只有一个apk包
private fun updateNormalItem(
context: Context, holder: GameViewHolder, gameEntity: GameEntity,
isShowPlatform: Boolean, briefStyle: String?,
context: Context,
holder: GameViewHolder,
gameEntity: GameEntity,
briefStyle: String?,
isShowRecommendStar: Boolean = false
) {
val entryMap: ArrayMap<String, DownloadEntity> = gameEntity.getEntryMap()
val apkEntity = gameEntity.getApk()[0]
var downloadEntity: DownloadEntity? = null
if (entryMap.isNotEmpty()) {
val downloadEntity = entryMap[apkEntity.getPlatform()]
if (downloadEntity != null) {
if (downloadEntity.isSimulatorGame()) {
if (downloadEntity.status != DownloadStatus.done) {
// 更改进度条和提示文本的状态
changeStatus(context, holder, downloadEntity, isShowPlatform, true)
return
}
} else {
downloadEntity = entryMap[apkEntity.getPlatform()]
}
if (downloadEntity == null) {
downloadEntity = DownloadManager.getInstance().getDownloadEntitySnapshot(gameEntity)
}
if (downloadEntity != null) {
if (downloadEntity.isSimulatorGame()) {
if (downloadEntity.status != DownloadStatus.done) {
// 更改进度条和提示文本的状态
changeStatus(context, holder, downloadEntity, isShowPlatform, true, isShowRecommendStar)
changeStatus(context, holder, downloadEntity)
return
}
} else {
// 更改进度条和提示文本的状态
changeStatus(context, holder, downloadEntity)
return
}
}
updateItemViewStatus(holder, false, briefStyle, gameEntity.columnRecommend, isShowRecommendStar)
updateItemViewStatus(holder, briefStyle, gameEntity.columnRecommend, isShowRecommendStar)
}
// 更新插件的条目有多个apk包
private fun updatePluginItem(
context: Context, holder: GameViewHolder, gameEntity: GameEntity,
isShowPlatform: Boolean, briefStyle: String?,
context: Context,
holder: GameViewHolder,
gameEntity: GameEntity,
briefStyle: String?,
isShowRecommendStar: Boolean = false
) {
val entryMap = gameEntity.getEntryMap()
var downloadEntity: DownloadEntity? = null
if (entryMap.isNotEmpty()) {
val queue = DownloadManager.getInstance().getQueue(gameEntity.name)
val downloadEntity = if (queue != null && !queue.isEmpty()) {
downloadEntity = if (queue != null && !queue.isEmpty()) {
entryMap[queue.peek()]
} else {
entryMap[entryMap.keyAt(0)]
}
if (downloadEntity != null) {
// 更改进度条和提示文本的状态
changeStatus(context, holder, downloadEntity, isShowPlatform, false, isShowRecommendStar)
return
}
}
updateItemViewStatus(holder, false, briefStyle, gameEntity.columnRecommend, isShowRecommendStar)
if (downloadEntity == null) {
downloadEntity = DownloadManager.getInstance().getDownloadEntitySnapshot(gameEntity)
}
if (downloadEntity != null) {
// 更改进度条和提示文本的状态
changeStatus(context, holder, downloadEntity, gameEntity.getApk().size > 1)
return
}
updateItemViewStatus(holder, briefStyle, gameEntity.columnRecommend, isShowRecommendStar)
}
// 更改进度条和提示文本的状态
fun changeStatus(
context: Context, holder: GameViewHolder, downloadEntity: DownloadEntity,
isShowPlatform: Boolean, isNormal: Boolean, isShowRecommendStar: Boolean = false
context: Context,
holder: GameViewHolder,
downloadEntity: DownloadEntity,
isMultiVersion: Boolean = false
) {
val status = downloadEntity.status
// 畅玩游戏下载完成时不再需要显示进度条
val shouldShowDownload = !(downloadEntity.isVGame() && status == DownloadStatus.done)
val platform = PlatformUtils.getInstance(context).getPlatformName(downloadEntity.platform)
updateItemViewStatus(holder, shouldShowDownload, null, null, isShowRecommendStar)
holder.gameProgressbar.progressDrawable = R.drawable.progressbar_bg_style.toDrawable()
if (status == DownloadStatus.downloading) {
if (DownloadStatus.pause != DownloadManager.getInstance().getStatus(downloadEntity.url)) {
holder.gameProgressbar.progress = (downloadEntity.percent * 10).toInt()
if (isShowPlatform && platform != null) {
holder.gameDownloadSpeed.text = String.format(
"%s - %s(剩%s)", platform,
SpeedUtils.getSpeed(downloadEntity.speed),
SpeedUtils.getRemainTime(
downloadEntity.size,
downloadEntity.progress,
downloadEntity.speed * 1024
)
)
when (downloadEntity.status) {
DownloadStatus.redirected,
DownloadStatus.downloading -> {
if (isMultiVersion) {
holder.gameDownloadBtn.buttonStyle = DownloadButton.ButtonStyle.NORMAL
val darkMode = (holder.gameDownloadTips?.getTag(R.string.is_dark_mode_on_id) as? Boolean) ?: false
val isDarkModeChanged = DarkModeUtils.isDarkModeOn(context) != darkMode
if (holder.gameDownloadTips?.visibility == View.GONE || holder.gameDownloadTips?.isAnimating == false || isDarkModeChanged) {
holder.gameDownloadTips?.visibility = View.VISIBLE
holder.gameDownloadTips?.setDownloadTipsAnimation(true)
}
holder.gameDownloadTips?.setTag(R.string.is_dark_mode_on_id, DarkModeUtils.isDarkModeOn(context))
} else {
holder.gameDownloadSpeed.text = String.format(
"%s(剩%s)", SpeedUtils.getSpeed(downloadEntity.speed),
SpeedUtils.getRemainTime(
downloadEntity.size,
downloadEntity.progress,
downloadEntity.speed * 1024
)
)
holder.gameDownloadTips?.visibility = View.GONE
holder.gameDownloadBtn.buttonStyle = DownloadButton.ButtonStyle.DOWNLOADING_NORMAL
holder.gameDownloadBtn.progress = (downloadEntity.percent * 10).toInt()
holder.gameDownloadBtn.text = downloadEntity.percent.toString() + "%"
}
holder.gameDownloadPercentage.text = downloadEntity.percent.toString() + "%"
}
} else if (status == DownloadStatus.waiting) {
holder.gameProgressbar.progress = (downloadEntity.percent * 10).toInt()
if (isShowPlatform && platform != null) {
holder.gameDownloadSpeed.text = String.format("%s - 等待", platform)
} else {
holder.gameDownloadSpeed.text = "等待"
DownloadStatus.waiting -> {
if (isMultiVersion) {
holder.gameDownloadTips?.visibility = View.VISIBLE
holder.gameDownloadTips?.setDownloadTipsAnimation(false)
}
holder.gameDownloadBtn.buttonStyle = DownloadButton.ButtonStyle.WAITING
holder.gameDownloadBtn.text = context.getString(R.string.waiting)
}
holder.gameDownloadPercentage.text = downloadEntity.percent.toString() + "%"
} else if (status == DownloadStatus.pause || status == DownloadStatus.timeout || status == DownloadStatus.neterror || status == DownloadStatus.subscribe || status == DownloadStatus.overflow) {
holder.gameProgressbar.progress = (downloadEntity.percent * 10).toInt()
if (isShowPlatform && platform != null) {
holder.gameDownloadSpeed.text = String.format("%s - 暂停", platform)
} else {
holder.gameDownloadSpeed.text = "暂停"
DownloadStatus.pause,
DownloadStatus.timeout,
DownloadStatus.neterror,
DownloadStatus.subscribe,
DownloadStatus.overflow -> {
if (isMultiVersion) {
holder.gameDownloadTips?.visibility = View.VISIBLE
holder.gameDownloadTips?.setDownloadTipsAnimation(false)
}
holder.gameDownloadBtn.buttonStyle = DownloadButton.ButtonStyle.NORMAL
holder.gameDownloadBtn.text = context.getString(R.string.resume)
}
holder.gameDownloadPercentage.text = downloadEntity.percent.toString() + "%"
} else if (status == DownloadStatus.done) {
val xapkStatus = downloadEntity.meta[XapkInstaller.XAPK_UNZIP_STATUS]
if (XapkUnzipStatus.UNZIPPING.name == xapkStatus) {
val percent = downloadEntity.meta[XapkInstaller.XAPK_UNZIP_PERCENT]
holder.gameProgressbar.progressDrawable =
context.resources.getDrawable(R.drawable.progressbar_xapk_style)
holder.gameDownloadSpeed.setText(R.string.unzipping)
holder.gameProgressbar.progress = (java.lang.Float.valueOf(percent) * 10).toInt()
holder.gameDownloadPercentage.text = "$percent%"
return
DownloadStatus.done -> {
if (isMultiVersion) {
holder.gameDownloadTips?.visibility = View.VISIBLE
holder.gameDownloadTips?.setDownloadTipsAnimation(false)
}
val xapkStatus = downloadEntity.meta[XapkInstaller.XAPK_UNZIP_STATUS]
if (XapkUnzipStatus.UNZIPPING.name == xapkStatus) {
val percent = downloadEntity.meta[XapkInstaller.XAPK_UNZIP_PERCENT]
holder.gameDownloadBtn.progress = (java.lang.Float.valueOf(percent) * 10).toInt()
holder.gameDownloadBtn.text = "$percent%"
return
} else if (XapkUnzipStatus.FAILURE.name == xapkStatus) {
holder.gameDownloadBtn.setText(R.string.install)
holder.gameDownloadBtn.buttonStyle = DownloadButton.ButtonStyle.INSTALL_NORMAL
return
}
holder.gameDownloadBtn.progress = 1000
holder.gameDownloadBtn.setText(R.string.hundred_percent)
}
holder.gameProgressbar.progress = 1000
if (isShowPlatform && platform != null) {
holder.gameDownloadSpeed.text = String.format("%s - 下载完成", platform)
} else {
holder.gameDownloadSpeed.text = "下载完成"
else -> {
holder.gameDownloadTips?.visibility = View.GONE
}
holder.gameDownloadPercentage.setText(R.string.hundred_percent)
}
}
private fun updateItemViewStatus(
holder: GameViewHolder,
showDownload: Boolean,
briefStyle: String?,
recommendStyle: LinkEntity?,
isShowRecommendStar: Boolean = false
) {
if (showDownload) {
holder.gameDownloadTips?.visibility = View.GONE
// 推荐指数优先,现暂时为游戏单详情列表游戏使用
if (isShowRecommendStar && holder.recommendStarInfo != null) {
holder.recommendStarInfo!!.visibility = View.VISIBLE
if (holder.gameRating != null) holder.gameRating!!.visibility = View.GONE
holder.gameDes.visibility = View.GONE
holder.gameProgressbar.visibility = View.VISIBLE
holder.gameInfo.visibility = View.VISIBLE
holder.gameDes?.visibility = View.GONE
return
}
// 推荐优先,有推荐内容时不执行下面的 star 和 brief 代码块
if (briefStyle != null && recommendStyle != null && briefStyle.contains("recommend")) {
if (holder.recommendContainer != null) {
holder.recommendContainer!!.visibility = View.VISIBLE
}
if (holder.gameRating != null) holder.gameRating!!.visibility = View.GONE
holder.gameDes?.visibility = View.GONE
holder.recommendTv?.text = recommendStyle.text
if (TextUtils.isEmpty(recommendStyle.icon)) {
holder.recommendIv?.visibility = View.GONE
holder.recommendContainer?.setPadding(6F.dip2px(), 0, 8F.dip2px(), 0)
} else {
holder.recommendIv?.visibility = View.VISIBLE
ImageUtils.display(holder.recommendIv, recommendStyle.icon)
}
return
} else {
if (holder.recommendContainer != null) {
holder.recommendContainer!!.visibility = View.GONE
}
if (holder.recommendStarInfo != null) {
holder.recommendStarInfo!!.visibility = View.GONE
}
}
if (briefStyle != null && briefStyle.contains("star")) {
if (holder.gameRating != null) holder.gameRating!!.visibility = View.VISIBLE
} else {
holder.gameProgressbar.visibility = View.GONE
holder.gameInfo.visibility = View.GONE
if (holder.gameRating != null) holder.gameRating!!.visibility = View.GONE
}
// 推荐指数优先,现暂时为游戏单详情列表游戏使用
if (isShowRecommendStar && holder.recommendStarInfo != null) {
holder.recommendStarInfo!!.visibility = View.VISIBLE
if (holder.gameRating != null) holder.gameRating!!.visibility = View.GONE
holder.gameDes.visibility = View.GONE
return
}
// 推荐优先,有推荐内容时不执行下面的 star 和 brief 代码块
if (briefStyle != null && recommendStyle != null && briefStyle.contains("recommend")) {
if (holder.recommendContainer != null) {
holder.recommendContainer!!.visibility = View.VISIBLE
}
if (holder.gameRating != null) holder.gameRating!!.visibility = View.GONE
holder.gameDes.visibility = View.GONE
holder.recommendTv.text = recommendStyle.text
if (TextUtils.isEmpty(recommendStyle.icon)) {
holder.recommendIv.visibility = View.GONE
holder.recommendContainer?.setPadding(6F.dip2px(), 0, 8F.dip2px(), 0)
} else {
holder.recommendIv.visibility = View.VISIBLE
ImageUtils.display(holder.recommendIv, recommendStyle.icon)
}
return
} else {
if (holder.recommendContainer != null) {
holder.recommendContainer!!.visibility = View.GONE
}
}
if (briefStyle != null && briefStyle.contains("star")) {
if (holder.gameRating != null) holder.gameRating!!.visibility = View.VISIBLE
} else {
if (holder.gameRating != null) holder.gameRating!!.visibility = View.GONE
}
// 缺省情况下回落到游戏简介
if (TextUtils.isEmpty(briefStyle) || briefStyle!!.contains("brief") || briefStyle.contains("recommend")) {
holder.gameDes.visibility = View.VISIBLE
} else {
holder.gameDes.visibility = View.GONE
}
// 缺省情况下回落到游戏简介
if (TextUtils.isEmpty(briefStyle) || briefStyle!!.contains("brief") || briefStyle.contains("recommend")) {
holder.gameDes?.visibility = View.VISIBLE
} else {
holder.gameDes?.visibility = View.GONE
}
}
@ -561,7 +575,7 @@ object DownloadItemUtils {
@JvmStatic
fun setOnClickListener(
context: Context,
downloadBtn: DownloadButton,
downloadBtn: View,
gameEntity: GameEntity,
position: Int,
adapter: RecyclerView.Adapter<out RecyclerView.ViewHolder?>?,
@ -641,30 +655,22 @@ object DownloadItemUtils {
allStateClickCallback?.onCallback()
clickCallback?.onCallback()
if ("download" == gameEntity.reserveStatus) {
ReservationHelper.showDeleteReservationDialog(context, object : EmptyCallback {
override fun onCallback() {
ReservationHelper.deleteReservation(gameEntity, object : EmptyCallback {
override fun onCallback() {
adapter?.notifyItemChanged(position)
refreshCallback?.onCallback()
}
})
ReservationHelper.showDeleteReservationDialog(context) {
ReservationHelper.deleteReservation(gameEntity) {
adapter?.notifyItemChanged(position)
refreshCallback?.onCallback()
}
})
}
} else {
ReservationHelper.showCancelReservationDialog(context, object : EmptyCallback {
override fun onCallback() {
NewFlatLogUtils.logMyGameCancelReserveDialogClick(
"确定取消",
gameEntity.id,
gameEntity.name ?: ""
)
ReservationHelper.cancelReservation(gameEntity, object : EmptyCallback {
override fun onCallback() {
adapter?.notifyItemChanged(position)
refreshCallback?.onCallback()
}
})
ReservationHelper.showCancelReservationDialog(context, {
NewFlatLogUtils.logMyGameCancelReserveDialogClick(
"确定取消",
gameEntity.id,
gameEntity.name ?: ""
)
ReservationHelper.cancelReservation(gameEntity) {
adapter?.notifyItemChanged(position)
refreshCallback?.onCallback()
}
}, object : CancelListener {
override fun onCancel() {
@ -707,26 +713,24 @@ object DownloadItemUtils {
}
} else if (gameEntity.getApk().size == 1) {
downloadBtn.setOnClickListener {
val clickRunnable = object : EmptyCallback {
override fun onCallback() {
allStateClickCallback?.onCallback()
clickCallback?.onCallback()
onNormalClick(
context,
downloadBtn,
gameEntity,
position,
adapter,
entrance,
location,
traceEvent,
refreshCallback
)
}
val clickRunnable = EmptyCallback {
allStateClickCallback?.onCallback()
clickCallback?.onCallback()
onNormalClick(
context,
downloadBtn,
gameEntity,
position,
adapter,
entrance,
location,
traceEvent,
refreshCallback
)
}
// 启动不需要请求存储权限
if (downloadBtn.text.toString() == context.getString(R.string.launch)) {
if (downloadBtn is DownloadButton && downloadBtn.text == context.getString(R.string.launch)) {
clickRunnable.onCallback()
} else {
PermissionHelper.checkStoragePermissionBeforeAction(context, clickRunnable)
@ -755,7 +759,7 @@ object DownloadItemUtils {
@JvmOverloads
fun onNormalClick(
context: Context,
downloadBtn: DownloadButton,
downloadBtn: View?,
gameEntity: GameEntity,
position: Int,
adapter: RecyclerView.Adapter<out RecyclerView.ViewHolder?>?,
@ -764,11 +768,12 @@ object DownloadItemUtils {
traceEvent: ExposureEvent? = null,
refreshCallback: EmptyCallback? = null
) {
val str = downloadBtn.text.toString()
val str = if (downloadBtn is DownloadButton) downloadBtn.text else context.getString(R.string.download)
if (gameEntity.getApk().isEmpty()) return
val apk = gameEntity.getApk().safelyGetInRelease(0) ?: return
if (str == context.getString(R.string.download)) {
ChainBuilder().apply {
addHandler(UpdateNewSimulatorHandler())
addHandler(GamePermissionHandler())
addHandler(BrowserInstallHandler())
addHandler(PackageCheckHandler())
@ -785,6 +790,7 @@ object DownloadItemUtils {
DataLogUtils.uploadGameLog(context, gameEntity.id, gameEntity.name, entrance)
} else if (str == context.getString(R.string.attempt)) {
ChainBuilder().apply {
addHandler(UpdateNewSimulatorHandler())
addHandler(GamePermissionHandler())
addHandler(BrowserInstallHandler())
addHandler(PackageCheckHandler())
@ -839,9 +845,16 @@ object DownloadItemUtils {
if (gameEntity.simulator != null) {
val isInstalled =
PackageUtils.isInstalledFromAllPackage(context, gameEntity.simulator!!.apk!!.packageName)
if (downloadEntity != null && SimulatorGameManager.isSimulatorGame(gameEntity) && !isInstalled) {
val isInstalledNewSimulator = SimulatorGameManager.isNewSimulatorInstalled(context)
val isInstalledOldSimulator = SimulatorGameManager.isOldSimulatorInstalled(context)
var simulator = gameEntity.simulator
val newSimulator = Config.getNewSimulatorEntitySetting()
if (!isInstalledOldSimulator && newSimulator != null && newSimulator.active) {//在没有安装旧的模拟器且有配置新版模拟器 才使用新版模拟器 否则还是用以前旧的
simulator = newSimulator
}
if (downloadEntity != null && SimulatorGameManager.isSimulatorGame(gameEntity) && !isInstalled && !isInstalledNewSimulator) {
SimulatorDownloadManager.getInstance().showDownloadDialog(
context, gameEntity.simulator,
context, simulator,
SimulatorDownloadManager.SimulatorLocation.LAUNCH, gameEntity.id, gameEntity.name!!, null
)
return
@ -855,9 +868,12 @@ object DownloadItemUtils {
}
} else if (str == context.getString(R.string.launch)) {
EnergyBridge.postEnergyTask("play_game", gameEntity.id, gameEntity.getApk()[0].packageName)
//启动模拟器游戏
if (SimulatorGameManager.isSimulatorGame(gameEntity)) {
if (NewSimulatorGameManager.shouldShowUpdateNewSimulatorAlert(context)) {
NewSimulatorGameManager.showUpdateNewsSimulator(context, null)
return
}
val downloadEntity = SimulatorGameManager.findDownloadEntityByUrl(gameEntity.getApk()[0].url)
if (downloadEntity != null) {
val file = File(downloadEntity.path)
@ -865,6 +881,7 @@ object DownloadItemUtils {
download(context, gameEntity, downloadBtn, entrance, location, false, traceEvent)
return
}
NewFlatLogUtils.logSimulatorGameCardClick("启动")
SimulatorGameManager.launchSimulatorGame(downloadEntity, gameEntity)
}
return
@ -895,15 +912,31 @@ object DownloadItemUtils {
}
})
} else {
if (gameEntity.isVGame()) {
context.startActivity(VDownloadManagerActivity.getIntent(context, true))
} else {
context.startActivity(
DownloadManagerActivity.getDownloadMangerIntent(
context,
apk.url, entrance + "+(" + location.split(":").toTypedArray()[0] + ")"
)
)
var downloadEntity = DownloadManager.getInstance().getDownloadEntitySnapshot(gameEntity)
if (downloadEntity == null && gameEntity.getApk().size == 1) {
val entryMap: ArrayMap<String, DownloadEntity> = gameEntity.getEntryMap()
val apkEntity = gameEntity.getApk()[0]
if (entryMap.isNotEmpty()) {
downloadEntity = entryMap[apkEntity.getPlatform()]
}
}
if (downloadEntity != null) {
val xapkStatus = downloadEntity.meta[XapkInstaller.XAPK_UNZIP_STATUS]
if (XapkUnzipStatus.UNZIPPING.name == xapkStatus) {
cancelUnzipTask(downloadEntity)
return
}
when (str) {
context.getString(R.string.resume) -> {
DownloadManager.getInstance().resume(downloadEntity, true)
}
context.getString(R.string.waiting) -> {
Utils.toast(context, "最多只能同时下载三个任务,请稍等")
}
else -> {
DownloadManager.getInstance().pause(downloadEntity.url)
}
}
}
}
}
@ -912,7 +945,7 @@ object DownloadItemUtils {
private fun download(
context: Context,
gameEntity: GameEntity,
downloadBtn: DownloadButton,
downloadBtn: View?,
entrance: String,
location: String,
isSubscribe: Boolean,
@ -932,8 +965,10 @@ object DownloadItemUtils {
traceEvent
)
Utils.toast(context, gameEntity.name + "已加入下载队列")
downloadBtn.setText(R.string.downloading)
downloadBtn.buttonStyle = DownloadButton.ButtonStyle.DOWNLOADING_NORMAL
if (downloadBtn is DownloadButton) {
downloadBtn.text = "0%"
downloadBtn.buttonStyle = DownloadButton.ButtonStyle.DOWNLOADING_NORMAL
}
DeviceRemindDialog.showDeviceRemindDialog(context, gameEntity)
} else {
Utils.toast(context, msg)
@ -942,15 +977,22 @@ object DownloadItemUtils {
//插件化
private fun plugin(
context: Context, gameEntity: GameEntity, downloadBtn: DownloadButton, entrance: String,
location: String, isSubscribe: Boolean, traceEvent: ExposureEvent?
context: Context,
gameEntity: GameEntity,
downloadBtn: View?,
entrance: String,
location: String,
isSubscribe: Boolean,
traceEvent: ExposureEvent?
) {
val msg = FileUtils.isCanDownload(context, gameEntity.getApk()[0].size)
if (TextUtils.isEmpty(msg)) {
DownloadManager.createDownload(context, gameEntity, "插件化", entrance, location, isSubscribe, traceEvent)
Utils.toast(context, gameEntity.name + "已加入下载队列")
downloadBtn.setText(R.string.downloading)
downloadBtn.buttonStyle = DownloadButton.ButtonStyle.DOWNLOADING_PLUGIN
if (downloadBtn is DownloadButton) {
downloadBtn.setText(R.string.downloading)
downloadBtn.buttonStyle = DownloadButton.ButtonStyle.DOWNLOADING_PLUGIN
}
} else {
Utils.toast(context, msg)
}
@ -958,8 +1000,11 @@ object DownloadItemUtils {
//安装
private fun install(
context: Context, gameEntity: GameEntity, position: Int,
adapter: RecyclerView.Adapter<out RecyclerView.ViewHolder?>?, refreshCallback: EmptyCallback?
context: Context,
gameEntity: GameEntity,
position: Int,
adapter: RecyclerView.Adapter<out RecyclerView.ViewHolder?>?,
refreshCallback: EmptyCallback?
) {
val apkEntity = gameEntity.getApk()[0]
val downloadEntity = DownloadManager.getInstance().getDownloadEntitySnapshot(gameEntity)

View File

@ -35,7 +35,7 @@ object DownloadNotificationHelper {
const val ACTION_DOWNLOAD = "com.gh.gamecenter.DOWNLOAD"
const val ACTION_VDOWNLOAD = "com.gh.gamecenter.VDOWNLOAD"
private val mNotifyMap: MutableMap<String, Long> = mutableMapOf()
private val mNotifyMap: MutableMap<String, Long> by lazy { mutableMapOf() }
private fun getNotificationManager(): NotificationManager {
return HaloApp.getInstance().application.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
@ -196,13 +196,6 @@ object DownloadNotificationHelper {
}
}
@JvmStatic
fun initDownloadNotification(downloadTasks: MutableList<DownloadEntity>) {
for (downloadTask in downloadTasks) {
addOrUpdateDownloadNotification(downloadTask)
}
}
private fun getNotificationIcon(): Int {
return R.mipmap.logo
}

View File

@ -1,6 +1,6 @@
package com.gh.common.util
import android.preference.PreferenceManager
import com.gh.common.constant.Config
import com.gh.common.exposure.ExposureUtils
import com.gh.common.simulator.SimulatorDownloadManager
import com.gh.common.simulator.SimulatorGameManager
@ -8,28 +8,25 @@ import com.gh.common.xapk.XapkInstaller
import com.gh.download.DownloadDataHelper
import com.gh.download.DownloadManager
import com.gh.gamecenter.R
import com.gh.gamecenter.SuggestionActivity
import com.gh.gamecenter.common.base.activity.BaseActivity
import com.gh.gamecenter.common.callback.ConfirmListener
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.common.entity.SimpleGameEntity
import com.gh.gamecenter.common.entity.SuggestType
import com.gh.gamecenter.common.eventbus.EBShowDialog
import com.gh.gamecenter.common.retrofit.Response
import com.gh.gamecenter.common.utils.*
import com.gh.gamecenter.core.utils.*
import com.gh.gamecenter.energy.EnergyBridge
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.entity.SimpleGameEntity
import com.gh.gamecenter.entity.SimulatorEntity
import com.gh.gamecenter.eventbus.EBDownloadStatus
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.gamecenter.feature.entity.SimulatorEntity
import com.gh.gamecenter.feature.utils.PlatformUtils
import com.gh.gamecenter.help.HelpAndFeedbackBridge
import com.gh.gamecenter.retrofit.RetrofitManager
import com.gh.gamecenter.setting.GameDownloadSettingFragment
import com.gh.gamecenter.suggest.SuggestType
import com.gh.vspace.VHelper
import com.halo.assistant.HaloApp
import com.lightgame.download.DataWatcher
import com.lightgame.download.DownloadEntity
import com.lightgame.download.DownloadStatus
import com.lightgame.download.FileUtils
import com.lightgame.download.*
import com.lightgame.utils.AppManager
import com.lightgame.utils.Utils
import io.reactivex.android.schedulers.AndroidSchedulers
@ -47,6 +44,8 @@ object DownloadObserver {
// TODO 修复因为更改内存对象造成的双重下载完成事件问题,具体触发代码见 DownloadDao.updateSnapshotList
private var mDoneDebouncePair: Pair<String, Long>? = null
private const val TEA_EVENT_DOWNLOAD_COMPLETE = "game_addiction"
// 如果在WIFI状态下,下载自动暂停,则再重试一遍
@JvmStatic
fun initObserver() {
@ -77,7 +76,7 @@ object DownloadObserver {
val currentActivity = AppManager.getInstance().currentActivity() ?: return
DialogHelper.showDialog(currentActivity, "下载失败", "下载链接已失效,建议提交反馈", "立即反馈", "取消", {
SuggestionActivity.startSuggestionActivity(
HelpAndFeedbackBridge.startSuggestionActivity(
currentActivity,
SuggestType.gameQuestion, "notfound",
StringUtils.buildString(downloadEntity.name, ",问题反馈:下载链接失效"),
@ -200,6 +199,11 @@ object DownloadObserver {
} else {
statDoneEvent(downloadEntity)
if (!SPUtils.getBoolean(TEA_EVENT_DOWNLOAD_COMPLETE)) {
HaloApp.getInstance().flavorProvider.logEvent(TEA_EVENT_DOWNLOAD_COMPLETE)
SPUtils.setBoolean(TEA_EVENT_DOWNLOAD_COMPLETE, true)
}
GameActivityDownloadHelper.clear()
EnergyBridge.postEnergyTask("download_game", downloadEntity.gameId, downloadEntity.packageName)
@ -239,26 +243,33 @@ object DownloadObserver {
val simulatorJson = downloadEntity.getMetaExtra(Constants.SIMULATOR)
val gameName = downloadEntity.getMetaExtra(Constants.GAME_NAME)
if (simulatorJson.isEmpty()) return
val simulator = GsonUtils.fromJson(simulatorJson, SimulatorEntity::class.java)
var simulator = GsonUtils.fromJson(simulatorJson, SimulatorEntity::class.java)
val isInstalled = PackageUtils.isInstalledFromAllPackage(
HaloApp.getInstance().application,
simulator.apk?.packageName
)
if (!isInstalled) {
val currentActivity = AppManager.getInstance().currentActivity()
?: return
SimulatorDownloadManager.getInstance().showDownloadDialog(
currentActivity, simulator,
SimulatorDownloadManager.SimulatorLocation.LAUNCH, downloadEntity.gameId, gameName, null
)
val isInstalledNewSimulator =
SimulatorGameManager.isNewSimulatorInstalled(HaloApp.getInstance().application)
val isInstalledOldSimulator =
SimulatorGameManager.isOldSimulatorInstalled(HaloApp.getInstance().application)
// if (!isInstalled && !isInstalledNewSimulator) {
val currentActivity = AppManager.getInstance().currentActivity()
?: return
val newSimulator = Config.getNewSimulatorEntitySetting()
if ((!isInstalledOldSimulator && newSimulator != null && newSimulator.active) || isInstalledNewSimulator) { //如果没有安装任一旧的模拟器 或者下载了新模拟器 则使用新版本模拟器
simulator = newSimulator ?: simulator
}
SimulatorDownloadManager.getInstance().showDownloadDialog(
currentActivity, simulator,
SimulatorDownloadManager.SimulatorLocation.LAUNCH, downloadEntity.gameId, gameName, null
)
// }
SimulatorGameManager.recordDownloadSimulatorGame(downloadEntity.gameId, simulator.type)
SimulatorGameManager.postPlayedGame(downloadEntity.gameId, downloadEntity.packageName)
} else {
val downloadType = downloadEntity.getMetaExtra(Constants.EXTRA_DOWNLOAD_TYPE)
// 是否是自动安装
val isAutoInstall = SPUtils.getBoolean(GameDownloadSettingFragment.AUTO_INSTALL_SP_KEY, true)
val isAutoInstall = SPUtils.getBoolean(Constants.SP_AUTO_INSTALL, true)
if (downloadType == Constants.SIMULATOR_DOWNLOAD || isAutoInstall) {
if (FileUtils.isEmptyFile(downloadEntity.path)) {
Utils.toast(mApplication, R.string.install_failure_hint)
@ -359,6 +370,22 @@ object DownloadObserver {
if (downloadEntity.isPluggable) {
type = ExposureUtils.DownloadType.PLUGIN_DOWNLOAD
}
var downloadSpeed = 0L
val elapsedTimeString = downloadEntity.meta[DownloadConfig.KEY_DOWNLOAD_ELAPSED_TIME]
if (elapsedTimeString != null) {
var elapsedTime = elapsedTimeString.toLong()
if (elapsedTime == 0L) {
elapsedTime = 1L
SentryHelper.onEvent(
"DOWNLOAD_ELAPSED_TIME",
"elapsedTime is zero",
downloadEntity.gameId + ":" + downloadEntity.size
)
}
downloadSpeed = downloadEntity.size / elapsedTime
}
val isPlatformRecommend =
java.lang.Boolean.parseBoolean(downloadEntity.getMetaExtra(Constants.IS_PLATFORM_RECOMMEND))
ExposureUtils.logADownloadCompleteExposureEvent(
@ -370,6 +397,7 @@ object DownloadObserver {
),
downloadEntity.platform,
downloadEntity.exposureTrace,
downloadSpeed,
downloadEntity.meta[DownloadEntity.DOWNLOAD_HOST_KEY] ?: "unknown",
downloadEntity.meta[DownloadEntity.DOWNLOAD_PATH_KEY] ?: "unknown",
type

View File

@ -37,6 +37,32 @@ import java.util.Set;
public class EntranceUtils {
public static void jumpActivityCompat(Context context, Bundle bundle) {
bundle.putBoolean(KEY_REQUIRE_REDIRECT, true);
if (HaloApp.getInstance().isRunningForeground || HaloApp.getInstance().isAlreadyUpAndRunning) {
// 应用正在运行,前台或后台
String to = bundle.getString(KEY_TO);
Class<?> clazz = ClassUtils.forName(to);
if (clazz == null) clazz = MainActivity.class;
if (ToolbarFragment.class.isAssignableFrom(clazz)) { // 兼容ToolbarFragment
ToolBarActivity.startFragmentNewTask(context, (Class<? extends ToolbarFragment>) clazz, bundle);
} else {
Intent intent1 = new Intent(context, clazz);
intent1.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// 如果 activity 名称有 singleton 的就添加 reorder_to_front 标签 (有点粗暴有点蠢,但暂时就先这样吧 :C )
if (clazz.getSimpleName().toLowerCase().contains("singleton")) {
intent1.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
}
intent1.putExtras(bundle);
context.startActivity(intent1);
}
} else {
// 应用未在运行
context.startActivity(SplashScreenActivity.getSplashScreenIntent(context, bundle));
}
}
public static void jumpActivity(Context context, Bundle bundle) {
bundle.putBoolean(KEY_REQUIRE_REDIRECT, true);

View File

@ -19,7 +19,7 @@ import com.gh.gamecenter.common.utils.DialogHelper
import com.gh.gamecenter.common.utils.dip2px
import com.gh.gamecenter.common.utils.toColor
import com.gh.gamecenter.common.utils.toObject
import com.gh.gamecenter.entity.ErrorEntity
import com.gh.gamecenter.common.entity.ErrorEntity
import com.halo.assistant.fragment.user.UserInfoEditFragment
import com.halo.assistant.fragment.user.VerifyPhoneFragment
import com.lightgame.utils.AppManager
@ -183,6 +183,11 @@ object ErrorHelper {
403210 -> handleVerifyPhoneError(context, errorEntity, realNameConfirmListener, entrance)
// 禁言(发布内容)
403402 -> Utils.toast(context, "您的账号存在违规,不允许发布内容")
// 禁言(点赞)
403403 -> Utils.toast(context, "您的账号存在违规,不允许点赞")
else -> Utils.toast(context, R.string.post_failure_hint)
}
}
@ -403,15 +408,16 @@ object ErrorHelper {
val errorEntity: ErrorEntity? =
httpException?.response()?.errorBody()?.string()?.toObject()
when {
errorEntity?.code == 403099 -> {
Utils.toast(context, "当前账号正在注销,禁止登录")
}
errorEntity?.code == 403401 -> {//禁止登录
Utils.toast(context, "网络异常")
}
errorEntity?.toast?.isNotEmpty() == true -> {
Utils.toast(context, errorEntity.toast)
}
errorEntity?.code == 403099 -> Utils.toast(context, "当前账号正在注销,禁止登录")
// 用户禁止登录
errorEntity?.code == 403401 -> Utils.toast(context, "您的账号存在违规,不允许登录")
// 设备禁止登录
errorEntity?.code == 403404 -> Utils.toast(context, "您的设备存在违规,不允许登录")
errorEntity?.toast?.isNotEmpty() == true -> Utils.toast(context, errorEntity.toast)
else -> Utils.toast(context, R.string.login_failure)
}
} catch (e: Exception) {

View File

@ -3,10 +3,10 @@ package com.gh.common.util
import android.app.Activity
import android.os.Build
import android.view.Gravity
import android.view.View
import android.widget.TextView
import com.gh.gamecenter.R
import com.gh.gamecenter.common.utils.dip2px
import com.gh.gamecenter.core.utils.DisplayUtils
import com.gh.gamecenter.energy.EnergyBridge
import com.lightgame.utils.Util_System_Keyboard
import com.lzf.easyfloat.EasyFloat
@ -67,23 +67,14 @@ object FloatingBackViewManager {
}
dragEnd { view ->
val statusBarHeight = DisplayUtils.getStatusBarHeight(activity.resources)
// 记录停止拖动的最后位置
val outLocation = IntArray(2)
view.getLocationInWindow(outLocation)
val yOffset = outLocation[1]
view.findViewById<View>(R.id.titleTv)?.apply {
val outLocation = IntArray(2)
getLocationOnScreen(outLocation)
val yOffset = outLocation[1]
if (yOffset <= statusBarHeight) {
// 判断状态栏是否被消费
if (yOffset == view.y.toInt()) {
view.y = statusBarHeight.toFloat()
} else {
view.y = 0F
}
mLastPositionY = yOffset
}
mLastPositionY = yOffset
}
}
.show()
@ -113,8 +104,6 @@ object FloatingBackViewManager {
/**
* 停用返回小浮窗
* @param type 类型
* @param activityUrl 类型为活动的时候用的地址
*/
@JvmStatic
fun disableBackView() {

View File

@ -5,13 +5,14 @@ import android.content.Context
import android.text.TextUtils
import androidx.appcompat.app.AppCompatActivity
import com.gh.common.DefaultJsApi
import com.gh.common.constant.Config
import com.gh.common.dialog.CertificationDialog
import com.gh.common.exposure.ExposureEvent
import com.gh.common.exposure.ExposureManager
import com.gh.common.exposure.ExposureSource
import com.gh.common.exposure.ExposureType
import com.gh.common.history.HistoryHelper
import com.gh.common.repository.ReservationRepository
import com.gh.common.simulator.NewSimulatorGameManager
import com.gh.common.simulator.SimulatorDownloadManager
import com.gh.common.simulator.SimulatorGameManager
import com.gh.download.DownloadManager
import com.gh.download.dialog.DownloadDialog
import com.gh.gamecenter.R
@ -27,17 +28,26 @@ import com.gh.gamecenter.common.utils.singleToMain
import com.gh.gamecenter.common.view.dsbridge.CompletionHandler
import com.gh.gamecenter.core.runOnUiThread
import com.gh.gamecenter.core.utils.EmptyCallback
import com.gh.gamecenter.core.utils.MtaHelper
import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.core.utils.ToastUtils
import com.gh.gamecenter.entity.ApkEntity
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.entity.PluginLocation
import com.gh.gamecenter.energy.EnergyBridge
import com.gh.gamecenter.feature.entity.ApkEntity
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.gamecenter.feature.entity.PluginLocation
import com.gh.gamecenter.feature.exposure.ExposureEvent
import com.gh.gamecenter.feature.exposure.ExposureSource
import com.gh.gamecenter.feature.exposure.ExposureType
import com.gh.gamecenter.feature.utils.ApkActiveUtils
import com.gh.gamecenter.gamedetail.dialog.GamePermissionDialogFragment
import com.gh.gamecenter.login.user.UserManager
import com.gh.gamecenter.retrofit.RetrofitManager
import com.gh.gamecenter.teenagermode.TeenagerModeActivity
import com.gh.vspace.VHelper
import com.lightgame.download.DownloadEntity
import com.lightgame.download.FileUtils
import com.lightgame.utils.Utils
import java.io.File
/**
* 游戏活动下载辅助类
@ -93,7 +103,7 @@ object GameActivityDownloadHelper {
// 开始玩
gameEntity.getApk().size == 0 && gameEntity.h5Link != null -> play(context, gameEntity)
// 下载
else -> handleDownload(context, event, gameEntity, entrance, location, this)
else -> handleDownloadStatus(context, event, gameEntity, entrance, location, this)
}
}
}
@ -157,8 +167,8 @@ object GameActivityDownloadHelper {
context.startActivity(i)
}
// 下载
private fun handleDownload(
// 处理下载的各种状态
private fun handleDownloadStatus(
context: Context,
event: DefaultJsApi.GameActivityEvent,
gameEntity: GameEntity,
@ -168,49 +178,190 @@ object GameActivityDownloadHelper {
) {
val apk = getApk(gameEntity, event, true) ?: return
val downloadEntity = DownloadManager.getInstance().getDownloadEntitySnapshot(gameEntity)
if (downloadEntity != null) {
val str = GameUtils.getDownloadBtnText(context, gameEntity, PluginLocation.only_game)
if (downloadEntity != null &&
str != context.getString(R.string.install) &&
str != context.getString(R.string.launch)
) {
ToastUtils.toast("${gameEntity.name}已加入下载队列")
} else {
val str = GameUtils.getDownloadBtnText(context, gameEntity, PluginLocation.only_game)
if (str == context.getString(R.string.download) || str == context.getString(R.string.attempt)) {
GamePermissionDialogFragment.show((context as AppCompatActivity), gameEntity, gameEntity.info) {
CertificationDialog.showCertificationDialog(context, gameEntity) {
DialogUtils.checkDownload(context, apk.size) { isSubscribe: Boolean ->
download(context, gameEntity, apk, isSubscribe, entrance, location, traceEvent)
}
}
when {
str == context.getString(R.string.download) || str == context.getString(R.string.attempt) -> {
handleDownloadStatus(context, gameEntity, apk, entrance, location, traceEvent)
}
DataLogUtils.uploadGameLog(context, gameEntity.id, gameEntity.name, entrance)
} else if (str == context.getString(R.string.smooth)) {
VHelper.validateVSpaceBeforeAction(context, gameEntity, true) {
GamePermissionDialogFragment.show((context as AppCompatActivity), gameEntity, gameEntity.info) {
CertificationDialog.showCertificationDialog(context, gameEntity) {
DialogUtils.checkDownload(context, apk.size) { isSubscribe: Boolean ->
download(context, gameEntity, apk, isSubscribe, entrance, location, traceEvent)
}
}
}
str == context.getString(R.string.smooth) -> {
handleSmoothStatus(context, gameEntity, apk, entrance, location, traceEvent)
}
} else if (str.contains("")) {
if (gameEntity.pluggableCollection != null) {
DownloadDialog.showDownloadDialog(context, gameEntity, traceEvent, entrance, location)
} else {
CertificationDialog.showCertificationDialog(context, gameEntity) {
DialogUtils.checkDownload(context, apk.size) { isSubscribe: Boolean ->
plugin(context, gameEntity, apk, entrance, location, isSubscribe, traceEvent)
}
}
str.contains("") -> {
handlePluginStatus(context, gameEntity, apk, entrance, location, traceEvent)
}
} else if (str == context.getString(R.string.install) || str == context.getString(R.string.launch)) {
ToastUtils.toast("${gameEntity.name}已加入下载队列")
} else if (str == context.getString(R.string.update)) {
DialogUtils.checkDownload(context, apk.size) { isSubscribe: Boolean ->
update(context, gameEntity, apk, entrance, location, isSubscribe, traceEvent)
str == context.getString(R.string.install) -> {
handleInstallStatus(context, gameEntity, apk, downloadEntity)
}
str == context.getString(R.string.launch) -> {
handleLaunchStatus(context, gameEntity, apk, entrance, location, traceEvent)
}
str == context.getString(R.string.update) -> {
handleUpdateStatus(context, gameEntity, apk, entrance, location, traceEvent)
}
else -> {
ToastUtils.toast("${gameEntity.name}已加入下载队列")
}
}
}
}
// 处理下载状态
private fun handleDownloadStatus(
context: Context,
gameEntity: GameEntity,
apk: ApkEntity,
entrance: String,
location: String,
traceEvent: ExposureEvent
) {
GamePermissionDialogFragment.show((context as AppCompatActivity), gameEntity, gameEntity.info) {
CertificationDialog.showCertificationDialog(context, gameEntity) {
DialogUtils.checkDownload(context, apk.size) { isSubscribe: Boolean ->
download(context, gameEntity, apk, isSubscribe, entrance, location, traceEvent)
}
}
}
DataLogUtils.uploadGameLog(context, gameEntity.id, gameEntity.name, entrance)
}
// 处理畅玩状态
private fun handleSmoothStatus(
context: Context,
gameEntity: GameEntity,
apk: ApkEntity,
entrance: String,
location: String,
traceEvent: ExposureEvent
) {
VHelper.validateVSpaceBeforeAction(context, gameEntity) {
GamePermissionDialogFragment.show((context as AppCompatActivity), gameEntity, gameEntity.info) {
CertificationDialog.showCertificationDialog(context, gameEntity) {
DialogUtils.checkDownload(context, apk.size) { isSubscribe: Boolean ->
download(context, gameEntity, apk, isSubscribe, entrance, location, traceEvent)
}
}
}
}
}
// 处理插件化状态
private fun handlePluginStatus(
context: Context,
gameEntity: GameEntity,
apk: ApkEntity,
entrance: String,
location: String,
traceEvent: ExposureEvent
) {
if (gameEntity.pluggableCollection != null) {
DownloadDialog.showDownloadDialog(context, gameEntity, traceEvent, entrance, location)
} else {
CertificationDialog.showCertificationDialog(context, gameEntity) {
DialogUtils.checkDownload(context, apk.size) { isSubscribe: Boolean ->
plugin(context, gameEntity, apk, entrance, location, isSubscribe, traceEvent)
}
}
}
}
// 处理安装状态
private fun handleInstallStatus(
context: Context,
gameEntity: GameEntity,
apk: ApkEntity,
downloadEntity: DownloadEntity?
) {
val simulatorDownloadEntity = SimulatorGameManager.findDownloadEntityByUrl(apk.url)
if (gameEntity.simulator != null) {
val isInstalled =
PackageUtils.isInstalledFromAllPackage(context, gameEntity.simulator!!.apk!!.packageName)
val isInstalledNewSimulator = SimulatorGameManager.isNewSimulatorInstalled(context)
val isInstalledOldSimulator = SimulatorGameManager.isOldSimulatorInstalled(context)
var simulator = gameEntity.simulator
val newSimulator = Config.getNewSimulatorEntitySetting()
// 在没有安装旧的模拟器且有配置新版模拟器 才使用新版模拟器 否则还是用以前旧的
if (!isInstalledOldSimulator && newSimulator != null && newSimulator.active) {
simulator = newSimulator
}
if (simulatorDownloadEntity != null && SimulatorGameManager.isSimulatorGame(gameEntity) && !isInstalled && !isInstalledNewSimulator) {
SimulatorDownloadManager.getInstance().showDownloadDialog(
context, simulator,
SimulatorDownloadManager.SimulatorLocation.LAUNCH, gameEntity.id, gameEntity.name!!, null
)
return
}
}
if (gameEntity.isVGame()) {
VHelper.installOrLaunch((context as AppCompatActivity), gameEntity.getUniquePackageName() ?: "")
} else {
downloadEntity?.run {
install(context, gameEntity, apk, this)
}
}
}
// 处理启动状态
private fun handleLaunchStatus(
context: Context,
gameEntity: GameEntity,
apk: ApkEntity,
entrance: String,
location: String,
traceEvent: ExposureEvent
) {
EnergyBridge.postEnergyTask("play_game", gameEntity.id, gameEntity.getApk()[0].packageName)
//启动模拟器游戏
if (SimulatorGameManager.isSimulatorGame(gameEntity)) {
if (NewSimulatorGameManager.shouldShowUpdateNewSimulatorAlert(context)) {
NewSimulatorGameManager.showUpdateNewsSimulator(context, null)
return
}
val simulatorDownloadEntity =
SimulatorGameManager.findDownloadEntityByUrl(gameEntity.getApk()[0].url)
if (simulatorDownloadEntity != null) {
val file = File(simulatorDownloadEntity.path)
if (!file.exists()) {
download(context, gameEntity, apk, false, entrance, location, traceEvent)
return
}
NewFlatLogUtils.logSimulatorGameCardClick("启动")
SimulatorGameManager.launchSimulatorGame(simulatorDownloadEntity, gameEntity)
}
return
}
if (gameEntity.isVGame()) {
VHelper.installOrLaunch((context as AppCompatActivity), gameEntity.getUniquePackageName() ?: "")
return
}
if (entrance.contains("我的游戏")) {
MtaHelper.onEvent("我的游戏_启动", "启动", gameEntity.name)
}
PackageUtils.launchApplicationByPackageName(context, gameEntity.getApk()[0].packageName)
}
// 处理更新状态
private fun handleUpdateStatus(
context: Context,
gameEntity: GameEntity,
apk: ApkEntity,
entrance: String,
location: String,
traceEvent: ExposureEvent
) {
DialogUtils.checkDownload(context, apk.size) { isSubscribe: Boolean ->
update(context, gameEntity, apk, entrance, location, isSubscribe, traceEvent)
}
}
private fun getApk(
gameEntity: GameEntity,
event: DefaultJsApi.GameActivityEvent,
@ -294,6 +445,29 @@ object GameActivityDownloadHelper {
}
}
// 安装
private fun install(
context: Context,
gameEntity: GameEntity,
apkEntity: ApkEntity,
downloadEntity: DownloadEntity
) {
val path = downloadEntity.path
when {
FileUtils.isEmptyFile(path) -> {
Utils.toast(context, R.string.install_failure_hint)
DownloadManager.getInstance().cancel(downloadEntity.url)
gameEntity.getEntryMap().remove(apkEntity.getPlatform())
}
PackageUtils.isCanPluggable(apkEntity) -> {
DialogHelper.showPluginDialog(context) { PackageInstaller.uninstall(context, path) }
}
else -> {
PackageInstaller.install(context, downloadEntity)
}
}
}
// 更新
private fun update(
context: Context,

Some files were not shown because too many files have changed in this diff Show More