Compare commits

...

673 Commits

Author SHA1 Message Date
8c0773aab2 fix:模拟器下载流程修复20221027测试反馈 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2125 2022-10-28 14:35:36 +08:00
e596de766a Merge remote-tracking branch 'origin/dev' into feature-issues2125 2022-10-27 14:36:36 +08:00
12c3605db8 fix:规范修改 2022-10-27 11:44:37 +08:00
ea51827ed6 Merge branch 'feature-issues2049' into 'dev'
feat:【光环助手V5.15.0】登录相关优化(20221025需求补充) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2049#note_175003

See merge request halo/android/assistant-android!371
2022-10-27 11:39:40 +08:00
ff4a78ae93 feat:【光环助手V5.15.0】登录相关优化(20221025需求补充) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2049#note_175003 2022-10-27 11:39:40 +08:00
4201d0abd3 fix:规范修改 2022-10-27 11:30:40 +08:00
3a0daea1fb fix:修改 2022-10-27 11:18:22 +08:00
19ff2a1fb7 Merge branch 'feature-issues2132' into 'dev'
fix:【光环助手V5.15.0】前端优化汇总10月第3周(7) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2132

See merge request halo/android/assistant-android!370
2022-10-27 11:11:22 +08:00
2efd0e8bc9 fix:【光环助手V5.15.0】前端优化汇总10月第3周(7) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2132 2022-10-27 11:11:22 +08:00
17e4923c98 fix修改私有变量命名规范 2022-10-27 10:39:37 +08:00
1a2c90cfb0 fix:合并冲突 2022-10-27 10:37:46 +08:00
6dca8cf33c !format: 全局格式化代码 2022-10-26 18:16:47 +08:00
322774fc78 fix:【光环助手V5.15.0】登录相关优化(1024UI测试问题) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2049#note_174815 2022-10-26 16:59:25 +08:00
8128aa603c fix:【光环助手V5.15.0】前端优化汇总10月第1周(1026UI测试问题 正文第7点) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2114#note_175286 2022-10-26 16:36:05 +08:00
06c084a1ec feat:模拟器游戏埋点 2022-10-26 16:29:53 +08:00
b05fb22e42 fix: 【光环助手V5.15.0】前端优化汇总10月第1周(1026UI测试问题第1点(1-3)、第10点(1)) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2114 2022-10-26 16:00:40 +08:00
2ab9b175e9 fix: 【光环助手V5.15.0】前端优化汇总10月第1周(1026UI测试问题第1点(1-3)、第10点(1)) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2114 2022-10-26 15:51:39 +08:00
930fc88183 merge 2022-10-26 11:30:14 +08:00
e8dec7d101 Merge remote-tracking branch 'origin/dev' into feature-issues2125 2022-10-26 11:20:46 +08:00
28fcd20186 fix:模拟器下载流程修改 2022-10-26 11:06:20 +08:00
f37b3a9729 feat:【光环助手V5.15.0】登录相关优化(优化代码) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2049 2022-10-26 09:52:10 +08:00
d8483686d2 Merge remote-tracking branch 'origin/dev' into feature-issues2125
# Conflicts:
#	app/src/main/java/com/gh/common/util/NewFlatLogUtils.kt
2022-10-25 17:40:55 +08:00
cb67b4f01e Merge branch 'dev' into 'feature-issues2125'
# Conflicts:
#   app/src/main/java/com/gh/common/util/NewFlatLogUtils.kt
2022-10-25 09:31:16 +00:00
236ecb9f4f fix:解决冲突 2022-10-25 17:26:46 +08:00
1e9f17bba5 feat: 【光环助手V5.15.0】前端优化汇总10月第1周(11) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2114 2022-10-25 17:25:26 +08:00
877335f47b fix:解决冲突 2022-10-25 17:21:07 +08:00
676b81b649 feat: 模拟器下载流程调整 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2125 2022-10-25 17:03:41 +08:00
f95365c6ba fix:【光环助手V5.15.0】个人主页新增显示用户ID(1025测试) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2069#note_174911 2022-10-25 16:20:31 +08:00
97022f19f6 Merge remote-tracking branch 'origin/release' into dev 2022-10-25 16:08:15 +08:00
9f60dd7c55 Merge branch 'hotfix-v5.14.0-630-dark_mode_fixes' into 'release'
fix: 修复在原生系统上部分 UI 组件不能响应深色模式状态变更的问题

See merge request halo/android/assistant-android!366
2022-10-25 16:07:29 +08:00
0124fa4d8e fix: 修复在原生系统上部分 UI 组件不能响应深色模式状态变更的问题 2022-10-25 16:06:02 +08:00
e3eef66884 refactor: 移除废弃的旧问答相关代码和资源 https://git.shanqu.cc/halo/android/assistant-android/-/issues/89 2022-10-25 14:48:07 +08:00
56395bc6fa feat:【光环助手V5.15.0】数据后台-新增活动相关数据统计展示 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2053 2022-10-25 14:46:19 +08:00
7f2fd57d43 feat:【光环助手V5.15.0】数据后台-新增活动相关数据统计展示 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2053 2022-10-25 14:40:08 +08:00
fb6d96e79d feat: 下载请求添加 referer https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2134 2022-10-25 11:34:55 +08:00
369edbe04e fit:【光环助手V5.15.0】前端优化汇总10月第2周(4) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2121 2022-10-25 11:09:07 +08:00
2a56165424 Merge branch 'hotfix-v5.14.0-630-update' into 'release'
fix: 修复更新弹窗进度失效的问题

See merge request halo/android/assistant-android!365
2022-10-25 10:24:08 +08:00
48b8c46cdf fix: 修复更新弹窗进度失效的问题 2022-10-25 10:22:17 +08:00
6b33a0a2ff feat:【光环助手V5.15.0】前端优化汇总10月第2周(1) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2121 2022-10-24 18:33:44 +08:00
b38d90b107 feat:【光环助手V5.15.0】登录相关优化(更换压缩图片) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2049 2022-10-24 17:28:58 +08:00
896f43246b feat:【光环助手V5.15.0】登录相关优化(处理一键登录图片资源找不到问题) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2049 2022-10-24 17:06:15 +08:00
b5e3d3a03e Merge branch 'hotfix-v5.14.0-630-dark_mode' into 'release'
fix: 修复正式包暗色模式被禁用的问题

See merge request halo/android/assistant-android!364
2022-10-24 16:29:56 +08:00
65fc3e6304 fix: 修复正式包暗色模式被禁用的问题 2022-10-24 16:19:34 +08:00
3f895d2cc3 feat:【光环助手V5.15.0】登录相关优化(处理点击登录闪退问题) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2049#note_174795 2022-10-24 16:00:53 +08:00
58cebe900e feat:【光环助手V5.15.0】登录相关优化(更新一键登录混淆规则) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2049 2022-10-24 15:26:06 +08:00
ecf003bd84 feat:【光环助手V5.15.0】登录相关优化(移除邀请码) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2049#note_174795 2022-10-24 15:02:55 +08:00
7c2dae7125 feat:【光环助手V5.15.0】登录相关优化(更换压缩后的图) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2049 2022-10-24 11:50:42 +08:00
8451a776dd Revert "ci: 升级 didi booster"
This reverts commit 5e9dc881d5.
2022-10-24 10:45:50 +08:00
2cb91a7917 feat:【光环助手V5.15.0】登录相关优化(处理逻辑问题) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2049 2022-10-23 20:20:52 +08:00
4d9b53420f feat:【光环助手V5.15.0】登录相关优化(处理夜间模式UI) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2049 2022-10-23 19:48:17 +08:00
82300e4b4e feat:【光环助手V5.15.0】登录相关优化 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2049 2022-10-21 18:41:15 +08:00
5e9dc881d5 ci: 升级 didi booster 2022-10-21 17:55:52 +08:00
1a1ed4a159 Merge remote-tracking branch 'origin/dev-5.15.0' into dev-5.15.0 2022-10-21 17:40:34 +08:00
b9d6dfc83a !refactor: 删除废弃的论坛选择页面代码 2022-10-21 17:39:50 +08:00
fbc1ccf886 Revert "build: 修改 buildSrc AGP版本为7.2.2"
This reverts commit 28d983dc00.
2022-10-21 17:17:50 +08:00
f33b699723 !refactor: 完全解耦光能模块,默认不添加到依赖中,移除旧版我的光环页面代码,清理无用资源 2022-10-21 16:58:20 +08:00
a970db9ca1 ci: 邮件包恢复使用 AndResguard 2022-10-21 11:02:19 +08:00
28d983dc00 build: 修改 buildSrc AGP版本为7.2.2 2022-10-20 18:19:23 +08:00
24193a6456 fix:清除gid修改 2022-10-20 17:28:10 +08:00
bb264496cc feat:在debug下 设置-》清除缓存处添加一个清除gid 2022-10-20 17:16:54 +08:00
11b75a9c52 Merge branch 'dev' into dev-5.15.0 2022-10-20 16:36:39 +08:00
eebc531707 Merge remote-tracking branch 'origin/release' into dev 2022-10-20 16:34:19 +08:00
5f5dc8e50f Merge branch 'hotfix-v5.13.5-615-activity_finish_error' into 'release'
fix: 修复设置中设置不保留 activity 时,返回单个 activity 会造成整个应用退出的问题

See merge request halo/android/assistant-android!363
2022-10-20 16:33:51 +08:00
017188a409 fix: 修复设置中设置不保留 activity 时,返回单个 activity 会造成整个应用退出的问题 2022-10-20 16:32:35 +08:00
f23ac762e2 fix: 修改板块通用链接标题间距错误问题 2022-10-20 11:38:38 +08:00
829991571e feat:【光环助手V5.15.0】前端优化汇总10月第1周(3) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2114 2022-10-19 16:52:04 +08:00
af01bd6990 Merge branch 'hotfix-v5.12.8-598-game_detail_subtitle' into 'release'
fix: 修复游戏详情副标题出现的闪退问题

See merge request halo/android/assistant-android!362
2022-10-19 14:58:21 +08:00
1150be4f52 fix: 修复游戏详情副标题出现的闪退问题 2022-10-19 14:41:12 +08:00
c685df4fd7 Merge branch 'hotfix-v5.13.5-615-content_provider_crash' into 'release'
fix: 捕抓实名认证 ContentProvider 闪退并上报至 Sentry

See merge request halo/android/assistant-android!360
2022-10-19 14:08:12 +08:00
f8d372207e fix: 捕抓实名认证 ContentProvider 闪退并上报至 Sentry 2022-10-19 14:07:17 +08:00
83358fab7d Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	dependencies.gradle
2022-10-19 12:01:47 +08:00
6ac1465329 Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	dependencies.gradle
2022-10-19 11:58:40 +08:00
596b5603cf chore: 版本更新至 5.13.5 2022-10-18 17:43:15 +08:00
e0cd733d63 fix: 修复畅玩下载的问题 2022-10-18 17:42:03 +08:00
1d53a12082 fix:【光环助手V5.15.0】前端优化汇总10月第2周(2) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2121 2022-10-18 13:53:34 +08:00
7f12dc09a0 chore: 版本更新至 5.13.4 2022-10-18 10:50:02 +08:00
7254db3c0e Merge branch 'hotfix-v5.13.3-613-notification_crash' into 'release'
fix: 修复 Android 10 以上设备应用处于后台时点击任务栏无法安装游戏的问题,修复下载完成时通知栏通知更新偶发的闪退问题

See merge request halo/android/assistant-android!359
2022-10-18 10:36:25 +08:00
5de5d07bca fix: 修复 Android 10 以上设备应用处于后台时点击任务栏无法安装游戏的问题,修复下载完成时通知栏通知更新偶发的闪退问题 2022-10-18 09:58:12 +08:00
3442602ff8 Merge branch 'hotfix-v5.13.3-613-web_crash' into 'release'
修改加载web页面闪退问题

See merge request halo/android/assistant-android!358
2022-10-17 18:00:01 +08:00
a57e4caa22 fix: 修改加载web页面闪退问题 2022-10-17 17:55:51 +08:00
05006d91b5 Merge branch 'hotfix-5.13.3-613_home_index_out_of_bounds' into 'release'
修改首页数组越界问题

See merge request halo/android/assistant-android!357
2022-10-17 17:20:44 +08:00
cfd67f3160 fix: 修改首页数组越界问题 2022-10-17 16:54:37 +08:00
a66c6daa82 ci: jenkins 编译脚本不再指定 submodule 分支 2022-10-17 14:22:23 +08:00
73818acb9f Merge branch 'feature-issues86' into 'dev-5.15.0'
新增本地 mock 接口返回数据

See merge request halo/android/assistant-android!353
2022-10-17 13:56:46 +08:00
ebbbc618b9 新增本地 mock 接口返回数据 2022-10-17 13:56:46 +08:00
5a560869d3 feat: 【光环助手V5.15.0】前端优化汇总10月第1周(1) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2114 2022-10-17 11:25:39 +08:00
81c3381d94 Merge remote-tracking branch 'origin/dev' into dev-5.15.0 2022-10-17 09:41:55 +08:00
f0b7cdda32 Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	dependencies.gradle
2022-10-17 09:39:14 +08:00
72c5c844fc Merge remote-tracking branch 'origin/legacy-release' into release 2022-10-14 17:04:19 +08:00
e405be9deb fix: 获取下载目录添加存储权限检测 2022-10-14 17:02:31 +08:00
752f79ad65 fix: 版本更新至 5.13.3 2022-10-14 14:59:26 +08:00
e377a52e74 Merge remote-tracking branch 'origin/legacy-release' into release 2022-10-14 14:54:50 +08:00
91c343a02b Merge branch 'hotfix-v5.12.8-598-update' into 'legacy-release'
fix: 修复因为没有授予存储权限导致应用内更新失效的问题

See merge request halo/android/assistant-android!356
2022-10-14 14:53:18 +08:00
1fbc834597 fix: 修复因为没有授予存储权限导致应用内更新失效的问题 2022-10-14 14:50:51 +08:00
9251ade73c fix: 修复部分 tab 的文字没有跟随深色模式变更的问题 2022-10-13 17:20:25 +08:00
d759ec2d66 Merge branch 'feature-upgrade_dependencies' into dev-5.15.0 2022-10-13 16:25:10 +08:00
22053f5c7f refactor: 【光环助手V5.15.0】详细信息板块相关调整(删除无用条件判断) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2048 2022-10-13 16:18:07 +08:00
ab968673e1 feat: 【光环助手V5.15.0】详细信息板块相关调整 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2048 2022-10-13 16:09:05 +08:00
bec06b63c7 fix: 修复系统切换浅色/深色模式时的闪退问题 2022-10-13 15:06:06 +08:00
8efe5ec460 Merge remote-tracking branch 'origin/dev' into dev-5.15.0 2022-10-13 14:06:23 +08:00
025e72101f fix: 【光环助手V5.15.0】前端优化汇总10月第1周(17,18) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2114 2022-10-13 14:01:55 +08:00
bd1887baad Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	dependencies.gradle
2022-10-13 14:01:13 +08:00
082e9b376a Merge remote-tracking branch 'origin/legacy-release' into release 2022-10-13 14:00:23 +08:00
5014eda3f2 Merge branch 'hotfix-v5.12.8-598_block_navigation_not_display' into 'legacy-release'
修复板块导航栏不显示问题

See merge request halo/android/assistant-android!355
2022-10-13 13:46:53 +08:00
1b4852ae0c fix: 修复板块导航栏不显示问题 2022-10-13 12:13:01 +08:00
52a23f5bde Merge branch 'hotfix-v5.13.1-611-check_webview_is_available' into 'release'
修改模拟器不能显示网页的问题

See merge request halo/android/assistant-android!354
2022-10-13 11:48:03 +08:00
baae314d85 fix: 修改模拟器不能显示网页的问题 2022-10-13 11:34:32 +08:00
85372416c0 fix: 【光环助手V5.15.0】前端优化汇总10月第1周(17,18) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2114 2022-10-13 10:41:59 +08:00
6d8908fe57 fix: 修复游戏详情页暗色模式切换时的闪退 2022-10-13 09:48:16 +08:00
4d0d9c0b48 fix: 修复切换暗色模式时有机率卡死的问题 2022-10-12 17:58:14 +08:00
a68782203b fix:【光环助手V5.15.0】前端优化汇总10月第1周(7、8) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2114 2022-10-12 17:47:08 +08:00
2fcfaf2ccd feat: 【光环助手V5.15.0】前端优化汇总10月第1周(10) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2114 2022-10-12 16:14:41 +08:00
d58a6df56a Merge branch 'dev-5.15.0' of git.shanqu.cc:halo/android/assistant-android into dev-5.15.0 2022-10-12 15:49:44 +08:00
2f8a783565 feat: 【光环助手V5.15.0】前端优化汇总10月第1周(2) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2114 2022-10-12 15:49:38 +08:00
9234a2f4ee fix: 修复判断是否使用浏览器安装偶发的闪退 2022-10-12 14:52:42 +08:00
662dd88be7 feat: 【光环助手V5.15.0】前端优化汇总10月第1周(11) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2114 2022-10-12 14:28:58 +08:00
ba64292b76 fix: 修复判断是否使用浏览器安装偶发的闪退 2022-10-12 14:09:01 +08:00
6fd43dd61b chore: 版本更新至 5.13.2 2022-10-12 13:52:24 +08:00
4ce7eee8eb feat: 【光环助手V5.15.0】前端优化汇总10月第1周(10) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2114 2022-10-12 11:44:02 +08:00
e3c2711b64 Merge remote-tracking branch 'origin/dev' into dev-5.15.0
# Conflicts:
#	dependencies.gradle
2022-10-12 11:34:51 +08:00
e00df4a066 fix: 【光环助手V5.15.0】前端优化汇总10月第1周(16) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2114 2022-10-12 11:33:38 +08:00
9764c2ce1a fix: 修复双列卡片专题跳转游戏详情无法下载游戏的问题 2022-10-12 11:14:19 +08:00
f588c2d981 Merge remote-tracking branch 'origin/release' into dev 2022-10-12 11:07:44 +08:00
e5dad8a8ce Merge remote-tracking branch 'origin/legacy-release' into release 2022-10-12 11:01:07 +08:00
3818160a5e Merge branch 'hotfix-v5.12.7-597-double_card_list_gamedetail' into 'legacy-release'
fix: 修复双列专题跳转游戏详情无法下载的问题

See merge request halo/android/assistant-android!352
2022-10-12 10:52:00 +08:00
2367a0bf8a fix: 修复双列专题跳转游戏详情无法下载的问题 2022-10-12 10:51:00 +08:00
b2e728331a fix: 修复设置页面一键修复按钮可能错误显示的问题 2022-10-12 10:04:58 +08:00
7af3233152 chore: 版本更新至 5.15.0 2022-10-11 17:36:28 +08:00
243ad6afb1 fix: 处理合并异常 2022-10-11 17:28:29 +08:00
0c3a063d86 fix: 修复暗色模式启动时的判断异常问题 2022-10-11 17:28:10 +08:00
558aa9a09e fix:【光环助手V5.15.0】前端优化汇总10月第1周(4) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2114 2022-10-11 16:34:05 +08:00
33c9a2e90b Merge branch 'feature-issues2114' into 'dev-5.15.0'
fix:前端优化汇总10月第1周第五点 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2114

See merge request halo/android/assistant-android!351
2022-10-11 16:28:57 +08:00
e618a0d5fd Merge branch 'hotfix-v5.12.7-597-certification' into 'legacy-release'
fix: 修复获取存储权限后 gid 并未同时更新的问题

See merge request halo/android/assistant-android!350
2022-10-11 15:39:28 +08:00
ccc97a93da fix: 修复获取存储权限后 gid 并未同时更新的问题 2022-10-11 15:38:27 +08:00
3e16f59dc5 build: 分拆主 app proguard 配置文件到各子 module 的 proguard 配置文件中 https://git.shanqu.cc/halo/android/assistant-android/-/issues/84 2022-10-11 15:09:04 +08:00
c9993de3ca Merge branch 'hotfix-v5.12.7-597-read_installed_list_permission' into 'legacy-release'
feat: 【光环助手V5.15.0】前端优化汇总10月第1周(14, 15)

See merge request halo/android/assistant-android!349
2022-10-11 14:56:00 +08:00
e3c140e5fd feat: 【光环助手V5.15.0】前端优化汇总10月第1周(14, 15) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2114#note_172887 2022-10-11 14:54:32 +08:00
b2f6d111a7 fix:前端优化汇总10月第1周第五点 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2114 2022-10-11 11:11:04 +08:00
ea03e7a73f fix: 修复部分 span 文字在深色模式启用时显示异常的问题 2022-10-11 11:06:38 +08:00
c08f268b04 feat: 【光环助手V5.14.0】关于夜间模式的特殊处理 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2106 2022-10-10 17:24:54 +08:00
f6423cb7ff feat:【光环助手V5.15.0】个人主页新增显示用户ID(1) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2069 2022-10-10 16:56:16 +08:00
89f00d7412 feat: 【光环助手V5.15.0】前端优化汇总10月第1周(9) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2114 2022-10-10 16:50:33 +08:00
68061d96ed refactor!: 移除 flutter 相关代码 2022-10-10 14:51:05 +08:00
388c11b173 Merge remote-tracking branch 'origin/release' into dev 2022-10-10 11:16:26 +08:00
ced7202d04 Merge remote-tracking branch 'origin/legacy-release' into release
# Conflicts:
#	module_login/src/main/java/com/gh/gamecenter/login/utils/LoginHelper.kt
2022-10-10 11:11:32 +08:00
07c7d37d3d Merge branch 'hotfix-v5.12.7-597-qq_sdk' into 'legacy-release'
fix: 修复升级 QQ SDK 后无法使用的问题

See merge request halo/android/assistant-android!348
2022-10-10 11:09:02 +08:00
030c10c6cc fix: 修复升级 QQ SDK 后无法使用的问题 2022-10-10 11:06:52 +08:00
16162a6944 build: 升级编译环境 https://git.shanqu.cc/halo/android/assistant-android/-/issues/85 2022-10-10 10:55:20 +08:00
5b9879e8a0 fix: typo 2022-10-10 09:26:48 +08:00
99446c7b74 fix: 处理合并冲突 2022-10-09 17:46:42 +08:00
077b865b81 Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/receiver/InstallReceiver.java
#	app/src/main/java/com/gh/gamecenter/setting/VideoSettingFragment.kt
#	app/src/main/java/com/halo/assistant/HaloApp.java
#	dependencies.gradle
2022-10-09 17:36:11 +08:00
e1a95a241a fix: 处理合并冲突 2022-10-09 17:31:08 +08:00
50e15fa79a Merge remote-tracking branch 'origin/legacy-release' into release
# Conflicts:
#	app/src/main/java/com/halo/assistant/HaloApp.java
#	module_login/src/main/java/com/gh/gamecenter/login/utils/LoginHelper.kt
2022-10-09 17:20:32 +08:00
933c3c4fce Merge branch 'hotfix-v5.12.7-597-privacy-policy' into 'legacy-release'
处理部分隐私相关问题

See merge request halo/android/assistant-android!347
2022-10-09 16:45:33 +08:00
2a79c9cddd fix: 禁用 WorkManager ,减少非必要权限 2022-10-09 16:43:26 +08:00
7d6fb3e815 fix: 处理 SonarQube 问题 2022-10-09 16:29:48 +08:00
1c95a6b968 fix: 修复初次启动时会多次获取已安装列表的问题 2022-10-09 11:29:55 +08:00
23c7a741cc fix: 处理 gson 序列化问题 2022-10-09 10:05:43 +08:00
46bdc4e4f7 Merge branch 'hotfix-v5.12.7-597-privacy_policy' into 'legacy-release'
处理部分隐私相关问题

See merge request halo/android/assistant-android!346
2022-10-08 17:23:56 +08:00
f41836615d fix: 停用一键登录提前初始化功能 2022-10-08 17:17:04 +08:00
d883b29cde fix: 移除下载前临时创建文件的测试代码 2022-10-08 17:06:03 +08:00
d36055276d fix: 移除普通日志中的 rom 检查上报,移除模拟器检测 2022-10-08 17:04:18 +08:00
e0c1d8169d fix: 更新 gid/sentry 依赖 2022-10-08 17:03:02 +08:00
c18945113c fix: 更新 QQ 登录 SDK 2022-10-08 17:02:13 +08:00
6ec3d21994 fix: 修复资讯中心评论详情页面不兼容深色模式的问题 2022-10-08 14:47:27 +08:00
add6b2bc5e Merge branch 'hotfix-v5.13.1-611-vector_crash' into 'release'
fix: 修复5.0以下系统出现的矢量图闪退问题

See merge request halo/android/assistant-android!345
2022-10-08 14:37:10 +08:00
936c793ddf fix: 修复5.0以下系统出现的矢量图闪退问题 2022-10-08 14:32:48 +08:00
bb08a845fc fix: 修复视频播放设置选择图标错误显示的问题 2022-10-08 14:03:05 +08:00
a36c2085ef Merge branch 'hotfix-5.12.7-597-vector_crash' into 'legacy-release'
fix: 修复5.0以下系统出现的矢量图闪退问题

See merge request halo/android/assistant-android!344
2022-10-08 13:39:30 +08:00
d7e0de88d7 fix: 修复5.0以下系统出现的矢量图闪退问题 2022-10-08 11:59:17 +08:00
931213dc82 Merge branch 'pack-v5.12.X-privacy_policy' into 'legacy-release'
调整用户隐私相关内容

See merge request halo/android/assistant-android!343
2022-10-08 10:44:19 +08:00
11c7959b38 fix: 处理 SonarQube 问题 2022-09-30 16:25:31 +08:00
4989debca5 fix: 修复我的光环活动位轮播垂直滑动时用户信息区域无法伸缩的问题 2022-09-30 16:04:42 +08:00
082a5fbff8 fix:【光环助手V5.14.0】发布内容需手机号验证(UI测试问题 2) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2054#note_171946 2022-09-30 10:00:47 +08:00
396bfbf52d fix: 处理 SonarQube 问题 2022-09-29 17:45:01 +08:00
c4ad84d0c6 fix: 处理 SonarQube 问题 2022-09-29 17:29:53 +08:00
b2dc318257 chore: 版本更新至 5.13.1 2022-09-29 17:04:24 +08:00
d28595afdd fix: 处理合并冲突 2022-09-29 17:04:04 +08:00
c2cd7b6f8a Merge remote-tracking branch 'origin/pack-v5.12.X-privacy_policy' into release
# Conflicts:
#	app/src/main/java/com/gh/common/util/DirectUtils.kt
#	app/src/main/java/com/gh/gamecenter/SkipActivity.java
#	app/src/main/java/com/gh/gamecenter/gamedetail/desc/DescFragment.kt
#	dependencies.gradle
#	module_login/src/main/java/com/gh/gamecenter/login/utils/QuickLoginHelper.kt
#	module_login/src/main/java/com/gh/gamecenter/login/view/LoginFragment.java
2022-09-29 16:55:26 +08:00
da997ad544 fix:【光环助手V5.14.0】前端优化汇总9月第4周(31) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2098 2022-09-29 16:16:07 +08:00
f374f105ce fix:【光环助手V5.14.0】前端优化汇总9月第4周(31-32) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2098 2022-09-29 16:01:57 +08:00
48459c84e1 fix: 隐私弹窗链接跳转至外部浏览器打开 2022-09-29 15:17:39 +08:00
8f72f80788 fix: 避免隐私政策通过前获取 rom 信息 2022-09-29 14:57:48 +08:00
fef66248ea fix: 处理 SonarQube 问题 2022-09-29 14:21:54 +08:00
d3e499696f fix: 处理 SonarQube 问题 2022-09-29 13:52:55 +08:00
4631d4daeb Merge remote-tracking branch 'origin/dev' into dev 2022-09-29 11:53:12 +08:00
9bdf69e9a6 fix:暂时取消个人主页显示用户ID(需求已改到下个版本) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2069 2022-09-29 11:52:56 +08:00
861b8312e1 Merge remote-tracking branch 'origin/dev' into dev 2022-09-29 11:49:13 +08:00
c4763ea342 fix:修复WebView首次加载重置深色模式的问题 2022-09-29 11:46:50 +08:00
ff0dcfd7e1 fix: 测试包添加 ANR 上报 2022-09-29 11:39:41 +08:00
6c558a1a17 fix: 更新 ci 脚本 2022-09-29 11:27:04 +08:00
e0870b875f Merge remote-tracking branch 'origin/dev-5.14.0' into dev 2022-09-29 11:10:12 +08:00
dae502bf55 Merge remote-tracking branch 'origin/release' into dev 2022-09-29 10:56:55 +08:00
7e26003698 fix:【光环助手V5.14.0】前端优化汇总9月第4周(30) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2098 2022-09-29 10:35:41 +08:00
7a5e27cffa fix:【光环助手V5.14.0】游戏评分相关优化(0928测试 2) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2063#note_172175 2022-09-28 21:47:21 +08:00
0711d72f6d fix:视频tab-视频流-评论面板缺省页修改 2022-09-28 21:45:19 +08:00
07331efffb fix:【光环助手V5.14.0】游戏评分相关优化(0928测试 17) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2063#note_171941 2022-09-28 21:19:54 +08:00
585acb9bae fix:【光环助手V5.14.0】前端优化汇总9月第4周(26-27) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2098 2022-09-28 21:10:52 +08:00
13e9ba4f48 fix: 移除 android.permission.GET_TASKS 权限 2022-09-28 21:00:03 +08:00
9434d7f9ba fix:通用无内容 页面,隐藏第二行文案 2022-09-28 20:52:40 +08:00
11643b9be0 fix:【光环助手V5.14.0】游戏评分相关优化(0928测试 2、7、18) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2063#note_171941 2022-09-28 20:47:18 +08:00
2bec88c130 fix:修改深色模式下负向浅色按钮的背景 2022-09-28 20:28:52 +08:00
ef9fd9d256 fix:【光环助手V5.14.0】前端优化汇总9月第4周(20-29) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2098 2022-09-28 19:57:43 +08:00
580e86c148 fix:【光环助手V5.14.0】游戏评分相关优化(0928UI补充 1) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2063#note_172008 2022-09-28 16:24:46 +08:00
9ff97dde77 fix:【光环助手V5.14.0】前端优化汇总9月第4周(19) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2098 2022-09-28 16:20:28 +08:00
207b650c34 fix:【光环助手V5.14.0】我的光环页面改版(0928补充问题1) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2062 2022-09-28 16:18:24 +08:00
1ce7cd8ee3 fix:【光环助手V5.14.0】发布内容需手机号验证(UI测试问题 1、0928测试 2) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2054#note_171969 2022-09-28 15:38:51 +08:00
b015d76004 fix:【光环助手V5.14.0】前端优化汇总9月第4周(17-18) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2098 2022-09-28 15:35:24 +08:00
5f622d894d fix:【光环助手V5.14.0】我的光环页面改版(0927测试3-4) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2062 2022-09-28 14:50:32 +08:00
faffbbfa87 chore: 版本更新至 5.12.8 2022-09-28 14:45:39 +08:00
d494957880 feat: 移除启动时的权限弹窗,移除读取手机信息的权限 2022-09-28 14:42:12 +08:00
c37b299ab7 fix:【光环助手V5.14.0】前端优化汇总9月第4周(16) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2098 2022-09-28 14:24:39 +08:00
41331d23a0 fix:【光环助手V5.14.0】游戏评分相关优化(0927UI测试) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2063#note_171619 2022-09-28 13:57:15 +08:00
5e3a38f52d fix:【光环助手V5.14.0】前端优化汇总9月第4周(11-15) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2098 2022-09-28 10:17:20 +08:00
21c8f4cf62 fix:【光环助手V5.14.0】游戏评分相关优化(0926测试 16、18) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2063#note_171613 2022-09-27 18:31:29 +08:00
fb08bc59be fix:【光环助手V5.14.0】游戏评分相关优化(0926测试 1、7、8) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2063#note_171613 2022-09-27 17:32:29 +08:00
680590e6c2 fix:【光环助手V5.14.0】前端优化汇总9月第4周(2-10) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2098
fix:【光环助手V5.14.0】前端优化汇总9月第3周(4) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2086
2022-09-27 15:32:04 +08:00
ee169b55c5 fix:【光环助手V5.14.0】前端优化汇总9月第2周 (8-3、8-4) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2079 2022-09-27 11:25:30 +08:00
d3caa5d66c fix:【光环助手V5.14.0】我的光环页面改版(0927补充) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2062 2022-09-27 11:13:30 +08:00
c195be5137 fix: 修改更新弹窗内存泄露问题 2022-09-27 10:56:13 +08:00
40ce144fee feat:【光环助手V5.14.0】发布内容需手机号验证 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2054 2022-09-27 10:53:38 +08:00
ba2fd87b21 fix:我的光环-帮助与反馈 按钮颜色修改 2022-09-27 10:50:28 +08:00
0e385e193f fix:论坛搜索结果左间距修改 2022-09-26 15:58:36 +08:00
341eabee27 fix: 修复 Android 10 以上设备应用处于后台时点击任务栏无法安装游戏的问题 2022-09-26 15:56:57 +08:00
091948cdd1 Merge branch 'hotfix-v5.12.7-597-crashes' into 'release'
Hotfix v5.12.7 597 crashes

See merge request halo/android/assistant-android!342
2022-09-26 15:00:46 +08:00
a2d439e207 fix: typo 2022-09-26 15:00:13 +08:00
b2a1ce54a3 fix:【光环助手V5.14.0】我的光环页面改版(0923UI测试问题1、4、7、10) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2062 2022-09-26 14:22:59 +08:00
1d96e1f92d fix: 还原在工作线程处理视频日志 2022-09-26 12:01:16 +08:00
42fd666ba0 Merge branch 'feature-issues2061' into 'dev-5.14.0'
fix:修改接口返回404时使用通用数据异常的缺省页

See merge request halo/android/assistant-android!341
2022-09-26 11:52:27 +08:00
2aeaecfaf3 fix: 修改接口返回404时使用通用数据异常的缺省页 2022-09-26 11:52:26 +08:00
44d039658e feat: 【光环助手V5.15.0】数据后台-内容数据展示优化(新增埋点) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2059 2022-09-26 11:42:26 +08:00
90a8cce831 fix: 提高触发 WorkManager 的阈值,规避因为空间不足导致的各种奇怪闪退 2022-09-26 11:36:56 +08:00
9bf019530d fix: 修复游戏下载完成后将状态改为查看引起的点击闪退 2022-09-26 11:31:42 +08:00
fd933f9d59 fix:【光环助手V5.14.0】我的光环页面改版(0923UI测试问题1-9,0923测试1、2、5) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2062 2022-09-26 11:29:43 +08:00
176dc4fe02 fix: 使用工作线程调用日志上报方法,避免部分性能较差设备 ANR 2022-09-26 11:20:43 +08:00
739413f450 fix: 修复首页列表分页刷新时偶发的数组越界问题 2022-09-26 09:53:22 +08:00
1b5a62e018 fix: 修复页面重建后切换深色模式,首页可能会闪退的问题 2022-09-26 09:49:00 +08:00
6bf74b4e03 fix: 整理基类代码,默认开启页面深色模式自动简单适配 2022-09-26 09:46:03 +08:00
537e59759b feat:【光环助手V5.14.0】游戏评分相关优化(修改字段) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2063 2022-09-23 16:30:19 +08:00
13f937dc0e fix: 修改游戏详情最新开服数组越界问题 2022-09-23 15:37:03 +08:00
e3f0c2bb11 fix: 修复部分居中警告按钮点击以后死循环调用的问题 2022-09-23 15:11:24 +08:00
2eabc52aa7 fix: 修复深色模式切换时 window 和导航栏颜色没有变更的问题 2022-09-23 14:56:16 +08:00
cf8615c6c3 style: 整理首页推荐列表代码 2022-09-23 14:12:16 +08:00
ab7bcc2b14 Merge remote-tracking branch 'origin/dev-5.14.0' into dev-5.14.0 2022-09-22 17:34:00 +08:00
99b0010784 feat:【光环助手V5.14.0】游戏评分相关优化(前端部分) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2063 2022-09-22 17:33:05 +08:00
4af170d4fa fix: 修复首页列表加载分页时自动滚动的问题 2022-09-22 17:30:31 +08:00
c45d4b5e19 feat:【光环助手V5.14.0】我的光环页面改版 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2062 2022-09-22 15:58:49 +08:00
9fca1f1551 fix: 修复通用合集 1-2 样式在列表复用时出现高度不一致的问题 2022-09-22 15:41:19 +08:00
b8662e24a0 fix: 修复首页安利墙栏目滚动时高度异常抖动的问题 2022-09-22 15:32:57 +08:00
ad1bee4b56 Merge remote-tracking branch 'origin/dev' into dev-5.14.0
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/forum/detail/ForumArticleAskListFragment.kt
2022-09-22 10:54:36 +08:00
69597a83a4 fix: 处理合并冲突 2022-09-22 10:53:04 +08:00
45a0f6fa1f Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/forum/detail/ForumArticleAskListViewModel.kt
#	dependencies.gradle
2022-09-22 10:46:04 +08:00
18ee571604 perf: 优化首页轮播图区域上下滑动时的性能 2022-09-22 10:44:41 +08:00
d50615633f feat:【光环助手V5.14.0】前端优化汇总9月第3周(2) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2086 2022-09-22 09:49:52 +08:00
7e8702363c fix: 修复首页列表分页刷新时偶发的数组越界问题 2022-09-21 16:20:58 +08:00
f02032dd47 fix: 优化双列通用合集专题的性能 2022-09-21 16:20:28 +08:00
f486b3aba9 build: 升级leakcanary版本至2.9.1 2022-09-21 14:22:17 +08:00
9afa8ad61b fix: 修改部分页面背景颜色使其适配深色模式 2022-09-21 11:37:17 +08:00
63f315e294 chore: 版本更新至 5.12.7 2022-09-21 11:33:30 +08:00
9debcdf55b fix:【光环助手V5.14.0】前端优化汇总9月第3周(6) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2086 2022-09-21 11:19:09 +08:00
130cb68b83 Merge branch 'hotfix-v5.12.6-596-simulator_install_error' into 'release'
fix: 修复模拟器下载完成后无法调起安装页面的问题

See merge request halo/android/assistant-android!340
2022-09-21 11:17:21 +08:00
4895bf694b fix: 修复模拟器下载完成后无法调起安装页面的问题 2022-09-21 11:16:33 +08:00
414aaeb5ea fix:【光环助手V5.14.0】前端优化汇总9月第3周(4) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2086 2022-09-20 17:44:23 +08:00
b0d1204341 fix: 优化首页双列专题的性能 2022-09-19 17:44:58 +08:00
9d76bcc06e format: 全局更改APP夜间模式相关名称的代码为深色模式 2022-09-19 15:32:26 +08:00
9e79b0d37e Merge branch 'hotfix-v5.12.6-596-vector_crash' into 'release'
fix: 修复5.0以下系统出现的矢量图闪退问题

See merge request halo/android/assistant-android!339
2022-09-19 14:56:50 +08:00
44c1f26f88 fix: 修复5.0以下系统出现的矢量图闪退问题 2022-09-19 14:48:16 +08:00
4be0ea9a96 fix: 修复双列卡片在夜间模式边缘存在锯齿的问题 2022-09-19 10:09:50 +08:00
61d16a9b50 Merge branch 'feature-issues2061' into 'dev-5.14.0'
fix:修改缺省页UI遗漏的id

See merge request halo/android/assistant-android!338
2022-09-19 09:05:37 +08:00
848b41ea76 fix:修改缺省页UI遗漏的id 2022-09-16 17:53:31 +08:00
2bd3990404 fix: 修复部分页面顶部下载按钮红点和数字显示不正确的问题 2022-09-16 16:51:56 +08:00
552da837c1 Merge remote-tracking branch 'origin/dev-5.14.0' into dev-5.14.0 2022-09-16 16:30:54 +08:00
192b1db9c9 fix: 修复首页轮播图不可见时仍然在自动滚动的问题 2022-09-16 16:29:10 +08:00
0d06701e0d chore: 版本更新至 5.12.6 2022-09-16 13:45:25 +08:00
943956c1b7 Merge branch 'hotfix-v5.12.5-595-temp_post_fixed_top' into 'release'
feat: 【光环助手】游戏业务临时需求 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2087

See merge request halo/android/assistant-android!337
2022-09-16 11:50:56 +08:00
5a47e4f87b feat: 【光环助手】游戏业务临时需求 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2087 2022-09-16 11:49:46 +08:00
731cdab9df Merge branch 'hotfix-v5.12.5-595-notification_crash' into 'release'
fix: 捕抓通知栏跳转的闪退

See merge request halo/android/assistant-android!336
2022-09-16 10:17:26 +08:00
f714beadab fix: 捕抓通知栏跳转的闪退 2022-09-16 10:15:59 +08:00
d9d7e713ba fix: 【光环助手V5.14.0】数据后台—搜索词统计 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2057 2022-09-15 17:21:01 +08:00
249b5ac876 perf: 响应系统低内存时的回调 2022-09-15 17:09:50 +08:00
14d961ed07 feat:【光环助手V5.14.0】个人主页新增显示用户ID(完成UI) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2069 2022-09-15 15:12:33 +08:00
3315686440 Merge branch 'feature-isuess2056' into 'dev-5.14.0'
fix:论坛搜索优化  https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2056

See merge request halo/android/assistant-android!334
2022-09-14 17:50:58 +08:00
bea3cdeacb Merge branch 'feature-isuess2055' into 'dev-5.14.0'
fix:修复热门内容标题显示问题

See merge request halo/android/assistant-android!335
2022-09-14 17:50:43 +08:00
1d10028353 fix:【光环助手V5.14.0】前端优化汇总9月第2周
(4-8) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2079
2022-09-14 17:47:56 +08:00
ee6f53ac92 fix:代码格式化 2022-09-14 17:45:10 +08:00
cdfda0d175 fix: 【光环助手V5.14.0】数据后台—搜索词统计 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2057 2022-09-14 17:24:13 +08:00
c6dbd167c9 Merge branch 'feature-issues2061' into 'dev-5.14.0'
feat:缺省页UI优化  https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2061

See merge request halo/android/assistant-android!330
2022-09-14 17:12:18 +08:00
b404bb91f9 fix:修复热门内容标题显示问题 2022-09-14 15:34:21 +08:00
a2488fe0c7 Merge branch 'dev-5.14.0' into feature-isuess2056 2022-09-14 14:40:26 +08:00
7602e27ac5 fix:删除无用布局,资源 2022-09-14 14:38:43 +08:00
6d21a5e8ae Merge branch 'feature-isuess2055' into 'dev-5.14.0'
社区搜索优化,新增热门内容

See merge request halo/android/assistant-android!332
2022-09-14 13:48:16 +08:00
77a1ae68ce fix:社区搜索优化,新增热门内容修改 https://git.shanqu.cc/halo/android/assistant-android/-/merge_requests/332 2022-09-14 11:49:01 +08:00
ccbacf6d37 fix:论坛搜索优化 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2056 2022-09-14 11:17:59 +08:00
d32ab37358 Merge branch 'hotfix-v5.12.5-595-crashes' into 'release'
Hotfix v5.12.5 595 crashes

See merge request halo/android/assistant-android!333
2022-09-14 11:16:29 +08:00
2f14607b03 fix: 修复插件跳转内容为空时的闪退 2022-09-14 10:47:52 +08:00
be599a24fd fix: 修复定期上报曝光事件时的闪退问题 2022-09-14 10:47:32 +08:00
c7ab3339f8 fix: 修复畅玩管理页面打开时快速切换 tab 触发的闪退 2022-09-14 10:46:11 +08:00
33c408d7e5 fix:社区搜索优化,新增热门内容补充 2022-09-14 10:37:21 +08:00
774f97261f fix:缺省页UI优化补充 2022-09-13 17:41:08 +08:00
55e7193149 feat:社区搜索优化,新增热门内容 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2055 2022-09-13 15:16:55 +08:00
76dedfbbc8 chore: 版本更新至 5.12.5 2022-09-13 13:47:59 +08:00
bfe6849ad2 Merge branch 'hotfix-v5.12.4-594-vector_crash' into 'release'
fix: 修复5.0以下系统出现的矢量图闪退问题

See merge request halo/android/assistant-android!331
2022-09-13 11:48:15 +08:00
b23e5ea441 fix: 修复5.0以下系统出现的矢量图闪退问题 2022-09-13 11:38:33 +08:00
d17bb2ac83 feat: 【光环助手V5.14.0】数据后台—搜索词统计 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2057 2022-09-13 11:28:01 +08:00
70cc9bbcb6 feat:缺省页UI优化(我的游戏页面补充) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2061 2022-09-13 10:14:53 +08:00
7ed1a37801 fix: 【光环助手V5.14.0】前端优化汇总9月第2周(1,2) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2079 2022-09-13 10:07:03 +08:00
c30a2cca6d feat:缺省页UI优化 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2061 2022-09-13 09:55:53 +08:00
2c8dbf2554 Merge branch 'hotfix-v5.12.4-594-more_feedback_jump' into 'release'
feat: 补充新的畅玩反馈跳转

See merge request halo/android/assistant-android!329
2022-09-13 09:38:04 +08:00
6eb37b7e52 feat: 补充新的畅玩反馈跳转 2022-09-09 18:02:09 +08:00
9a55cc297a Merge remote-tracking branch 'origin/dev' into dev-5.14.0 2022-09-09 16:25:32 +08:00
2bbe148971 fix: 处理合并冲突 2022-09-09 16:25:04 +08:00
986d41d0c3 Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	app/src/main/java/com/gh/common/FixedRateJobHelper.kt
#	app/src/main/java/com/gh/common/databind/BindingAdapters.java
#	app/src/main/java/com/gh/common/util/DetailDownloadUtils.java
#	app/src/main/java/com/gh/common/util/DialogUtils.java
#	app/src/main/java/com/gh/gamecenter/adapter/viewholder/DetailViewHolder.java
#	app/src/main/java/com/gh/gamecenter/forum/detail/ForumArticleAskListViewModel.kt
#	dependencies.gradle
2022-09-09 16:02:17 +08:00
07a72bce77 Merge remote-tracking branch 'origin/dev-5.14.0' into dev-5.14.0 2022-09-09 15:52:20 +08:00
8384464066 perf: 微调横向专题的代码 2022-09-09 15:51:59 +08:00
1e96f3e11b fix: 版本更新至 5.12.4 2022-09-09 11:30:10 +08:00
21f99df976 feat:【光环助手V5.14.0】数据后台—新增社区点击转化统计 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2058 2022-09-08 17:35:27 +08:00
cb087fb5fb Merge branch 'hotfix-v5.12.3-593-vgame_gamedetail_switch' into 'release'
fix: 修复关闭畅玩功能的游戏详情仍然显示畅玩游戏跳转按钮的问题

See merge request halo/android/assistant-android!328
2022-09-08 17:34:34 +08:00
db03b55850 fix: 修复关闭畅玩功能的游戏详情仍然显示畅玩游戏跳转按钮的问题 2022-09-08 17:33:36 +08:00
457f050948 chore: 版本更新为 5.14.0 2022-09-08 16:49:54 +08:00
f4afda913e Merge branch 'hotfix-v5.12.3-593-game_collection_square_skeleton' into 'release'
fix: 修复游戏单广场骨架屏不能沉浸状态栏的问题

See merge request halo/android/assistant-android!327
2022-09-08 09:39:01 +08:00
2300695607 fix: 修复游戏单广场骨架屏不能沉浸状态栏的问题 2022-09-08 09:33:29 +08:00
32c318cc61 Merge branch 'hotfix-v5.12.3-593-install_hint' into 'release'
fix: 修复游戏下载时多次调用显示安装引导方法的问题

See merge request halo/android/assistant-android!326
2022-09-08 09:28:57 +08:00
7fd5a37b4c Merge branch 'feature-issues1933' into 'release'
【光环助手V_5.11.0】国际服游戏下载弹窗优化

See merge request halo/android/assistant-android!325
2022-09-08 09:22:16 +08:00
a805e56a7c Merge branch 'release' into feature-issues1933
# Conflicts:
#	app/src/main/java/com/gh/common/databind/BindingAdapters.java
#	app/src/main/java/com/gh/common/filter/RegionSetting.kt
#	app/src/main/java/com/gh/common/filter/RegionSettingHelper.kt
#	app/src/main/java/com/gh/common/util/DetailDownloadUtils.java
#	app/src/main/java/com/gh/gamecenter/adapter/viewholder/DetailViewHolder.java
#	dependencies.gradle
2022-09-07 19:11:20 +08:00
7679c750cf fix: 修复游戏下载时多次调用显示安装引导方法的问题 2022-09-07 18:04:00 +08:00
5440a1faf5 Merge branch 'feature-issues2047' into 'release'
feat:【光环助手】国际服游戏合规调整方案(需求变动)...

See merge request halo/android/assistant-android!324
2022-09-07 17:43:20 +08:00
ce840cf33e feat:【光环助手】国际服游戏合规调整方案(需求变动) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2047#note_169012 2022-09-07 17:41:00 +08:00
82fc7d01fc chore: 版本更新至 5.11.4 2022-09-07 17:30:58 +08:00
37a2c5171d fix: 【光环助手V_5.11.0】国际服游戏下载弹窗优化(20220907需求补充) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1933 2022-09-07 17:30:06 +08:00
b72f751dc0 Merge branch 'hotfix-v5.12.3-593-wrong_toast' into 'release'
fix: 修复异常的畅玩 toast 提示

See merge request halo/android/assistant-android!323
2022-09-07 15:48:11 +08:00
fa740bacb3 fix: 修复异常的畅玩 toast 提示 2022-09-07 15:44:27 +08:00
22e92cdaf6 Merge branch 'feature-issues2047' into 'release'
feat:【光环助手】国际服游戏合规调整方案 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2047

See merge request halo/android/assistant-android!322
2022-09-06 17:32:04 +08:00
ac72abe105 feat:【光环助手】国际服游戏合规调整方案 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2047 2022-09-06 17:29:32 +08:00
aaa2c6330e chore: 版本更新至 5.12.3 2022-09-06 17:03:31 +08:00
c338bf4f00 Merge branch 'hotfix-v5.12.2-592-download_crash' into 'release'
fix: 尝试修复启动下载服务异常...

See merge request halo/android/assistant-android!321
2022-09-06 17:02:39 +08:00
aec874b3e0 fix: 尝试修复启动下载服务异常 https://sentry.shanqu.cc/organizations/lightgame/issues/203713/?project=22&query=dist%3A592&sort=freq&statsPeriod=14d 2022-09-06 16:30:17 +08:00
dc3f3240c6 fix: 修复游戏单广场骨架屏不能沉浸状态栏的问题 2022-09-05 14:58:53 +08:00
a3ddf54afc chore: 版本更新至 5.12.2 2022-09-05 10:37:12 +08:00
d840fab316 Merge branch 'hotfix-v5.12.1-591-homepage_crash' into 'release'
fix: 修复首页下载更新页面偶发的多线程操作闪退

See merge request halo/android/assistant-android!320
2022-09-05 10:20:51 +08:00
125701534d fix: 修复首页下载更新页面偶发的多线程操作闪退 2022-09-05 10:19:29 +08:00
be85ba6c47 Merge branch 'hotfix-v5.12.1-591-home_video_crash' into 'release'
修复首页列表数据更新导致播放视频数组越界问题

See merge request halo/android/assistant-android!319
2022-09-05 10:13:29 +08:00
bcba6c4230 fix: 修复首页列表数据更新导致播放视频数组越界问题 2022-09-05 10:10:50 +08:00
453ca0ceea Merge branch 'hotfix-v5.12.1-591-crashes' into 'release'
Hotfix v5.12.1 591 crashes

See merge request halo/android/assistant-android!318
2022-09-02 11:14:40 +08:00
dc4e345ea8 fix: 多线程上报日志导致的闪退 2022-09-02 11:12:58 +08:00
946bd39fb6 fix: 修复首页列表更新数组越界闪退 2022-09-02 10:06:57 +08:00
83610a98f4 Merge branch 'hotfix-v5.12.1-591-download_crash' into 'release'
fix: 尝试修复启动下载服务时的闪退

See merge request halo/android/assistant-android!317
2022-09-01 16:28:18 +08:00
e21d8a5ac5 fix: 尝试修复启动下载服务时的闪退 2022-09-01 16:27:30 +08:00
3b2f5c6749 Merge remote-tracking branch 'origin/dev-5.13.0' into dev 2022-09-01 15:20:36 +08:00
43c840cd94 chore: 版本更新至 5.12.1 2022-09-01 15:19:21 +08:00
9f7b1acef9 Merge branch 'hotfix-v5.12.0-590-crashes' into 'release'
fix v5.12.0 crashes

See merge request halo/android/assistant-android!316
2022-09-01 15:15:11 +08:00
08ac765e9c fix: 修复多线程操作下载数据引起的闪退 2022-09-01 15:12:34 +08:00
15a3624e55 fix: 修复下载完成游戏时多线程操作日志造成的闪退 2022-09-01 15:12:09 +08:00
ce16ad471b fix: 修复安装游戏时获取不到版本的闪退 2022-09-01 15:11:41 +08:00
c20a9e86d0 Merge branch 'hotfix-v5.12.0-590-home_index_out_of_bounds' into 'release'
修改首页可能出现的数组越界问题

See merge request halo/android/assistant-android!315
2022-09-01 15:09:30 +08:00
8e068684e0 fix: 修改首页可能出现的数组越界问题 2022-09-01 14:45:13 +08:00
31d8a442a3 fix: 修复下载实例快照列表为空时的闪退 2022-09-01 13:58:43 +08:00
f534216009 fix:【光环助手V5.13.0】游戏搜索功能优化(第9期)(0831UI测试问题 3) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2011#note_167425 2022-08-31 20:40:39 +08:00
2a808e3ac9 fix:【光环助手V5.13.0】游戏搜索功能优化(第9期)(0831UI测试问题 3) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2011#note_167425 2022-08-31 20:07:44 +08:00
42f5cbe9a4 fix:【光环助手V5.13.0】游戏搜索功能优化(第9期)(测试问题 1) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2011#note_167665 2022-08-31 18:30:05 +08:00
d1e87d552d fix:【光环助手V5.13.0】游戏搜索功能优化(第9期)(0831UI测试问题 3、0831测试 3) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2011 2022-08-31 15:30:33 +08:00
fa457fa337 fix:【光环助手V5.13.0】游戏搜索功能优化(第9期)(0831UI测试问题) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2011#note_167425 2022-08-31 10:17:23 +08:00
5dd0734aad fix: 修复正式包畅玩链接不正确的问题 2022-08-30 18:13:59 +08:00
fa2c86c3f1 fix: 修复畅玩配置加载失败触发的闪退问题 2022-08-30 17:55:35 +08:00
1753224cc4 build: 正式包畅玩开关默认改为开启状态 2022-08-30 17:18:02 +08:00
e3cece6654 fix:【光环助手V5.13.0】游戏搜索功能优化(第9期)(UI优化) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2011 2022-08-30 17:11:45 +08:00
f01e79d303 fix: 微调帖子详情页UI 2022-08-30 16:09:11 +08:00
5d89a2c26d fix:【光环助手V5.13.0】游戏搜索功能优化(第9期)(UI优化) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2011 2022-08-30 15:57:07 +08:00
2ff948dab1 fix: 缓存畅玩游戏游玩时间和占用空间,修复畅玩游戏 newIntent 时 tab 定位不生效的问题 2022-08-30 15:33:47 +08:00
ebe560bc2b Merge remote-tracking branch 'origin/dev' into dev-5.13.0
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/SplashScreenActivity.kt
#	app/src/main/res/layout/home_game_item.xml
2022-08-30 14:16:21 +08:00
7dd0bdfd73 Merge remote-tracking branch 'origin/release' into dev 2022-08-30 14:10:14 +08:00
af3797afc7 feature:【光环助手V5.13.0】游戏搜索功能优化(第9期)(前端部分) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2011 2022-08-30 14:02:46 +08:00
0821f00584 fix: 添加畅玩备份完整性校验,避免数据异常 2022-08-30 13:46:09 +08:00
163a1a7f1f fix: 修复回调 onNewIntent 回到畅玩游戏管理列表无法正常刷新的问题 2022-08-29 18:04:23 +08:00
02b9d15134 feat: 添加畅玩广场的跳转 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2000#note_166886 2022-08-29 14:17:54 +08:00
4ab2a23840 feat: 添加畅玩广场的跳转 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2000#note_166886 2022-08-29 10:20:43 +08:00
2f35f07ba0 fix: 修复定时日志上报可能触发的多线程操作闪退 2022-08-26 16:56:47 +08:00
76cfda2df1 fix: 修复曝光事件序列化时可能出现死循环卡死的问题 2022-08-26 16:10:59 +08:00
fc705578b7 Merge branch 'hotfix-v5.11.3-573-game_detail_crash' into 'release'
fix: 修复游戏详情页面的闪退

See merge request halo/android/assistant-android!314
2022-08-25 16:12:39 +08:00
c6c544f699 feat: 邮件包添加最近代码变更弹窗 https://git.shanqu.cc/halo/android/assistant-android/-/issues/79 2022-08-25 15:58:45 +08:00
ec96fc3258 fix: 修复游戏详情页面的闪退 2022-08-25 15:53:02 +08:00
bfa0b7bd11 Merge branch 'hotfix-v5.11.3-573-crashes' into 'release'
fix: 修复游戏详情页面、查看大图页面的闪退

See merge request halo/android/assistant-android!313
2022-08-25 14:41:01 +08:00
26fc068d29 fix: 修复游戏详情页面、查看大图页面的闪退 2022-08-25 14:36:59 +08:00
a035418ff9 fix: 【光环助手V5.13.0】评论 新增 IP属地展示(0825UI测试1) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2008 2022-08-25 14:19:14 +08:00
c40b1f5391 fix: 【光环助手V5.13.0】评论 新增 IP属地展示(0825测试反馈1) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2008 2022-08-25 11:29:50 +08:00
848d3f27bd feat: 邮件包添加最近代码变更弹窗 https://git.shanqu.cc/halo/android/assistant-android/-/issues/79 2022-08-25 11:08:26 +08:00
676011eef3 Merge branch 'hotfix-v5.11.3-573-forum_detail_crash' into 'release'
fix: 修复论坛详情页点击标题栏页面吸顶时的闪退问题

See merge request halo/android/assistant-android!312
2022-08-25 11:04:14 +08:00
3319fd29de fix: 修复论坛详情页点击标题栏页面吸顶时的闪退问题 2022-08-25 11:03:18 +08:00
d3233c379f fix: 【光环助手V5.13.0】通用链接内容合集优化(0825UI测试问题1) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2010 2022-08-25 10:58:25 +08:00
eb7c5d6285 fix:【光环助手V5.13.0】前端优化汇总8月第1周(4 修改评论时间显示规则) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2014#note_166462 2022-08-25 09:57:58 +08:00
b32bb19051 fix: 【光环助手V5.13.0】评论新增IP属地展示(补充问题2) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2008 2022-08-25 09:42:43 +08:00
5a7001dd66 fix: 修复部分设备不能获取已安装应用列表的问题 2022-08-24 17:36:12 +08:00
bdeb0c79eb fix: 【光环助手V5.13.0】客户端内部需求(修改错误webview提示UI,通过接口配置链接下载) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2029 2022-08-24 11:12:53 +08:00
bb29702db8 fix:【光环助手V5.13.0】前端优化汇总8月第2周(3) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2026 2022-08-24 10:02:20 +08:00
4138f2861c Merge branch 'feature-issues2014-buried-point' into 'dev-5.13.0'
fix:修复点击我的游戏-预约Tab位置是 按钮 时,没有上报事件

See merge request halo/android/assistant-android!311
2022-08-24 09:48:40 +08:00
33050a7c94 fix:修复点击我的游戏-预约Tab位置是 按钮 时,没有上报事件 2022-08-24 09:32:33 +08:00
4fef613390 fix: 【光环助手V5.13.0】评论 新增 IP属地展示(0822测试3,4) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2008 2022-08-22 16:44:46 +08:00
15565281a9 fix: 【光环助手V5.13.0】评论 新增 IP属地展示(0822测试反馈1) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2008 2022-08-22 15:49:21 +08:00
39d3c4d3c8 fix: 修复未安装畅玩游戏在列表中会找不到的问题 2022-08-19 17:59:52 +08:00
443c8d7eaf fix: 修复备份畅玩游戏异常, 2022-08-19 17:53:52 +08:00
0195af422c fix: 【光环助手V5.13.0】前端优化汇总8月第3周(1、2) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2032 2022-08-19 17:31:29 +08:00
7d05d42e14 fix: 【光环助手V5.13.0】前端优化汇总8月第3周(4) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2032 2022-08-19 11:11:42 +08:00
322da11319 style: 添加项目相关的 editorConfig 2022-08-19 10:47:01 +08:00
b46da2751b Merge remote-tracking branch 'origin/dev' into dev 2022-08-19 10:45:44 +08:00
4999ba6563 style: 添加项目相关的 editorConfig 2022-08-19 10:45:32 +08:00
5b3aec8e19 fix: 【光环助手V5.13.0】前端优化汇总8月第3周(3) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2032 2022-08-19 10:27:15 +08:00
6cc2f3af26 fix: 修复社区-论坛-热门论坛的Item需要点击两次才能跳转的问题 2022-08-18 14:23:23 +08:00
3a4b3326e7 fix: 移除首页最近在玩列表的冗余刷新代码 2022-08-18 11:39:08 +08:00
51c75947c9 fix: 移除首页部分冗余代码 2022-08-18 11:38:32 +08:00
19bb89b6f1 fix: 修复首页列表刷新时偶发的异常闪烁问题 2022-08-18 11:31:10 +08:00
6e2ec70434 fix: 修改首页游戏卡片标题布局样式 2022-08-17 18:43:09 +08:00
793f2f241a fix: 清理畅玩管理冗余代码 2022-08-17 17:59:44 +08:00
72f3d4a379 fix: 修复畅玩游戏管理页面lottie开关动画闪退问题 2022-08-17 17:48:48 +08:00
6b6a7dd81e fix: 修复畅玩游戏管理页面lottie开关动画闪退问题 2022-08-17 17:45:50 +08:00
ffa4257eb4 fix: 重构下载按钮的实现 (修复我的游戏-预约tab列表下载按钮不显示文字的问题) https://git.shanqu.cc/halo/android/assistant-android/-/issues/75 2022-08-17 17:31:57 +08:00
22c06286c2 fix: 修改首页游戏卡片下载按钮不会根据下载状态变更显示样式问题 2022-08-17 16:57:00 +08:00
1d600f370a Merge branch 'feature-issues2014-buried-point' into 'dev-5.13.0'
feat:新增我的光环-我的游戏相关数据埋点

See merge request halo/android/assistant-android!310
2022-08-17 16:35:37 +08:00
ac3788541b feat:新增我的光环-我的游戏相关数据埋点 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2014 2022-08-17 16:09:22 +08:00
015418b56a fix: 处理合并冲突 2022-08-17 16:06:25 +08:00
9c066431b4 Merge remote-tracking branch 'origin/dev' into dev-5.13.0
# Conflicts:
#	app/src/main/java/com/gh/common/util/DetailDownloadUtils.java
#	app/src/main/java/com/gh/gamecenter/forum/home/ForumActivityFragment.kt
#	app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleListFragment.kt
#	app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareFragment.kt
2022-08-17 15:57:56 +08:00
3f2b59aecf fix: 【光环助手V5.12.0】同步正式环境后测试问题汇总(5) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2021 2022-08-17 15:48:51 +08:00
1c3d78dc17 fix: 移除旧的下载更新页面相关代码 2022-08-17 15:39:12 +08:00
9fc9f0362f refactor: 1.积分模块单独运行时使用新包名; 2.积分模块登录支持不授权登录 2022-08-17 15:12:07 +08:00
ee131da96b Merge branch 'dev-5.13.0' of git.shanqu.cc:halo/android/assistant-android into dev-5.13.0 2022-08-17 11:27:49 +08:00
843a2f8831 fix: 处理合并冲突 2022-08-17 11:27:30 +08:00
cfb48c07ff feat: 【光环助手V5.13.0】评论 新增 IP属地展示 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2008 2022-08-17 11:17:34 +08:00
3952139324 chore: 更新 assistant_flutter 依赖 2022-08-17 11:16:36 +08:00
d9665a8464 fix: 修复应用启动时没有安装畅玩助手也会出发连接尝试的问题 2022-08-17 10:46:36 +08:00
b4d44d6e0a fix: 处理合并冲突 2022-08-17 10:42:39 +08:00
bba8261d97 Merge remote-tracking branch 'origin/dev-5.13.0' into dev-5.13.0
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/qa/article/detail/ArticleDetailAdapter.kt
#	app/src/main/java/com/gh/gamecenter/qa/questions/newdetail/NewQuestionDetailAdapter.kt
2022-08-17 10:24:17 +08:00
134df71aba Merge branch 'feature-module_login' into dev-5.13.0
# Conflicts:
#	app/src/main/java/com/gh/common/constant/Config.java
#	app/src/main/java/com/gh/common/simulator/SimulatorGameManager.kt
#	app/src/main/java/com/gh/common/util/DirectUtils.kt
#	app/src/main/java/com/gh/common/util/DownloadObserver.kt
#	app/src/main/java/com/gh/common/util/GameActivityDownloadHelper.kt
#	app/src/main/java/com/gh/gamecenter/adapter/viewholder/DetailViewHolder.java
#	app/src/main/java/com/gh/gamecenter/catalog/NewCatalogListFragment.kt
#	app/src/main/java/com/gh/gamecenter/category/NewCategoryListFragment.kt
#	app/src/main/java/com/gh/gamecenter/category2/CategoryV2ListFragment.kt
#	app/src/main/java/com/gh/gamecenter/entity/GameEntity.kt
#	app/src/main/java/com/gh/gamecenter/fragment/MainWrapperViewModel.kt
#	app/src/main/java/com/gh/gamecenter/game/GameFragment.kt
#	app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionPosterFragment.kt
#	app/src/main/java/com/gh/gamecenter/gamecollection/publish/GameCollectionEditActivity.kt
#	app/src/main/java/com/gh/gamecenter/gamecollection/publish/GameCollectionEditViewModel.kt
#	app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailViewModel.kt
#	app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyViewModel.kt
#	app/src/main/java/com/gh/gamecenter/home/HomeFragmentAdapter.kt
#	app/src/main/java/com/gh/gamecenter/home/HomeViewModel.kt
#	app/src/main/java/com/gh/gamecenter/mygame/PlayedGameAdapter.kt
#	app/src/main/java/com/gh/gamecenter/personal/PersonalFragment.kt
#	app/src/main/java/com/gh/gamecenter/personalhome/background/BackgroundPreviewFragment.kt
#	app/src/main/java/com/gh/gamecenter/simulatorgame/SimulatorGameListFragment.kt
#	app/src/main/java/com/gh/gamecenter/subject/SubjectListFragment.kt
#	app/src/main/java/com/gh/gamecenter/tag/TagsListFragment.kt
#	app/src/main/java/com/halo/assistant/HaloApp.java
#	module_login/src/main/java/com/gh/gamecenter/login/user/UserManager.java
#	module_login/src/main/java/com/gh/gamecenter/login/utils/LoginHelper.kt
2022-08-17 10:22:47 +08:00
0752813c09 fix: 修复畅玩配置为空时的闪退 2022-08-16 17:33:37 +08:00
28744ce9ce fix: 修复畅玩游戏更新无法在列表显示进度的问题 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2027 2022-08-16 17:07:33 +08:00
1aadf7bd38 fix: 修改判断webview是否可用 2022-08-16 14:28:31 +08:00
4a7e0a8b4d Merge branch 'feature-webview_abi_error' into dev-5.13.0 2022-08-16 14:01:07 +08:00
9780aa532a fix: 【光环助手V5.12.0】同步正式环境后测试问题汇总(5) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2021 2022-08-16 10:02:02 +08:00
2920ca4975 fix: 修复申请权限后闪退问题 2022-08-15 16:12:08 +08:00
c20f92f2cc refactor: 组件化积分相关功能(可单独运行积分模块) https://git.shanqu.cc/halo/android/assistant-android/-/issues/73 2022-08-15 15:55:06 +08:00
9c2c4562aa refactor: 组件化积分相关功能(可单独运行积分模块) https://git.shanqu.cc/halo/android/assistant-android/-/issues/73 2022-08-15 15:49:42 +08:00
96d10703c7 style: 删除无用代码 2022-08-15 15:26:23 +08:00
b58baf565c fix: 修复首页游戏大图卡片副标题超长时与下载按钮重叠的问题 2022-08-15 15:15:22 +08:00
1a3f0f87d5 feat: 尝试避免安装错误版本 WebView 的用户闪退 https://git.shanqu.cc/halo/android/assistant-android/-/issues/78 2022-08-15 15:14:17 +08:00
9ce4ff54ba Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	app/src/main/AndroidManifest.xml
2022-08-15 14:02:48 +08:00
a6605e6044 Merge branch 'fix_content_provider' into 'release'
本地实名认证插入数据库改为contentProvider插入,并在Manifest加入queries

See merge request halo/android/assistant-android!306
2022-08-15 14:01:24 +08:00
61f77a6fcc fix:本地实名认证插入数据库改为contentProvider插入,并在Manifest加入queries 2022-08-15 11:32:02 +08:00
d39755efe6 Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	dependencies.gradle
2022-08-15 10:45:01 +08:00
ddf7d6f94d Merge branch 'hotfix-v5.11.3-573-crashes' into 'release'
Hotfix v5.11.3 573 crashes

See merge request halo/android/assistant-android!305
2022-08-15 10:42:49 +08:00
17ad25aff3 fix: 修复游戏详情页点击关闭下载的下载按钮会闪退的问题 2022-08-15 10:00:42 +08:00
b169ce66b4 fix: 修复部分设备获取已安装信息时会闪退的问题 2022-08-15 09:56:10 +08:00
c0e34b3edb fix: 修复下载路径为空时调用下载触发的闪退 2022-08-15 09:53:30 +08:00
7936cb2b9f feat: 预检查 Webview 是否安装/安装错误ABI 2022-08-13 16:45:19 +08:00
2bf662ee27 fix: 修复首页游戏大图卡片副标题超长时与下载按钮重叠的问题 2022-08-11 16:00:59 +08:00
a0c1a14987 refactor: 组件化积分相关功能 https://git.shanqu.cc/halo/android/assistant-android/-/issues/73 2022-08-11 14:50:23 +08:00
ab01fac150 feat: 重构下载按钮的实现 https://git.shanqu.cc/halo/android/assistant-android/-/issues/75 2022-08-11 11:17:50 +08:00
2ce35ab8a5 feat: 【光环助手V5.13.0】通用链接内容合集优化 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2010 2022-08-11 10:34:46 +08:00
50db76ce70 chore: 版本更新至 5.11.3 2022-08-11 09:41:37 +08:00
30cb1b8f87 Merge branch 'hotfix-v5.11.2-572-vertical_scroll_issue' into 'release'
fix: 修复横向列表滚动专题更新数据时会自动往左切换的问题

See merge request halo/android/assistant-android!304
2022-08-11 09:40:19 +08:00
470256411d fix: 修复横向列表滚动专题更新数据时会自动往左切换的问题 2022-08-11 09:39:24 +08:00
364f089d75 Merge branch 'feature-issues2016-v5.11.2' into 'release'
隐私弹窗修改 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2016

See merge request halo/android/assistant-android!303
2022-08-10 17:31:52 +08:00
fc0c710172 Merge branch 'hotfix-v5.11.2-572-wrong_image_url' into 'release'
fix: 修复部分图片可能因为 jpegConfig 为空而导致加载失败的问题

See merge request halo/android/assistant-android!302
2022-08-10 11:03:50 +08:00
18314347de fix: 修复部分图片可能因为 jpegConfig 为空而导致加载失败的问题 2022-08-10 11:03:50 +08:00
87b9ff7054 feat: 【光环助手】隐私弹窗修改 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2016 2022-08-10 10:11:34 +08:00
a4c7aa6338 fix: 修复资讯详情闪退问题 2022-08-09 16:42:34 +08:00
8d6628404c fix: 修改专区短链接使用webview打开 2022-08-09 16:26:32 +08:00
e383abf942 Merge branch 'dev-5.13.0-issues74' into 'dev-5.13.0'
fix:曝光上报使用对象池来复用 ExposureEvent

See merge request halo/android/assistant-android!300
2022-08-09 14:43:30 +08:00
d0c9c0f2f5 fix:曝光上报使用对象池来复用 ExposureEvent 2022-08-09 14:43:29 +08:00
f2ebc7796f Merge branch 'hotfix-v5.11.2-572-game_subtitle_crash' into 'release'
fix: 修复游戏副标题闪退问题

See merge request halo/android/assistant-android!301
2022-08-09 11:18:55 +08:00
6e6b107a80 fix: 修复游戏副标题闪退问题 2022-08-09 11:12:05 +08:00
4d29ff8752 feat: 更新微博 SDK (避免初始化获取 MAC 地址) 2022-08-09 11:09:00 +08:00
56226b8620 Merge branch 'hotfix-v5.11.2-572_suggestion_crash' into 'release'
修复意见反馈闪退问题

See merge request halo/android/assistant-android!299
2022-08-09 10:01:38 +08:00
240d3ea304 fix: 修复意见反馈闪退问题 2022-08-09 09:56:01 +08:00
e9ca19fa41 chore: 版本更新至 5.13.0 2022-08-08 17:29:11 +08:00
821d21a2e1 Merge remote-tracking branch 'origin/dev' into dev-5.13.0 2022-08-08 17:27:40 +08:00
9009567226 feat: 更新微博 SDK (避免初始化获取 MAC 地址) 2022-08-08 17:25:25 +08:00
6506012d78 fix:【光环助手V5.13.0】前端优化汇总8月第1周(4、8) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2014 2022-08-08 17:11:44 +08:00
cc4b685a28 refactor: 优化下载点击事件的死亡嵌套回调 https://git.shanqu.cc/halo/android/assistant-android/-/issues/77 2022-08-08 16:50:46 +08:00
5d21f4e29f feat: 畅玩游戏发布相关准备 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2000 2022-08-08 15:38:27 +08:00
e84973f0e6 fix: 【光环助手V5.13.0】前端优化汇总8月第1周(2,3) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2014 2022-08-08 12:05:33 +08:00
a997f77584 fix:【光环助手V5.13.0】前端优化汇总8月第1周(5) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2014 2022-08-08 10:43:54 +08:00
b70fb261d4 Merge branch 'hotfix-v5.11.2-572-skeleton_crash' into 'release'
fix: 修复懒加载列表页更新骨架屏出现闪退的问题

See merge request halo/android/assistant-android!298
2022-08-04 15:09:07 +08:00
cbef1095d6 fix: 修复懒加载列表页更新骨架屏出现闪退的问题 2022-08-04 15:01:15 +08:00
e3f6d64fa9 refactor: 组件化登录功能 https://git.shanqu.cc/halo/android/assistant-android/-/issues/73 2022-08-04 11:28:24 +08:00
6f5f72194a feat: 移除 log 线程,取消本地 log 数据库(由 loghub sdk 实现) 2022-08-03 16:15:16 +08:00
8ff396e05b feat: 调整主 IO 线程池的核心数和最大数 2022-08-03 15:16:00 +08:00
6fa4bf75bf fix: 【光环助手V5.12.0】首页内容列表优化(0802测试5) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1949 2022-08-02 16:25:38 +08:00
9c11f7f70e fix: 处理部分 SonarQube 问题 2022-08-02 16:22:45 +08:00
c8cd753022 feat: Android 8.0 以下设备停用畅玩游戏 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2000 2022-08-02 16:21:01 +08:00
12d94c7d0a Merge remote-tracking branch 'origin/dev' into dev 2022-08-02 15:05:21 +08:00
d1159c30d1 Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	dependencies.gradle
2022-08-02 14:59:01 +08:00
8b241ec569 fix:【光环助手V5.12.0】游戏详情新增“内容卡片”功能(UI测试问题汇总0802补充3) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1953 2022-08-02 14:46:01 +08:00
07f68f050b fix: 调整部分 sentry 日志 2022-08-02 13:59:40 +08:00
f8c61b5d53 feat: 添加全局畅玩游戏功能开关 2022-08-02 13:45:37 +08:00
791bf000ef Merge branch 'hotfix-v5.11.2-572-image_viewer' into 'release'
fix: 修复帖子评论查看大图进入动画位置异常

See merge request halo/android/assistant-android!297
2022-08-02 11:45:15 +08:00
515a34ecf9 Merge remote-tracking branch 'origin/dev' into dev 2022-08-02 11:13:16 +08:00
3e74b39b45 fix: 修复畅玩游戏安装完成后会取消相同包名游戏下载任务的问题(20220729需求补充:测试反馈) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1955 2022-08-02 11:13:11 +08:00
c3eba42b17 fix:【光环助手V5.12.0】游戏详情新增“内容卡片”功能(UI测试问题汇总0802补充2) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1953 2022-08-02 10:41:12 +08:00
13ab6f7b38 fix: 修复畅玩游戏下载进度状态同步问题(20220729需求补充:测试反馈) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1955 2022-08-01 17:45:29 +08:00
7ee9913964 fix: 修复帖子评论查看大图进入动画位置异常 2022-08-01 17:27:29 +08:00
96f0c03ff2 chore: 版本更新至 5.11.2 2022-08-01 15:37:12 +08:00
7c3f91c296 Merge branch 'feature-issues1292-v5.11.1' into 'release'
Feature issues1292 简单适配华为无应用列表读取权限的情况

See merge request halo/android/assistant-android!296
2022-08-01 15:31:08 +08:00
cd9d0b5456 Merge remote-tracking branch 'origin/dev' into feature-issues1801-v5.12.0 2022-08-01 15:14:23 +08:00
cb4b83ddb4 fix: 更新 LGLibrary 依赖 2022-08-01 15:10:17 +08:00
449836cbd0 fix: 处理合并冲突 2022-08-01 15:08:56 +08:00
a028639138 fix:【光环助手V5.12.0】游戏详情新增“内容卡片”功能(UI测试问题汇总1) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1953 2022-08-01 14:58:07 +08:00
c34e5f0a3d Merge remote-tracking branch 'origin/dev' into feature-issues1801-v5.12.0
# Conflicts:
#	app/src/main/java/com/gh/common/util/NewFlatLogUtils.kt
#	app/src/main/java/com/gh/gamecenter/gamedetail/entity/NewGameDetailEntity.kt
#	app/src/main/java/com/gh/gamecenter/home/HomeFragmentAdapter.kt
#	app/src/main/java/com/gh/gamecenter/home/HomeViewModel.kt
#	app/src/main/res/layout/fragment_forum_home.xml
#	libraries/LGLibrary
2022-08-01 14:50:48 +08:00
06f008d577 fix:【光环助手V5.12.0】游戏详情新增“内容卡片”功能(0727测试4) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1953 2022-08-01 11:49:39 +08:00
08a7491fa7 feat: 修复畅玩游戏和普通游戏同一下载地址回引起错误回调的问题 2022-08-01 11:17:28 +08:00
faa9d50426 fix:【光环助手V5.12.0】游戏详情新增“内容卡片”功能(0729测试1) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1953 2022-08-01 10:20:45 +08:00
493a444990 fix:【光环助手V5.12.0】游戏详情新增“内容卡片”功能(0729测试1-2) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1953 2022-07-29 15:51:49 +08:00
596cc4ca15 feat: 移除无安装权限启动弹窗 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1994 2022-07-29 15:34:09 +08:00
a14ea13dd7 fix: 移除无用文件 2022-07-29 11:27:19 +08:00
0cfce764ff Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	dependencies.gradle
#	libraries/LGLibrary
2022-07-29 11:19:32 +08:00
6c0f7f8cb3 fix: 移除无用资源文件 2022-07-29 11:17:13 +08:00
4ce17aa6a3 feat: 移除 x86 架构支持,捕抓 RenderScript 异常 2022-07-29 10:48:14 +08:00
c58db04155 fix: 修复在那无下载的游戏打开详情页闪退的问题 2022-07-28 17:42:04 +08:00
c47ab8fc41 Merge remote-tracking branch 'origin/release' into feature-issues1801 2022-07-28 17:37:04 +08:00
6c88782635 feat: 完成获取应用列表权限相关处理 https://git.shanqu.cc/pm/halo-app-issues/-/issues/1292 2022-07-28 16:55:44 +08:00
1ae905b0b4 fix:【光环助手V5.12.0】游戏详情新增“内容卡片”功能(0727测试2、8(3)) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1953 2022-07-28 15:11:45 +08:00
d0dc009906 Merge remote-tracking branch 'origin/dev' into dev 2022-07-28 14:39:44 +08:00
99ffde9b67 fix: 【光环助手V5.12.0】首页内容列表优化(0728测试1) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1949 2022-07-28 14:31:35 +08:00
3d56da3b6f fix:【光环助手V5.12.0】游戏详情新增“内容卡片”功能(0727测试2-4、8(3)) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1953 2022-07-28 14:31:20 +08:00
dc3ae1d36d fix: 【光环助手V5.12.0】版块内容列表优化(0727测试2) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1948 2022-07-28 09:22:31 +08:00
4e9d5357c8 fix:【光环助手V5.12.0】新增 发布内容需实名认证(0727测试2) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1982 2022-07-27 16:23:15 +08:00
a1d182a82c fix: 【光环助手V5.12.0】游戏专题功能优化(0727UI测试问题2) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1950 2022-07-27 13:59:03 +08:00
6efe9328b1 fix: 【光环助手V5.12.0】版块内容列表优(0727测试1) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1948 2022-07-27 11:43:56 +08:00
lyr
e8645cd717 fix:【光环助手V5.12.0】游戏专题功能优化(0727UI测试问题 1)https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1950#note_161351 2022-07-27 11:19:27 +08:00
7792574f20 Merge remote-tracking branch 'origin/feature-issues1801' into feature-issues1801 2022-07-26 16:38:44 +08:00
54131d507b fix: 修复普通游戏下载进度更新频率也提高的问题 2022-07-26 16:38:16 +08:00
5609a95382 feat:【光环助手V5.12.0】游戏详情新增“内容卡片”功能 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1953 2022-07-26 14:05:31 +08:00
3ab3229580 fix:安装完畅玩游戏 新增插入当前是否是测试包依据 2022-07-26 11:06:37 +08:00
8d1f300241 fix:安装完畅玩游戏 新增插入当前接口环境 2022-07-26 10:00:00 +08:00
d00f50bcf8 feat: 【光环助手V5.12.0】违规管理整合 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1946 2022-07-25 15:48:20 +08:00
624fb934e4 Merge branch 'hotfix-v5.11.1-571-vector_crash' into 'release'
fix: 修复5.0以下系统设置矢量图闪退的问题

See merge request halo/android/assistant-android!295
2022-07-22 17:08:04 +08:00
965b6b3f66 fix: 修复5.0以下系统设置矢量图闪退的问题 2022-07-22 16:51:24 +08:00
f98726fa18 feat: 【光环助手V5.12.0】首页内容列表优化 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1949 2022-07-22 16:11:52 +08:00
495070a14e feat: 添加畅玩助手隐私政策跳转地址 2022-07-22 15:14:55 +08:00
e8b00cc87f Merge remote-tracking branch 'origin/release' into feature-issues1801
# Conflicts:
#	app/src/main/java/com/gh/common/util/NewFlatLogUtils.kt
#	libraries/LGLibrary
2022-07-22 14:19:53 +08:00
6823f27ff3 Merge branch 'hotfix-v5.11.1-571-welcomdialog_display_issue' into 'release'
fix: 修复首页弹窗重复弹出的问题

See merge request halo/android/assistant-android!294
2022-07-22 11:54:34 +08:00
c0b561cb78 fix: 修复首页弹窗重复弹出的问题 2022-07-22 11:53:55 +08:00
d02bdf9a8a feat:【光环助手V5.12.0】新增 发布内容需实名认证 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1982 2022-07-22 11:07:20 +08:00
7029c170a4 feat:游戏数据插入畅玩助手ContentProvider URI修改 2022-07-22 11:05:15 +08:00
6afe9b2f3c feat: 将安装好的畅玩游戏数据插入到畅玩助手 2022-07-22 09:32:28 +08:00
54c9850014 Merge branch 'hotfix-v5.11.1-571-home_focus_issue' into 'release'
fix: 修复首页有新内容样式时下拉刷新会获取焦点产生滑动偏移的问题

See merge request halo/android/assistant-android!293
2022-07-21 17:04:46 +08:00
3123045a91 fix: 修复首页有新内容样式时下拉刷新会获取焦点产生滑动偏移的问题 2022-07-21 16:57:37 +08:00
16614ac2d1 feat: 更频繁地备份畅玩数据库 2022-07-21 16:22:42 +08:00
74fda1fc17 feat: ToastUtils 的 toast 默认切换到主线程执行 2022-07-21 16:18:43 +08:00
563d9123c8 fix: 【光环助手V5.12.0】端内兼容适配短链接(0720测试反馈) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1945 2022-07-20 19:44:34 +08:00
lyr
8af97a44c8 feat:【光环助手V5.12.0】搜索管理功能优化(前端部分 1)https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1951 2022-07-20 18:07:16 +08:00
75e032b1f9 feat:【光环助手v5.12.0】前端优化汇总7月第3周(7)https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1976 2022-07-20 15:12:08 +08:00
lyr
7786a1b2a6 feat:【光环助手v5.12.0】前端优化汇总7月第3周(6)https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1976 2022-07-19 16:56:40 +08:00
abd854ac3b fix: 【光环助手V5.12.0】端内兼容适配短链接(0718测试反馈) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1945 2022-07-19 15:03:34 +08:00
lyr
96d60fefd4 fix:【光环助手V5.12.0】社区相关优化-第八期(第2点 长按时间修改为1秒) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1943#note_159827 2022-07-19 13:47:32 +08:00
681c26a6a3 Merge branch 'dev' of git.shanqu.cc:halo/android/assistant-android into dev 2022-07-19 10:00:04 +08:00
ef72119a48 fix: 提交遗漏的代码 2022-07-19 09:59:49 +08:00
lyr
051371b0d8 feat:【光环助手V5.12.0】游戏专题功能优化(前端部分 1(优化列表Item刷新逻辑)) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1950 2022-07-19 09:39:12 +08:00
lyr
2d5420efec feat:【光环助手V5.12.0】游戏专题功能优化(前端部分 1(增加列表Item刷新逻辑)) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1950 2022-07-18 18:34:54 +08:00
59cc581645 fix: 【光环助手V5.12.0】端内兼容适配短链接(0718测试反馈) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1945 2022-07-18 17:07:48 +08:00
lyr
cbc65e4ccd fix:【光环助手V5.10.0】畅玩助手数据埋点(20220713测试补充 1) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1872#note_159670 2022-07-18 14:41:37 +08:00
lyr
5f337e3905 chore: 更新Loghub SDK至2.6.4 2022-07-18 13:56:34 +08:00
20eb18d3f0 feat: 【光环助手V5.12.0】版块内容列表优化(2) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1948 2022-07-18 10:28:59 +08:00
e6191e8c37 feat: 【光环助手V5.12.0】版块内容列表优化(1) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1948 2022-07-15 18:09:56 +08:00
lyr
47b0361401 feat:【光环助手V5.12.0】社区相关优化-第八期(3(优化逻辑)) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1943 2022-07-15 17:36:04 +08:00
lyr
d4a9f2ab41 feat:【光环助手V5.12.0】游戏专题功能优化(前端部分 1) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1950 2022-07-15 14:58:16 +08:00
lyr
89ead6b348 feat:【光环助手V5.12.0】搜索管理功能优化(前端部分 2)https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1951 2022-07-15 09:13:03 +08:00
5f014f6f6b feat: 【光环助手V5.12.0】首页加载速度优化(整合接口) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1919 2022-07-14 16:13:07 +08:00
e8553116b6 fix:【夜间模式】UI测试调整问题汇总(7月第1周)(0706补充15)https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1957 2022-07-13 17:38:13 +08:00
b16fcb6725 fix: 修复点击下载完成启动悬浮窗无法启动游戏的问题 2022-07-13 17:09:16 +08:00
lyr
e42fb2ab66 fix:【光环助手V5.12.0】游戏专题功能优化(修改专题默认显示下载按钮的值) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1950 2022-07-13 16:45:37 +08:00
32574ba33a fix: 【光环助手V5.12.0】端内兼容适配短链接(0713测试反馈) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1945 2022-07-13 16:40:29 +08:00
lyr
1a734c32a4 feat:【光环助手V5.12.0】游戏专题功能优化(前端部分(大致完成)) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1950 2022-07-13 16:35:36 +08:00
764e6bb6fb fix:【夜间模式】UI测试调整问题汇总(7月第1周)(0706补充15)https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1957 2022-07-13 15:08:07 +08:00
d695eefbe8 fix: 修复畅玩管理页的页面刷新问题 2022-07-13 14:59:51 +08:00
b0491f48d6 chore: 版本更新至 5.12.0 2022-07-13 14:03:53 +08:00
15885fa6b0 fix:【夜间模式】UI测试调整问题汇总(7月第1周)(0706补充13、15、16)https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1957 2022-07-13 11:56:21 +08:00
00f90d3617 fix: block focus 避免更新时出现奇怪滚动 2022-07-13 10:10:32 +08:00
47beb3eeb2 fix: 移除冗余刷新 2022-07-12 17:35:24 +08:00
e41b6e4430 feat: 【光环助手V5.12.0】端内兼容适配短链接 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1945 2022-07-12 17:07:10 +08:00
f72095efc1 fix: 修复未安装畅玩更新重复进入时出现错误提示的问题 2022-07-12 16:52:03 +08:00
762c43bd6f fix: 修复重新下载取消任务时会触发异常安装的问题,修复未下载完成的任务也可能触发安装的问题 2022-07-12 15:39:00 +08:00
aa0f27c61b ci: suppress SonarQube 问题 2022-07-12 10:59:40 +08:00
adb6691818 曝光统计添加毫秒时间戳字段 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1953 2022-07-12 10:49:20 +08:00
lyr
c1fd2e48db feat:【光环助手V5.12.0】社区相关优化-第八期(1、2、3) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1943 2022-07-11 14:24:50 +08:00
3ed5795205 fix:【夜间模式】UI测试调整问题汇总(7月第1周)(0706补充)https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1957 2022-07-11 10:16:23 +08:00
f11f391940 Merge remote-tracking branch 'origin/dev' into dev-5.12.0
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/teenagermode/TeenagerModeActivity.kt
2022-07-08 15:14:01 +08:00
8756144018 fix:【夜间模式】UI测试调整问题汇总(7月第1周)(第6点遗漏)https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1957 2022-07-08 11:57:39 +08:00
dfba5cdf99 fix:【夜间模式】UI测试调整问题汇总(7月第1周)(第6点遗漏)https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1957 2022-07-08 11:57:39 +08:00
3deb83ac8d fix:【夜间模式】UI测试调整问题汇总(7月第1周)https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1957 2022-07-08 11:57:38 +08:00
f4d16ff8f9 Merge branch 'cherry-pick-919db31e-2' into 'feature-issues1801'
fix:修复升级Loghub数据库时未添加默认值的错误

See merge request halo/android/assistant-android!282
2022-07-08 09:30:23 +08:00
lyr
28266cd06d fix:修复升级Loghub数据库时未添加默认值的错误
(cherry picked from commit 919db31ec3)
2022-07-08 09:29:39 +08:00
1c0b8b1382 Merge branch 'cherry-pick-919db31e' into 'dev-5.12.0'
fix:修复升级Loghub数据库时未添加默认值的错误

See merge request halo/android/assistant-android!281
2022-07-08 09:29:09 +08:00
lyr
35506c75f5 fix:修复升级Loghub数据库时未添加默认值的错误
(cherry picked from commit 919db31ec3)
2022-07-08 09:28:48 +08:00
c084f786f9 Merge remote-tracking branch 'origin/feature-issues1801' into feature-issues1801 2022-07-07 16:18:18 +08:00
5e36bd7955 style: 整理首页最近在玩代码 2022-07-07 16:18:10 +08:00
lyr
36e99a4a7e fix:【光环助手V5.10.0】畅玩助手数据埋点(埋点字段使用平铺方式上传) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1872#note_157925 2022-07-07 14:27:59 +08:00
e0f5a668ab Merge branch 'cherry-pick-78d5d4b3-2' into 'feature-issues1801'
feat:升级Loghub数据库

See merge request halo/android/assistant-android!278
2022-07-07 14:16:27 +08:00
lyr
6f01610d10 feat:升级Loghub数据库
(cherry picked from commit 78d5d4b39f)
2022-07-07 14:16:00 +08:00
b94c1eedfa Merge branch 'cherry-pick-78d5d4b3' into 'dev-5.12.0'
feat:升级Loghub数据库

See merge request halo/android/assistant-android!277
2022-07-07 14:15:31 +08:00
lyr
2747857db3 feat:升级Loghub数据库
(cherry picked from commit 78d5d4b39f)
2022-07-07 14:14:11 +08:00
0b51155177 fix: 尝试提高下载回调刷新频率 2022-07-07 11:36:49 +08:00
32f583825a fix: 修复畅玩游戏管理在玩页更新不及时的问题 2022-07-07 11:33:51 +08:00
14e2784ab8 fix: 修复畅玩安装异常时无任何反馈的问题 2022-07-07 11:19:22 +08:00
d2b2f5e306 fix: 修复畅玩管理下载页进入时多次刷新的问题 2022-07-07 11:18:57 +08:00
d78de995b2 Merge branch 'cherry-pick-040de6d4-2' into 'feature-issues1801'
feat:增加平铺埋点功能

See merge request halo/android/assistant-android!275
2022-07-07 10:31:16 +08:00
lyr
ad4ca04db3 feat:增加平铺埋点功能
(cherry picked from commit 040de6d458)
2022-07-07 10:30:12 +08:00
36e246fd30 Merge branch 'cherry-pick-040de6d4' into 'dev-5.12.0'
feat:增加平铺埋点功能

See merge request halo/android/assistant-android!274
2022-07-07 10:28:35 +08:00
lyr
59e913c529 feat:增加平铺埋点功能
(cherry picked from commit 040de6d458)
2022-07-07 10:27:36 +08:00
66d0dba9c6 fix: 修复详情页底栏高度异常的问题 2022-07-06 17:45:58 +08:00
877490ce01 fix: 优化畅玩游戏管理的列表数据显示逻辑 2022-07-06 17:45:58 +08:00
cf12312d97 feat: 使用独立的数据库来存已安装的畅玩游戏 2022-07-06 17:45:58 +08:00
1e7edd9e85 fix: 修复首页和专题列表页切换页面频繁闪烁的问题 2022-07-06 17:45:58 +08:00
3bd4427348 fix!: 修复畅玩游戏的更新问题 (修改了通用的下载功能,可能会有其它次生 bug) 2022-07-06 17:45:58 +08:00
18013fe582 fix: 补充处理部分遗漏的下载状态 2022-07-06 17:45:58 +08:00
ebb22d8d13 fix: 修复畅玩工具更新不及时的问题 2022-07-06 17:45:58 +08:00
20161e6ca1 fix: 合并冲突 2022-07-06 17:45:58 +08:00
68d32ae429 fix: 修复更新畅玩游戏有概率出现重复更新的问题 2022-07-06 17:45:58 +08:00
5a377913bb fix: 修复非插件更新会丢失角标的问题 2022-07-06 17:45:58 +08:00
lyr
8e5ceb1e0e feat:【光环助手V5.10.0】畅玩助手数据埋点 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1872 2022-07-06 17:45:58 +08:00
034db094e1 fix: 修复因为获取已安装列表异常造成的任务重下问题 2022-07-06 17:45:58 +08:00
541ebe8a29 fix: 修复进入畅玩游戏管理页面过慢的问题 2022-07-06 17:45:58 +08:00
8114e2a74a fix: 修复首页最近在玩的排序问题 2022-07-06 17:45:58 +08:00
27350c5c70 fix: 修复游戏详情页点击更新与其它位置点击更新效果不一样的问题 2022-07-06 17:45:58 +08:00
2c3a395b50 fix: 修复畅玩空间和畅玩游戏的更新问题
feat: 添加暴力的畅玩游戏备份/恢复逻辑
2022-07-06 17:45:58 +08:00
983bbfc309 fix: 修复下载状态更新不及时的问题 2022-07-06 17:45:57 +08:00
d4a651ce63 fix: 编译异常 2022-07-06 17:45:57 +08:00
c091a47900 fix: 微调 UI 2022-07-06 17:45:57 +08:00
a488608969 fix: 调整游戏详情页按钮文案 2022-07-06 17:45:57 +08:00
e715a46285 fix: 修复部分位置无法触发畅玩游戏丢失重下载的问题 2022-07-06 17:45:57 +08:00
f9a2d56acc fix: 调整畅玩游戏下载完成弹窗高度 2022-07-06 17:45:57 +08:00
dc8280c025 fix: 修复最近在玩区域闪烁的问题 2022-07-06 17:45:57 +08:00
4e53b1fb91 fix: 修复更新判断异常和首页最近在玩的排序问题 2022-07-06 17:45:57 +08:00
0af479e441 fix: 修复误判断造成的重复下载问题 2022-07-06 17:45:57 +08:00
559164ebce fix: 修复部分 UI 问题 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1923#note_154774 2022-07-06 17:45:57 +08:00
9f694085fd fix: 修复部分逻辑问题和 UI 问题 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1923#note_155241 2022-07-06 17:45:57 +08:00
b5c897170b fix: 畅玩服务连接异常问题 2022-07-06 17:45:57 +08:00
72926f5046 fix: 修复部分 UI 问题 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1923#note_155108 2022-07-06 17:45:57 +08:00
ee21dbc643 fix: 修复部分代码问题 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1923#note_154823 2022-07-06 17:45:57 +08:00
0f9b3c94f0 fix: 修复部分 UI 问题 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1923#note_154774 2022-07-06 17:45:57 +08:00
36704af531 feat: UI 细节完善 2022-07-06 17:45:57 +08:00
6ae44c34d1 fix: 修复首页更新不及时的问题 2022-07-06 17:45:57 +08:00
dce756e53f feat: 添加假的畅玩安装页面 2022-07-06 17:45:57 +08:00
c4035d319e feat: 将畅玩存储权限检测移到安装时 2022-07-06 17:45:57 +08:00
f37200f902 feat: 畅玩游戏绕过浏览器下载判断 2022-07-06 17:45:57 +08:00
3dc65fb415 fix: 修复畅玩助手下载进度显示异常 2022-07-06 17:45:57 +08:00
c646251b34 feat: 支持点击通知栏跳转畅玩下载管理页面 2022-07-06 17:45:57 +08:00
eb1def1768 feature: 完成管理页简单的下载按钮样式 2022-07-06 17:45:57 +08:00
27471cbf61 fix: 修复首页最近在玩 item 样式点击后不更新的问题 2022-07-06 17:45:57 +08:00
e59e1c1e65 feat: 对接畅玩反馈接口 2022-07-06 17:45:57 +08:00
1eeec1c89b feat: 实现畅玩游戏更新 2022-07-06 17:45:57 +08:00
90e947b65d fix: 游戏列表 item 样式显示异常 2022-07-06 17:45:57 +08:00
a96fe9144a 切换到 64 位畅玩空间 2022-07-06 17:45:57 +08:00
4d06707fab feat: 完成首页最近在玩简单的排序 2022-07-06 17:45:57 +08:00
ab202abe0a feat: 首页简单对接下载进度 2022-07-06 17:45:57 +08:00
56c1dbb6cb fix: 处理合并冲突 2022-07-06 17:45:57 +08:00
83afd7448f 添加简单首页列表项占位 2022-07-06 17:45:57 +08:00
477ffa0c33 添加简单首页列表项 2022-07-06 17:45:57 +08:00
57668ec97d 合并未接入防沉迷的代码 2022-07-06 17:45:57 +08:00
26b0f33f1c 添加简单的更新控制 2022-07-06 17:45:57 +08:00
8e0dcd74e5 补充启动(畅玩)的判断代码 2022-07-06 17:45:57 +08:00
88842de6c7 完成粗暴的安装启动流程 2022-07-06 17:45:57 +08:00
b0647bf3a9 合并 5.10.0 代码 2022-07-06 17:45:57 +08:00
7837318390 首页添加最近在玩占位代码 2022-07-06 17:45:57 +08:00
c7143a6f89 完成简陋的首页最近畅玩 item UI & 调整原有错误的颜色命名 2022-07-06 17:45:57 +08:00
97219323d3 添加部分简陋的 UI 2022-07-06 17:45:57 +08:00
417633b623 调整部分点击逻辑 2022-07-06 17:45:56 +08:00
2f35e6ac56 rebase to 5.10.0 分支 2022-07-06 17:45:56 +08:00
331e4fc410 对接部分接口 2022-07-06 17:45:56 +08:00
25768d8cae 完成粗糙的畅玩游戏详情 UI 2022-07-06 17:45:56 +08:00
9d00e53b73 添加畅玩管理页 2022-07-06 17:45:56 +08:00
3ef9a38342 添加游戏加载完成提醒浮窗工具类 2022-07-06 17:45:56 +08:00
898f72a218 简单对接空间助手接口 2022-07-06 17:45:56 +08:00
49091b7a72 添加简单的交互工具类 2022-07-06 17:45:09 +08:00
670f840be1 添加简单的 V 空间工具类 2022-07-06 17:45:09 +08:00
92cab5ae6a 添加 VSPACE submodule 2022-07-06 17:45:09 +08:00
614a57580c 添加 vspace submodule 2022-07-06 17:45:09 +08:00
2630 changed files with 55059 additions and 42417 deletions

555
.editorconfig Normal file
View File

@ -0,0 +1,555 @@
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = false
max_line_length = 120
tab_width = 4
ij_continuation_indent_size = 8
ij_formatter_off_tag = @formatter:off
ij_formatter_on_tag = @formatter:on
ij_formatter_tags_enabled = false
ij_smart_tabs = false
ij_visual_guides = none
ij_wrap_on_typing = false
[*.java]
ij_java_align_consecutive_assignments = false
ij_java_align_consecutive_variable_declarations = false
ij_java_align_group_field_declarations = false
ij_java_align_multiline_annotation_parameters = false
ij_java_align_multiline_array_initializer_expression = false
ij_java_align_multiline_assignment = false
ij_java_align_multiline_binary_operation = false
ij_java_align_multiline_chained_methods = false
ij_java_align_multiline_extends_list = false
ij_java_align_multiline_for = true
ij_java_align_multiline_method_parentheses = false
ij_java_align_multiline_parameters = true
ij_java_align_multiline_parameters_in_calls = false
ij_java_align_multiline_parenthesized_expression = false
ij_java_align_multiline_records = true
ij_java_align_multiline_resources = true
ij_java_align_multiline_ternary_operation = false
ij_java_align_multiline_text_blocks = false
ij_java_align_multiline_throws_list = false
ij_java_align_subsequent_simple_methods = false
ij_java_align_throws_keyword = false
ij_java_align_types_in_multi_catch = true
ij_java_annotation_parameter_wrap = off
ij_java_array_initializer_new_line_after_left_brace = false
ij_java_array_initializer_right_brace_on_new_line = false
ij_java_array_initializer_wrap = off
ij_java_assert_statement_colon_on_next_line = false
ij_java_assert_statement_wrap = off
ij_java_assignment_wrap = off
ij_java_binary_operation_sign_on_next_line = false
ij_java_binary_operation_wrap = off
ij_java_blank_lines_after_anonymous_class_header = 0
ij_java_blank_lines_after_class_header = 0
ij_java_blank_lines_after_imports = 1
ij_java_blank_lines_after_package = 1
ij_java_blank_lines_around_class = 1
ij_java_blank_lines_around_field = 0
ij_java_blank_lines_around_field_in_interface = 0
ij_java_blank_lines_around_initializer = 1
ij_java_blank_lines_around_method = 1
ij_java_blank_lines_around_method_in_interface = 1
ij_java_blank_lines_before_class_end = 0
ij_java_blank_lines_before_imports = 1
ij_java_blank_lines_before_method_body = 0
ij_java_blank_lines_before_package = 0
ij_java_block_brace_style = end_of_line
ij_java_block_comment_add_space = false
ij_java_block_comment_at_first_column = true
ij_java_builder_methods = none
ij_java_call_parameters_new_line_after_left_paren = false
ij_java_call_parameters_right_paren_on_new_line = false
ij_java_call_parameters_wrap = off
ij_java_case_statement_on_separate_line = true
ij_java_catch_on_new_line = false
ij_java_class_annotation_wrap = split_into_lines
ij_java_class_brace_style = end_of_line
ij_java_class_count_to_use_import_on_demand = 99
ij_java_class_names_in_javadoc = 1
ij_java_do_not_indent_top_level_class_members = false
ij_java_do_not_wrap_after_single_annotation = false
ij_java_do_not_wrap_after_single_annotation_in_parameter = false
ij_java_do_while_brace_force = never
ij_java_doc_add_blank_line_after_description = true
ij_java_doc_add_blank_line_after_param_comments = false
ij_java_doc_add_blank_line_after_return = false
ij_java_doc_add_p_tag_on_empty_lines = true
ij_java_doc_align_exception_comments = true
ij_java_doc_align_param_comments = true
ij_java_doc_do_not_wrap_if_one_line = false
ij_java_doc_enable_formatting = true
ij_java_doc_enable_leading_asterisks = true
ij_java_doc_indent_on_continuation = false
ij_java_doc_keep_empty_lines = true
ij_java_doc_keep_empty_parameter_tag = true
ij_java_doc_keep_empty_return_tag = true
ij_java_doc_keep_empty_throws_tag = true
ij_java_doc_keep_invalid_tags = true
ij_java_doc_param_description_on_new_line = false
ij_java_doc_preserve_line_breaks = false
ij_java_doc_use_throws_not_exception_tag = true
ij_java_else_on_new_line = false
ij_java_enum_constants_wrap = off
ij_java_extends_keyword_wrap = off
ij_java_extends_list_wrap = off
ij_java_field_annotation_wrap = split_into_lines
ij_java_finally_on_new_line = false
ij_java_for_brace_force = never
ij_java_for_statement_new_line_after_left_paren = false
ij_java_for_statement_right_paren_on_new_line = false
ij_java_for_statement_wrap = off
ij_java_generate_final_locals = false
ij_java_generate_final_parameters = false
ij_java_if_brace_force = never
ij_java_imports_layout = $android.**,$androidx.**,$com.**,$junit.**,$net.**,$org.**,$java.**,$javax.**,$*,|,android.**,|,androidx.**,|,com.**,|,junit.**,|,net.**,|,org.**,|,java.**,|,javax.**,|,*,|
ij_java_indent_case_from_switch = true
ij_java_insert_inner_class_imports = false
ij_java_insert_override_annotation = true
ij_java_keep_blank_lines_before_right_brace = 2
ij_java_keep_blank_lines_between_package_declaration_and_header = 2
ij_java_keep_blank_lines_in_code = 2
ij_java_keep_blank_lines_in_declarations = 2
ij_java_keep_builder_methods_indents = false
ij_java_keep_control_statement_in_one_line = true
ij_java_keep_first_column_comment = true
ij_java_keep_indents_on_empty_lines = false
ij_java_keep_line_breaks = true
ij_java_keep_multiple_expressions_in_one_line = false
ij_java_keep_simple_blocks_in_one_line = false
ij_java_keep_simple_classes_in_one_line = false
ij_java_keep_simple_lambdas_in_one_line = false
ij_java_keep_simple_methods_in_one_line = false
ij_java_label_indent_absolute = false
ij_java_label_indent_size = 0
ij_java_lambda_brace_style = end_of_line
ij_java_layout_static_imports_separately = true
ij_java_line_comment_add_space = false
ij_java_line_comment_add_space_on_reformat = false
ij_java_line_comment_at_first_column = true
ij_java_method_annotation_wrap = split_into_lines
ij_java_method_brace_style = end_of_line
ij_java_method_call_chain_wrap = off
ij_java_method_parameters_new_line_after_left_paren = false
ij_java_method_parameters_right_paren_on_new_line = false
ij_java_method_parameters_wrap = off
ij_java_modifier_list_wrap = false
ij_java_multi_catch_types_wrap = normal
ij_java_names_count_to_use_import_on_demand = 99
ij_java_new_line_after_lparen_in_annotation = false
ij_java_new_line_after_lparen_in_record_header = false
ij_java_parameter_annotation_wrap = off
ij_java_parentheses_expression_new_line_after_left_paren = false
ij_java_parentheses_expression_right_paren_on_new_line = false
ij_java_place_assignment_sign_on_next_line = false
ij_java_prefer_longer_names = true
ij_java_prefer_parameters_wrap = false
ij_java_record_components_wrap = normal
ij_java_repeat_synchronized = true
ij_java_replace_instanceof_and_cast = false
ij_java_replace_null_check = true
ij_java_replace_sum_lambda_with_method_ref = true
ij_java_resource_list_new_line_after_left_paren = false
ij_java_resource_list_right_paren_on_new_line = false
ij_java_resource_list_wrap = off
ij_java_rparen_on_new_line_in_annotation = false
ij_java_rparen_on_new_line_in_record_header = false
ij_java_space_after_closing_angle_bracket_in_type_argument = false
ij_java_space_after_colon = true
ij_java_space_after_comma = true
ij_java_space_after_comma_in_type_arguments = true
ij_java_space_after_for_semicolon = true
ij_java_space_after_quest = true
ij_java_space_after_type_cast = true
ij_java_space_before_annotation_array_initializer_left_brace = false
ij_java_space_before_annotation_parameter_list = false
ij_java_space_before_array_initializer_left_brace = false
ij_java_space_before_catch_keyword = true
ij_java_space_before_catch_left_brace = true
ij_java_space_before_catch_parentheses = true
ij_java_space_before_class_left_brace = true
ij_java_space_before_colon = true
ij_java_space_before_colon_in_foreach = true
ij_java_space_before_comma = false
ij_java_space_before_do_left_brace = true
ij_java_space_before_else_keyword = true
ij_java_space_before_else_left_brace = true
ij_java_space_before_finally_keyword = true
ij_java_space_before_finally_left_brace = true
ij_java_space_before_for_left_brace = true
ij_java_space_before_for_parentheses = true
ij_java_space_before_for_semicolon = false
ij_java_space_before_if_left_brace = true
ij_java_space_before_if_parentheses = true
ij_java_space_before_method_call_parentheses = false
ij_java_space_before_method_left_brace = true
ij_java_space_before_method_parentheses = false
ij_java_space_before_opening_angle_bracket_in_type_parameter = false
ij_java_space_before_quest = true
ij_java_space_before_switch_left_brace = true
ij_java_space_before_switch_parentheses = true
ij_java_space_before_synchronized_left_brace = true
ij_java_space_before_synchronized_parentheses = true
ij_java_space_before_try_left_brace = true
ij_java_space_before_try_parentheses = true
ij_java_space_before_type_parameter_list = false
ij_java_space_before_while_keyword = true
ij_java_space_before_while_left_brace = true
ij_java_space_before_while_parentheses = true
ij_java_space_inside_one_line_enum_braces = false
ij_java_space_within_empty_array_initializer_braces = false
ij_java_space_within_empty_method_call_parentheses = false
ij_java_space_within_empty_method_parentheses = false
ij_java_spaces_around_additive_operators = true
ij_java_spaces_around_annotation_eq = true
ij_java_spaces_around_assignment_operators = true
ij_java_spaces_around_bitwise_operators = true
ij_java_spaces_around_equality_operators = true
ij_java_spaces_around_lambda_arrow = true
ij_java_spaces_around_logical_operators = true
ij_java_spaces_around_method_ref_dbl_colon = false
ij_java_spaces_around_multiplicative_operators = true
ij_java_spaces_around_relational_operators = true
ij_java_spaces_around_shift_operators = true
ij_java_spaces_around_type_bounds_in_type_parameters = true
ij_java_spaces_around_unary_operator = false
ij_java_spaces_within_angle_brackets = false
ij_java_spaces_within_annotation_parentheses = false
ij_java_spaces_within_array_initializer_braces = false
ij_java_spaces_within_braces = false
ij_java_spaces_within_brackets = false
ij_java_spaces_within_cast_parentheses = false
ij_java_spaces_within_catch_parentheses = false
ij_java_spaces_within_for_parentheses = false
ij_java_spaces_within_if_parentheses = false
ij_java_spaces_within_method_call_parentheses = false
ij_java_spaces_within_method_parentheses = false
ij_java_spaces_within_parentheses = false
ij_java_spaces_within_record_header = false
ij_java_spaces_within_switch_parentheses = false
ij_java_spaces_within_synchronized_parentheses = false
ij_java_spaces_within_try_parentheses = false
ij_java_spaces_within_while_parentheses = false
ij_java_special_else_if_treatment = true
ij_java_subclass_name_suffix = Impl
ij_java_ternary_operation_signs_on_next_line = false
ij_java_ternary_operation_wrap = off
ij_java_test_name_suffix = Test
ij_java_throws_keyword_wrap = off
ij_java_throws_list_wrap = off
ij_java_use_external_annotations = false
ij_java_use_fq_class_names = false
ij_java_use_relative_indents = false
ij_java_use_single_class_imports = true
ij_java_variable_annotation_wrap = off
ij_java_visibility = public
ij_java_while_brace_force = never
ij_java_while_on_new_line = false
ij_java_wrap_comments = false
ij_java_wrap_first_method_in_call_chain = false
ij_java_wrap_long_lines = false
[.editorconfig]
ij_editorconfig_align_group_field_declarations = false
ij_editorconfig_space_after_colon = false
ij_editorconfig_space_after_comma = true
ij_editorconfig_space_before_colon = false
ij_editorconfig_space_before_comma = false
ij_editorconfig_spaces_around_assignment_operators = true
[{*.ant,*.fxml,*.jhm,*.jnlp,*.jrxml,*.rng,*.tld,*.wsdl,*.xml,*.xsd,*.xsl,*.xslt,*.xul}]
ij_continuation_indent_size = 4
ij_xml_align_attributes = false
ij_xml_align_text = false
ij_xml_attribute_wrap = normal
ij_xml_block_comment_add_space = false
ij_xml_block_comment_at_first_column = true
ij_xml_keep_blank_lines = 2
ij_xml_keep_indents_on_empty_lines = false
ij_xml_keep_line_breaks = false
ij_xml_keep_line_breaks_in_text = true
ij_xml_keep_whitespaces = false
ij_xml_keep_whitespaces_around_cdata = preserve
ij_xml_keep_whitespaces_inside_cdata = false
ij_xml_line_comment_at_first_column = true
ij_xml_space_after_tag_name = false
ij_xml_space_around_equals_in_attribute = false
ij_xml_space_inside_empty_tag = true
ij_xml_text_wrap = normal
ij_xml_use_custom_settings = true
[{*.gant,*.groovy,*.gy}]
ij_groovy_align_group_field_declarations = false
ij_groovy_align_multiline_array_initializer_expression = false
ij_groovy_align_multiline_assignment = false
ij_groovy_align_multiline_binary_operation = false
ij_groovy_align_multiline_chained_methods = false
ij_groovy_align_multiline_extends_list = false
ij_groovy_align_multiline_for = true
ij_groovy_align_multiline_list_or_map = true
ij_groovy_align_multiline_method_parentheses = false
ij_groovy_align_multiline_parameters = true
ij_groovy_align_multiline_parameters_in_calls = false
ij_groovy_align_multiline_resources = true
ij_groovy_align_multiline_ternary_operation = false
ij_groovy_align_multiline_throws_list = false
ij_groovy_align_named_args_in_map = true
ij_groovy_align_throws_keyword = false
ij_groovy_array_initializer_new_line_after_left_brace = false
ij_groovy_array_initializer_right_brace_on_new_line = false
ij_groovy_array_initializer_wrap = off
ij_groovy_assert_statement_wrap = off
ij_groovy_assignment_wrap = off
ij_groovy_binary_operation_wrap = off
ij_groovy_blank_lines_after_class_header = 0
ij_groovy_blank_lines_after_imports = 1
ij_groovy_blank_lines_after_package = 1
ij_groovy_blank_lines_around_class = 1
ij_groovy_blank_lines_around_field = 0
ij_groovy_blank_lines_around_field_in_interface = 0
ij_groovy_blank_lines_around_method = 1
ij_groovy_blank_lines_around_method_in_interface = 1
ij_groovy_blank_lines_before_imports = 1
ij_groovy_blank_lines_before_method_body = 0
ij_groovy_blank_lines_before_package = 0
ij_groovy_block_brace_style = end_of_line
ij_groovy_block_comment_add_space = false
ij_groovy_block_comment_at_first_column = true
ij_groovy_call_parameters_new_line_after_left_paren = false
ij_groovy_call_parameters_right_paren_on_new_line = false
ij_groovy_call_parameters_wrap = off
ij_groovy_catch_on_new_line = false
ij_groovy_class_annotation_wrap = split_into_lines
ij_groovy_class_brace_style = end_of_line
ij_groovy_class_count_to_use_import_on_demand = 5
ij_groovy_do_while_brace_force = never
ij_groovy_else_on_new_line = false
ij_groovy_enable_groovydoc_formatting = true
ij_groovy_enum_constants_wrap = off
ij_groovy_extends_keyword_wrap = off
ij_groovy_extends_list_wrap = off
ij_groovy_field_annotation_wrap = split_into_lines
ij_groovy_finally_on_new_line = false
ij_groovy_for_brace_force = never
ij_groovy_for_statement_new_line_after_left_paren = false
ij_groovy_for_statement_right_paren_on_new_line = false
ij_groovy_for_statement_wrap = off
ij_groovy_if_brace_force = never
ij_groovy_import_annotation_wrap = 2
ij_groovy_imports_layout = *,|,javax.**,java.**,|,$*
ij_groovy_indent_case_from_switch = true
ij_groovy_indent_label_blocks = true
ij_groovy_insert_inner_class_imports = false
ij_groovy_keep_blank_lines_before_right_brace = 2
ij_groovy_keep_blank_lines_in_code = 2
ij_groovy_keep_blank_lines_in_declarations = 2
ij_groovy_keep_control_statement_in_one_line = true
ij_groovy_keep_first_column_comment = true
ij_groovy_keep_indents_on_empty_lines = false
ij_groovy_keep_line_breaks = true
ij_groovy_keep_multiple_expressions_in_one_line = false
ij_groovy_keep_simple_blocks_in_one_line = false
ij_groovy_keep_simple_classes_in_one_line = true
ij_groovy_keep_simple_lambdas_in_one_line = true
ij_groovy_keep_simple_methods_in_one_line = true
ij_groovy_label_indent_absolute = false
ij_groovy_label_indent_size = 0
ij_groovy_lambda_brace_style = end_of_line
ij_groovy_layout_static_imports_separately = true
ij_groovy_line_comment_add_space = false
ij_groovy_line_comment_add_space_on_reformat = false
ij_groovy_line_comment_at_first_column = true
ij_groovy_method_annotation_wrap = split_into_lines
ij_groovy_method_brace_style = end_of_line
ij_groovy_method_call_chain_wrap = off
ij_groovy_method_parameters_new_line_after_left_paren = false
ij_groovy_method_parameters_right_paren_on_new_line = false
ij_groovy_method_parameters_wrap = off
ij_groovy_modifier_list_wrap = false
ij_groovy_names_count_to_use_import_on_demand = 3
ij_groovy_packages_to_use_import_on_demand = java.awt.*,javax.swing.*
ij_groovy_parameter_annotation_wrap = off
ij_groovy_parentheses_expression_new_line_after_left_paren = false
ij_groovy_parentheses_expression_right_paren_on_new_line = false
ij_groovy_prefer_parameters_wrap = false
ij_groovy_resource_list_new_line_after_left_paren = false
ij_groovy_resource_list_right_paren_on_new_line = false
ij_groovy_resource_list_wrap = off
ij_groovy_space_after_assert_separator = true
ij_groovy_space_after_colon = true
ij_groovy_space_after_comma = true
ij_groovy_space_after_comma_in_type_arguments = true
ij_groovy_space_after_for_semicolon = true
ij_groovy_space_after_quest = true
ij_groovy_space_after_type_cast = true
ij_groovy_space_before_annotation_parameter_list = false
ij_groovy_space_before_array_initializer_left_brace = false
ij_groovy_space_before_assert_separator = false
ij_groovy_space_before_catch_keyword = true
ij_groovy_space_before_catch_left_brace = true
ij_groovy_space_before_catch_parentheses = true
ij_groovy_space_before_class_left_brace = true
ij_groovy_space_before_closure_left_brace = true
ij_groovy_space_before_colon = true
ij_groovy_space_before_comma = false
ij_groovy_space_before_do_left_brace = true
ij_groovy_space_before_else_keyword = true
ij_groovy_space_before_else_left_brace = true
ij_groovy_space_before_finally_keyword = true
ij_groovy_space_before_finally_left_brace = true
ij_groovy_space_before_for_left_brace = true
ij_groovy_space_before_for_parentheses = true
ij_groovy_space_before_for_semicolon = false
ij_groovy_space_before_if_left_brace = true
ij_groovy_space_before_if_parentheses = true
ij_groovy_space_before_method_call_parentheses = false
ij_groovy_space_before_method_left_brace = true
ij_groovy_space_before_method_parentheses = false
ij_groovy_space_before_quest = true
ij_groovy_space_before_record_parentheses = false
ij_groovy_space_before_switch_left_brace = true
ij_groovy_space_before_switch_parentheses = true
ij_groovy_space_before_synchronized_left_brace = true
ij_groovy_space_before_synchronized_parentheses = true
ij_groovy_space_before_try_left_brace = true
ij_groovy_space_before_try_parentheses = true
ij_groovy_space_before_while_keyword = true
ij_groovy_space_before_while_left_brace = true
ij_groovy_space_before_while_parentheses = true
ij_groovy_space_in_named_argument = true
ij_groovy_space_in_named_argument_before_colon = false
ij_groovy_space_within_empty_array_initializer_braces = false
ij_groovy_space_within_empty_method_call_parentheses = false
ij_groovy_spaces_around_additive_operators = true
ij_groovy_spaces_around_assignment_operators = true
ij_groovy_spaces_around_bitwise_operators = true
ij_groovy_spaces_around_equality_operators = true
ij_groovy_spaces_around_lambda_arrow = true
ij_groovy_spaces_around_logical_operators = true
ij_groovy_spaces_around_multiplicative_operators = true
ij_groovy_spaces_around_regex_operators = true
ij_groovy_spaces_around_relational_operators = true
ij_groovy_spaces_around_shift_operators = true
ij_groovy_spaces_within_annotation_parentheses = false
ij_groovy_spaces_within_array_initializer_braces = false
ij_groovy_spaces_within_braces = true
ij_groovy_spaces_within_brackets = false
ij_groovy_spaces_within_cast_parentheses = false
ij_groovy_spaces_within_catch_parentheses = false
ij_groovy_spaces_within_for_parentheses = false
ij_groovy_spaces_within_gstring_injection_braces = false
ij_groovy_spaces_within_if_parentheses = false
ij_groovy_spaces_within_list_or_map = false
ij_groovy_spaces_within_method_call_parentheses = false
ij_groovy_spaces_within_method_parentheses = false
ij_groovy_spaces_within_parentheses = false
ij_groovy_spaces_within_switch_parentheses = false
ij_groovy_spaces_within_synchronized_parentheses = false
ij_groovy_spaces_within_try_parentheses = false
ij_groovy_spaces_within_tuple_expression = false
ij_groovy_spaces_within_while_parentheses = false
ij_groovy_special_else_if_treatment = true
ij_groovy_ternary_operation_wrap = off
ij_groovy_throws_keyword_wrap = off
ij_groovy_throws_list_wrap = off
ij_groovy_use_flying_geese_braces = false
ij_groovy_use_fq_class_names = false
ij_groovy_use_fq_class_names_in_javadoc = true
ij_groovy_use_relative_indents = false
ij_groovy_use_single_class_imports = true
ij_groovy_variable_annotation_wrap = off
ij_groovy_while_brace_force = never
ij_groovy_while_on_new_line = false
ij_groovy_wrap_chain_calls_after_dot = false
ij_groovy_wrap_long_lines = false
[{*.kt,*.kts,*.main.kts}]
ij_kotlin_align_in_columns_case_branch = false
ij_kotlin_align_multiline_binary_operation = false
ij_kotlin_align_multiline_extends_list = false
ij_kotlin_align_multiline_method_parentheses = false
ij_kotlin_align_multiline_parameters = true
ij_kotlin_align_multiline_parameters_in_calls = false
ij_kotlin_allow_trailing_comma = false
ij_kotlin_allow_trailing_comma_on_call_site = false
ij_kotlin_assignment_wrap = normal
ij_kotlin_blank_lines_after_class_header = 0
ij_kotlin_blank_lines_around_block_when_branches = 0
ij_kotlin_blank_lines_before_declaration_with_comment_or_annotation_on_separate_line = 1
ij_kotlin_block_comment_add_space = false
ij_kotlin_block_comment_at_first_column = true
ij_kotlin_call_parameters_new_line_after_left_paren = true
ij_kotlin_call_parameters_right_paren_on_new_line = true
ij_kotlin_call_parameters_wrap = on_every_item
ij_kotlin_catch_on_new_line = false
ij_kotlin_class_annotation_wrap = split_into_lines
ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL
ij_kotlin_continuation_indent_for_chained_calls = false
ij_kotlin_continuation_indent_for_expression_bodies = false
ij_kotlin_continuation_indent_in_argument_lists = false
ij_kotlin_continuation_indent_in_elvis = false
ij_kotlin_continuation_indent_in_if_conditions = false
ij_kotlin_continuation_indent_in_parameter_lists = false
ij_kotlin_continuation_indent_in_supertype_lists = false
ij_kotlin_else_on_new_line = false
ij_kotlin_enum_constants_wrap = off
ij_kotlin_extends_list_wrap = normal
ij_kotlin_field_annotation_wrap = split_into_lines
ij_kotlin_finally_on_new_line = false
ij_kotlin_if_rparen_on_new_line = true
ij_kotlin_import_nested_classes = false
ij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^
ij_kotlin_insert_whitespaces_in_simple_one_line_method = true
ij_kotlin_keep_blank_lines_before_right_brace = 2
ij_kotlin_keep_blank_lines_in_code = 2
ij_kotlin_keep_blank_lines_in_declarations = 2
ij_kotlin_keep_first_column_comment = true
ij_kotlin_keep_indents_on_empty_lines = false
ij_kotlin_keep_line_breaks = true
ij_kotlin_lbrace_on_next_line = false
ij_kotlin_line_comment_add_space = false
ij_kotlin_line_comment_add_space_on_reformat = false
ij_kotlin_line_comment_at_first_column = true
ij_kotlin_method_annotation_wrap = split_into_lines
ij_kotlin_method_call_chain_wrap = normal
ij_kotlin_method_parameters_new_line_after_left_paren = true
ij_kotlin_method_parameters_right_paren_on_new_line = true
ij_kotlin_method_parameters_wrap = on_every_item
ij_kotlin_name_count_to_use_star_import = 5
ij_kotlin_name_count_to_use_star_import_for_members = 3
ij_kotlin_packages_to_use_import_on_demand = java.util.*,kotlinx.android.synthetic.**,io.ktor.**
ij_kotlin_parameter_annotation_wrap = off
ij_kotlin_space_after_comma = true
ij_kotlin_space_after_extend_colon = true
ij_kotlin_space_after_type_colon = true
ij_kotlin_space_before_catch_parentheses = true
ij_kotlin_space_before_comma = false
ij_kotlin_space_before_extend_colon = true
ij_kotlin_space_before_for_parentheses = true
ij_kotlin_space_before_if_parentheses = true
ij_kotlin_space_before_lambda_arrow = true
ij_kotlin_space_before_type_colon = false
ij_kotlin_space_before_when_parentheses = true
ij_kotlin_space_before_while_parentheses = true
ij_kotlin_spaces_around_additive_operators = true
ij_kotlin_spaces_around_assignment_operators = true
ij_kotlin_spaces_around_equality_operators = true
ij_kotlin_spaces_around_function_type_arrow = true
ij_kotlin_spaces_around_logical_operators = true
ij_kotlin_spaces_around_multiplicative_operators = true
ij_kotlin_spaces_around_range = false
ij_kotlin_spaces_around_relational_operators = true
ij_kotlin_spaces_around_unary_operator = false
ij_kotlin_spaces_around_when_arrow = true
ij_kotlin_use_custom_formatting_for_modifiers = true
ij_kotlin_variable_annotation_wrap = off
ij_kotlin_while_on_new_line = false
ij_kotlin_wrap_elvis_expressions = 1
ij_kotlin_wrap_expression_body_functions = 1
ij_kotlin_wrap_first_method_in_call_chain = false

View File

@ -38,7 +38,6 @@ send_sonar_report:
dependencies: [] #禁止传递来的artifact
script:
- group=`echo $CI_PROJECT_PATH | sed 's#/#-#g'`
- docker login -u "${HARBOR_REGISTRY_USERNAME}" -p "${HARBOR_REGISTRY_PASSWORD}" "${HARBOR_REGISTRY}"
- docker run -e PROJECTKEY=$group -e EMAIL=$GITLAB_USER_EMAIL --name send-email --rm hub.shanqu.cc/platform/send-sonar-report:latest
only:
- dev

9
.gitmodules vendored
View File

@ -2,6 +2,9 @@
path = libraries/LGLibrary
url = git@git.shanqu.cc:android/common-library.git
branch = master
[submodule "assistant_flutter"]
path = assistant_flutter
url = git@git.shanqu.cc:halo/android/flutter-module.git
[submodule "vspace-bridge"]
path = vspace-bridge
url = git@git.shanqu.cc:cwzs/android/vspace-bridge.git
[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

View File

@ -47,12 +47,10 @@ android {
multiDexEnabled true
ndk {
// 如果不添加 `arm64` 调用系统的 PackageManager 的方法读取安装包信息的时候会出现 native 层闪退,草
// 加了 `arm64` 以后部分 5.0 的设备会报用错 so 的问题,
// couldn't find DSO to load: libimagepipeline.so caused by: dlopen failed: "/data/data/com.gh.gamecenter/lib-main/libimagepipeline.so" is 64-bit instead of 32-bit result: 0
// 以 OPPO R7PLUS 为例,明明设备是骁龙 615ARMv8-64 bit 的设备却不支持 arm64 的 abi限制了只使用 java 后还是报错,只有 5.05.1 设备无法复现 : (
// 惊了
abiFilters "armeabi-v7a", "arm64-v8a", "x86"
// x86 本来是为了模拟器用户使用 RenderScript 用的,但是其实用到 RenderScript 的人本来就不多 (一天不到 100),用模拟器的人就更少了
// 加了 x86 反而会导致用户没法使用微博登录,因为微博没有提供 x86 的 SO ...
// 还会增大 APK 体积,所以还是去掉吧。数据可见 https://sentry.shanqu.cc/organizations/lightgame/issues/144232/?project=22
abiFilters "armeabi-v7a", "arm64-v8a"
}
renderscriptTargetApi 18
@ -74,12 +72,11 @@ android {
*/
buildConfigField "String", "API_HOST", "\"${API_HOST}\""
buildConfigField "String", "NEW_API_HOST", "\"${NEW_API_HOST}\""
buildConfigField "String", "VAPI_HOST", "\"${VAPI_HOST}\""
buildConfigField "String", "WECHAT_APPID", "\"${WECHAT_APPID}\""
buildConfigField "String", "WECHAT_SECRET", "\"${WECHAT_SECRET}\""
buildConfigField "String", "TENCENT_APPID", "\"${TENCENT_APPID}\""
buildConfigField "String", "WEIBO_APPKEY", "\"${WEIBO_APPKEY}\""
buildConfigField "String", "QUICK_LOGIN_APPID", "\"${QUICK_LOGIN_APPID}\""
buildConfigField "String", "QUICK_LOGIN_APPKEY", "\"${QUICK_LOGIN_APPKEY}\""
}
// gradle 2.2以上默认同时启用v1和v2优先用于Android N
@ -157,14 +154,20 @@ android {
buildConfigField "String", "DEV_API_HOST", "\"${DEV_API_HOST}\""
buildConfigField "String", "NEW_DEV_API_HOST", "\"${NEW_DEV_API_HOST}\""
buildConfigField "String", "DEV_VAPI_HOST", "\"${DEV_VAPI_HOST}\""
buildConfigField "String", "QUICK_LOGIN_APPID", "\"${DEV_QUICK_LOGIN_APPID}\""
buildConfigField "String", "QUICK_LOGIN_APPKEY", "\"${DEV_QUICK_LOGIN_APPKEY}\""
}
// publish release host˛
// publish release host
publish {
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}\""
}
tea {
@ -172,15 +175,13 @@ android {
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}\""
manifestPlaceholders.put("APPLOG_SCHEME", "rangersapplog.byAx6uYt".toLowerCase())
}
}
lintOptions {
// For flutter release build, see https://github.com/flutter/flutter/issues/58247
checkReleaseBuilds false
}
}
repositories {
@ -197,6 +198,7 @@ dependencies {
testImplementation 'junit:junit:4.12'
debugImplementation "com.squareup.leakcanary:leakcanary-android:${leakcanary}"
debugImplementation "com.squareup.leakcanary:leakcanary-android-process:${leakcanary}"
// debugImplementation "com.gu.android:toolargetool:${toolargetool}" // 需要使用调试时才启用
debugImplementation "com.github.nichbar:WhatTheStack:${whatTheStack}"
@ -220,8 +222,6 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"
implementation "com.google.android:flexbox:${flexbox}"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "com.contrarywind:Android-PickerView:${pickerView}"
@ -238,12 +238,10 @@ dependencies {
})
implementation "com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-exo_player2:$gsyVideo"
implementation "androidx.work:work-runtime:${workManager}"
// implementation "androidx.work:work-runtime:${workManager}"
implementation "com.llew.huawei:verifier:${verifier}"
implementation "com.lg:skeleton:${skeleton}"
teaImplementation "com.bytedance.applog:RangersAppLog-Lite-cn:${bytedanceApplog}"
implementation "net.lingala.zip4j:zip4j:${zip4j}"
@ -255,8 +253,6 @@ dependencies {
implementation "io.github.florent37:shapeofview:${shapeOfView}"
implementation "io.github.sinaweibosdk:core:${weiboSDK}"
implementation "com.lg:apksig:${apksig}"
implementation "com.lg:gid:${gid}"
@ -264,9 +260,18 @@ dependencies {
compileOnly "com.github.axen1314.lancet:lancet-base:${lancet_version}"
kapt "com.alibaba:arouter-compiler:$arouterVersion"
implementation(project(':module_common')) {
implementation project(':vspace-bridge:vspace')
implementation (project(':module_common')) {
exclude group: 'androidx.swiperefreshlayout'
}
implementation(project(':module_login')) {
exclude group: 'androidx.swiperefreshlayout'
}
// 默认不接入光能模块,提高编译速度
// debugImplementation(project(':module_energy')) {
// exclude group: 'androidx.swiperefreshlayout'
// }
}
File propFile = file('sign.properties')
if (propFile.exists()) {
@ -357,36 +362,14 @@ andResGuard {
"R.drawable.bg_notification_reserve_game_style_2",
"R.drawable.bg_notification_video_style_1",
"R.drawable.bg_notification_video_style_2",
"R.drawable.ic_search_no_1",
"R.drawable.ic_search_no_2",
"R.drawable.ic_search_no_3",
"R.drawable.ic_search_no_4",
"R.drawable.ic_search_no_5",
"R.drawable.ic_search_no_6",
"R.drawable.ic_search_no_7",
"R.drawable.ic_search_no_8",
"R.drawable.ic_search_no_9",
"R.drawable.ic_search_no_10",
"R.drawable.ic_search_no_11",
"R.drawable.ic_search_no_12",
"R.drawable.ic_search_no_13",
"R.drawable.ic_search_no_14",
"R.drawable.ic_search_no_15",
"R.drawable.ic_search_no_16",
"R.drawable.ic_search_no_17",
"R.drawable.ic_search_no_18",
"R.drawable.ic_search_no_19",
"R.drawable.ic_search_no_20",
"R.drawable.ic_recommend_activity",
"R.drawable.ic_recommend_discount",
"R.drawable.ic_recommend_function",
"R.drawable.ic_recommend_gift",
"R.drawable.ic_recommend_role",
"R.drawable.login_btn_bg",
"R.drawable.ic_quick_login_check",
"R.drawable.ic_quick_login_uncheck",
"R.anim.anim_auth_in",
"R.anim.anim_auth_out",
"R.drawable.download_button_normal_style",
"R.drawable.ic_selector_selected",
"R.drawable.ic_selector_default",
"R.id.download_speed",
"R.id.download_percentage",
"R.id.comment",
@ -397,6 +380,9 @@ andResGuard {
"R.id.bottomShareTv",
"R.id.recommendStarPref",
"R.id.recommendStar",
"R.id.iv_vmode_badge",
"R.id.tv_vmode",
"R.id.iv_vmode",
"R.drawable.help_search_delete",
"R.drawable.suggest_type_normal",
"R.drawable.suggest_type_crash",

Binary file not shown.

View File

@ -1,266 +0,0 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:\Android\sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
#--------- remove logs start ----------------
-assumenosideeffects class com.lightgame.config.CommonDebug {
private static String getLogTag(...);
private static String getMethodName();
public static void logMethodName(...);
public static void logParams(...);
public static void logFields(...);
public static void logMethodWithParams(...);
}
#-assumenosideeffects class com.lightgame.config.CommonDebug {*;}
#-dontoptimize
#--------- remove logs end ----------------
-keepattributes *Annotation*,Signature,InnerClasses,EnclosingMethod
-dontwarn InnerClasses
# OrmLite uses reflection
-keep class com.j256.**
-keepclassmembers class com.j256.** { *; }
-keep enum com.j256.**
-keepclassmembers enum com.j256.** { *; }
-keep interface com.j256.**
-keepclassmembers interface com.j256.** { *; }
-dontwarn com.j256.**
#okhttp3
-dontwarn com.squareup.okhttp3.**
-dontwarn okio.**
-keep class com.squareup.okhttp3.** { *;}
# stetho
-keep class com.facebook.stetho.** { *; }
-dontwarn com.facebook.stetho.**
# Retrofit 2.2
# Platform calls Class.forName on types which do not exist on Android to determine platform.
-dontnote retrofit2.Platform
# Platform used when running on Java 8 VMs. Will not be used at runtime.
-dontwarn retrofit2.Platform$Java8
# Retain generic type information for use by reflection by converters and adapters.
-keepattributes Signature
# Retain declared checked exceptions for use by a Proxy instance.
-keepattributes Exceptions
# Retrofit 2.X
## https://square.github.io/retrofit/ ##
-dontwarn retrofit2.**
-keep class retrofit2.** { *; }
-keepattributes Signature
-keepattributes Exceptions
-keepclasseswithmembers class * {
@retrofit2.http.* <methods>;
}
# rxjava
-keep class rx.schedulers.Schedulers {
public static <methods>;
}
-keep class rx.schedulers.ImmediateScheduler {
public <methods>;
}
-keep class rx.schedulers.TestScheduler {
public <methods>;
}
-keep class rx.schedulers.Schedulers {
public static ** test();
}
-keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
long producerIndex;
long consumerIndex;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
long producerNode;
long consumerNode;
}
-dontwarn rx.internal.util.**
## AutoScrollViewPager
-keep class cn.trinea.android.** { *; }
-keepclassmembers class cn.trinea.android.** { *; }
-dontwarn cn.trinea.android.**
## butterknife
# Retain generated class which implement Unbinder.
#-keep public class * implements butterknife.Unbinder { public <init>(**, android.view.View); }
#
## Prevent obfuscation of types which use ButterKnife annotations since the simple name
## is used to reflectively look up the generated ViewBinding.
#-keep class butterknife.*
#-keepclasseswithmembernames class * { @butterknife.* <methods>; }
#-keepclasseswithmembernames class * { @butterknife.* <fields>; }
-dontwarn butterknife.internal.**
-keep class **$$ViewInjector { *; }
-keepnames class * { @butterknife.InjectView *;}
-dontwarn butterknife.Views$InjectViewProcessor
-dontwarn com.gc.materialdesign.views.**
# eventbus
-keepattributes *Annotation*
-keepclassmembers class ** {
@org.greenrobot.eventbus.Subscribe <methods>;
}
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
# Only required if you use AsyncExecutor
-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
<init>(java.lang.Throwable);
}
# weiboSdk
-keep class com.sina.weibo.sdk.** { *; }
-dontwarn android.webkit.WebView
-dontwarn android.webkit.WebViewClient
# 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.retrofit.** {*;}
-keep class com.gh.gamecenter.eventbus.** {*;}
-keep class com.gh.gamecenter.video.detail.** {*;}
-keep class * extends rx.Subscriber
#---------------------------------webview------------------------------------
-keepclassmembers class * extends android.webkit.WebViewClient {
public void *(android.webkit.WebView, java.lang.String, android.graphics.Bitmap);
public boolean *(android.webkit.WebView, java.lang.String);
}
-keepclassmembers class * extends android.webkit.WebViewClient {
public void *(android.webkit.WebView, java.lang.String);
}
#----------------------------------------------------------------------------
##---------------Begin: proguard configuration for Gson ----------
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature
# For using GSON @Expose annotation
-keepattributes *Annotation*
# Gson specific classes
-keep class sun.misc.Unsafe { *; }
#-keep class com.google.gson.stream.** { *; }
# Prevent proguard from stripping interface information from TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer
-keepclassmembers enum * { *; }
##---------------End: proguard configuration for Gson ----------
# ------ bugly ---------
-dontwarn com.tencent.bugly.**
-keep public class com.tencent.bugly.**{*;}
# easypermission
-keepclassmembers class * {
@pub.devrel.easypermissions.AfterPermissionGranted <methods>;
}
# 重命名文件为SourceFile再配合mapping符号表可以拿到真实的类名
-renamesourcefileattribute SourceFile
# 保留源文件行号
-keepattributes SourceFile,LineNumberTable
-ignorewarnings
-keep @androidx.annotation.Keep class *
-keepclassmembers class ** {
@androidx.annotation.Keep *;
}
-keep class com.gh.loghub.** { *; }
### greenDAO 3
-keepclassmembers class * extends org.greenrobot.greendao.AbstractDao {
public static java.lang.String TABLENAME;
}
-keep class **$Properties
-keep class org.greenrobot.greendao.** { *; }
# If you do not use SQLCipher:
-dontwarn org.greenrobot.greendao.database.**
# If you do not use RxJava:
-dontwarn rx.**
-dontwarn org.greenrobot.greendao.rx.**
-dontwarn org.greenrobot.greendao.**
### fastJson
-dontwarn com.alibaba.fastjson.**
-keep class com.alibaba.fastjson.** { *; }
-keepattributes Signature
-keepattributes Annotation
### AndroidX
-keep class androidx.core.app.CoreComponentFactory { *; }
#阿里云上传
-keep class com.alibaba.sdk.android.oss.** { *; }
-dontwarn okio.**
-dontwarn org.apache.commons.codec.binary.**
#视频相关
-keep class com.shuyu.gsyvideoplayer.video.** { *; }
-dontwarn com.shuyu.gsyvideoplayer.video.**
-keep class com.shuyu.gsyvideoplayer.video.base.** { *; }
-dontwarn com.shuyu.gsyvideoplayer.video.base.**
-keep class com.shuyu.gsyvideoplayer.utils.** { *; }
-dontwarn com.shuyu.gsyvideoplayer.utils.**
-keep class tv.danmaku.ijk.** { *; }
-dontwarn tv.danmaku.ijk.**
-keep public class * extends android.view.View{
*** get*();
void set*(***);
public <init>(android.content.Context);
public <init>(android.content.Context, android.util.AttributeSet);
public <init>(android.content.Context, android.util.AttributeSet, int);
}
#穿山甲
-keep class com.bytedance.sdk.openadsdk.** { *; }
-keep public interface com.bytedance.sdk.openadsdk.downloadnew.** {*;}
-keep class com.pgl.sys.ces.* {*;}
-keep class com.gyf.immersionbar.* {*;}
-dontwarn com.gyf.immersionbar.**
-keep class com.taobao.securityjni.**{*;}
-keep class com.taobao.wireless.security.**{*;}
-keep class com.ut.secbody.**{*;}
-keep class com.taobao.dp.**{*;}
-keep class com.alibaba.wireless.security.**{*;}
-keep class com.alibaba.sdk.android.**{*;}
-keep class com.ut.**{*;}
-keep class com.ta.**{*;}
-keep class com.gh.gamecenter.TeaHelper { *; }

View File

@ -1,30 +1,7 @@
#--------- remove logs start ----------------
-assumenosideeffects class com.lightgame.config.CommonDebug {
private static String getLogTag(...);
private static String getMethodName();
public static void logMethodName(...);
public static void logParams(...);
public static void logFields(...);
public static void logMethodWithParams(...);
}
-assumenosideeffects class com.lightgame.utils.Utils {
public static void log(...);
}
#--------- remove logs end ----------------
# inline getter method
-allowaccessmodification
#--------- remove useless mtahelper class --------
-assumenosideeffects class com.gh.gamecenter.core.utils.MtaHelper {
public static void onEvent(...);
public static void onEventWithTime(...);
public static void onEventWithBasicDeviceInfo(...);
}
#--------- remove useless mta class end ----
# TODO Dicard sourceFile in final release build but remain in internal build.
-renamesourcefileattribute SourceFile
# Keep Attribute
@ -39,70 +16,20 @@
-keepclassmembers interface com.j256.* { *; }
-dontwarn com.j256.**
### AutoScrollViewPager
-keep class cn.trinea.android.* { *; }
-keepclassmembers class cn.trinea.android.* { *; }
-dontwarn cn.trinea.android.**
### eventbus
-keepclassmembers class * {
@org.greenrobot.eventbus.Subscribe <methods>;
}
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
### Only required if you use AsyncExecutor
-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
<init>(java.lang.Throwable);
}
### weiboSdk
-keep class com.sina.weibo.sdk.** { *; }
-dontwarn android.webkit.WebView
-dontwarn android.webkit.WebViewClient
### wechatSdk
### TODO 这里用 com.tencent.*{*;} 不起效?但其它地方可以?
-keep class com.tencent.**{*;}
### 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.common.entity.* {*;}
-keep class com.gh.gamecenter.qa.entity.* {*;}
-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.* {*;}
###
-keepclassmembers class * extends android.webkit.WebViewClient {
public void *(android.webkit.WebView, java.lang.String, android.graphics.Bitmap);
public boolean *(android.webkit.WebView, java.lang.String);
}
-keepclassmembers class * extends android.webkit.WebViewClient {
public void *(android.webkit.WebView, java.lang.String);
}
### easypermission
-keepclassmembers class * {
@pub.devrel.easypermissions.AfterPermissionGranted <methods>;
}
# TODO What's this ?
-ignorewarnings
### Keep Annotation
-keep @androidx.annotation.Keep class *
-keepclassmembers class * {
@androidx.annotation.Keep *;
}
### 阿里云上传
-keep class com.alibaba.sdk.android.oss.* { *; }
-dontwarn okio.**
-dontwarn org.apache.commons.codec.binary.**
### 视频相关
-keep class com.shuyu.gsyvideoplayer.video.* { *; }
-dontwarn com.shuyu.gsyvideoplayer.video.**
@ -120,32 +47,12 @@
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keep class com.alibaba.sdk.android.*{*;}
-keep class com.ut.*{*;}
-keep class com.ta.*{*;}
### TEA
-keep class com.gh.gamecenter.TeaHelper { *; }
### 阿里云日志
-keep class com.aliyun.sls.android.producer.* { *; }
-keep interface com.aliyun.sls.android.producer.* { *; }
### 中国移动一键登录
-dontwarn com.cmic.sso.sdk.**
-keep class com.cmic.sso.sdk.* { *; }
### EasyFloat
-keep class com.lzf.easyfloat.* {*;}
### 避免 WebChromeClient 被混淆
-keepclassmembers class * extends android.webkit.WebChromeClient{
public void openFileChooser(...);
}
### emoji4j
-keep class emoji4j.* {*;}
### dokit
-keep class com.didichuxing.** {*;}
@ -159,12 +66,3 @@
public static void directToSuggestion(...);
}
# ARouter
-keep public class com.alibaba.android.arouter.routes.**{*;}
-keep public class com.alibaba.android.arouter.facade.**{*;}
-keep class * implements com.alibaba.android.arouter.facade.template.ISyringe{*;}
# 如果使用了 byType 的方式获取 Service需添加下面规则保护接口
-keep interface * implements com.alibaba.android.arouter.facade.template.IProvider
# 如果使用了 单类注入,即不定义接口实现 IProvider需添加下面规则保护实现
-keep class * implements com.alibaba.android.arouter.facade.template.IProvider

View File

@ -3,6 +3,9 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.gh.gamecenter">
<queries>
<package android:name="com.gh.gamecenter" />
</queries>
<!-- 允许应用程序访问网络连接 -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- 允许应用程序写入外部存储如SD卡上写文件 -->
@ -13,10 +16,6 @@
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!-- 允许应用程序获取网络信息状态 -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- 允许应用程序读取电话状态 -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<!-- 允许应用程序获取当前或最近运行的应用 -->
<uses-permission android:name="android.permission.GET_TASKS" />
<!-- 允许访问振动设备 -->
<uses-permission android:name="android.permission.VIBRATE" />
<!-- 允许应用程序改变Wi-Fi连接状态 -->
@ -25,8 +24,11 @@
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<!-- 允许应用程序快捷方式 -->
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<!-- 应用安装相关 -->
<uses-permission android:name="com.android.permission.GET_INSTALLED_APPS" />
<!-- 前台服务权限-->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission
android:name="android.permission.PACKAGE_USAGE_STATS"
@ -56,6 +58,14 @@
android:name="android.permission.READ_CONTACTS"
tools:node="remove" />
<uses-permission
android:name="android.permission.READ_PHONE_STATE"
tools:node="remove" />
<uses-permission
android:name="android.permission.GET_TASKS"
tools:node="remove" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
@ -70,7 +80,6 @@
android:icon="@mipmap/logo"
android:label="@string/app_name"
android:largeHeap="true"
android:networkSecurityConfig="@xml/network_security_config"
android:resizeableActivity="true"
android:theme="@style/AppCompatTheme.APP"
tools:replace="android:name,android:allowBackup"
@ -166,7 +175,7 @@
<activity
android:name="com.gh.gamecenter.WebActivity"
android:screenOrientation="portrait"/>
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.SingletonWebActivity"
@ -257,11 +266,6 @@
android:name=".category.CategoryListActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.LoginActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="com.gh.gamecenter.UserInfoActivity"
android:screenOrientation="portrait" />
@ -287,10 +291,6 @@
android:name="com.gh.gamecenter.qa.answer.detail.AnswerDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name=".qa.answer.fold.AnswerFoldActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.qa.answer.edit.AnswerEditActivity"
android:screenOrientation="portrait" />
@ -376,10 +376,6 @@
android:name="com.gh.gamecenter.qa.article.detail.ArticleDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.qa.article.detail.comment.ArticleDetailCommentActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.qa.draft.CommunityDraftWrapperActivity"
android:screenOrientation="portrait" />
@ -513,10 +509,6 @@
android:name=".video.poster.PosterClipActivity"
android:screenOrientation="portrait" />
<activity
android:name=".forum.select.ForumSelectActivity"
android:screenOrientation="portrait" />
<activity
android:name=".forum.detail.ForumDetailActivity"
android:screenOrientation="portrait" />
@ -570,19 +562,6 @@
android:name=".forum.search.ForumOrUserSearchActivity"
android:screenOrientation="portrait" />
<activity
android:name=".energy.EnergyCenterActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait" />
<activity
android:name=".energy.EnergyHouseActivity"
android:screenOrientation="portrait" />
<activity
android:name=".personal.NewPersonalActivity"
android:screenOrientation="portrait" />
<activity
android:name=".qa.questions.draft.QuestionDraftActivity"
android:screenOrientation="portrait" />
@ -651,14 +630,6 @@
android:name=".gamecollection.detail.GameCollectionPosterActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.cmic.sso.sdk.activity.LoginAuthActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name=".home.skip.PackageSkipActivity"
android:screenOrientation="portrait" />
@ -732,6 +703,16 @@
android:name="com.gh.gamecenter.toolbox.ToolBoxBlockActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.vspace.VDownloadManagerActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.vspace.VSpaceLoadingActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.qa.subject.CommunitySubjectActivity"
android:screenOrientation="portrait" />
@ -741,11 +722,16 @@
android:screenOrientation="portrait" />
<activity
android:name="${applicationId}.wxapi.WXEntryActivity"
android:exported="true"
android:label="@string/app_name"
android:launchMode="singleTop"
android:theme="@android:style/Theme.Translucent.NoTitleBar"></activity>
android:name="com.gh.gamecenter.mypost.MyPostActivity"
android:screenOrientation="portrait" />
<activity
android:name=".VerifyPhoneActivity"
android:screenOrientation="portrait" />
<activity
android:name=".BbsCertificationActivity"
android:screenOrientation="portrait" />
<!-- <activity-->
<!-- android:name="${applicationId}.douyinapi.DouYinEntryActivity"-->
@ -767,19 +753,19 @@
android:name="com.gh.gamecenter.provider.GhContentProvider"
android:authorities="${applicationId}.provider"
android:enabled="true"
android:exported="true"/>
android:exported="true" />
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
android:exported="false"
tools:node="merge">
<!-- If you are using androidx.startup to initialize other components -->
<meta-data
android:name="androidx.work.WorkManagerInitializer"
android:value="androidx.startup"
tools:node="remove" />
</provider>
<!-- <provider-->
<!-- android:name="androidx.startup.InitializationProvider"-->
<!-- android:authorities="${applicationId}.androidx-startup"-->
<!-- android:exported="false"-->
<!-- tools:node="merge">-->
<!-- &lt;!&ndash; If you are using androidx.startup to initialize other components &ndash;&gt;-->
<!-- <meta-data-->
<!-- android:name="androidx.work.WorkManagerInitializer"-->
<!-- android:value="androidx.startup"-->
<!-- tools:node="remove" />-->
<!-- </provider>-->
<receiver
android:name="com.gh.gamecenter.receiver.DownloadReceiver"

Binary file not shown.

View File

@ -0,0 +1 @@
{"v":"5.9.1","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,"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":[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,"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":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":[1,1,1,1],"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,"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":"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":[1,1,1,1],"ix":4},"o":{"a":0,"k":20,"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,"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":"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.156862750649,0.533333361149,0.878431379795,1]},{"t":18,"s":[1,1,1,1]}],"ix":4},"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.667],"y":[0]},"t":0,"s":[100]},{"t":18,"s":[8]}],"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

@ -0,0 +1 @@
{"v":"5.9.1","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,"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":[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,"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":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":[1,1,1,1],"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,"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":"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,"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":"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

@ -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":[33,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":[89,33,0],"to":[2.306,0,0],"ti":[-1.318,0,0]},{"t":24,"s":[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":[{"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":[0]},{"t":18,"s":[100]}],"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":[4.5,4.5]},{"t":18,"s":[6.5,6.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,6]},{"t":18,"s":[1.5,4]}],"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":[100]},{"t":18,"s":[0]}],"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.933332979679,0.933332979679,0.933332979679,1]},{"t":18,"s":[0.141176477075,0.588235318661,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.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

@ -0,0 +1 @@
{"v":"5.9.1","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":[33,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":[89,33,0],"to":[2.306,0,0],"ti":[-1.318,0,0]},{"t":24,"s":[87,33,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":[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":[0]},{"t":18,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[33,33,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":1,"k":[{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.667,0.667],"y":[0,0]},"t":0,"s":[4.5,4.5]},{"t":18,"s":[6.5,6.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":[1,1,1,1],"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,"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":"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,6]},{"t":18,"s":[1.5,4]}],"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":[1,1,1,1],"ix":4},"o":{"a":0,"k":20,"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":[100]},{"t":18,"s":[0]}],"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,"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":"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":[1,1,1,1]},{"t":18,"s":[0.156862750649,0.533333361149,0.878431379795,1]}],"ix":4},"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.667],"y":[0]},"t":0,"s":[8]},{"t":18,"s":[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

@ -0,0 +1 @@
{"v":"5.9.1","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":[33,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":[89,33,0],"to":[2.306,0,0],"ti":[-1.318,0,0]},{"t":24,"s":[87,33,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":[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":[0]},{"t":18,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[33,33,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":1,"k":[{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.667,0.667],"y":[0,0]},"t":0,"s":[4.5,4.5]},{"t":18,"s":[6.5,6.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":[1,1,1,1],"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,"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":"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,6]},{"t":18,"s":[1.5,4]}],"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":[100]},{"t":18,"s":[0]}],"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,"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":"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.933332979679,0.933332979679,0.933332979679,1]},{"t":18,"s":[0.141176477075,0.588235318661,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.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

@ -113,7 +113,8 @@ abstract class BaseRichEditorActivity<VM : BaseRichEditorViewModel> : ToolBarAct
}
}
INSERT_GAME_COLLECTION_CODE -> {
val gameCollectionEntity = data?.getParcelableExtra<GamesCollectionEntity>(GamesCollectionEntity::class.java.simpleName)
val gameCollectionEntity =
data?.getParcelableExtra<GamesCollectionEntity>(GamesCollectionEntity::class.java.simpleName)
if (gameCollectionEntity != null) {
mRichEditor.focusEditor()
insertData = EditorInsertEntity.transform(gameCollectionEntity)
@ -124,7 +125,9 @@ abstract class BaseRichEditorActivity<VM : BaseRichEditorViewModel> : ToolBarAct
if (data != null) mViewModel.uploadPic(data)
}
INSERT_MEDIA_VIDEO_CODE -> {
val localVideoList = data?.getParcelableArrayListExtra<LocalVideoEntity>(LocalVideoEntity::class.java.name) ?: arrayListOf()
val localVideoList =
data?.getParcelableArrayListExtra<LocalVideoEntity>(LocalVideoEntity::class.java.name)
?: arrayListOf()
if (localVideoList.isNotEmpty()) {
mRichEditor.focusEditor()
uploadVideo(localVideoList)
@ -210,7 +213,7 @@ abstract class BaseRichEditorActivity<VM : BaseRichEditorViewModel> : ToolBarAct
mViewModel.setUploadVideoListener(this)
mKeyboardHeightProvider = KeyboardHeightProvider(this)
mRichEditor.post { mKeyboardHeightProvider?.start() }
mRichEditor.enableForceDark(NightModeUtils.isNightMode(this))
mRichEditor.enableForceDark(DarkModeUtils.isDarkModeOn(this))
// 防止个别手机在Js里无法获取粘贴内容
mRichEditor.addJavascriptInterface(OnPasteListener(), "onPasteListener")
mRichEditor.addJavascriptInterface(OnCursorChangeListener(), "OnCursorChangeListener")
@ -741,12 +744,12 @@ abstract class BaseRichEditorActivity<VM : BaseRichEditorViewModel> : ToolBarAct
abstract fun provideViewModel(): VM
abstract fun getVideoGuideKey(): String
override fun isAutoResetViewBackgroundEnabled(): Boolean =true
override fun isAutoResetViewBackgroundEnabled(): Boolean = true
override fun onNightModeChange() {
super.onNightModeChange()
override fun onDarkModeChanged() {
super.onDarkModeChanged()
updateStatusBarColor(R.color.background_white, R.color.background_white)
mRichEditor.enableForceDark(NightModeUtils.isNightMode(this))
mRichEditor.enableForceDark(DarkModeUtils.isDarkModeOn(this))
}
companion object {

View File

@ -0,0 +1,86 @@
package com.gh.base
import android.view.Gravity
import androidx.appcompat.app.AppCompatActivity
import com.gh.gamecenter.R
import com.gh.gamecenter.common.utils.DarkModeUtils
import com.gh.gamecenter.common.utils.DialogHelper
import com.gh.gamecenter.common.utils.PackageFlavorHelper
import com.gh.gamecenter.common.utils.dip2px
import com.lzf.easyfloat.EasyFloat
import com.lzf.easyfloat.enums.ShowPattern
import com.lzf.easyfloat.enums.SidePattern
object DarkModeSwitchHelper {
fun showDarkModeSwitchFloatingView(activity: AppCompatActivity) {
if (PackageFlavorHelper.IS_TEST_FLAVOR) {
EasyFloat.with(activity)
.setLayout(R.layout.layout_day_mode_night_mode_switch)
.setTag("night_mode_switch_floating_view")
.setAnimator(null)
.setGravity(Gravity.TOP.xor(Gravity.END), 0, 114F.dip2px())
.setSidePattern(SidePattern.RESULT_SIDE)
.setDragEnable(true)
.setShowPattern(ShowPattern.CURRENT_ACTIVITY)
.registerCallback {
createResult { _, _, view ->
view?.setOnClickListener {
showDarkModeSwitchDialog(activity)
}
}
}
.show()
}
}
fun dismissDarkModeSwitchFloatingView() {
if (PackageFlavorHelper.IS_TEST_FLAVOR) {
EasyFloat.dismiss("night_mode_switch_floating_view")
}
}
private fun showDarkModeSwitchDialog(activity: AppCompatActivity) {
if (PackageFlavorHelper.IS_TEST_FLAVOR) {
//切换深色模式
var mode = "普通模式"
var positive = "跟随系统模式"
var negative = "深色模式"
if (DarkModeUtils.isFollowSystemDarkModeFromSp()) {
mode = "跟随系统模式"
positive = "普通模式"
negative = "深色模式"
} else if (DarkModeUtils.isAppDarkModeEnabledFromSp()) {
mode = "深色模式"
positive = "跟随系统模式"
negative = "普通模式"
}
DialogHelper.showDialog(
context = activity,
title = "选择模式",
content = "当前为 $mode",
confirmText = positive,
cancelText = negative,
confirmClickCallback = {
if (DarkModeUtils.isFollowSystemDarkModeFromSp()) {
DarkModeUtils.updateAppDarkModeStatusToSp(false)
DarkModeUtils.updateFollowSystemDarkModeToSp(false)
} else {
DarkModeUtils.updateFollowSystemDarkModeToSp(true)
}
DarkModeUtils.initDarkMode()
},
cancelClickCallback = {
if (DarkModeUtils.isFollowSystemDarkModeFromSp()) {
DarkModeUtils.updateAppDarkModeStatusToSp(true)
} else {
DarkModeUtils.updateAppDarkModeStatusToSp(!DarkModeUtils.isAppDarkModeEnabledFromSp())
}
DarkModeUtils.updateFollowSystemDarkModeToSp(false)
DarkModeUtils.initDarkMode()
},
extraConfig = DialogHelper.Config(centerTitle = true, centerContent = true)
)
}
}
}

View File

@ -6,7 +6,6 @@ import android.view.MenuItem
import android.view.View
import android.widget.ImageView
import android.widget.TextView
import androidx.core.content.ContextCompat
import com.gh.download.DownloadManager
import com.gh.gamecenter.DownloadManagerActivity
import com.gh.gamecenter.R
@ -58,7 +57,7 @@ abstract class DownloadToolbarActivity : ToolBarActivity() {
updateDownloadCountHint(mPackageViewModel?.filterSameUpdateLiveData?.value)
}
val downloadMenuView = mActionMenuView.menu.findItem(R.id.menu_download).actionView
mDownloadCountHint = downloadMenuView.findViewById(R.id.menu_download_count_hint)
mDownloadCountHint = downloadMenuView?.findViewById(R.id.menu_download_count_hint)
}
override fun onMenuItemClick(item: MenuItem?): Boolean {
@ -72,7 +71,7 @@ abstract class DownloadToolbarActivity : ToolBarActivity() {
}
private fun updateDownloadCountHint(updateList: List<GameUpdateEntity>?) {
if (mDownloadCountHint == null || updateList.isNullOrEmpty()) return
if (mDownloadCountHint == null) return
val count = DownloadManager.getInstance().getDownloadOrUpdateCount(updateList)
if (count != null) {
mDownloadCountHint!!.visibility = View.VISIBLE
@ -102,11 +101,11 @@ abstract class DownloadToolbarActivity : ToolBarActivity() {
}
}
override fun onNightModeChange() {
super.onNightModeChange()
override fun onDarkModeChanged() {
super.onDarkModeChanged()
if (showDownloadMenu() && getMenuItem(R.id.menu_download) != null) {
(getMenuItem(R.id.menu_download).actionView.findViewById(R.id.menu_download_iv) as ImageView).setImageDrawable(
ContextCompat.getDrawable(this, R.drawable.toolbar_download)
(getMenuItem(R.id.menu_download).actionView?.findViewById(R.id.menu_download_iv) as ImageView).setImageResource(
R.drawable.toolbar_download
)
}
}

View File

@ -9,12 +9,12 @@ import com.gh.download.DownloadManager
import com.gh.gamecenter.MainActivity
import com.gh.gamecenter.SplashScreenActivity
import com.gh.gamecenter.common.utils.PackageFlavorHelper
import com.gh.gamecenter.energy.EnergyCenterActivity
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
// TODO移动到对应的模块
@ -31,7 +31,7 @@ class GlobalActivityLifecycleObserver : Application.ActivityLifecycleCallbacks {
override fun onActivityResumed(activity: Activity) {
// 判断是否需要显示或隐藏返回小浮窗
if (FloatingBackViewManager.getType().isNotEmpty()) {
if (activity is EnergyCenterActivity
if ((activity::class.java.name == "EnergyCenterActivity")
&& FloatingBackViewManager.getType() == FloatingBackViewManager.TYPE_TASK
) {
FloatingBackViewManager.disableBackView()
@ -57,7 +57,11 @@ class GlobalActivityLifecycleObserver : Application.ActivityLifecycleCallbacks {
}
if (PackageFlavorHelper.IS_TEST_FLAVOR && activity is AppCompatActivity) {
NightModeSwitchHelper.showNightModeSwitchFloatingView(activity)
DarkModeSwitchHelper.showDarkModeSwitchFloatingView(activity)
}
if (activity is AppCompatActivity && activity !is SplashScreenActivity) {
VHelper.showFeedbackDialogIfLastSuccessfulLaunchedGameExitUnexpectedly(activity)
}
}
@ -73,7 +77,7 @@ class GlobalActivityLifecycleObserver : Application.ActivityLifecycleCallbacks {
override fun onActivityPaused(activity: Activity) {
FloatingBackViewManager.dismissBackView()
if (PackageFlavorHelper.IS_TEST_FLAVOR && activity is AppCompatActivity) {
NightModeSwitchHelper.dismissNightModeSwitchFloatingView()
DarkModeSwitchHelper.dismissDarkModeSwitchFloatingView()
}
}

View File

@ -1,107 +0,0 @@
package com.gh.base
import android.os.Build
import android.view.Gravity
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.app.AppCompatDelegate
import com.gh.gamecenter.R
import com.gh.gamecenter.common.utils.DialogHelper
import com.gh.gamecenter.common.utils.NightModeUtils
import com.gh.gamecenter.common.utils.PackageFlavorHelper
import com.gh.gamecenter.common.utils.dip2px
import com.lzf.easyfloat.EasyFloat
import com.lzf.easyfloat.enums.ShowPattern
import com.lzf.easyfloat.enums.SidePattern
object NightModeSwitchHelper {
fun showNightModeSwitchFloatingView(activity: AppCompatActivity) {
if (PackageFlavorHelper.IS_TEST_FLAVOR) {
EasyFloat.with(activity)
.setLayout(R.layout.layout_day_mode_night_mode_switch)
.setTag("night_mode_switch_floating_view")
.setAnimator(null)
.setGravity(Gravity.TOP.xor(Gravity.END), 0, 114F.dip2px())
.setSidePattern(SidePattern.RESULT_SIDE)
.setDragEnable(true)
.setShowPattern(ShowPattern.CURRENT_ACTIVITY)
.registerCallback {
createResult { _, _, view ->
// val url = "https://ps.w.org/dark-mode-for-wp-dashboard/assets/icon-128x128.png"
// view?.findViewById<ImageView>(R.id.iconIv)?.let {
// Picasso.with(activity).load(url).into(it)
// }
view?.setOnClickListener {
showNightModeSwitchDialog(activity)
}
}
}
.show()
}
}
fun dismissNightModeSwitchFloatingView() {
if (PackageFlavorHelper.IS_TEST_FLAVOR) {
EasyFloat.dismiss("night_mode_switch_floating_view")
}
}
private fun showNightModeSwitchDialog(activity: AppCompatActivity) {
if (PackageFlavorHelper.IS_TEST_FLAVOR) {
//切换深色模式
var mode = "普通模式"
var positive = "跟随系统模式"
var negative ="深色模式"
if (NightModeUtils.getSystemMode()) {
mode = "跟随系统模式"
positive = "普通模式"
negative = "深色模式"
} else if (NightModeUtils.getNightMode()) {
mode = "深色模式"
positive = "跟随系统模式"
negative = "普通模式"
}
DialogHelper.showDialog(
context = activity,
title = "选择模式",
content = "当前为 $mode",
confirmText = positive,
cancelText = negative,
confirmClickCallback = {
if (NightModeUtils.getSystemMode()) {
NightModeUtils.setNightMode(false)
NightModeUtils.setSystemMode(false)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
activity.delegate.localNightMode = AppCompatDelegate.MODE_NIGHT_NO
}
} else {
NightModeUtils.setSystemMode(true)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
activity.delegate.localNightMode =
AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
}
}
NightModeUtils.initNightMode()
},
cancelClickCallback = {
if (NightModeUtils.getSystemMode()) {
NightModeUtils.setNightMode(true)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
activity.delegate.localNightMode = AppCompatDelegate.MODE_NIGHT_YES
}
} else {
val nightMode = NightModeUtils.getNightMode()
NightModeUtils.setNightMode(!NightModeUtils.getNightMode())
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
activity.delegate.localNightMode =
if (nightMode) AppCompatDelegate.MODE_NIGHT_NO else AppCompatDelegate.MODE_NIGHT_YES
}
}
NightModeUtils.setSystemMode(false)
NightModeUtils.initNightMode()
},
extraConfig = DialogHelper.Config(centerTitle = true, centerContent = true)
)
}
}
}

View File

@ -25,16 +25,18 @@ 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.energy.EnergyCenterActivity
import com.gh.gamecenter.energy.EnergyHouseActivity
import com.gh.gamecenter.entity.Badge
import com.gh.gamecenter.energy.EnergyBridge
import com.gh.gamecenter.entity.MtaEvent
import com.gh.gamecenter.help.QaFeedbackDialogFragment
import com.gh.gamecenter.manager.UserManager
import com.gh.gamecenter.login.entity.Badge
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.user.LoginTag
import com.gh.gamecenter.user.UserRepository
import com.gh.gamecenter.login.user.UserRepository
import com.gh.gamecenter.login.utils.LoginHelper
import com.gh.gamecenter.login.utils.QuickLoginHelper
import com.halo.assistant.HaloApp
import com.lightgame.utils.Utils
import org.json.JSONObject
@ -126,7 +128,7 @@ class DefaultJsApi(var context: Context, val entrance: String = "") {
WechatBindHelper.bindWechat(wechatLoginInfoMap, object : BiCallback<Boolean, Boolean> {
override fun onFirst(first: Boolean) {
EnergyTaskHelper.postEnergyTask("bind_wechat")
EnergyBridge.postEnergyTask("bind_wechat")
handler.complete(true)
}
@ -218,7 +220,7 @@ class DefaultJsApi(var context: Context, val entrance: String = "") {
@JavascriptInterface
fun updateRegulationTestStatus(msg: Any) {
if (msg.toString().toLowerCase(Locale.getDefault()) == "pass") {
EnergyTaskHelper.postEnergyTask("finish_etiquette_exam")
EnergyBridge.postEnergyTask("finish_etiquette_exam")
SPUtils.setString(Constants.SP_REGULATION_TEST_PASS_STATUS, "pass")
}
}
@ -289,22 +291,22 @@ class DefaultJsApi(var context: Context, val entrance: String = "") {
@JavascriptInterface
fun openInNewWebview(url: Any) {
runOnUiThread { DirectUtils.directToWebView(context, url.toString(), "内部网页") }
runOnUiThread { DirectUtils.directToWebView(context, url.toString(), entrance.ifBlank { "内部网页" }) }
}
@JavascriptInterface
fun postWearBadgeTask(msg: Any) {
EnergyTaskHelper.postEnergyTask("wear_badge")
EnergyBridge.postEnergyTask("wear_badge")
}
@JavascriptInterface
fun startEnergyCenter(msg: Any) {
context.startActivity(EnergyCenterActivity.getIntent(context))
context.startActivity(EnergyBridge.getEnergyCenterIntent(context))
}
@JavascriptInterface
fun startEnergyHouse(msg: Any) {
context.startActivity(EnergyHouseActivity.getIntent(context))
context.startActivity(EnergyBridge.getEnergyHouseIntent(context, null))
}
@JavascriptInterface
@ -369,7 +371,8 @@ class DefaultJsApi(var context: Context, val entrance: String = "") {
runOnIoThread {
val base64String = base64StringData.replace("data:image/png;base64", "")
tryWithDefaultCatch {
val imageFile = File(HaloApp.getInstance().cacheDir.absolutePath + File.separator + System.currentTimeMillis() + ".png")
val imageFile =
File(HaloApp.getInstance().cacheDir.absolutePath + File.separator + System.currentTimeMillis() + ".png")
val decodedString = Base64.decode(base64String, Base64.DEFAULT)
val bos = BufferedOutputStream(FileOutputStream(imageFile))
bos.write(decodedString)
@ -396,7 +399,7 @@ class DefaultJsApi(var context: Context, val entrance: String = "") {
@JavascriptInterface
fun openInNewFullWebview(url: Any) {
runOnUiThread { DirectUtils.directToFullScreenWebPage(context, url.toString(), true) }
runOnUiThread { DirectUtils.directToFullScreenWebPage(context, url.toString(), true, entrance) }
}
@JavascriptInterface

View File

@ -21,6 +21,8 @@ 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.core.AppExecutor
import com.gh.gamecenter.common.utils.DialogHelper
import com.gh.gamecenter.common.utils.EnvHelper
@ -72,7 +74,13 @@ object DefaultUrlHandler {
entrance = entrance
)
"column" -> SubjectActivity.startSubjectActivity(context, id, uri.getQueryParameter("name"), false, entrance)
"column" -> SubjectActivity.startSubjectActivity(
context,
id,
uri.getQueryParameter("name"),
false,
entrance
)
"libao" -> context.startActivity(LibaoDetailActivity.getIntentById(context, id, entrance))
@ -91,7 +99,7 @@ object DefaultUrlHandler {
}
"inurl" -> {
DirectUtils.directToWebView(context, uri.getQueryParameter("url") ?: "")
DirectUtils.directToWebView(context, uri.getQueryParameter("url") ?: "", entrance)
}
"outurl" -> {
@ -165,13 +173,26 @@ object DefaultUrlHandler {
val linkEntity = VideoLinkEntity(title, categoryId, link, tagActivityId, tagActivityName)
val simpleGameEntity = SimpleGameEntity(gameId, gameName)
CheckLoginUtils.checkLogin(context, null, true, EntranceConsts.ENTRANCE_BROWSER) {
DirectUtils.directToVideoManager(context, linkEntity, simpleGameEntity, EntranceConsts.ENTRANCE_BROWSER, "")
DirectUtils.directToVideoManager(
context,
linkEntity,
simpleGameEntity,
EntranceConsts.ENTRANCE_BROWSER,
""
)
}
}
EntranceConsts.HOST_USERHOME -> {
val position = uri.getQueryParameter("position")
val subtype = uri.getQueryParameter("sub_type") ?: ""
DirectUtils.directToHomeActivity(context, id, subtype, if (position.isNullOrEmpty()) -1 else position.toInt(), entrance, "")
DirectUtils.directToHomeActivity(
context,
id,
subtype,
if (position.isNullOrEmpty()) -1 else position.toInt(),
entrance,
""
)
}
EntranceConsts.HOST_VIDEO_MORE -> {
val referer = uri.getQueryParameter("referer") ?: ""
@ -356,11 +377,16 @@ object DefaultUrlHandler {
GameEntity(id = gameId, mName = gameName, mIcon = icon, mIconSubscript = iconSubscript)
} else null
val activityLabelEntity = if (activityId.isNotEmpty() && activityName.isNotEmpty()) {
ActivityLabelEntity(id = activityId, name = activityName, original = original.ifEmpty { "false" }.toBoolean())
} else null
val communityEntity = if (forumId.isNotEmpty() && forumName.isNotEmpty() && forumIcon.isNotEmpty()) {
CommunityEntity(id = forumId, name = forumName, icon = forumIcon)
ActivityLabelEntity(
id = activityId,
name = activityName,
original = original.ifEmpty { "false" }.toBoolean()
)
} else null
val communityEntity =
if (forumId.isNotEmpty() && forumName.isNotEmpty() && forumIcon.isNotEmpty()) {
CommunityEntity(id = forumId, name = forumName, icon = forumIcon)
} else null
context.startActivity(
VideoPublishActivity.getIntent(
@ -400,7 +426,14 @@ object DefaultUrlHandler {
if (!TextUtils.isEmpty(qaId)) {
directToQa(context, qaTitle, qaId)
} else {
directToFeedback(context, content, null, isQaFeedback, qaContentId, EntranceConsts.ENTRANCE_BROWSER)
directToFeedback(
context,
content,
null,
isQaFeedback,
qaContentId,
EntranceConsts.ENTRANCE_BROWSER
)
}
}
@ -422,7 +455,15 @@ object DefaultUrlHandler {
val id = uri.getQueryParameter("id")
val name = uri.getQueryParameter("name")
val qaCollectionId = uri.getQueryParameter("collection_id")
context.startActivity(WebActivity.getIntent(context, "$url$id", name, true, !qaCollectionId.isNullOrEmpty()))
context.startActivity(
WebActivity.getIntent(
context,
"$url$id",
name,
true,
!qaCollectionId.isNullOrEmpty()
)
)
}
}
@ -438,7 +479,15 @@ object DefaultUrlHandler {
val activityId = uri.getQueryParameter("activity_id") ?: ""
val activityName = uri.getQueryParameter("activity_name") ?: ""
val gameId = uri.getQueryParameter("game_id") ?: ""
context.startActivity(GameCollectionEditActivity.getIntent(context, activityId, activityName, gameId, entrance))
context.startActivity(
GameCollectionEditActivity.getIntent(
context,
activityId,
activityName,
gameId,
entrance
)
)
}
else -> {
@ -502,6 +551,13 @@ object DefaultUrlHandler {
@JvmStatic
fun transformNormalScheme(context: Context, url: String, entrance: String): Boolean {
val b = transformNewNormalScheme(context, url, entrance)
if (b) return b
return transformOldNormalScheme(context, url, entrance)
}
@JvmStatic
fun transformOldNormalScheme(context: Context, url: String, entrance: String): Boolean {
val uri = Uri.parse(url)
if (uri.host == "www.ghzs666.com"
|| uri.host == "www.ghzs.com"
@ -513,9 +569,14 @@ object DefaultUrlHandler {
uri.path?.apply {
when {
contains("game") -> {
val gameId = uri.getQueryParameter("gameId") ?: uri.pathSegments.last()
?: ""
DirectUtils.directToGameDetail(context, gameId, entrance, autoDownload = false, traceEvent = null)
val gameId = uri.getQueryParameter("gameId") ?: uri.pathSegments.last() ?: ""
DirectUtils.directToGameDetail(
context,
gameId,
entrance,
autoDownload = false,
traceEvent = null
)
}
contains("question") -> {
val questionId = split("/")[2]
@ -532,7 +593,8 @@ object DefaultUrlHandler {
var type = ""
var typeId = ""
val split =
replace("/communities", "").replace("/bbs", "").replace(".html", "").split("/".toRegex()).dropLastWhile { it.isEmpty() }
replace("/communities", "").replace("/bbs", "").replace(".html", "").split("/".toRegex())
.dropLastWhile { it.isEmpty() }
.toTypedArray()
for (text in split) {
if (TextUtils.isEmpty(communityId)) {
@ -580,6 +642,55 @@ object DefaultUrlHandler {
return false
}
@JvmStatic
fun transformNewNormalScheme(context: Context, url: String, entrance: String): Boolean {
val uri = Uri.parse(url)
if (uri.host == "www.ghzs666.com"
|| uri.host == "www.ghzs.com"
|| uri.host == "ask.ghzs.com"
|| uri.host == "m.ghzs.com"
|| uri.host == "m.ghzs666.com"
|| uri.host == "dev-bbs-mobile.ghzs.com"
) {
Utils.log(uri.path)
uri.path?.apply {
val splits = split("/")
when {
//https://m.ghzs666.com/bbs/thread-帖子ID
splits.size >= 3 && splits[1] == "bbs" && splits[2].startsWith("thread-") -> {
val articleId = splits[2].substring(7)
DirectUtils.directToCommunityArticle(
context, articleId, "",
entrance, "文章链接"
)
}
//https://m.ghzs666.com/article/文章ID
splits.size >= 3 && splits[1] == "article" -> {
val articleId = splits[2]
DirectUtils.directToArticle(context, articleId, entrance)
}
//https://m.ghzs666.com/column/专题ID
splits.size >= 3 && splits[1] == "column" -> {
val columnId = splits[2]
DirectUtils.directToSubject(context, columnId, "", entrance)
}
//https://m.ghzs666.com/zone/游戏ID
splits.size >= 3 && splits[1] == "zone" -> {
DirectUtils.directToWebView(context, url, entrance)
}
//https://m.ghzs666.com/bbs/video-视频ID
splits.size >= 3 && splits[1] == "bbs" && splits[2].startsWith("video-") -> {
val videoId = splits[2].substring(6)
DirectUtils.directToVideoDetail(context, videoId, entrance)
}
else -> return false
}
}
return true
}
return false
}
/**
* 将 url 转换为 LinkEntity (实际只有 type 和 link 两个字段,仅供日志,不保证能用)
*/

View File

@ -9,6 +9,7 @@ import com.gh.common.videolog.VideoRecordUtils
import com.gh.download.DownloadDataHelper
import com.gh.gamecenter.entity.TimeEntity
import com.gh.gamecenter.common.retrofit.Response
import com.gh.gamecenter.core.runOnUiThread
import com.gh.gamecenter.retrofit.RetrofitManager
import com.halo.assistant.HaloApp
import io.reactivex.schedulers.Schedulers
@ -36,18 +37,22 @@ object FixedRateJobHelper {
// 时间校对10分钟一次
if ((mExecuteCount * CHECKER_PERIOD) % TIME_PERIOD == 0L) {
RetrofitManager.getInstance().api.time
.subscribeOn(Schedulers.io())
.subscribe(object : Response<TimeEntity>() {
override fun onResponse(response: TimeEntity?) {
val serverTime = response?.time
serverTime?.let { timeDeltaBetweenServerAndClient = it * 1000 - System.currentTimeMillis() }
.subscribeOn(Schedulers.io())
.subscribe(object : Response<TimeEntity>() {
override fun onResponse(response: TimeEntity?) {
val serverTime = response?.time
serverTime?.let {
timeDeltaBetweenServerAndClient = it * 1000 - System.currentTimeMillis()
}
})
}
})
}
// 提交曝光数据
if ((mExecuteCount * CHECKER_PERIOD) % EXPOSURE_PERIOD == 0L) {
ExposureManager.commitSavedExposureEvents(true)
runOnUiThread {
ExposureManager.commitSavedExposureEvents(true)
}
}
// 分片检测下载进度
@ -60,7 +65,9 @@ object FixedRateJobHelper {
// 提交普通 loghub 数据
if ((mExecuteCount * CHECKER_PERIOD) % LOGHUB_PERIOD == 0L) {
LoghubUtils.commitSavedLoghubEvents()
runOnUiThread {
LoghubUtils.commitSavedLoghubEvents(true)
}
}
// 更新游戏屏蔽信息

View File

@ -0,0 +1,21 @@
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
class BrowserInstallHandler : ChainHandler() {
override fun handleRequest(context: Context, gameEntity: GameEntity) {
BrowserInstallHelper.showBrowserInstallHintDialog(context, gameEntity.isVGame(), object : EmptyCallback {
override fun onCallback() {
if (hasNext()) {
getNext()?.handleRequest(context, gameEntity)
} else {
processEndCallback?.invoke(null)
}
}
})
}
}

View File

@ -0,0 +1,18 @@
package com.gh.common.chain
import android.content.Context
import com.gh.common.dialog.CertificationDialog
import com.gh.gamecenter.entity.GameEntity
class CertificationHandler : ChainHandler() {
override fun handleRequest(context: Context, gameEntity: GameEntity) {
CertificationDialog.showCertificationDialog(context, gameEntity) {
if (hasNext()) {
getNext()?.handleRequest(context, gameEntity)
} else {
processEndCallback?.invoke(null)
}
}
}
}

View File

@ -0,0 +1,28 @@
package com.gh.common.chain
class ChainBuilder {
private val handlers: MutableList<ChainHandler> = ArrayList()
private var processEndCallback: ((Any?) -> Unit)? = null
fun setProcessEndCallback(callback: (Any?) -> Unit): ChainBuilder {
processEndCallback = callback
return this
}
fun addHandler(handler: ChainHandler): ChainBuilder {
handlers.add(handler)
return this
}
fun buildHandlerChain(): ChainHandler? {
for (i in handlers.indices) {
handlers[i].processEndCallback = processEndCallback
if (i + 1 < handlers.size) {
handlers[i].setNext(handlers[i + 1])
}
}
return if (handlers.isEmpty()) null else handlers[0]
}
}

View File

@ -0,0 +1,24 @@
package com.gh.common.chain
import android.content.Context
import com.gh.gamecenter.entity.GameEntity
abstract class ChainHandler {
private var next: ChainHandler? = null
var processEndCallback: ((Any?) -> Unit)? = null
fun setNext(next: ChainHandler?) {
this.next = next
}
fun getNext(): ChainHandler? {
return next
}
fun hasNext(): Boolean {
return next != null
}
abstract fun handleRequest(context: Context, gameEntity: GameEntity)
}

View File

@ -0,0 +1,21 @@
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
class CheckDownloadHandler : ChainHandler() {
override fun handleRequest(context: Context, gameEntity: GameEntity) {
val apk = gameEntity.getApk().safelyGetInRelease(0) ?: return
DialogUtils.checkDownload(context, apk.size) { isSubscribe: Boolean ->
if (hasNext()) {
getNext()?.handleRequest(context, gameEntity)
} else {
processEndCallback?.invoke(isSubscribe)
}
}
}
}

View File

@ -0,0 +1,21 @@
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
class CheckStoragePermissionHandler : ChainHandler() {
override fun handleRequest(context: Context, gameEntity: GameEntity) {
PermissionHelper.checkStoragePermissionBeforeAction(context, object : EmptyCallback {
override fun onCallback() {
if (hasNext()) {
getNext()?.handleRequest(context, gameEntity)
} else {
processEndCallback?.invoke(null)
}
}
})
}
}

View File

@ -0,0 +1,23 @@
package com.gh.common.chain
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
class DownloadDialogHelperHandler : ChainHandler() {
override fun handleRequest(context: Context, gameEntity: GameEntity) {
val apk = gameEntity.getApk().safelyGetInRelease(0) ?: return
DownloadDialogHelper.findAvailableDialogAndShow(context, gameEntity, apk, object : EmptyCallback {
override fun onCallback() {
if (hasNext()) {
getNext()?.handleRequest(context, gameEntity)
} else {
processEndCallback?.invoke(null)
}
}
})
}
}

View File

@ -0,0 +1,19 @@
package com.gh.common.chain
import android.content.Context
import androidx.appcompat.app.AppCompatActivity
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.gamedetail.dialog.GamePermissionDialogFragment
class GamePermissionHandler : ChainHandler() {
override fun handleRequest(context: Context, gameEntity: GameEntity) {
GamePermissionDialogFragment.show((context as AppCompatActivity), gameEntity, gameEntity.info) {
if (hasNext()) {
getNext()?.handleRequest(context, gameEntity)
} else {
processEndCallback?.invoke(null)
}
}
}
}

View File

@ -0,0 +1,18 @@
package com.gh.common.chain
import android.content.Context
import com.gh.common.util.DialogUtils
import com.gh.gamecenter.entity.GameEntity
class OverseaDownloadHandler : ChainHandler() {
override fun handleRequest(context: Context, gameEntity: GameEntity) {
DialogUtils.showOverseaDownloadDialog(context, gameEntity) {
if (hasNext()) {
getNext()?.handleRequest(context, gameEntity)
} else {
processEndCallback?.invoke(null)
}
}
}
}

View File

@ -0,0 +1,19 @@
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
class PackageCheckHandler : ChainHandler() {
override fun handleRequest(context: Context, gameEntity: GameEntity) {
PackageCheckDialogFragment.show((context as AppCompatActivity), gameEntity) {
if (hasNext()) {
getNext()?.handleRequest(context, gameEntity)
} else {
processEndCallback?.invoke(null)
}
}
}
}

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.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

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

View File

@ -0,0 +1,18 @@
package com.gh.common.chain
import android.content.Context
import com.gh.common.util.DialogUtils
import com.gh.gamecenter.entity.GameEntity
class VersionNumberHandler : ChainHandler() {
override fun handleRequest(context: Context, gameEntity: GameEntity) {
DialogUtils.showVersionNumberDialog(context, gameEntity) {
if (hasNext()) {
getNext()?.handleRequest(context, gameEntity)
} else {
processEndCallback?.invoke(null)
}
}
}
}

View File

@ -8,6 +8,7 @@ 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;
@ -20,10 +21,13 @@ 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.eventbus.EBReuse;
import com.gh.gamecenter.common.eventbus.EBReuse;
import com.gh.gamecenter.entity.SimulatorEntity;
import com.gh.gamecenter.entity.VSetting;
import com.gh.gamecenter.common.retrofit.BiResponse;
import com.gh.gamecenter.common.retrofit.Response;
import com.gh.gamecenter.retrofit.RetrofitManager;
import com.gh.vspace.VHelper;
import com.halo.assistant.HaloApp;
import com.lightgame.utils.Utils;
@ -44,6 +48,7 @@ public class Config {
// 这个 API_HOST 在测试包里会随着选择的环境切换,正式包里会一直保持正式 host
public static final String API_HOST = EnvHelper.getHost();
public static final String NEW_API_HOST = EnvHelper.getNewHost();
public static final String VAPI_HOST = EnvHelper.getVHost();
// Third-Party confs
public static final String WECHAT_APPID = BuildConfig.WECHAT_APPID;
@ -59,6 +64,10 @@ public class Config {
private static SettingsEntity mSettingsEntity;
private static NewSettingsEntity mNewSettingsEntity;
private static NewSettingsEntity.NightMode mNightModeSetting;
private static SimulatorEntity mNewSimulatorEntity;
private static VSetting mVSetting;
private static GameGuidePopupEntity mGameGuidePopupEntity;
private static SharedPreferences mDefaultSharedPreferences;
@ -87,7 +96,6 @@ public class Config {
}
public static boolean isShowDownload(String gameId) {
if (getPreferences().getBoolean(FIX_DOWNLOAD_KEY, false)) return true;
@ -112,6 +120,17 @@ public class Config {
return false;
}
/**
* 是否启用畅玩游戏
*/
public static boolean isVGameEnabled() {
if (getSettings() == null) {
return false;
}
return !"off".equals(getSettings().getGameSmooth());
}
public static boolean isShowPlugin(String gameId) {
SharedPreferences preferences = getPreferences();
@ -177,11 +196,15 @@ public class Config {
getPreferences().edit().putString(SETTINGS_KEY, GsonUtils.toJson(settingsEntity)).apply();
mSettingsEntity = settingsEntity;
// 更新 FIX_ARTICLE_KEY 状态
// 更新设置状态
mSettingsEntity.showArticleEntrance();
mSettingsEntity.showCommunityEntrance();
// 加载完设置后刷新下
PackageHelper.initList();
// 初始化畅玩相关的东西
VHelper.init(HaloApp.getInstance());
}
@Nullable
@ -199,6 +222,29 @@ public class Config {
return mSettingsEntity;
}
//新模拟器
@Nullable
public static SimulatorEntity getNewSimulatorEntitySetting() {
if (mNewSimulatorEntity != null) {
return mNewSimulatorEntity;
} else if (mNewSettingsEntity != null && mNewSettingsEntity.getSimulator() != null) {
return mNewSettingsEntity.getSimulator();
} else {
return null;
}
}
@Nullable
public static NewSettingsEntity.NightMode getNightModeSetting() {
if (mNightModeSetting != null) {
return mNightModeSetting;
} else if (mNewSettingsEntity != null && mNewSettingsEntity.getNightMode() != null) {
return mNewSettingsEntity.getNightMode();
} else {
return null;
}
}
@Nullable
public static NewSettingsEntity getNewSettingsEntity() {
if (mNewSettingsEntity == null) {
@ -214,6 +260,21 @@ public class Config {
return mNewSettingsEntity;
}
@Nullable
public static VSetting getVSettingEntity() {
if (mVSetting == null) {
try {
String json = SPUtils.getString(Constants.SP_V_SETTINGS);
if (!TextUtils.isEmpty(json)) {
mVSetting = GsonUtils.fromJson(json, VSetting.class);
}
} catch (Exception e) {
e.printStackTrace();
}
}
return mVSetting;
}
@Nullable
public static GameGuidePopupEntity getGameGuidePopupEntity() {
return mGameGuidePopupEntity;
@ -242,7 +303,7 @@ public class Config {
public static SharedPreferences getPreferences() {
if (mDefaultSharedPreferences == null) {
mDefaultSharedPreferences = PreferenceManager.getDefaultSharedPreferences(HaloApp.getInstance().getApplication());
mDefaultSharedPreferences = PreferenceManager.getDefaultSharedPreferences(HaloApp.getInstance().getApplication());
}
return mDefaultSharedPreferences;
@ -303,10 +364,51 @@ 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));
}
});
if (mVSetting == null) {
RetrofitManager.getInstance()
.getVApi().getSettings(BuildConfig.VERSION_NAME)
.subscribeOn(Schedulers.io())
.subscribe(new BiResponse<VSetting>() {
@Override
public void onSuccess(VSetting data) {
mVSetting = data;
SPUtils.setString(Constants.SP_V_SETTINGS, GsonUtils.toJson(data));
}
});
}
if (mNightModeSetting == null && mNewSimulatorEntity == null) {
RetrofitManager.getInstance()
.getNewApi().getNewSettings(PackageUtils.getGhVersionName(), channel)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new BiResponse<NewSettingsEntity>() {
@Override
public void onSuccess(NewSettingsEntity 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.setSimulator(mNewSimulatorEntity);
mNewSettingsEntity.setNightMode(mNightModeSetting);
SPUtils.setString(Constants.SP_NEW_SETTINGS, GsonUtils.toJson(data));
}
}
});
}
RetrofitManager.getInstance()
.getApi().getGameGuidePopup(Build.MANUFACTURER, Build.VERSION.RELEASE, Build.MODEL, channel, BuildConfig.VERSION_NAME)
.subscribeOn(Schedulers.io())

View File

@ -67,7 +67,7 @@ object AddKaiFuBindingAdapter {
binding.kaifuAddServerName.hint = "点击填写"
}
}
binding.kaifuAddFirstName.addTextChangedListener(object :TextWatcher{
binding.kaifuAddFirstName.addTextChangedListener(object : TextWatcher {
override fun beforeTextChanged(
s: CharSequence?,
start: Int,
@ -77,7 +77,7 @@ object AddKaiFuBindingAdapter {
}
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
if (!s.isNullOrEmpty()){
if (!s.isNullOrEmpty()) {
popupWindow?.dismiss()
}
}
@ -104,12 +104,14 @@ object AddKaiFuBindingAdapter {
val format = SimpleDateFormat(pattern, Locale.CHINA)
view.setText(format.format(time * 1000))
if (position == 0) {
view.append(if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) Html.fromHtml(
String.format(
"<font color='#2496FF'>%1\$s</font>",
"&nbsp+"
), Html.FROM_HTML_MODE_LEGACY
) else Html.fromHtml(String.format("<font color='#2496FF'>%1\$s</font>", "&nbsp+")))
view.append(
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) Html.fromHtml(
String.format(
"<font color='#2496FF'>%1\$s</font>",
"&nbsp+"
), Html.FROM_HTML_MODE_LEGACY
) else Html.fromHtml(String.format("<font color='#2496FF'>%1\$s</font>", "&nbsp+"))
)
}
}
}

View File

@ -19,17 +19,27 @@ import androidx.core.content.ContextCompat;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.facebook.drawee.view.SimpleDraweeView;
import com.gh.common.chain.BrowserInstallHandler;
import com.gh.common.chain.CertificationHandler;
import com.gh.common.chain.ChainBuilder;
import com.gh.common.chain.ChainHandler;
import com.gh.common.chain.CheckDownloadHandler;
import com.gh.common.chain.DownloadDialogHelperHandler;
import com.gh.common.chain.GamePermissionHandler;
import com.gh.common.chain.OverseaDownloadHandler;
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.dialog.CertificationDialog;
import com.gh.common.dialog.PackageCheckDialogFragment;
import com.gh.common.exposure.ExposureEvent;
import com.gh.common.filter.RegionSetting;
import com.gh.common.filter.RegionSettingHelper;
import com.gh.common.history.HistoryHelper;
import com.gh.common.repository.ReservationRepository;
import com.gh.common.simulator.SimulatorDownloadManager;
import com.gh.common.simulator.SimulatorGameManager;
import com.gh.common.util.CheckLoginUtils;
import com.gh.common.util.DialogUtils;
import com.gh.common.util.DownloadDialogHelper;
import com.gh.common.util.GameUtils;
import com.gh.common.util.GameViewUtils;
import com.gh.common.util.LogUtils;
@ -37,21 +47,19 @@ 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.common.util.RealNameHelper;
import com.gh.common.util.ReservationHelper;
import com.gh.common.view.DownloadProgressBar;
import com.gh.common.view.DownloadButton;
import com.gh.common.view.GameIconView;
import com.gh.download.DownloadManager;
import com.gh.download.dialog.DownloadDialog;
import com.gh.download.server.BrowserInstallHelper;
import com.gh.gamecenter.DownloadManagerActivity;
import com.gh.gamecenter.R;
import com.gh.gamecenter.WebActivity;
import com.gh.gamecenter.baselist.LoadStatus;
import com.gh.gamecenter.common.baselist.LoadStatus;
import com.gh.gamecenter.common.callback.OnViewClickListener;
import com.gh.gamecenter.common.utils.ExtensionsKt;
import com.gh.gamecenter.common.utils.ImageUtils;
import com.gh.gamecenter.common.utils.NightModeUtils;
import com.gh.gamecenter.common.utils.DarkModeUtils;
import com.gh.gamecenter.common.view.DrawableView;
import com.gh.gamecenter.core.utils.DisplayUtils;
import com.gh.gamecenter.core.utils.MtaHelper;
@ -59,15 +67,17 @@ 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.entity.LinkEntity;
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.eventbus.EBReuse;
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.vspace.VDownloadManagerActivity;
import com.gh.vspace.VHelper;
import com.lightgame.download.DownloadEntity;
import com.lightgame.download.FileUtils;
import com.lightgame.utils.Utils;
@ -331,7 +341,7 @@ public class BindingAdapters {
}
// 大图下的进度条
public static void setDownloadButton(DownloadProgressBar progressBar,
public static void setDownloadButton(DownloadButton progressBar,
GameEntity gameEntity,
ExposureEvent traceEvent,
@Nullable View.OnClickListener clickCallBack,
@ -354,62 +364,77 @@ public class BindingAdapters {
// 点击事件
progressBar.setOnClickListener(v -> {
if (clickCallBack != null) clickCallBack.onClick(v);
switch (progressBar.getDownloadType()) {
switch (progressBar.getButtonStyle()) {
case DOWNLOADING_PLUGIN:
case DOWNLOADING_NORMAL:
Intent intent = DownloadManagerActivity.getDownloadMangerIntent(v.getContext(),
gameEntity.getApk().get(0).getUrl(), entrance);
v.getContext().startActivity(intent);
if (gameEntity.isVGame()) {
v.getContext().startActivity(VDownloadManagerActivity.getIntent(v.getContext(), true));
} else {
Intent intent = DownloadManagerActivity.getDownloadMangerIntent(v.getContext(),
gameEntity.getApk().get(0).getUrl(), entrance);
v.getContext().startActivity(intent);
}
break;
case NONE:
Utils.toast(v.getContext(), "该游戏已关闭下载");
break;
case NORMAL:
case PLUGIN:
if (gameEntity.getApk().size() == 1) {
ApkEntity apk = gameEntity.getApk().get(0);
DownloadEntity downloadEntity = SimulatorGameManager.findDownloadEntityByUrl(apk.getUrl());
if (gameEntity.getSimulator() != null) {
boolean isInstalled = PackageUtils.isInstalledFromAllPackage(v.getContext(), gameEntity.getSimulator().getApk().getPackageName());
if (downloadEntity != null && SimulatorGameManager.isSimulatorGame(gameEntity) && !isInstalled) {
SimulatorDownloadManager.getInstance().showDownloadDialog(v.getContext(), gameEntity.getSimulator(),
SimulatorDownloadManager.SimulatorLocation.LAUNCH, gameEntity.getId(), gameEntity.getName(), null);
return;
final RegionSetting.GameH5Download gameH5Download = RegionSettingHelper.getGameH5DownloadByGameId(gameEntity.getId());
if (gameH5Download != null) {
DialogUtils.showGameH5DownloadDialog(v.getContext(), gameEntity, gameH5Download);
} else {
if (gameEntity.getApk().size() == 1) {
ApkEntity apk = gameEntity.getApk().get(0);
DownloadEntity downloadEntity = SimulatorGameManager.findDownloadEntityByUrl(apk.getUrl());
if (gameEntity.getSimulator() != null) {
boolean isInstalled = PackageUtils.isInstalledFromAllPackage(v.getContext(), gameEntity.getSimulator().getApk().getPackageName());
if (downloadEntity != null && SimulatorGameManager.isSimulatorGame(gameEntity) && !isInstalled) {
SimulatorDownloadManager.getInstance().showDownloadDialog(v.getContext(), gameEntity.getSimulator(),
SimulatorDownloadManager.SimulatorLocation.LAUNCH, gameEntity.getId(), gameEntity.getName(), null);
return;
}
}
ChainBuilder builder = new ChainBuilder();
builder.addHandler(new ValidateVSpaceHandler());
builder.addHandler(new GamePermissionHandler());
builder.addHandler(new BrowserInstallHandler());
builder.addHandler(new PackageCheckHandler());
builder.addHandler(new DownloadDialogHelperHandler());
builder.addHandler(new CertificationHandler());
builder.addHandler(new VersionNumberHandler());
builder.addHandler(new OverseaDownloadHandler());
builder.addHandler(new CheckDownloadHandler());
builder.setProcessEndCallback(o -> {
download(progressBar, gameEntity, traceEvent, (boolean) o, entrance, location);
return null;
});
final ChainHandler chainHandler = builder.buildHandlerChain();
if (chainHandler != null) {
chainHandler.handleRequest(v.getContext(), gameEntity);
}
} else {
ChainBuilder builder = new ChainBuilder();
builder.addHandler(new GamePermissionHandler());
builder.addHandler(new CertificationHandler());
builder.addHandler(new VersionNumberHandler());
builder.setProcessEndCallback(o -> {
DownloadDialog.showDownloadDialog(
v.getContext(),
gameEntity,
traceEvent,
entrance,
location + ":" + gameEntity.getName());
return null;
});
final ChainHandler chainHandler = builder.buildHandlerChain();
if (chainHandler != null) {
chainHandler.handleRequest(v.getContext(), gameEntity);
}
}
RealNameHelper.checkIfAuth(v.getContext(), gameEntity, () -> {
GamePermissionDialogFragment.show((AppCompatActivity) v.getContext(), gameEntity, gameEntity.getInfo(), () -> {
BrowserInstallHelper.showBrowserInstallHintDialog(v.getContext(), () -> {
PackageCheckDialogFragment.show((AppCompatActivity) v.getContext(), gameEntity, () -> {
DownloadDialogHelper.findAvailableDialogAndShow(v.getContext(), gameEntity, apk, () -> {
CertificationDialog.showCertificationDialog(v.getContext(), gameEntity, () -> {
DialogUtils.showVersionNumberDialog(v.getContext(), gameEntity, () -> {
DialogUtils.showOverseaDownloadDialog(v.getContext(), gameEntity, () -> {
DialogUtils.checkDownload(v.getContext(), apk.getSize(),
isSubscribe -> download(progressBar, gameEntity, traceEvent, isSubscribe, entrance, location));
});
});
});
});
});
});
});
});
} else {
RealNameHelper.checkIfAuth(v.getContext(), gameEntity, () -> {
GamePermissionDialogFragment.show((AppCompatActivity) v.getContext(), gameEntity, gameEntity.getInfo(), () -> {
CertificationDialog.showCertificationDialog(v.getContext(), gameEntity, () -> {
DialogUtils.showVersionNumberDialog(v.getContext(), gameEntity, () -> {
DownloadDialog.showDownloadDialog(
v.getContext(),
gameEntity,
traceEvent,
entrance,
location + ":" + gameEntity.getName());
});
});
});
});
}
break;
case LAUNCH_OR_OPEN:
@ -428,6 +453,12 @@ public class BindingAdapters {
}
return;
}
if (gameEntity.isVGame()) {
VHelper.installOrLaunch((AppCompatActivity) v.getContext(), gameEntity.getApk().get(0).getPackageName());
return;
}
PackageUtils.launchApplicationByPackageName(v.getContext(), gameEntity.getApk().get(0).getPackageName());
} else {
DownloadDialog.showDownloadDialog(
@ -441,20 +472,25 @@ public class BindingAdapters {
case INSTALL_PLUGIN:
case INSTALL_NORMAL:
if (gameEntity.getApk().size() == 1) {
DownloadEntity downloadEntity = DownloadManager.getInstance().getDownloadEntitySnapshotByUrl(gameEntity.getApk().get(0).getUrl());
DownloadEntity downloadEntity = DownloadManager.getInstance().getDownloadEntitySnapshot(gameEntity);
String packageName = gameEntity.getApk().get(0).getPackageName();
if (gameEntity.isVGame()) {
VHelper.installOrLaunch(v.getContext(), packageName);
return;
}
if (downloadEntity != null) {
PackageInstaller.install(v.getContext(), downloadEntity);
}
}
break;
case RESERVABLE:
RealNameHelper.checkIfAuth(v.getContext(), gameEntity, () -> {
GamePermissionDialogFragment.show((AppCompatActivity) v.getContext(), gameEntity, gameEntity.getInfo(), () -> {
CheckLoginUtils.checkLogin(progressBar.getContext(), "", () -> {
ReservationHelper.reserve(v.getContext(), gameEntity.getId(), () -> {
LogUtils.logReservation(gameEntity, traceEvent);
updateReservation(progressBar, gameEntity);
});
GamePermissionDialogFragment.show((AppCompatActivity) v.getContext(), gameEntity, gameEntity.getInfo(), () -> {
CheckLoginUtils.checkLogin(progressBar.getContext(), "", () -> {
ReservationHelper.reserve(v.getContext(), gameEntity.getId(), () -> {
LogUtils.logReservation(gameEntity, traceEvent);
updateReservation(progressBar, gameEntity);
});
});
});
@ -498,10 +534,10 @@ public class BindingAdapters {
if (gameEntity.isReservable()) {
if (!ReservationRepository.thisGameHasBeenReserved(gameEntity.getId())) {
progressBar.setText("预约");
progressBar.setDownloadType(DownloadProgressBar.DownloadType.RESERVABLE);
progressBar.setButtonStyle(DownloadButton.ButtonStyle.RESERVABLE);
} else {
progressBar.setText("已预约");
progressBar.setDownloadType(DownloadProgressBar.DownloadType.RESERVED);
progressBar.setButtonStyle(DownloadButton.ButtonStyle.RESERVED);
}
return;
}
@ -516,17 +552,17 @@ public class BindingAdapters {
} else {
progressBar.setText("查看");
}
progressBar.setDownloadType(DownloadProgressBar.DownloadType.H5_GAME);
progressBar.setButtonStyle(DownloadButton.ButtonStyle.H5_GAME);
} else {
if (offStatus != null && "dialog".equals(offStatus)) {
progressBar.setText("查看");
progressBar.setDownloadType(DownloadProgressBar.DownloadType.NONE);
progressBar.setButtonStyle(DownloadButton.ButtonStyle.NONE);
} else if ("updating".equals(offStatus)) {
progressBar.setText("更新中");
progressBar.setDownloadType(DownloadProgressBar.DownloadType.UPDATING);
progressBar.setButtonStyle(DownloadButton.ButtonStyle.UPDATING);
} else {
progressBar.setText("暂无");
progressBar.setDownloadType(DownloadProgressBar.DownloadType.NONE);
progressBar.setButtonStyle(DownloadButton.ButtonStyle.NONE);
}
}
@ -534,14 +570,14 @@ public class BindingAdapters {
String status = GameUtils.getDownloadBtnText(progressBar.getContext(), gameEntity, PluginLocation.only_game);
switch (status) {
case "插件化":
progressBar.setDownloadType(DownloadProgressBar.DownloadType.PLUGIN);
progressBar.setButtonStyle(DownloadButton.ButtonStyle.PLUGIN);
break;
case "打开":
case "启动":
progressBar.setDownloadType(DownloadProgressBar.DownloadType.LAUNCH_OR_OPEN);
progressBar.setButtonStyle(DownloadButton.ButtonStyle.LAUNCH_OR_OPEN);
break;
default:
progressBar.setDownloadType(DownloadProgressBar.DownloadType.NORMAL);
progressBar.setButtonStyle(DownloadButton.ButtonStyle.NORMAL);
break;
}
progressBar.setText(status);
@ -549,7 +585,7 @@ public class BindingAdapters {
// 显示下载过程状态
if (gameEntity.getApk().size() == 1) {
DownloadEntity downloadEntity = DownloadManager.getInstance().getDownloadEntitySnapshotByUrl(gameEntity.getApk().get(0).getUrl());
DownloadEntity downloadEntity = DownloadManager.getInstance().getDownloadEntitySnapshot(gameEntity);
if (downloadEntity != null) {
progressBar.setProgress((int) (downloadEntity.getPercent() * 10));
switch (downloadEntity.getStatus()) {
@ -560,18 +596,18 @@ public class BindingAdapters {
case waiting:
progressBar.setText(R.string.downloading);
if (downloadEntity.isPluggable() && PackagesManager.INSTANCE.isInstalled(downloadEntity.getPackageName())) {
progressBar.setDownloadType(DownloadProgressBar.DownloadType.DOWNLOADING_PLUGIN);
progressBar.setButtonStyle(DownloadButton.ButtonStyle.DOWNLOADING_PLUGIN);
} else {
progressBar.setDownloadType(DownloadProgressBar.DownloadType.DOWNLOADING_NORMAL);
progressBar.setButtonStyle(DownloadButton.ButtonStyle.DOWNLOADING_NORMAL);
}
break;
case done:
progressBar.setText(R.string.install);
if (downloadEntity.isPluggable()
&& PackagesManager.INSTANCE.isInstalled(downloadEntity.getPackageName())) {
progressBar.setDownloadType(DownloadProgressBar.DownloadType.INSTALL_PLUGIN);
progressBar.setButtonStyle(DownloadButton.ButtonStyle.INSTALL_PLUGIN);
} else {
progressBar.setDownloadType(DownloadProgressBar.DownloadType.INSTALL_NORMAL);
progressBar.setButtonStyle(DownloadButton.ButtonStyle.INSTALL_NORMAL);
}
break;
case cancel:
@ -580,6 +616,7 @@ public class BindingAdapters {
case uncertificated:
case unqualified:
case unavailable:
case banned:
break;
default:
break;
@ -592,7 +629,7 @@ public class BindingAdapters {
* 当页面完全重建时若存在重建的DialogFragment则需要手动恢复该DialogFragment之前配置的回调(因为DialogFragment重建时只会从arguments中获取之前的配置内容
* 而arguments无法传递回调)或者dismiss该DialogFragment
*/
private static void restoreDialogFragment(DownloadProgressBar progressBar) {
private static void restoreDialogFragment(DownloadButton progressBar) {
GamePermissionDialogFragment gamePermissionDialogFragment =
((GamePermissionDialogFragment) ((AppCompatActivity) progressBar.getContext()).getSupportFragmentManager().findFragmentByTag(GamePermissionDialogFragment.class.getName()));
if (gamePermissionDialogFragment != null) {
@ -618,28 +655,28 @@ public class BindingAdapters {
}*/
private static void updateReservation(DownloadProgressBar progressBar, GameEntity gameEntity) {
private static void updateReservation(DownloadButton progressBar, GameEntity gameEntity) {
// 显示预约
if (gameEntity.isReservable()) {
if (!ReservationRepository.thisGameHasBeenReserved(gameEntity.getId())) {
progressBar.setText("预约");
progressBar.setDownloadType(DownloadProgressBar.DownloadType.RESERVABLE);
progressBar.setButtonStyle(DownloadButton.ButtonStyle.RESERVABLE);
} else {
progressBar.setText("已预约");
progressBar.setDownloadType(DownloadProgressBar.DownloadType.RESERVED);
progressBar.setButtonStyle(DownloadButton.ButtonStyle.RESERVED);
}
}
}
// 开始下载
private static void download(DownloadProgressBar progressBar,
private static void download(DownloadButton progressBar,
GameEntity gameEntity,
ExposureEvent traceEvent,
boolean isSubscribe,
String entrance,
String location) {
String str = progressBar.getText();
String str = progressBar.getText().toString();
String method;
if (str.contains("更新")) {
method = "更新";
@ -661,8 +698,8 @@ public class BindingAdapters {
traceEvent);
progressBar.setProgress(0);
progressBar.setDownloadType("插件化".equals(method) ?
DownloadProgressBar.DownloadType.DOWNLOADING_PLUGIN : DownloadProgressBar.DownloadType.DOWNLOADING_NORMAL);
progressBar.setButtonStyle("插件化".equals(method) ?
DownloadButton.ButtonStyle.DOWNLOADING_PLUGIN : DownloadButton.ButtonStyle.DOWNLOADING_NORMAL);
} else {
Utils.toast(progressBar.getContext(), msg);
}
@ -693,16 +730,16 @@ public class BindingAdapters {
tagStyle.add(typeTag);
} else {
TagStyleEntity typeTag = new TagStyleEntity();
boolean isNightMode = NightModeUtils.INSTANCE.isNightMode(layout.getContext());
boolean isDarkModeOn = DarkModeUtils.INSTANCE.isDarkModeOn(layout.getContext());
typeTag.setName(test.getType() != null ? test.getType() : "");
typeTag.setBackground("1AFFA142");
typeTag.setColor(isNightMode ? "EB9238" : "FFA142");
typeTag.setColor(isDarkModeOn ? "EB9238" : "FFA142");
tagStyle.add(typeTag);
TagStyleEntity timeTag = new TagStyleEntity();
timeTag.setName(GameViewUtils.getGameTestDate(test.getStart()));
timeTag.setBackground("1A06CEA8");
timeTag.setColor(isNightMode ? "07A385" : "06CEA8");
timeTag.setColor(isDarkModeOn ? "07A385" : "06CEA8");
tagStyle.add(timeTag);
}
} else {
@ -775,7 +812,7 @@ public class BindingAdapters {
public static void setCommunityVideoDuration(TextView mVideoDuration, List<CommunityVideoEntity> videos) {
if (videos != null && videos.size() > 0) {
CommunityVideoEntity videoEntity = videos.get(0);
mVideoDuration.setBackground(DrawableView.getOvalDrawable(R.color.black_alpha_80, 999F));
mVideoDuration.setBackground(DrawableView.getOvalDrawable(R.color.black_alpha_50, 999F));
mVideoDuration.setText(videoEntity.getDuration());
mVideoDuration.setVisibility(View.VISIBLE);
} else {

View File

@ -6,13 +6,13 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import com.gh.gamecenter.common.base.fragment.BaseDialogFragment
import com.gh.common.util.DirectUtils
import com.gh.gamecenter.R
import com.gh.gamecenter.common.base.fragment.BaseDialogFragment
import com.gh.gamecenter.common.constant.EntranceConsts
import com.gh.gamecenter.core.utils.SpanBuilder
import com.gh.gamecenter.common.utils.dip2px
import com.gh.gamecenter.common.view.CustomLinkMovementMethod
import com.gh.gamecenter.R
import com.gh.gamecenter.core.utils.SpanBuilder
import com.gh.gamecenter.databinding.DialogApplyModeratorBinding
@ -45,7 +45,13 @@ class ApplyModeratorDialogFragment : BaseDialogFragment() {
val startText = "版主考核群:"
val text = "$startText$mGroupNumber\n感谢你对论坛建设的支持\n请加入版主考核群并联系群主进行版主资格考核"
binding.desTv.text = SpanBuilder(text)
.click(startText.length, startText.length + mGroupNumber.length, R.color.theme_font,true) {
.click(
requireContext(),
startText.length,
startText.length + mGroupNumber.length,
R.color.theme_font,
true
) {
DirectUtils.directToQqGroup(
requireContext(),
mGroupKey

View File

@ -27,13 +27,18 @@ 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.manager.UserManager
import com.gh.gamecenter.login.user.UserManager
import com.google.gson.reflect.TypeToken
import com.halo.assistant.fragment.user.UserInfoEditFragment
import com.lightgame.utils.AppManager
class CertificationDialog(context: Context, private val authDialogEntity: AuthDialogEntity, val gameId: String, val listener: ConfirmListener) :
Dialog(context, R.style.GhAlertDialog) {
class CertificationDialog(
context: Context,
private val authDialogEntity: AuthDialogEntity,
val gameId: String,
val listener: ConfirmListener
) :
Dialog(context, R.style.GhAlertDialog) {
private lateinit var view: View
private lateinit var detailedDesTv: TextView
@ -119,8 +124,10 @@ class CertificationDialog(context: Context, private val authDialogEntity: AuthDi
private fun gotoLoginPage() {
val currentActivity = AppManager.getInstance().currentActivity() ?: return
CheckLoginUtils.checkLogin(currentActivity as AppCompatActivity,
null, true, "实名认证弹窗") {
CheckLoginUtils.checkLogin(
currentActivity as AppCompatActivity,
null, true, "实名认证弹窗"
) {
if (UserManager.getInstance().isAuth) {
listener.onConfirm()
dismiss()

View File

@ -8,7 +8,6 @@ import android.os.Build
import android.os.Bundle
import android.os.Handler
import android.os.Message
import android.preference.PreferenceManager
import android.view.LayoutInflater
import android.view.MotionEvent
import android.view.View
@ -41,7 +40,8 @@ import java.lang.ref.WeakReference
/**
* 设备提醒弹窗
*/
class DeviceRemindDialog(context: Context, val entity: DeviceDialogEntity, val gameEntity: GameEntity) : Dialog(context, R.style.GhAlertDialog) {
class DeviceRemindDialog(context: Context, val entity: DeviceDialogEntity, val gameEntity: GameEntity) :
Dialog(context, R.style.GhAlertDialog) {
private val mBinding: DialogDeviceRemindBinding by lazy { DialogDeviceRemindBinding.inflate(layoutInflater) }
private var currentPage = 0
private var mSlideLooperInterval = 3000L
@ -53,8 +53,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 sp = PreferenceManager.getDefaultSharedPreferences(getContext())
val autoInstall = sp.getBoolean(AUTO_INSTALL_SP_KEY, true)
val autoInstall = SPUtils.getBoolean(AUTO_INSTALL_SP_KEY, true)
if (autoInstall) {
dismiss()
}
@ -80,7 +79,8 @@ class DeviceRemindDialog(context: Context, val entity: DeviceDialogEntity, val g
val type = object : TypeToken<List<DeviceDialogEntity>>() {}.type
val entities = GsonUtils.gson.fromJson<List<DeviceDialogEntity>>(datas, type)
//1.判断设备是否匹配
val entity = entities.find { it.manufacturer.toLowerCase().startsWith(Build.MANUFACTURER.toLowerCase()) }
val entity =
entities.find { it.manufacturer.toLowerCase().startsWith(Build.MANUFACTURER.toLowerCase()) }
?: return Pair(false, null)
//2.判断游戏不含剔除标签
gameEntity.tagStyle.forEach {
@ -191,7 +191,9 @@ class DeviceRemindDialog(context: Context, val entity: DeviceDialogEntity, val g
inner class BannerAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
return object : RecyclerView.ViewHolder(LayoutInflater.from(context).inflate(R.layout.item_device_remind_banner, parent, false)) {}
return object : RecyclerView.ViewHolder(
LayoutInflater.from(context).inflate(R.layout.item_device_remind_banner, parent, false)
) {}
}
override fun getItemCount(): Int = if (mDatas.size == 1) mDatas.size else Int.MAX_VALUE

View File

@ -31,9 +31,9 @@ class GameOffServiceDialogFragment : BaseDialogFragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
return DialogGameOffServiceBinding
.inflate(inflater)
.apply { mBinding = this }
.root
.inflate(inflater)
.apply { mBinding = this }
.root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
@ -52,16 +52,19 @@ class GameOffServiceDialogFragment : BaseDialogFragment() {
notEmptySite.forEachIndexed { index, site ->
val siteTv = TextView(context)
siteTv.layoutParams = LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT).apply {
siteTv.layoutParams = LinearLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT
).apply {
topMargin = 24F.dip2px()
if (index == notEmptySite.size - 1) bottomMargin = 8F.dip2px()
}
siteTv.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14F)
siteTv.setTextColor(R.color.theme_font.toColor())
siteTv.setTextColor(R.color.theme_font.toColor(requireContext()))
siteTv.text = site.text
siteTv.paintFlags = siteTv.paintFlags or Paint.UNDERLINE_TEXT_FLAG
siteTv.setOnClickListener {
// MtaHelper.onEvent("游戏下载状态按钮", getKey(), site.text)
// MtaHelper.onEvent("游戏下载状态按钮", getKey(), site.text)
DirectUtils.directToWebView(requireContext(), site.url, "(关闭下载弹窗)")
dismissAllowingStateLoss()
}

View File

@ -90,7 +90,11 @@ class InstallPermissionDialogFragment : BaseDialogFragment() {
companion object {
@JvmStatic
fun show(activity: AppCompatActivity, downloadEntity: DownloadEntity, callBack: ((isFromPermissionGrantedCallback: Boolean) -> Unit)?) {
fun show(
activity: AppCompatActivity,
downloadEntity: DownloadEntity,
callBack: ((isFromPermissionGrantedCallback: Boolean) -> Unit)?
) {
val isXapk = XapkInstaller.XAPK_EXTENSION_NAME == downloadEntity.path.getExtension()
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
callBack?.invoke(false)
@ -114,7 +118,8 @@ class InstallPermissionDialogFragment : BaseDialogFragment() {
return
}
}
var installPermissionDialogFragment = activity.supportFragmentManager.findFragmentByTag(InstallPermissionDialogFragment::class.java.name) as? InstallPermissionDialogFragment
var installPermissionDialogFragment =
activity.supportFragmentManager.findFragmentByTag(InstallPermissionDialogFragment::class.java.name) as? InstallPermissionDialogFragment
if (installPermissionDialogFragment != null) {
installPermissionDialogFragment.mCallBack = callBack
installPermissionDialogFragment.isXapk = isXapk
@ -128,7 +133,10 @@ class InstallPermissionDialogFragment : BaseDialogFragment() {
this.isXapk = isXapk
this.url = downloadEntity.url
}
installPermissionDialogFragment.show(activity.supportFragmentManager, InstallPermissionDialogFragment::class.java.name)
installPermissionDialogFragment.show(
activity.supportFragmentManager,
InstallPermissionDialogFragment::class.java.name
)
}
}
}

View File

@ -0,0 +1,172 @@
package com.gh.common.dialog
import android.app.Dialog
import android.content.DialogInterface
import android.os.Bundle
import android.text.SpannableStringBuilder
import android.text.Spanned
import android.text.TextPaint
import android.text.style.ClickableSpan
import android.view.*
import androidx.core.content.ContextCompat
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() {
private var mCallBack: ((isSuccess: Boolean) -> Unit)? = null
private val mBinding by lazy { DialogPrivacyProtocolNewBinding.inflate(layoutInflater) }
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View {
return mBinding.root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
updateView()
}
private fun updateView() {
val contentText = SpannableStringBuilder(
"1.您可以通过《光环助手隐私政策》以及《儿童隐私保护声明》,了解我们如何收集、使用、存储、保护、对外提供您的个人信息以及您享有的权利\n" +
"2.您可以通过《接入第三方SDK目录》了解本产品接入的第三方SDK的具体信息\n" +
"3.您可以通过《应用权限列表》了解权限申请与使用情况说明\n" +
"4.如果您是14周岁以下的未成年人您需要和您监护人一起仔细阅读《儿童隐私保护声明》并在征得您监护人同意后使用我们的产品、服务或向我们提供信息"
)
val privacyPolicyText = "《光环助手隐私政策》"
val childrenPrivacyPolicyText = "《儿童隐私保护声明》"
val thirdPartySdkText = "《接入第三方SDK目录》"
val permissionListText = "《应用权限列表》"
val hypertextList = arrayListOf(
privacyPolicyText,
childrenPrivacyPolicyText,
thirdPartySdkText,
permissionListText
)
val positionListPairList = arrayListOf<Pair<Int, Int>>()
for (hypertext in hypertextList) {
var start = 0
var index = 0
while (index != -1) {
index = contentText.indexOf(hypertext, start)
start = index + hypertext.length
if (index != -1) {
positionListPairList.add(Pair(index, start))
}
}
}
for (hypertextPositionPair in positionListPairList) {
contentText.setSpan(object : ClickableSpan() {
override fun updateDrawState(ds: TextPaint) {
super.updateDrawState(ds)
ds.color = ContextCompat.getColor(requireContext(), R.color.theme_font)
ds.isUnderlineText = false
}
override fun onClick(widget: View) {
val privacyPolicyUrl = requireContext().getString(R.string.privacy_policy_url)
val childrenPrivacyPolicyUrl = requireContext().getString(R.string.children_policy_url)
val thirdPartySdkUrl = requireContext().getString(R.string.sdk_list_url)
val permissionListUrl = requireContext().getString(R.string.permission_and_usage_url)
val selectedUrl =
when (contentText.substring(hypertextPositionPair.first, hypertextPositionPair.second)) {
privacyPolicyText -> privacyPolicyUrl
childrenPrivacyPolicyText -> childrenPrivacyPolicyUrl
thirdPartySdkText -> thirdPartySdkUrl
permissionListText -> permissionListUrl
else -> ""
}
DirectUtils.directToExternalBrowser(requireContext(), selectedUrl)
}
}, hypertextPositionPair.first, hypertextPositionPair.second, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
}
mBinding.contentTv.movementMethod = CustomLinkMovementMethod.getInstance()
mBinding.contentTv.text = contentText
mBinding.refuseTv.setOnClickListener {
mCallBack?.invoke(false)
dismissAllowingStateLoss()
}
mBinding.agreeTv.setOnClickListener {
mCallBack?.invoke(true)
dismissAllowingStateLoss()
}
}
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val createDialog = super.onCreateDialog(savedInstanceState)
createDialog.setCanceledOnTouchOutside(false)
createDialog.setOnKeyListener(object : DialogInterface.OnKeyListener {
override fun onKey(dialog: DialogInterface?, keyCode: Int, event: KeyEvent?): Boolean {
if (keyCode == KeyEvent.KEYCODE_BACK) {
return true
}
return false
}
})
val window = createDialog.window
window?.setGravity(Gravity.CENTER)
return createDialog
}
override fun onStart() {
super.onStart()
val width = 300F.dip2px()
val height = ViewGroup.LayoutParams.WRAP_CONTENT
dialog?.window?.setLayout(width, height)
}
companion object {
const val KEY_DATA = "data"
@JvmStatic
fun show(
activity: FragmentActivity,
privacyPolicyEntity: DialogEntity.PrivacyPolicyEntity? = null,
callBack: ((isSuccess: Boolean) -> Unit)?
) {
var privacyDialogFragment =
activity.supportFragmentManager.findFragmentByTag(NewPrivacyPolicyDialogFragment::class.java.name) as? NewPrivacyPolicyDialogFragment
if (privacyDialogFragment != null) {
privacyDialogFragment.mCallBack = callBack
val transaction: FragmentTransaction = activity.supportFragmentManager.beginTransaction()
transaction.show(privacyDialogFragment)
transaction.commit()
} else {
privacyDialogFragment = NewPrivacyPolicyDialogFragment().apply {
mCallBack = callBack
}
}
privacyDialogFragment.arguments = Bundle().apply {
put(KEY_DATA, privacyPolicyEntity)
}
privacyDialogFragment.show(
activity.supportFragmentManager,
NewPrivacyPolicyDialogFragment::class.java.name
)
}
}
}

View File

@ -15,21 +15,24 @@ import androidx.fragment.app.FragmentTransaction
import androidx.lifecycle.Lifecycle
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.gh.gamecenter.common.base.BaseRecyclerViewHolder
import com.gh.gamecenter.common.constant.Constants
import com.gh.common.util.*
import com.gh.common.util.DirectUtils
import com.gh.common.util.LogUtils
import com.gh.gamecenter.common.view.CustomLinkMovementMethod
import com.gh.common.util.PackageUtils
import com.gh.download.DownloadManager
import com.gh.gamecenter.R
import com.gh.gamecenter.common.base.BaseRecyclerViewHolder
import com.gh.gamecenter.common.callback.ConfirmListener
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.common.entity.LinkEntity
import com.gh.gamecenter.common.utils.*
import com.gh.gamecenter.core.utils.*
import com.gh.gamecenter.common.view.CustomLinkMovementMethod
import com.gh.gamecenter.core.utils.DisplayUtils
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.LinkEntity
import com.gh.gamecenter.entity.PackageDialogEntity
import com.gh.gamecenter.eventbus.EBPackage
import com.halo.assistant.HaloApp
@ -67,9 +70,14 @@ class PackageCheckDialogFragment : BaseDialogFragment() {
if (detectionObject.packages.contains(packageName)) {
val packageLink = gameEntity?.packageDialog?.links?.find { it.buttonLink }
LogUtils.uploadPackageCheck(
"pkg_check_pop_download", if (DownloadStatus.add == downloadEntity.status) "下载开始" else "下载完成",
gameEntity, packageLink?.text ?: "", packageLink?.title
?: "", downloadEntity.gameId, downloadEntity.getMetaExtra(Constants.GAME_NAME)
"pkg_check_pop_download",
if (DownloadStatus.add == downloadEntity.status) "下载开始" else "下载完成",
gameEntity,
packageLink?.text ?: "",
packageLink?.title
?: "",
downloadEntity.gameId,
downloadEntity.getMetaExtra(Constants.GAME_NAME)
)
}
}
@ -105,10 +113,21 @@ class PackageCheckDialogFragment : BaseDialogFragment() {
val spanBuilder = SpanBuilder(it.linkHintText).build()
it.links.forEachIndexed { index, link ->
val linkSpan = SpanBuilder(link.title ?: "").click(
0, (link.title
?: "").length, R.color.theme_font, true
requireContext(),
0,
(link.title ?: "").length,
R.color.theme_font,
true
) {
LogUtils.uploadPackageCheck("pkg_check_pop_click", "点击链接", gameEntity, link.text, link.title, "", "")
LogUtils.uploadPackageCheck(
"pkg_check_pop_click",
"点击链接",
gameEntity,
link.text,
link.title,
"",
""
)
DirectUtils.directToLinkPage(requireContext(), link, "包名检测弹窗", "")
}.build()
spanBuilder.append(linkSpan)
@ -165,7 +184,15 @@ class PackageCheckDialogFragment : BaseDialogFragment() {
packageLink = entity.links.find { it.buttonLink }
}
if (packageLink != null) {
LogUtils.uploadPackageCheck("pkg_check_pop_click", "点击前往下载", gameEntity, packageLink.text, packageLink.title, "", "")
LogUtils.uploadPackageCheck(
"pkg_check_pop_click",
"点击前往下载",
gameEntity,
packageLink.text,
packageLink.title,
"",
""
)
DirectUtils.directToLinkPage(requireContext(), packageLink, "包名检测弹窗", "")
}
}
@ -318,7 +345,8 @@ class PackageCheckDialogFragment : BaseDialogFragment() {
}
}
class PackageCheckViewHolder(val binding: PackageCheckItemBinding) : BaseRecyclerViewHolder<DetectionObjectEntity>(binding.root)
class PackageCheckViewHolder(val binding: PackageCheckItemBinding) :
BaseRecyclerViewHolder<DetectionObjectEntity>(binding.root)
companion object {
@JvmStatic
@ -365,7 +393,10 @@ class PackageCheckDialogFragment : BaseDialogFragment() {
}
}
private fun checkDetectionsInstalled(allInstalledPackages: List<PackageInfo>, packages: ArrayList<String>): Boolean {
private fun checkDetectionsInstalled(
allInstalledPackages: List<PackageInfo>,
packages: ArrayList<String>
): Boolean {
var isPackagesInstalled = false
packages.forEach { packageName ->
val isInstalled = allInstalledPackages.find { it.packageName == packageName } != null
@ -378,7 +409,10 @@ class PackageCheckDialogFragment : BaseDialogFragment() {
}
fun isAllPackageInstalled(allInstalledPackages: List<PackageInfo>, packageDialogEntity: PackageDialogEntity): Boolean {
fun isAllPackageInstalled(
allInstalledPackages: List<PackageInfo>,
packageDialogEntity: PackageDialogEntity
): Boolean {
var isAllInstalled = true
packageDialogEntity.detectionObjects.forEach loop@{ obj ->
if (!checkDetectionsInstalled(allInstalledPackages, obj.packages)) {

View File

@ -65,7 +65,8 @@ class PrivacyPolicyDialogFragment : BaseDialogFragment() {
}
override fun onClick(widget: View) {
val intent = WebActivity.getIntent(requireContext(), context!!.getString(R.string.privacy_policy_url), true)
val intent =
WebActivity.getIntent(requireContext(), context!!.getString(R.string.privacy_policy_url), true)
context?.startActivity(intent)
}
}, skipText.length - 6, skipText.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
@ -106,7 +107,8 @@ class PrivacyPolicyDialogFragment : BaseDialogFragment() {
}
override fun onClick(widget: View) {
val intent = WebActivity.getIntent(requireContext(), context!!.getString(R.string.privacy_policy_url), true)
val intent =
WebActivity.getIntent(requireContext(), context!!.getString(R.string.privacy_policy_url), true)
context?.startActivity(intent)
}
}, skipText.length - 9, skipText.length - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
@ -164,10 +166,13 @@ class PrivacyPolicyDialogFragment : BaseDialogFragment() {
const val KEY_DATA = "data"
@JvmStatic
fun show(activity: FragmentActivity,
privacyPolicyEntity: DialogEntity.PrivacyPolicyEntity? = null,
callBack: ((isSuccess: Boolean) -> Unit)?) {
var privacyDialogFragment = activity.supportFragmentManager.findFragmentByTag(PrivacyPolicyDialogFragment::class.java.name) as? PrivacyPolicyDialogFragment
fun show(
activity: FragmentActivity,
privacyPolicyEntity: DialogEntity.PrivacyPolicyEntity? = null,
callBack: ((isSuccess: Boolean) -> Unit)?
) {
var privacyDialogFragment =
activity.supportFragmentManager.findFragmentByTag(PrivacyPolicyDialogFragment::class.java.name) as? PrivacyPolicyDialogFragment
if (privacyDialogFragment != null) {
privacyDialogFragment.mCallBack = callBack
val transaction: FragmentTransaction = activity.supportFragmentManager.beginTransaction()

View File

@ -1,62 +0,0 @@
package com.gh.common.exposure
import androidx.room.TypeConverter
import com.gh.gamecenter.common.entity.ExposureEntity
import com.gh.gamecenter.common.exposure.meta.Meta
import com.gh.gamecenter.core.utils.GsonUtils
import java.util.*
import kotlin.collections.ArrayList
class ExposureConverters {
@TypeConverter
fun convertPayload2String(any: ExposureEntity): String {
return GsonUtils.toJson(any)
}
@TypeConverter
fun convertString2Payload(string: String): ExposureEntity {
return GsonUtils.fromJson(string, ExposureEntity::class.java)
}
@TypeConverter
fun convertSource2String(sourceList: List<ExposureSource>): String {
return GsonUtils.toJson(sourceList)
}
@TypeConverter
fun convertString2Source(sourceList: String): List<ExposureSource> {
return ArrayList(Arrays.asList(GsonUtils.fromJson(sourceList, Array<ExposureSource>::class.java))) as List<ExposureSource>
}
@TypeConverter
fun convertETrace2String(sourceList: List<ExposureEvent>?): String {
return GsonUtils.toJson(sourceList)
}
@TypeConverter
fun convertStringToETrace(sourceList: String): List<ExposureEvent> {
return ArrayList(Arrays.asList(GsonUtils.fromJson(sourceList, Array<ExposureEvent>::class.java))) as List<ExposureEvent>
}
@TypeConverter
fun convertExposeType2String(exposureType: ExposureType): String {
return exposureType.toString()
}
@TypeConverter
fun convertStringToExposeType(exposureType: String): ExposureType {
return ExposureType.valueOf(exposureType)
}
@TypeConverter
fun convertMeta2String(any: Meta): String {
return GsonUtils.toJson(any)
}
@TypeConverter
fun convertString2Meta(string: String): Meta {
return GsonUtils.fromJson(string, Meta::class.java)
}
}

View File

@ -1,23 +0,0 @@
package com.gh.common.exposure
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
import androidx.room.TypeConverters
import android.content.Context
@TypeConverters(ExposureConverters::class)
@Database(entities = [ExposureEvent::class], version = 1, exportSchema = false)
abstract class ExposureDatabase : RoomDatabase() {
companion object {
private const val DATABASE = "exposure_database"
fun buildDatabase(context: Context): ExposureDatabase {
return Room.databaseBuilder(context, ExposureDatabase::class.java, DATABASE)
.fallbackToDestructiveMigration()
.build()
}
}
abstract fun logHubEventDao(): ExposureEventDao
}

View File

@ -2,35 +2,135 @@ package com.gh.common.exposure
import android.os.Parcelable
import androidx.annotation.Keep
import androidx.room.Entity
import androidx.room.PrimaryKey
import com.gh.common.exposure.time.TimeUtil
import com.gh.download.server.BrowserInstallHelper
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.common.entity.ExposureEntity
import com.gh.gamecenter.common.exposure.meta.Meta
import com.gh.gamecenter.common.exposure.meta.MetaUtil
import com.gh.common.exposure.time.TimeUtil
import com.gh.gamecenter.common.utils.getFirstElementDividedByDivider
import com.gh.download.server.BrowserInstallHelper
import com.gh.gamecenter.common.entity.ExposureEntity
import com.gh.gamecenter.entity.GameEntity
import com.lightgame.download.DownloadEntity
import com.lightgame.utils.Utils
import kotlinx.parcelize.IgnoredOnParcel
import kotlinx.parcelize.Parcelize
import java.util.*
import kotlin.collections.ArrayList
@Keep
@Parcelize
@Entity(tableName = "exposureEvent")
data class ExposureEvent(
var payload: ExposureEntity,
val source: List<ExposureSource>,
var source: List<ExposureSource>,
var eTrace: List<ExposureEvent>? = arrayListOf(),
val event: ExposureType,
var event: ExposureType,
val meta: Meta = MetaUtil.getMeta(),
val time: Int = TimeUtil.currentTime(),
var time: Int = TimeUtil.currentTime(),
var timeInMillisecond: Long = System.currentTimeMillis(),
@PrimaryKey
val id: String = UUID.randomUUID().toString()
var id: String = UUID.randomUUID().toString(),
) : Parcelable {
@Transient
@IgnoredOnParcel
var next: ExposureEvent? = null
@Transient
@IgnoredOnParcel
var flags = 0
private fun initExposureEventData(
gameEntity: GameEntity?,
source: List<ExposureSource>,
eTrace: List<ExposureEvent>? = null,
event: ExposureType = ExposureType.EXPOSURE
) {
this.payload = ExposureEntity(
gameId = gameEntity?.id?.getFirstElementDividedByDivider(DownloadEntity.GAME_ID_DIVIDER),
gameName = eTrace?.firstOrNull()?.payload?.gameName
?: gameEntity?.name?.removeSuffix(Constants.GAME_NAME_DECORATOR),
gameVersion = eTrace?.firstOrNull()?.payload?.gameVersion
?: gameEntity?.gameVersion,
subjectId = eTrace?.firstOrNull()?.payload?.subjectId
?: gameEntity?.subjectId
?: gameEntity?.subjectData?.id,
isMirrorData = eTrace?.firstOrNull()?.payload?.isMirrorData
?: gameEntity?.shouldUseMirrorInfo() ?: false,
isWebDownload = BrowserInstallHelper.isUseBrowserToInstallEnabled() && BrowserInstallHelper.shouldUseBrowserToInstall(), // 实时的值,不用从 eTrace 里取
sequence = eTrace?.firstOrNull()?.payload?.sequence ?: gameEntity?.sequence,
outerSequence = eTrace?.firstOrNull()?.payload?.outerSequence
?: gameEntity?.outerSequence,
platform = eTrace?.firstOrNull()?.payload?.platform ?: gameEntity?.platform,
downloadType = gameEntity?.downloadType,
downloadCompleteType = gameEntity?.downloadCompleteType,
displayType = eTrace?.firstOrNull()?.payload?.displayType
?: gameEntity?.displayContent,
isPlatformRecommend = gameEntity?.isPlatformRecommend,
// ugly
welcomeDialogId = gameEntity?.welcomeDialogId
?: eTrace?.firstOrNull()?.payload?.welcomeDialogId,
welcomeDialogLinkTitle = gameEntity?.welcomeDialogTitle
?: eTrace?.firstOrNull()?.payload?.welcomeDialogLinkTitle
)
this.id = UUID.randomUUID().toString()
this.timeInMillisecond = System.currentTimeMillis()
this.time = TimeUtil.currentTime()
this.source = source
this.eTrace = eTrace
this.event = event
this.also {
it.payload.categoryId = eTrace?.firstOrNull()?.payload?.categoryId
it.payload.categoryV2Id = eTrace?.firstOrNull()?.payload?.categoryV2Id
it.payload.testServerId = eTrace?.firstOrNull()?.payload?.testServerId
it.payload.blockId = eTrace?.firstOrNull()?.payload?.blockId
it.payload.setContainerInfo(
eTrace?.firstOrNull()?.payload?.containerId ?: gameEntity?.containerId,
eTrace?.firstOrNull()?.payload?.containerType ?: gameEntity?.containerType
)
it.payload.sourcePage = eTrace?.firstOrNull()?.payload?.sourcePage
it.payload.sourcePageId = eTrace?.firstOrNull()?.payload?.sourcePageId
it.payload.sourcePageName = eTrace?.firstOrNull()?.payload?.sourcePageName
gameEntity?.exposureEvent = it
}
}
fun recycle() {
if (inUse()) {
Utils.log(
EXPOSURE_EVENT_LOG_TAG,
"This ExposureEvent $this cannot be recycled because it is still in use."
)
return
}
recycleUnchecked()
}
private fun recycleUnchecked() {
this.flags = FLAG_IN_USE
synchronized(sPoolSync) {
if (sPoolSize < EXPOSURE_EVENT_MAX_POOL_SIZE) {
next = sPool
sPool = this
sPoolSize++
Utils.log(EXPOSURE_EVENT_LOG_TAG, "This ExposureEvent $this Recycled")
}
}
}
private fun inUse(): Boolean {
return flags == FLAG_IN_USE
}
companion object {
private val sPoolSync = Any()
private var sPool: ExposureEvent? = null
private var sPoolSize: Int = 0
private const val EXPOSURE_EVENT_MAX_POOL_SIZE: Int = 300
private const val FLAG_IN_USE = 1
private const val EXPOSURE_EVENT_LOG_TAG = "ExposureEvent"
@JvmStatic
fun createEvent(
@ -42,54 +142,33 @@ data class ExposureEvent(
if (gameEntity?.getApk()?.size == 1) {
gameEntity.gameVersion = gameEntity.getApk().elementAtOrNull(0)?.version ?: ""
}
return ExposureEvent(
payload = ExposureEntity(
gameId = gameEntity?.id?.getFirstElementDividedByDivider(DownloadEntity.GAME_ID_DIVIDER),
gameName = eTrace?.firstOrNull()?.payload?.gameName
?: gameEntity?.name?.removeSuffix(Constants.GAME_NAME_DECORATOR),
gameVersion = eTrace?.firstOrNull()?.payload?.gameVersion
?: gameEntity?.gameVersion,
subjectId = eTrace?.firstOrNull()?.payload?.subjectId
?: gameEntity?.subjectId
?: gameEntity?.subjectData?.id,
isMirrorData = eTrace?.firstOrNull()?.payload?.isMirrorData
?: gameEntity?.shouldUseMirrorInfo() ?: false,
isWebDownload = BrowserInstallHelper.isUseBrowserToInstallEnabled() && BrowserInstallHelper.shouldUseBrowserToInstall(), // 实时的值,不用从 eTrace 里取
sequence = eTrace?.firstOrNull()?.payload?.sequence ?: gameEntity?.sequence,
outerSequence = eTrace?.firstOrNull()?.payload?.outerSequence
?: gameEntity?.outerSequence,
platform = eTrace?.firstOrNull()?.payload?.platform ?: gameEntity?.platform,
downloadType = gameEntity?.downloadType,
downloadCompleteType = gameEntity?.downloadCompleteType,
displayType = eTrace?.firstOrNull()?.payload?.displayType
?: gameEntity?.displayContent,
isPlatformRecommend = gameEntity?.isPlatformRecommend,
// ugly
welcomeDialogId = gameEntity?.welcomeDialogId
?: eTrace?.firstOrNull()?.payload?.welcomeDialogId,
welcomeDialogLinkTitle = gameEntity?.welcomeDialogTitle
?: eTrace?.firstOrNull()?.payload?.welcomeDialogLinkTitle
),
synchronized(sPoolSync) {
if (sPool != null) {
val exposureEvent = sPool
sPool = exposureEvent?.next
exposureEvent?.next = null
exposureEvent?.flags = 0
sPoolSize--
exposureEvent?.initExposureEventData(gameEntity, source, eTrace, event)
Utils.log(
EXPOSURE_EVENT_LOG_TAG,
"ExposureEvent 对象 $this 正在被循环使用, 当前对象池数量还有 $sPoolSize"
)
return exposureEvent!!
}
}
Utils.log(
EXPOSURE_EVENT_LOG_TAG,
"new ExposureEvent 对象"
)
val exposureEvent = ExposureEvent(
payload = ExposureEntity(),
source = source,
eTrace = eTrace,
event = event
).also {
it.payload.categoryId = eTrace?.firstOrNull()?.payload?.categoryId
it.payload.categoryV2Id = eTrace?.firstOrNull()?.payload?.categoryV2Id
it.payload.testServerId = eTrace?.firstOrNull()?.payload?.testServerId
it.payload.blockId = eTrace?.firstOrNull()?.payload?.blockId
it.payload.setContainerInfo(
eTrace?.firstOrNull()?.payload?.containerId ?: gameEntity?.containerId,
eTrace?.firstOrNull()?.payload?.containerType ?: gameEntity?.containerType
)
it.payload.sourcePage = eTrace?.firstOrNull()?.payload?.sourcePage
it.payload.sourcePageId = eTrace?.firstOrNull()?.payload?.sourcePageId
it.payload.sourcePageName = eTrace?.firstOrNull()?.payload?.sourcePageName
gameEntity?.exposureEvent = it
}
)
exposureEvent.initExposureEventData(gameEntity, source, eTrace, event)
return exposureEvent
}
@JvmStatic

View File

@ -1,18 +0,0 @@
package com.gh.common.exposure
import androidx.room.*
@Dao
interface ExposureEventDao {
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun insertMany(eventList: List<ExposureEvent>)
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun insert(event: ExposureEvent)
@Query("SELECT * FROM exposureEvent")
fun getAll(): List<ExposureEvent>
@Delete
fun deleteMany(eventList: List<ExposureEvent>)
}

View File

@ -11,26 +11,32 @@ import io.reactivex.functions.Consumer
*/
class ExposureListener(var fragment: Fragment, var exposable: IExposable) : RecyclerView.OnScrollListener() {
val throttleBus: ExposureThrottleBus by lazy { ExposureThrottleBus(Consumer { commitExposure(it) }, Consumer(Throwable::printStackTrace)) }
val throttleBus: ExposureThrottleBus by lazy {
ExposureThrottleBus(
Consumer { commitExposure(it) },
Consumer(Throwable::printStackTrace)
)
}
var layoutManager: LinearLayoutManager? = null
var visibleState: ExposureThrottleBus.VisibleState? = null
init {
fragment.fragmentManager?.registerFragmentLifecycleCallbacks(
object : FragmentManager.FragmentLifecycleCallbacks() {
override fun onFragmentPaused(fm: FragmentManager, f: Fragment) {
if (fragment == f) {
visibleState?.let { commitExposure(it) }
throttleBus.clear()
}
object : FragmentManager.FragmentLifecycleCallbacks() {
override fun onFragmentPaused(fm: FragmentManager, f: Fragment) {
if (fragment == f) {
visibleState?.let { commitExposure(it) }
throttleBus.clear()
}
}
override fun onFragmentViewDestroyed(fm: FragmentManager, f: Fragment) {
if (fragment == f) {
fragment.fragmentManager?.unregisterFragmentLifecycleCallbacks(this)
}
override fun onFragmentViewDestroyed(fm: FragmentManager, f: Fragment) {
if (fragment == f) {
fragment.fragmentManager?.unregisterFragmentLifecycleCallbacks(this)
}
}, false)
}
}, false
)
}
/**
@ -43,7 +49,8 @@ class ExposureListener(var fragment: Fragment, var exposable: IExposable) : Recy
if (layoutManager == null) layoutManager = recyclerView.layoutManager as LinearLayoutManager
layoutManager?.run {
visibleState = ExposureThrottleBus.VisibleState(findFirstVisibleItemPosition(), findLastVisibleItemPosition())
visibleState =
ExposureThrottleBus.VisibleState(findFirstVisibleItemPosition(), findLastVisibleItemPosition())
throttleBus.postVisibleState(visibleState!!)
}
}

View File

@ -1,14 +1,11 @@
package com.gh.common.exposure
import com.aliyun.sls.android.producer.Log
import com.gh.gamecenter.common.loghub.LoghubHelper
import com.gh.gamecenter.common.utils.toJson
import com.gh.gamecenter.common.utils.tryWithDefaultCatch
import com.gh.gamecenter.BuildConfig
import com.gh.gamecenter.common.loghub.LoghubHelper
import com.gh.gamecenter.common.utils.FixedSizeLinkedHashSet
import com.halo.assistant.HaloApp
import com.gh.gamecenter.common.utils.toJson
import com.lightgame.utils.Utils
import java.util.concurrent.ExecutorService
/**
* A handful tool for committing logs to aliyun loghub.
@ -26,40 +23,17 @@ object ExposureManager {
// exposureCache 用来过滤掉具有相同 id 的曝光事件,避免重复发送事件
private val exposureSet by lazy { hashSetOf<ExposureEvent>() }
private var exposureExecutor: ExecutorService? = null
private val exposureCache by lazy { FixedSizeLinkedHashSet<String>(300) }
private val exposureDao by lazy { ExposureDatabase.buildDatabase(HaloApp.getInstance().application).logHubEventDao() }
@JvmStatic
fun init(excutor: ExecutorService) {
exposureExecutor = excutor
exposureExecutor?.execute {
tryWithDefaultCatch {
val eventList = exposureDao.getAll()
exposureSet.addAll(eventList)
}
}
}
/**
* Log a single exposure event.
*/
fun log(event: ExposureEvent) {
exposureExecutor?.execute {
try {
if (!exposureCache.contains(event.id)) {
// Catch `android.database.sqlite.SQLiteFullException: database or disk is full` exception.
exposureSet.add(event)
exposureDao.insert(event)
exposureCache.add(event.id)
} else {
Utils.log("Exposure", "遇到重复曝光事件,自动过滤 ${event.id} - ${event.payload.gameName}")
}
} catch (e: Exception) {
e.printStackTrace()
}
if (!exposureCache.contains(event.id)) {
exposureSet.add(event)
exposureCache.add(event.id)
} else {
Utils.log("Exposure", "遇到重复曝光事件,自动过滤 ${event.id} - ${event.payload.gameName}")
}
}
@ -67,51 +41,37 @@ object ExposureManager {
* Log a collection of exposure event.
*/
fun log(eventList: List<ExposureEvent>) {
exposureExecutor?.execute {
for (event in eventList) {
try {
if (!exposureCache.contains(event.id)) {
// Catch `android.database.sqlite.SQLiteFullException: database or disk is full` exception.
exposureSet.add(event)
exposureDao.insert(event)
exposureCache.add(event.id)
} else {
Utils.log("Exposure", "遇到重复曝光事件,自动过滤 ${event.id} - ${event.payload.gameName}")
}
} catch (e: Exception) {
e.printStackTrace()
}
for (event in eventList) {
if (!exposureCache.contains(event.id)) {
exposureSet.add(event)
exposureCache.add(event.id)
} else {
Utils.log("Exposure", "遇到重复曝光事件,自动过滤 ${event.id} - ${event.payload.gameName}")
}
commitSavedExposureEvents()
}
commitSavedExposureEvents()
}
/**
* @param forced Ignore all restrictions.
* @param forcedUpload Ignore all restrictions.
*/
fun commitSavedExposureEvents(forced: Boolean = false) {
exposureExecutor?.execute {
tryWithDefaultCatch {
// TODO 初始化 loghubHelper 去掉这个 tryCatch 块
if (exposureSet.size < STORE_SIZE && !forced || exposureSet.size == 0) return@execute
fun commitSavedExposureEvents(forcedUpload: Boolean = false) {
if (exposureSet.size < STORE_SIZE && !forcedUpload || exposureSet.size == 0) return
val exposureList = exposureSet.toList()
uploadExposures(exposureList)
uploadExposures(exposureSet.toList(), forcedUpload)
Utils.log("Exposure", "提交了${exposureList.size}条曝光记录")
exposureSet.removeAll(exposureList)
exposureDao.deleteMany(exposureList)
}
}
Utils.log("Exposure", "提交了${exposureSet.size}条曝光记录")
exposureSet.clear()
}
private fun eliminateMultipleBrackets(jsonWithMultipleBracket: String): String {
return jsonWithMultipleBracket.replace("[[", "[").replace("]]", "]")
}
private fun uploadExposures(eventList: List<ExposureEvent>) {
private fun uploadExposures(eventList: List<ExposureEvent>, forced: Boolean) {
eventList.forEach {
LoghubHelper.uploadLog(buildLog(it), LOG_STORE)
LoghubHelper.uploadLog(buildLog(it), LOG_STORE, forced)
it.recycle()
}
}
@ -121,9 +81,12 @@ object ExposureManager {
putContent("event", event.event.toString())
putContent("source", eliminateMultipleBrackets(event.source.toJson()))
putContent("meta", event.meta.toJson())
putContent("e-traces", if (event.eTrace != null) {
eliminateMultipleBrackets(event.eTrace?.toJson() ?: "")
} else "")
putContent("real_millisecond", event.timeInMillisecond.toString())
putContent(
"e-traces", if (event.eTrace != null) {
eliminateMultipleBrackets(event.eTrace?.toJson() ?: "")
} else ""
)
logTime = event.time.toLong()
}

View File

@ -6,4 +6,4 @@ import kotlinx.parcelize.Parcelize
@Keep
@Parcelize
data class ExposureSource(var k: String, var v: String = ""): Parcelable
data class ExposureSource(var k: String, var v: String = "") : Parcelable

View File

@ -23,10 +23,10 @@ class ExposureThrottleBus(var onSuccess: Consumer<VisibleState>, var onError: Co
* throttleWithTimeout() to pass a visibleState event with a delay and drop current event if another event arrives before the timeout.
*/
val disposable = mPublishSubject
.distinctUntilChanged()
.throttleWithTimeout(THRESHOLD_TIME, TimeUnit.MILLISECONDS)
.subscribeOn(Schedulers.io())
.subscribe(onSuccess, onError)
.distinctUntilChanged()
.throttleWithTimeout(THRESHOLD_TIME, TimeUnit.MILLISECONDS)
.subscribeOn(Schedulers.io())
.subscribe(onSuccess, onError)
mCompositeDisposable.add(disposable)
}

View File

@ -7,6 +7,7 @@ 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.manager.PackagesManager
import com.halo.assistant.HaloApp
import com.lightgame.download.DownloadEntity
@ -75,44 +76,44 @@ object ExposureUtils {
exposureEvent.payload.host = host
exposureEvent.payload.path = path
ExposureManager.log(exposureEvent)
ExposureManager.commitSavedExposureEvents(forced = true)
ExposureManager.commitSavedExposureEvents(forcedUpload = true)
}
@JvmStatic
fun getDownloadType(apkEntity: ApkEntity, gameId: String): DownloadType {
return if (PackageUtils.isInstalled(
fun getDownloadType(apkEntity: ApkEntity, gameId: String, isVGame: Boolean): DownloadType {
return when {
isVGame -> getVGameDownloadType(apkEntity, gameId)
PackageUtils.isInstalled(
HaloApp.getInstance().application,
apkEntity.packageName
)
) {
if (PackageUtils.isSignedByGh(
HaloApp.getInstance().application,
apkEntity.packageName
)
) {
if (PackageUtils.isCanUpdate(apkEntity, gameId)) {
DownloadType.PLUGIN_UPDATE
} else {
if (Version(apkEntity.version).isHigherThan(
PackageUtils.getVersionNameByPackageName(
apkEntity.packageName
)
)
) {
DownloadType.UPDATE
} else {
DownloadType.DOWNLOAD
}
}
} else {
if (!TextUtils.isEmpty(apkEntity.ghVersion)) {
DownloadType.PLUGIN_DOWNLOAD
} else {
DownloadType.UPDATE
}
}
} else {
DownloadType.DOWNLOAD
) -> getInstallDownloadType(apkEntity, gameId)
else -> DownloadType.DOWNLOAD
}
}
private fun getVGameDownloadType(apkEntity: ApkEntity, gameId: String): DownloadType {
return when {
PackagesManager.isCanUpdate(gameId, apkEntity.packageName) -> DownloadType.FUN_UPDATE
else -> DownloadType.FUN_DOWNLOAD
}
}
private fun getInstallDownloadType(apkEntity: ApkEntity, gameId: String): DownloadType {
return when {
PackageUtils.isSignedByGh(
HaloApp.getInstance().application,
apkEntity.packageName
) -> getUpdateDownloadType(apkEntity, gameId)
!TextUtils.isEmpty(apkEntity.ghVersion) -> DownloadType.PLUGIN_DOWNLOAD
else -> DownloadType.UPDATE
}
}
private fun getUpdateDownloadType(apkEntity: ApkEntity, gameId: String): DownloadType {
return when {
PackageUtils.isCanUpdate(apkEntity, gameId) -> DownloadType.PLUGIN_UPDATE
Version(apkEntity.version).isHigherThan(PackageUtils.getVersionNameByPackageName(apkEntity.packageName)) -> DownloadType.UPDATE
else -> DownloadType.DOWNLOAD
}
}
@ -143,6 +144,10 @@ object ExposureUtils {
PLUGIN_UPDATE,
PLUGIN_DOWNLOAD
PLUGIN_DOWNLOAD,
FUN_DOWNLOAD,
FUN_UPDATE
}
}

View File

@ -5,17 +5,46 @@ import com.google.gson.annotations.SerializedName
@Keep
data class RegionSetting(
@SerializedName("game_mirror")
var mirrorGameIdSet: HashSet<String>,
@SerializedName("game_block")
var filterGameIdSet: HashSet<String>,
@SerializedName("channel_control")
var channelControl: ChannelControl) {
@SerializedName("game_mirror")
var mirrorGameIdSet: HashSet<String>,
@SerializedName("game_block")
var filterGameIdSet: HashSet<String>,
@SerializedName("channel_control")
var channelControl: ChannelControl,
@SerializedName("game_h5_download")
var gameH5DownloadList: List<GameH5Download>,
@SerializedName("game_special_download")
var gameSpecialDownloadInfoList: List<GameSpecialDownloadInfo>
) {
@Keep
data class ChannelControl(
@SerializedName("game_category")
var gameCategory: String,
@SerializedName("effect")
var effect: Boolean)
@SerializedName("game_category")
var gameCategory: String,
@SerializedName("effect")
var effect: Boolean
)
@Keep
data class GameH5Download(
@SerializedName("game_id")
var gameId: String,// 游戏id
@SerializedName("h5_link")
var h5Link: String,// 网页链接
@SerializedName("download_link")
var downloadLink: String,// 下载链接
@SerializedName("button_text")
var buttonText: String,// 按钮文案
)
data class GameSpecialDownloadInfo(
@SerializedName("game_id")
var gameId: String = "",
@SerializedName("bbs_id")
var bbsId: String = "",
@SerializedName("top_id")
var topId: String = "",
@SerializedName("hint_text")
var hintText: String = ""
)
}

View File

@ -19,6 +19,8 @@ object RegionSettingHelper {
private var mChannelControl: RegionSetting.ChannelControl? = null
private var mFilterGameIdSet: HashSet<String>? = hashSetOf()
private var mDisplayMirrorIfoGameIdSet: HashSet<String>? = hashSetOf()
private var mGameH5DownloadList: List<RegionSetting.GameH5Download>? = listOf()
private var mGameSpecialDownloadInfoList: List<RegionSetting.GameSpecialDownloadInfo>? = listOf()
private const val SP_SETTING = "region_setting"
@ -31,6 +33,12 @@ object RegionSettingHelper {
return mFilterGameIdSet?.contains(gameId) ?: false
}
fun shouldThisGameShowSpecialDownload(gameId: String) =
mGameSpecialDownloadInfoList?.any { it.gameId == gameId } ?: false
@JvmStatic
fun getGameSpecialDownloadInfo(gameId: String) = mGameSpecialDownloadInfoList?.find { it.gameId == gameId }
@JvmStatic
fun filterGame(list: List<GameEntity>?): ArrayList<GameEntity> {
if (list == null) return arrayListOf()
@ -58,27 +66,33 @@ object RegionSettingHelper {
}
}
@JvmStatic
fun getGameH5DownloadByGameId(gameId: String): RegionSetting.GameH5Download? {
if (mGameH5DownloadList.isNullOrEmpty()) return null
return mGameH5DownloadList!!.find { it.gameId == gameId }
}
@SuppressLint("CheckResult")
@JvmStatic
fun getRegionSetting() {
debounceActionWithInterval(R.string.app_name, 5000) {
// 使用默认的 Schdulers.io() 可能会触发 OOM
RetrofitManager.getInstance()
.api
.getRegionSetting(HaloApp.getInstance().channel)
.subscribeOn(Schedulers.io())
.subscribe(object : BiResponse<RegionSetting>() {
override fun onSuccess(data: RegionSetting) {
updateSettingsInMemory(data)
SPUtils.setString(SP_SETTING, data.toJson())
}
.api
.getRegionSetting(HaloApp.getInstance().channel)
.subscribeOn(Schedulers.io())
.subscribe(object : BiResponse<RegionSetting>() {
override fun onSuccess(data: RegionSetting) {
updateSettingsInMemory(data)
SPUtils.setString(SP_SETTING, data.toJson())
}
override fun onFailure(exception: Exception) {
SPUtils.getString(SP_SETTING)?.toObject<RegionSetting>()?.let {
updateSettingsInMemory(it)
}
override fun onFailure(exception: Exception) {
SPUtils.getString(SP_SETTING)?.toObject<RegionSetting>()?.let {
updateSettingsInMemory(it)
}
})
}
})
}
}
@ -86,6 +100,8 @@ object RegionSettingHelper {
mFilterGameIdSet = data.filterGameIdSet
mDisplayMirrorIfoGameIdSet = data.mirrorGameIdSet
mChannelControl = data.channelControl
mGameH5DownloadList = data.gameH5DownloadList
mGameSpecialDownloadInfoList = data.gameSpecialDownloadInfoList
}
/**

View File

@ -16,24 +16,30 @@ 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, exportSchema = false)
@TypeConverters(CountConverter::class,
CommunityConverter::class,
TimeConverter::class,
AnswerUserConverter::class,
ThumbnailConverter::class,
TagStyleListConverter::class,
StringArrayListConverter::class,
ListStringConverter::class,
CommunityVideoConverter::class,
UserConverter::class,
ImageInfoConverter::class,
VideoInfoConverter::class,
QuestionsConverter::class,
MeConverter::class,
SimpleGameListConverter::class,
TagInfoListConverter::class,
ActivityLabelListConverter::class)
@Database(
entities = [AnswerEntity::class, ArticleEntity::class, NewsEntity::class, HistoryGameEntity::class, MyVideoEntity::class, GamesCollectionEntity::class],
version = 11,
exportSchema = false
)
@TypeConverters(
CountConverter::class,
CommunityConverter::class,
TimeConverter::class,
AnswerUserConverter::class,
ThumbnailConverter::class,
TagStyleListConverter::class,
StringArrayListConverter::class,
ListStringConverter::class,
CommunityVideoConverter::class,
UserConverter::class,
ImageInfoConverter::class,
VideoInfoConverter::class,
QuestionsConverter::class,
MeConverter::class,
SimpleGameListConverter::class,
TagInfoListConverter::class,
ActivityLabelListConverter::class
)
abstract class HistoryDatabase : RoomDatabase() {
@ -109,7 +115,8 @@ abstract class HistoryDatabase : RoomDatabase() {
val MIGRATION_9_10: Migration = object : Migration(9, 10) {
override fun migrate(database: SupportSQLiteDatabase) {
database.execSQL("CREATE TABLE GamesCollectionEntity (id TEXT NOT NULL PRIMARY KEY, tags TEXT, games TEXT, title TEXT NOT NULL, intro TEXT NOT NULL, cover TEXT NOT NULL, display TEXT NOT NULL, stamp TEXT NOT NULL, count TEXT, user TEXT, me TEXT, orderTag INTEGER NOT NULL)"
database.execSQL(
"CREATE TABLE GamesCollectionEntity (id TEXT NOT NULL PRIMARY KEY, tags TEXT, games TEXT, title TEXT NOT NULL, intro TEXT NOT NULL, cover TEXT NOT NULL, display TEXT NOT NULL, stamp TEXT NOT NULL, count TEXT, user TEXT, me TEXT, orderTag INTEGER NOT NULL)"
)
}
}
@ -121,17 +128,21 @@ abstract class HistoryDatabase : RoomDatabase() {
}
val instance by lazy {
Room.databaseBuilder(HaloApp.getInstance().application, HistoryDatabase::class.java, "USER_TRACK_HISTORY_DATABASE")
.addMigrations(MIGRATION_2_3)
.addMigrations(MIGRATION_3_4)
.addMigrations(MIGRATION_4_5)
.addMigrations(MIGRATION_5_6)
.addMigrations(MIGRATION_6_7)
.addMigrations(MIGRATION_7_8)
.addMigrations(MIGRATION_8_9)
.addMigrations(MIGRATION_9_10)
.addMigrations(MIGRATION_10_11)
.build()
Room.databaseBuilder(
HaloApp.getInstance().application,
HistoryDatabase::class.java,
"USER_TRACK_HISTORY_DATABASE"
)
.addMigrations(MIGRATION_2_3)
.addMigrations(MIGRATION_3_4)
.addMigrations(MIGRATION_4_5)
.addMigrations(MIGRATION_5_6)
.addMigrations(MIGRATION_6_7)
.addMigrations(MIGRATION_7_8)
.addMigrations(MIGRATION_8_9)
.addMigrations(MIGRATION_9_10)
.addMigrations(MIGRATION_10_11)
.build()
}
}

View File

@ -26,7 +26,11 @@ object HistoryHelper {
fun insertGamesCollectionEntity(gamesCollectionDetailEntity: GamesCollectionDetailEntity) {
val gamesCollectionEntity = convertGamesCollectionDetailToGamesCollection(gamesCollectionDetailEntity)
runOnIoThread { tryCatchInRelease { HistoryDatabase.instance.gamesCollectionDao().addGamesCollection(gamesCollectionEntity) } }
runOnIoThread {
tryCatchInRelease {
HistoryDatabase.instance.gamesCollectionDao().addGamesCollection(gamesCollectionEntity)
}
}
}
@JvmStatic
@ -78,27 +82,47 @@ object HistoryHelper {
@JvmStatic
fun deleteNewsEntity(newsId: String) {
runOnIoThread { tryCatchInRelease { HistoryDatabase.instance.newsDao().deleteNews(NewsEntity().apply { id = newsId }) } }
runOnIoThread {
tryCatchInRelease {
HistoryDatabase.instance.newsDao().deleteNews(NewsEntity().apply { id = newsId })
}
}
}
@JvmStatic
fun deleteGameEntity(gameId: String) {
runOnIoThread { tryCatchInRelease { HistoryDatabase.instance.gameDao().deleteGame(HistoryGameEntity(id = gameId)) } }
runOnIoThread {
tryCatchInRelease {
HistoryDatabase.instance.gameDao().deleteGame(HistoryGameEntity(id = gameId))
}
}
}
@JvmStatic
fun deleteArticleEntity(articleId: String) {
runOnIoThread { tryCatchInRelease { HistoryDatabase.instance.articleDao().deleteArticle(ArticleEntity(id = articleId)) } }
runOnIoThread {
tryCatchInRelease {
HistoryDatabase.instance.articleDao().deleteArticle(ArticleEntity(id = articleId))
}
}
}
@JvmStatic
fun deleteAnswerEntity(answerId: String) {
runOnIoThread { tryCatchInRelease { HistoryDatabase.instance.answerDao().deleteAnswer(AnswerEntity().apply { primaryKey = answerId }) } }
runOnIoThread {
tryCatchInRelease {
HistoryDatabase.instance.answerDao().deleteAnswer(AnswerEntity().apply { primaryKey = answerId })
}
}
}
@JvmStatic
fun deleteVideoEntity(videoId: String) {
runOnIoThread { tryCatchInRelease { HistoryDatabase.instance.videoHistoryDao().deleteVideo(MyVideoEntity().apply { id = videoId }) } }
runOnIoThread {
tryCatchInRelease {
HistoryDatabase.instance.videoHistoryDao().deleteVideo(MyVideoEntity().apply { id = videoId })
}
}
}
@JvmStatic
@ -108,7 +132,12 @@ object HistoryHelper {
@JvmStatic
fun deleteGamesCollectionEntity(gameCollectionId: String) {
runOnIoThread { tryCatchInRelease { HistoryDatabase.instance.gamesCollectionDao().deleteGamesCollection(GamesCollectionEntity(id = gameCollectionId)) } }
runOnIoThread {
tryCatchInRelease {
HistoryDatabase.instance.gamesCollectionDao()
.deleteGamesCollection(GamesCollectionEntity(id = gameCollectionId))
}
}
}
@ -121,7 +150,9 @@ object HistoryHelper {
val articleEntity = ArticleEntity()
articleEntity.id = articleDetailEntity.id
articleEntity.brief = articleDetailEntity.content.removeVideoContent().removeInsertedContent().clearHtmlFormatCompletely().replace(" +".toRegex(), " ")
articleEntity.brief =
articleDetailEntity.content.removeVideoContent().removeInsertedContent().clearHtmlFormatCompletely()
.replace(" +".toRegex(), " ")
articleEntity.count = articleDetailEntity.count
articleDetailEntity.community.id = articleDetailEntity.communityId
articleEntity.community = articleDetailEntity.community
@ -146,7 +177,9 @@ object HistoryHelper {
answerEntity.vote = answerDetailEntity.vote
answerEntity.user = answerDetailEntity.user
answerEntity.orderTag = System.currentTimeMillis()
answerEntity.brief = answerDetailEntity.content.removeVideoContent().removeInsertedContent().clearHtmlFormatCompletely().replace(" +".toRegex(), " ")
answerEntity.brief =
answerDetailEntity.content.removeVideoContent().removeInsertedContent().clearHtmlFormatCompletely()
.replace(" +".toRegex(), " ")
answerEntity.time = answerDetailEntity.time
answerEntity.images = answerDetailEntity.images
answerEntity.imagesInfo = answerDetailEntity.imagesInfo
@ -176,7 +209,8 @@ object HistoryHelper {
id = id ?: "",
name = name ?: "",
icon = icon ?: "",
badge = badge)
badge = badge
)
}
gamesCollectionEntity.me = gamesCollectionDetailEntity.me

View File

@ -7,9 +7,9 @@ import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IActivationProvider
@Route(path = RouteConsts.provider.activation, name = "ActivationHelper暴露服务")
interface ActivationProviderImpl : IActivationProvider {
class ActivationProviderImpl : IActivationProvider {
override fun init(context: Context?) {
// Do nothing
}
override fun sendActivationInfo() {

View File

@ -10,7 +10,7 @@ import com.halo.assistant.HaloApp
@Route(path = RouteConsts.provider.app, name = "Application暴露服务")
class AppProviderImpl : IAppProvider {
override fun init(context: Context?) {
// Do nothing
}
override fun getAppName(): String {
@ -21,6 +21,10 @@ class AppProviderImpl : IAppProvider {
return HaloApp.getInstance().gid ?: ""
}
override fun refreshGid() {
HaloApp.getInstance().refreshGid()
}
override fun getOaid(): String {
return HaloApp.getInstance().oaid ?: ""
}

View File

@ -9,7 +9,7 @@ import com.gh.gamecenter.core.provider.IBuildConfigProvider
@Route(path = RouteConsts.provider.buildConfig, name = "BuildConfig暴露服务")
class BuildConfigImpl : IBuildConfigProvider {
override fun init(context: Context?) {
// Do nothing
}
override fun getApplicationId(): String = BuildConfig.APPLICATION_ID
@ -28,4 +28,7 @@ class BuildConfigImpl : IBuildConfigProvider {
override fun getNewDevApiHost(): String = BuildConfig.NEW_DEV_API_HOST
override fun getVApiHost(): String = BuildConfig.VAPI_HOST
override fun getVDevApiHost(): String = BuildConfig.DEV_VAPI_HOST
}

View File

@ -13,6 +13,6 @@ class CheckLoginProviderImpl : ICheckLoginProvider {
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -16,6 +16,10 @@ class ConfigProviderImpl : IConfigProvider {
return Config.WECHAT_APPID
}
override fun getWechatSecret(): String {
return Config.WECHAT_SECRET
}
override fun getUploadLimitSize(): Long {
return Config.getSettings()?.image?.uploadLimitSize ?: 0L
}
@ -56,7 +60,19 @@ class ConfigProviderImpl : IConfigProvider {
return Config.getSettings()?.support?.qq ?: ""
}
override fun init(context: Context?) {
override fun getQuickLoginAppId(): String {
return Config.QUICK_LOGIN_APPID
}
override fun getQuickLoginAppKey(): String {
return Config.QUICK_LOGIN_APPKEY
}
override fun getWeiboAppKey(): String {
return Config.WEIBO_APPKEY
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -0,0 +1,20 @@
package com.gh.common.provider
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.common.util.DataUtils
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IDataUtilsProvider
import com.halo.assistant.HaloApp
@Route(path = RouteConsts.provider.dataUtils, name = "DataUtils暴露服务")
class DataUtilsProviderImpl : IDataUtilsProvider {
override fun getDeviceCertification() {
DataUtils.getDeviceCertification(HaloApp.getInstance().gid)
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -9,11 +9,16 @@ import com.gh.gamecenter.core.provider.IDefaultUrlHandlerProvider
@Route(path = RouteConsts.provider.defaultUrlHandler, name = "DefaultUrlHandler暴露服务")
class DefaultUrlHandlerProviderImpl : IDefaultUrlHandlerProvider {
override fun interceptUrl(context: Context, url: String, entrance: String):Boolean {
return DefaultUrlHandler.interceptUrl(context, url, entrance)
override fun interceptUrl(
context: Context,
url: String,
entrance: String,
bringAppToFront: Boolean
): Boolean {
return DefaultUrlHandler.interceptUrl(context, url, entrance, bringAppToFront)
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -15,7 +15,7 @@ class DialogUtilsProviderImpl : IDialogUtilsProvider {
override fun onConfirm() {
confirm.invoke()
}
}, object :CancelListener{
}, object : CancelListener {
override fun onCancel() {
cancel.invoke()
}
@ -23,6 +23,6 @@ class DialogUtilsProviderImpl : IDialogUtilsProvider {
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -21,7 +21,35 @@ class DirectProviderImpl : IDirectProvider {
DirectUtils.directToQqConversation(context, qq)
}
override fun init(context: Context?) {
override fun directToCommodityDetail(context: Context, commodityId: String) {
DirectUtils.directToCommodityDetail(context, commodityId)
}
override fun directToEnergyRecord(context: Context) {
DirectUtils.directToEnergyRecord(context)
}
override fun directToEnergyRulePage(context: Context) {
DirectUtils.directToEnergyRulePage(context)
}
override fun directToInviteFriends(context: Context) {
DirectUtils.directToInviteFriends(context)
}
override fun directToExchangeRulePage(context: Context) {
DirectUtils.directToExchangeRulePage(context)
}
override fun directToExchangeCommodityPage(context: Context) {
DirectUtils.directToExchangeCommodityPage(context)
}
override fun directToLotteryParadisePage(context: Context) {
DirectUtils.directToLotteryParadisePage(context)
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -14,8 +14,12 @@ class DownloadManagerProviderImpl : IDownloadManagerProvider {
return DownloadManager.getInstance().getDownloadEntityByUrl(url)
}
override fun init(context: Context?) {
override fun resumeAllInvisiblePendingTask() {
DownloadManager.getInstance().resumeAllInvisiblePendingTask()
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -1,23 +0,0 @@
package com.gh.common.provider
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.common.util.EnergyTaskHelper
import com.gh.common.util.IntegralLogHelper
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IEnergyTaskProvider
@Route(path = RouteConsts.provider.energyTask, name = "EnergyTask暴露服务")
class EnergyTaskProviderImpl : IEnergyTaskProvider {
override fun postEnergyTaskForShare(type: String, id: String, url: String) {
EnergyTaskHelper.postEnergyTaskForShare(type, id, url)
}
override fun logInviteResult(result: String, type: String?) {
IntegralLogHelper.logInviteResult(result, type)
}
override fun init(context: Context?) {
}
}

View File

@ -8,7 +8,7 @@ import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IEntranceUtilsProvider
@Route(path = RouteConsts.provider.entranceUtils, name = "EntranceUtils暴露服务")
class EntranceUtilsProviderImpl: IEntranceUtilsProvider {
class EntranceUtilsProviderImpl : IEntranceUtilsProvider {
override fun jumpActivity(context: Context, bundle: Bundle) {
EntranceUtils.jumpActivity(context, bundle)
}
@ -18,6 +18,6 @@ class EntranceUtilsProviderImpl: IEntranceUtilsProvider {
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -0,0 +1,28 @@
package com.gh.common.provider
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.common.util.ErrorHelper
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IErrorHelperProvider
import retrofit2.HttpException
@Route(path = RouteConsts.provider.errorHelper, name = "ErrorHelper暴露服务")
class ErrorHelperProviderImpl : IErrorHelperProvider {
override fun handleError(
context: Context,
errorString: String?,
showHighPriorityHint: Boolean
) {
ErrorHelper.handleError(context, errorString, showHighPriorityHint)
}
override fun handleLoginError(context: Context, httpException: HttpException?) {
ErrorHelper.handleLoginError(context, httpException)
}
override fun init(context: Context?) {
// Do nothing
}
}

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.FloatingBackViewManager
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IFloatingBackViewManagerProvider
@Route(path = RouteConsts.provider.floatingBackViewManager, name = "FloatingViewBackManager暴露服务")
class FloatingBackViewManagerProviderImpl : IFloatingBackViewManagerProvider {
override fun enableBackViewForTaskType() {
FloatingBackViewManager.enableBackView(FloatingBackViewManager.TYPE_TASK)
}
override fun init(context: Context?) {
// Do nothing
}
}

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.GameSubstituteRepositoryHelper
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IGameSubstituteRepositoryProvider
@Route(path = RouteConsts.provider.gameSubstituteRepository, name = "GameSubstituteRepositoryHelper暴露服务")
class GameSubstituteRepositoryProviderImpl : IGameSubstituteRepositoryProvider {
override fun updateSubstitutableGames() {
GameSubstituteRepositoryHelper.updateSubstitutableGames()
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -0,0 +1,44 @@
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.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
@Route(path = RouteConsts.provider.handleGameResponse, name = "处理游戏类型返回")
class HandleGameResponseProviderImpl : IHandleGameResponseProvider {
override fun handleGameResponse(response: List<Any>, entrance: String): List<Any> {
// 针对游戏的一些操作(过滤隐藏游戏过滤隐藏APK吗增加下载数据)
if (response.isNotEmpty() && response[0] is GameEntity) {
val responseResult = RegionSettingHelper.filterGame(response as? List<GameEntity>?)
if (responseResult.isNotEmpty()) {
for (entity in responseResult) {
val game: GameEntity = entity
game.setEntryMap(DownloadManager.getInstance().getEntryMap(game.name))
// 当页面是由启动弹窗过来的第一或第二个页面的时候添加启动弹窗信息
if (entrance.contains(EntranceConsts.ENTRANCE_WELCOME)
&& entrance.countOccurrences("+") <= 1
) {
game.setWelcomeDialogInfoIfAvailable()
}
ApkActiveUtils.filterHideApk(game)
}
}
return responseResult
}
return response
}
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.common.util.DirectUtils
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.common.entity.LinkEntity
import com.gh.gamecenter.common.provider.ILinkDirectUtilsProvider
@Route(path = RouteConsts.provider.linkDirectUtils, name = "DirectUtils暴露服务主要是暴露directToLinkPage方法")
class LinkDirectUtilsProviderImpl : ILinkDirectUtilsProvider {
override fun directToLinkPage(
context: Context,
linkEntity: LinkEntity,
entrance: String,
path: String
) {
DirectUtils.directToLinkPage(context, linkEntity, entrance, path)
}
override fun init(context: Context?) {
// Do nothing
}
}

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.*
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.*
@Route(path = RouteConsts.provider.logUtils, name = "LogUtils暴露服务")
class LogUtilsProviderImpl : ILogUtilsProvider {
override fun login(loginStep: String, loginType: String, entrance: String) {
LogUtils.login(loginStep, loginType, entrance)
}
override fun init(context: Context?) {
// Do nothing
}
}

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.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IMessageUnreadRepositoryProvider
import com.gh.gamecenter.message.MessageUnreadRepository
@Route(path = RouteConsts.provider.messageUnreadRepository, name = "MessageUnreadRepository暴露服务")
class MessageUnreadRepositoryProviderImpl : IMessageUnreadRepositoryProvider {
override fun loadMessageUnreadData() {
MessageUnreadRepository.loadMessageUnreadData()
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -14,6 +14,6 @@ class PackageHelperProviderImpl : IPackageHelperProvider {
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -19,6 +19,6 @@ class PackageInstallerProviderImpl : IPackageInstallerProvider {
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -34,6 +34,6 @@ class PackageUtilsProviderImpl : IPackageUtilsProvider {
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -1,19 +0,0 @@
package com.gh.common.provider
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.common.util.QuickLoginHelper
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IQuickLoginProvider
@Route(path = RouteConsts.provider.quickLogin, name = "一键登录暴露服务")
class QuickLoginProviderImpl : IQuickLoginProvider {
override fun startLogin(context: Context, entrance: String) {
QuickLoginHelper.startLogin(context, entrance)
}
override fun init(context: Context?) {
}
}

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.common.repository.ReservationRepository
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IReservationRepositoryProvider
@Route(path = RouteConsts.provider.reservationRepository, name = "ReservationRepository暴露服务")
class ReservationRepositoryProviderImpl : IReservationRepositoryProvider {
override fun refreshReservations() {
ReservationRepository.refreshReservations()
}
override fun clearReservations() {
ReservationRepository.clearReservations()
}
override fun init(context: Context?) {
// Do nothing
}
}

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.exposure.time.TimeUtil
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.ITimeUtilProvider
@Route(path = RouteConsts.provider.timeUtil, name = "TimeUtil暴露服务")
class TimeUtilProviderImpl : ITimeUtilProvider {
override fun currentTimeMillis() = TimeUtil.currentTimeMillis()
override fun currentTime() = TimeUtil.currentTime()
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -13,7 +13,11 @@ class WebProviderImpl : IWebProvider {
return WebActivity.getIntent(context, url, autoCompletionTitle)
}
override fun init(context: Context?) {
override fun getWebIntent(context: Context, title: String, url: String): Intent {
return WebActivity.getWebIntent(context, title, url)
}
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.util.WechatBindHelper
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IWechatBindHelperProvider
@Route(path = RouteConsts.provider.wechatHelper, name = "WechatHelper暴露服务")
class WechatHelperProviderImpl : IWechatBindHelperProvider {
override fun getWechatConfig() {
WechatBindHelper.getWechatConfig()
}
override fun init(context: Context?) {
// Do nothing
}
}

View File

@ -16,10 +16,10 @@ object RemenkapaiRepository {
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)
.map(RegionSettingHelper.filterGame)
.map { gameList -> filterEntityWithoutApk(gameList) }
.map { pickRandomSizeEntity(size) }
.map(ApkActiveUtils.filterMapperList)
} else {
Observable.create { emitter -> emitter.onNext(pickRandomSizeEntity(size)) }
}

View File

@ -2,7 +2,7 @@ package com.gh.common.repository
import android.annotation.SuppressLint
import com.gh.common.util.CheckLoginUtils
import com.gh.gamecenter.manager.UserManager
import com.gh.gamecenter.login.user.UserManager
import com.gh.gamecenter.common.retrofit.BiResponse
import com.gh.gamecenter.retrofit.RetrofitManager
import com.halo.assistant.HaloApp
@ -40,16 +40,19 @@ object ReservationRepository {
fun refreshReservations() {
if (CheckLoginUtils.isLogin()) {
RetrofitManager.getInstance().api
.getAllTheGameReservations(UserManager.getInstance().userId, Utils.getTime(HaloApp.getInstance().application))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(object : BiResponse<List<String>>() {
.getAllTheGameReservations(
UserManager.getInstance().userId,
Utils.getTime(HaloApp.getInstance().application)
)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(object : BiResponse<List<String>>() {
override fun onSuccess(data: List<String>) {
mReservationSet = HashSet(data)
}
override fun onSuccess(data: List<String>) {
mReservationSet = HashSet(data)
}
})
})
}
}

View File

@ -0,0 +1,165 @@
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.g00fy2.versioncompare.Version
import com.gh.common.constant.Config
import com.gh.common.util.DownloadItemUtils
import com.gh.common.util.LogUtils
import com.gh.common.util.NewFlatLogUtils
import com.gh.common.util.PackageUtils
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.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

@ -9,14 +9,16 @@ import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import androidx.constraintlayout.widget.ConstraintLayout
import com.g00fy2.versioncompare.Version
import com.gh.gamecenter.core.AppExecutor.uiExecutor
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.common.base.TrackableDialog
import com.gh.common.util.*
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
import com.gh.gamecenter.R
import com.gh.gamecenter.common.base.TrackableDialog
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
@ -50,8 +52,12 @@ class SimulatorDownloadManager private constructor() {
val size = downloadEntity.progress.toFloat() / 1024 / 1024
val df = DecimalFormat("0.00")
appProgressSize!!.text = "${df.format(size.toDouble())}MB"
appProgressRemain!!.text = String.format("剩余%s", SpeedUtils.getRemainSecondTime(downloadEntity.size,
downloadEntity.progress, downloadEntity.speed * 1024))
appProgressRemain!!.text = String.format(
"剩余%s", SpeedUtils.getRemainSecondTime(
downloadEntity.size,
downloadEntity.progress, downloadEntity.speed * 1024
)
)
app_pb_progress!!.progress = (downloadEntity.percent * 10).toInt()
val width = app_pb_progress!!.width
@ -69,11 +75,22 @@ class SimulatorDownloadManager private constructor() {
appProgressPercent?.text = if (downloadEntity.percent != 100.0) "${downloadEntity.percent}%" else "100%"
when {
DownloadStatus.done == downloadEntity.status -> {
val locationStr = if (simulatorLocation == SimulatorLocation.LAUNCH) "${simulatorLocation?.value}${gameName}" else simulatorLocation?.value
val fileName = downloadEntity.path.substring(downloadEntity.path.lastIndexOf('/') + 1).removeSuffix(".apk")
val locationStr =
if (simulatorLocation == SimulatorLocation.LAUNCH) "${simulatorLocation?.value}${gameName}" else simulatorLocation?.value
val fileName =
downloadEntity.path.substring(downloadEntity.path.lastIndexOf('/') + 1).removeSuffix(".apk")
val startTime = downloadEntity.getMetaExtra(Constants.SIMULATOR_DOWNLOAD_START_TIME)
LogUtils.uploadSimulatorDownload("simulator_download_complete", fileName, simulator?.id, downloadEntity.name, gameId, locationStr, downloadType, startTime)
DownloadManager.getInstance().cancel(downloadEntity.url, false, true)
LogUtils.uploadSimulatorDownload(
"simulator_download_complete",
fileName,
simulator?.id,
downloadEntity.name,
gameId,
locationStr,
downloadType,
startTime
)
DownloadManager.getInstance().cancel(downloadEntity.url, false, true, false)
val activity = mContextRef?.get() as? AppCompatActivity
if (activity?.isFinishing == false) {
downloadDialog?.dismiss()
@ -97,6 +114,9 @@ class SimulatorDownloadManager private constructor() {
DownloadStatus.unavailable == downloadEntity.status -> {
ToastUtils.showToast("该游戏未接入防沉迷系统,暂不支持下载")
}
DownloadStatus.banned == downloadEntity.status -> {
ToastUtils.showToast("网络异常")
}
DownloadStatus.hijack == downloadEntity.status -> {
ToastUtils.showToast("网络劫持,请稍后重试")
}
@ -109,58 +129,87 @@ class SimulatorDownloadManager private constructor() {
showDownloadDialog(context, simulator, location, "", "", null)
}
fun showDownloadDialog(context: Context?, simulator: SimulatorEntity?, location: SimulatorLocation, gameId: String = "", gameName: String = "", cancelCallback: (() -> Unit)? = null) {
fun showDownloadDialog(
context: Context?,
simulator: SimulatorEntity?,
location: SimulatorLocation,
gameId: String = "",
gameName: String = "",
cancelCallback: (() -> Unit)? = null
) {
if (context == null) return
mContextRef = WeakReference(context)
this.simulatorLocation = location
this.simulator = simulator
this.gameId = gameId
this.gameName = gameName
//判断是否隐藏
if (simulator?.active == false) {
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)
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
)
DialogHelper.showDialog(
context,
title,
message,
positiveText,
negativeText,
trackMtaEvent = true,
cancelClickCallback = {
if (shouldShowUpdate && isInstalled) {
cancelCallback?.invoke()
MtaHelper.onEvent(trackableEntity.event, trackableEntity.key, "点击下次再说")
PermissionHelper.checkGetInstalledAppsListBeforeAction(context, object : EmptyCallback {
override fun onCallback() {
//判断是否隐藏
if (simulator?.active == false) {
showNoneEmulatorDialog(context)
return
}
},
confirmClickCallback = {
showDownloadingDialog(context, simulator)
MtaHelper.onEvent(
trackableEntity.event,
trackableEntity.key,
if (shouldShowUpdate && isInstalled) "点击更新" else "点击下载"
val isInstalled = PackageUtils.isInstalledFromAllPackage(context, simulator?.apk?.packageName)
// 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 "取消"
val trackableEntity = TrackableEntity(
"模拟器下载",
key = if (shouldShowUpdate && isInstalled) "更新弹窗" else "下载弹窗",
logShowEvent = true
)
},
mtaEvent = trackableEntity.event, mtaKey = trackableEntity.key,
extraConfig = DialogHelper.Config(centerTitle = true, centerContent = true)
)
if (shouldShowUpdate && isInstalled) {
NewFlatLogUtils.logSimulatorUpdateAlertShow()
}
DialogHelper.showDialog(
context,
title,
message,
positiveText,
negativeText,
trackMtaEvent = true,
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,
if (shouldShowUpdate && isInstalled) "点击更新" else "点击下载"
)
},
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)
@ -218,9 +267,10 @@ class SimulatorDownloadManager private constructor() {
ToastUtils.showToast("该模拟器暂未提供下载")
},
uiModificationCallback = { binding ->
binding.confirmTv.setTextColor(R.color.text_body.toColor())
binding.confirmTv.setTextColor(R.color.text_body.toColor(context))
},
extraConfig = DialogHelper.Config(centerTitle = true, centerContent = true))
extraConfig = DialogHelper.Config(centerTitle = true, centerContent = true)
)
}
private fun download(simulator: SimulatorEntity?) {
@ -257,13 +307,26 @@ class SimulatorDownloadManager private constructor() {
downloadEntity.versionName = apkEntity.version
downloadEntity.addMetaExtra(Constants.EXTRA_DOWNLOAD_TYPE, Constants.SIMULATOR_DOWNLOAD)
downloadEntity.addMetaExtra(Constants.SIMULATOR_DOWNLOAD_START_TIME, (System.currentTimeMillis() / 1000).toString())
downloadEntity.addMetaExtra(
Constants.SIMULATOR_DOWNLOAD_START_TIME,
(System.currentTimeMillis() / 1000).toString()
)
downloadEntity.addMetaExtra(Constants.DOWNLOAD_ID, downloadId)
uiExecutor.executeWithDelay(Runnable { DownloadManager.getInstance().add(downloadEntity) }, 200)
val locationStr = if (simulatorLocation == SimulatorLocation.LAUNCH) "${simulatorLocation?.value}${gameName}" else simulatorLocation?.value
val locationStr =
if (simulatorLocation == SimulatorLocation.LAUNCH) "${simulatorLocation?.value}${gameName}" else simulatorLocation?.value
val fileName = downloadEntity.path.substring(downloadEntity.path.lastIndexOf('/') + 1).removeSuffix(".apk")
LogUtils.uploadSimulatorDownload("simulator_download", fileName, simulator.id, simulator.name, gameId, locationStr, downloadType, "")
LogUtils.uploadSimulatorDownload(
"simulator_download",
fileName,
simulator.id,
simulator.name,
gameId,
locationStr,
downloadType,
""
)
downloadDialog?.show()
}

View File

@ -2,24 +2,29 @@ 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.gamecenter.common.json.json
import com.gh.common.util.*
import com.gh.common.constant.Config
import com.gh.common.util.ApkActiveUtils
import com.gh.common.util.LogUtils
import com.gh.common.util.PackageUtils
import com.gh.download.DownloadManager
import com.gh.gamecenter.common.callback.BiCallback
import com.gh.gamecenter.common.utils.*
import com.gh.gamecenter.core.utils.*
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.entity.SimulatorGameRecordEntity
import com.gh.gamecenter.manager.UserManager
import com.gh.gamecenter.common.json.json
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.login.user.UserManager
import com.gh.gamecenter.retrofit.RetrofitManager
import com.gh.gamecenter.room.AppDatabase
import com.halo.assistant.HaloApp
@ -34,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>) {
@ -72,7 +112,7 @@ object SimulatorGameManager {
@JvmStatic
fun findDownloadEntityByUrl(url: String?): DownloadEntity? {
val downloadEntity = DownloadDao.getInstance(HaloApp.getInstance().application).get(url)
val downloadEntity = DownloadManager.getInstance().getDownloadEntityByUrl(url)
if (downloadEntity != null) {
val isFileCompleted = DownloadManager.getInstance().isDownloadCompleted(url)
if (downloadEntity.isSimulatorGame() && isFileCompleted) {
@ -88,14 +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,
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 {
@ -105,50 +164,55 @@ 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 {
getBitmapFormCache(it)
}.map {
BitmapUtils.compressBitmap(it, 100)
}.map {
val baos = ByteArrayOutputStream()
it.compress(Bitmap.CompressFormat.WEBP, 100, baos)
baos.toByteArray()
.flatMap {
getBitmapFormCache(it)
}.map {
BitmapUtils.compressBitmap(it, 100)
}.map {
val baos = ByteArrayOutputStream()
it.compress(Bitmap.CompressFormat.WEBP, 100, baos)
baos.toByteArray()
}
.compose(singleToMain())
.subscribe({
val intent = Intent()
intent.data = Uri.fromFile(File(downloadEntity.path))
if (gameEntity.simulatorType == "FBA" || gameEntity.simulatorType == "FBN") {
val apkEntity = gameEntity.getApk()[0]
intent.putExtra("rom_name", apkEntity.packageName)
}
.compose(singleToMain())
.subscribe({
val intent = Intent()
intent.data = Uri.fromFile(File(downloadEntity.path))
if (gameEntity.simulatorType == "FBA" || gameEntity.simulatorType == "FBN") {
val apkEntity = gameEntity.getApk()[0]
intent.putExtra("rom_name", apkEntity.packageName)
}
intent.putExtra("default_path", downloadEntity.path.substring(0, downloadEntity.path.lastIndexOf('/')))
intent.putExtra("game_type", gameEntity.simulatorType)
intent.putExtra("title", downloadEntity.name)
intent.putExtra("icon", gameIcon)
intent.putExtra("iconStream", it)
intent.putExtra("meta", LogUtils.getMetaObject().toString())
intent.putExtra("simulatorId", gameEntity.simulator?.id)
intent.putExtra("simulatorName", gameEntity.simulator?.name)
intent.putExtra("gameId", gameEntity.id)
intent.putExtra("default_path", downloadEntity.path.substring(0, downloadEntity.path.lastIndexOf('/')))
intent.putExtra("game_type", gameEntity.simulatorType)
intent.putExtra("title", downloadEntity.name)
intent.putExtra("icon", gameIcon)
intent.putExtra("iconStream", it)
intent.putExtra("meta", LogUtils.getMetaObject().toString())
intent.putExtra("simulatorId", gameEntity.simulator?.id)
intent.putExtra("simulatorName", gameEntity.simulator?.name)
intent.putExtra("gameId", gameEntity.id)
val destActivity = "com.gh.emu.RequestPermissionActivity"
intent.setClassName(gameEntity.simulator?.apk?.packageName ?: "", destActivity)
try {
AppManager.getInstance().recentActiveActivity?.startActivity(intent)
} catch (e: ActivityNotFoundException) {
ToastUtils.showToast("模拟器安装错误")
}
val destActivity = "com.gh.emu.RequestPermissionActivity"
intent.setClassName(gameEntity.simulator?.apk?.packageName ?: "", destActivity)
try {
AppManager.getInstance().recentActiveActivity?.startActivity(intent)
} catch (e: ActivityNotFoundException) {
ToastUtils.showToast("模拟器安装错误")
}
recordPlaySimulatorGames(gameEntity.id)
}, {
ToastUtils.showToast("跳转失败")
})
recordPlaySimulatorGames(gameEntity.id)
}, {
ToastUtils.showToast("跳转失败")
})
}
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) {
@ -174,13 +238,13 @@ object SimulatorGameManager {
requestMap["package"] = "-"
val body = requestMap.createRequestBodyAny()
RetrofitManager.getInstance().api
.downloadSimulatorGames(HaloApp.getInstance().gid, body)
.compose(singleToMain())
.subscribe(object : BiResponse<ResponseBody>() {
override fun onSuccess(data: ResponseBody) {
refreshSimulatorGame(gameId, type)
}
})
.downloadSimulatorGames(HaloApp.getInstance().gid, body)
.compose(singleToMain())
.subscribe(object : BiResponse<ResponseBody>() {
override fun onSuccess(data: ResponseBody) {
refreshSimulatorGame(gameId, type)
}
})
}
/**
@ -203,28 +267,28 @@ object SimulatorGameManager {
if (gameArray.length() == 0) return
RetrofitManager.getInstance().api
.putDownloadSimulatorGames(HaloApp.getInstance().gid, gameArray.toRequestBody())
.compose(singleToMain())
.subscribe(EmptyResponse())
.putDownloadSimulatorGames(HaloApp.getInstance().gid, gameArray.toRequestBody())
.compose(singleToMain())
.subscribe(EmptyResponse())
}
@SuppressLint("CheckResult")
private fun refreshSimulatorGame(gameId: String, type: String) {
val simulatorGameDao = AppDatabase.getInstance().simulatorGameDao()
RetrofitManager.getInstance().api
.getSimulatorGames(HaloApp.getInstance().gid, 1, getFilter(type))
.compose(singleToMain())
.subscribe(object : BiResponse<List<GameEntity>>() {
override fun onSuccess(data: List<GameEntity>) {
val simulatorGameRecordList = ArrayList<SimulatorGameRecordEntity>()
data.forEach {
val entity = it.convertSimulatorGameRecordEntity()
entity.isRecentlyPlayed = it.id == gameId
simulatorGameRecordList.add(entity)
}
simulatorGameDao.addSimulatorGameList(simulatorGameRecordList)
.getSimulatorGames(HaloApp.getInstance().gid, 1, getFilter(type))
.compose(singleToMain())
.subscribe(object : BiResponse<List<GameEntity>>() {
override fun onSuccess(data: List<GameEntity>) {
val simulatorGameRecordList = ArrayList<SimulatorGameRecordEntity>()
data.forEach {
val entity = it.convertSimulatorGameRecordEntity()
entity.isRecentlyPlayed = it.id == gameId
simulatorGameRecordList.add(entity)
}
})
simulatorGameDao.addSimulatorGameList(simulatorGameRecordList)
}
})
}
private fun getFilter(type: String): String {
@ -242,9 +306,9 @@ object SimulatorGameManager {
requestMap["package"] = packageName
val body = requestMap.toRequestBody()
RetrofitManager.getInstance().api
.postPlayedGame(UserManager.getInstance().userId, body)
.compose(singleToMain())
.subscribe(EmptyResponse())
.postPlayedGame(UserManager.getInstance().userId, body)
.compose(singleToMain())
.subscribe(EmptyResponse())
}
}
@ -259,10 +323,10 @@ object SimulatorGameManager {
requestMap["package"] = "-"
val body = requestMap.createRequestBodyAny()
RetrofitManager.getInstance().api
.playedSimulatorGames(HaloApp.getInstance().gid, body)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(EmptyResponse())
.playedSimulatorGames(HaloApp.getInstance().gid, body)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(EmptyResponse())
}
/**
@ -271,14 +335,14 @@ object SimulatorGameManager {
@SuppressLint("CheckResult")
fun deleteSimulatorGame(gameId: String, callback: () -> Unit) {
RetrofitManager.getInstance().api
.deleteSimulatorGame(HaloApp.getInstance().gid, gameId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(object : BiResponse<ResponseBody>() {
override fun onSuccess(data: ResponseBody) {
callback.invoke()
}
})
.deleteSimulatorGame(HaloApp.getInstance().gid, gameId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(object : BiResponse<ResponseBody>() {
override fun onSuccess(data: ResponseBody) {
callback.invoke()
}
})
}
/**
@ -290,14 +354,14 @@ object SimulatorGameManager {
val requestMap = hashMapOf<String, Any>()
requestMap["game_ids"] = gameIds
RetrofitManager.getInstance().api
.deleteSimulatorGames(HaloApp.getInstance().gid, requestMap.toRequestBody())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(object : BiResponse<ResponseBody>() {
override fun onSuccess(data: ResponseBody) {
callback.invoke()
}
})
.deleteSimulatorGames(HaloApp.getInstance().gid, requestMap.toRequestBody())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(object : BiResponse<ResponseBody>() {
override fun onSuccess(data: ResponseBody) {
callback.invoke()
}
})
}
/**
@ -307,27 +371,29 @@ object SimulatorGameManager {
@SuppressLint("CheckResult")
fun deleteAllSimulatorGame() {
RetrofitManager.getInstance().api
.deleteAllSimulatorGame(HaloApp.getInstance().gid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(EmptyResponse())
.deleteAllSimulatorGame(HaloApp.getInstance().gid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(EmptyResponse())
}
private fun updateSimulatorConfigFile(gameId: String) {
RetrofitManager.getInstance()
.api
.getGameDigest(gameId)
.map(ApkActiveUtils.filterMapper)
.subscribeOn(Schedulers.io())
.subscribe(object : Response<GameEntity>() {
override fun onResponse(game: GameEntity?) {
game?.let {
if (!TextUtils.isEmpty(game.simulatorGameConfig)) {
val configFilePath = getPathByType(game.simulatorType + "/cheat/" + game.getApk().firstOrNull()?.packageName + ".ini")
FileUtils.downloadAndUpdateFile(game.simulatorGameConfig, configFilePath)
}
.api
.getGameDigest(gameId)
.map(ApkActiveUtils.filterMapper)
.subscribeOn(Schedulers.io())
.subscribe(object : Response<GameEntity>() {
override fun onResponse(game: GameEntity?) {
game?.let {
if (!TextUtils.isEmpty(game.simulatorGameConfig)) {
val configFilePath = getPathByType(
game.simulatorType + "/cheat/" + game.getApk().firstOrNull()?.packageName + ".ini"
)
FileUtils.downloadAndUpdateFile(game.simulatorGameConfig, configFilePath)
}
}
})
}
})
}
}

View File

@ -22,16 +22,16 @@ object ActivationHelper {
fun sendActivationInfo() {
if (!mHasSentActivatedInfo) {
RetrofitManager.getInstance()
.api.postActivationInfo()
.subscribeOn(Schedulers.io())
.subscribe(object : Response<ResponseBody>() {
override fun onResponse(response: ResponseBody?) {
super.onResponse(response)
.api.postActivationInfo()
.subscribeOn(Schedulers.io())
.subscribe(object : Response<ResponseBody>() {
override fun onResponse(response: ResponseBody?) {
super.onResponse(response)
mHasSentActivatedInfo = true
SPUtils.setBoolean(HAS_SENT_ACTIVATED_INFO, true)
}
})
mHasSentActivatedInfo = true
SPUtils.setBoolean(HAS_SENT_ACTIVATED_INFO, true)
}
})
}
}

View File

@ -0,0 +1,78 @@
package com.gh.common.util
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"))
}
@JvmStatic
fun postActivityPageEnter(url: String?, entrance: String) {
if (url?.contains(ACTIVITY_URL_COMMON_PREF) == true) {
val uri = Uri.parse(url)
val activityId = uri.getQueryParameter("id") ?: return
NewFlatLogUtils.logActivityPageEnter(transformEntrance(entrance), activityId)
}
}
private fun transformEntrance(originalEntrance: String): String {
return when {
originalEntrance.contains("(启动广告)") -> "开屏页"
originalEntrance.contains(EntranceConsts.ENTRANCE_WELCOME) -> "首页弹窗"
originalEntrance.contains("首页tab") -> "首页二级导航"
originalEntrance.contains("论坛-活动") -> "活动tab"
originalEntrance.contains("新首页-轮播图") -> "首页banner"
originalEntrance.contains("资讯") -> "资讯广场"
else -> originalEntrance
}
}
fun startCountStayTime(url: String) {
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)
}
}
}
}
fun endCountStayTime() {
mIsStayTimeCountEnabled = false
mStayTimeCount = 0
}
}

View File

@ -31,14 +31,14 @@ object AdHelper {
}
RetrofitManager.getInstance()
.api
.getSplashAd(HaloApp.getInstance().channel)
.subscribeOn(Schedulers.io())
.subscribe(object : BiResponse<StartupAdEntity>() {
override fun onSuccess(data: StartupAdEntity) {
startupAd.postValue(data)
}
})
.api
.getSplashAd(HaloApp.getInstance().channel)
.subscribeOn(Schedulers.io())
.subscribe(object : BiResponse<StartupAdEntity>() {
override fun onSuccess(data: StartupAdEntity) {
startupAd.postValue(data)
}
})
}
fun getAd(location: String): SettingsEntity.AD? {
@ -54,7 +54,7 @@ object AdHelper {
val adList = Config.getSettings()?.adList ?: return null
var result: SettingsEntity.AD? = null
run outside@ {
run outside@{
for (ad in adList) {
if (ad.location == location) {
result = ad

View File

@ -94,7 +94,7 @@ object BbsReportHelper {
binding.otherReasonEt.doOnTextChanged { text, start, before, count ->
val tvCount: Int = text.toString().length
if (tvCount >= 500) {
binding.tvCount.setTextColor(R.color.theme_red.toColor())
binding.tvCount.setTextColor(R.color.theme_red.toColor(binding.tvCount.context))
}
binding.tvCount.text = "$tvCount/500"
}
@ -120,7 +120,10 @@ object BbsReportHelper {
override fun onFailure(exception: Exception) {
super.onFailure(exception)
if (exception is HttpException) {
ErrorHelper.handleError(HaloApp.getInstance().application, exception.response().errorBody()?.string())
ErrorHelper.handleError(
HaloApp.getInstance().application,
exception.response().errorBody()?.string()
)
}
}
})

View File

@ -114,18 +114,18 @@ object BbsStayTimeHelper {
@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()
.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

@ -0,0 +1,28 @@
package com.gh.common.util
import android.annotation.SuppressLint
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.common.utils.singleToMain
import com.gh.gamecenter.common.retrofit.BiResponse
import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.retrofit.RetrofitManager
import com.google.gson.JsonObject
object CertificationSwitchHelper {
@JvmStatic
@SuppressLint("CheckResult")
fun getCertificationSwitch() {
RetrofitManager.getInstance().api
.certificationSwitch
.compose(singleToMain())
.subscribe(object : BiResponse<JsonObject>() {
override fun onSuccess(data: JsonObject) {
SPUtils.setBoolean(
Constants.SP_CERTIFICATION_SWITCH,
data["authentication_display_switch"].asString == "on"
)
}
})
}
}

View File

@ -8,10 +8,11 @@ import android.text.TextUtils;
import com.gh.gamecenter.common.constant.EntranceConsts;
import com.gh.gamecenter.core.utils.CurrentActivityHolder;
import com.gh.gamecenter.common.constant.Constants;
import com.gh.gamecenter.LoginActivity;
import com.gh.gamecenter.login.utils.QuickLoginHelper;
import com.gh.gamecenter.login.view.LoginActivity;
import com.gh.gamecenter.common.utils.NetworkUtils;
import com.gh.gamecenter.core.utils.SPUtils;
import com.gh.gamecenter.manager.UserManager;
import com.gh.gamecenter.login.user.UserManager;
import com.lightgame.utils.Utils;
@ -28,14 +29,7 @@ public class CheckLoginUtils {
LogUtils.login("activity", null, entrance);
if (SPUtils.getBoolean(Constants.SP_HAS_GET_PHONE_INFO) || NetworkUtils.isOpenMobileData(context)) {
// 需要确保传入的 context 不为 application
if (!(context instanceof Activity)) {
context = CurrentActivityHolder.getCurrentActivity();
}
if (context != null) {
QuickLoginHelper.startLogin(context, entrance);
}
startQuickLogin(context, entrance);
} else {
// 有可能App未启动
Bundle bundle = new Bundle();
@ -50,6 +44,17 @@ public class CheckLoginUtils {
}
}
private static void startQuickLogin(Context context, String entrance) {
// 需要确保传入的 context 不为 application
if (!(context instanceof Activity)) {
context = CurrentActivityHolder.getCurrentActivity();
}
if (context != null) {
QuickLoginHelper.startLogin(context, entrance);
}
}
public static void checkLogin(final Context context, Bundle nextToBundle, boolean isTriggerNextStep, String entrance, OnLoginListener listener) {
if (!isLogin()) {
if (listener != null) Utils.toast(context, "需要登录");

View File

@ -2,7 +2,7 @@ package com.gh.common.util
import android.content.Context
import com.gh.gamecenter.eventbus.EBCollectionChanged
import com.gh.gamecenter.manager.UserManager
import com.gh.gamecenter.login.user.UserManager
import com.gh.gamecenter.common.retrofit.Response
import com.gh.gamecenter.retrofit.RetrofitManager
import io.reactivex.Observable
@ -25,64 +25,70 @@ object CollectionUtils {
fun postCollection(context: Context, content: String, type: CollectionType, listener: OnCollectionListener) {
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 -> 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)
else -> return
}
postCollection
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(object : Response<ResponseBody>() {
override fun onResponse(response: ResponseBody?) {
super.onResponse(response)
listener.onSuccess()
EventBus.getDefault().post(EBCollectionChanged(content, true, type))
}
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(object : Response<ResponseBody>() {
override fun onResponse(response: ResponseBody?) {
super.onResponse(response)
listener.onSuccess()
EventBus.getDefault().post(EBCollectionChanged(content, true, type))
}
override fun onFailure(e: HttpException?) {
super.onFailure(e)
if (e != null) {
try {
val string = e.response()?.errorBody()?.string()
val errorBody = JSONObject(string)
if (errorBody.getInt("code") == 403009) {
listener.onSuccess()
return
}
} catch (e: Exception) {
e.printStackTrace()
override fun onFailure(e: HttpException?) {
super.onFailure(e)
if (e != null) {
try {
val string = e.response()?.errorBody()?.string()
val errorBody = JSONObject(string)
if (errorBody.getInt("code") == 403009) {
listener.onSuccess()
return
}
} catch (e: Exception) {
e.printStackTrace()
}
listener.onError()
}
})
listener.onError()
}
})
}
fun deleteCollection(context: Context, id: String, type: CollectionType, listener: OnCollectionListener) {
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)
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)
else -> return
}
postCollection
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(object : Response<ResponseBody>() {
override fun onResponse(response: ResponseBody?) {
super.onResponse(response)
listener.onSuccess()
EventBus.getDefault().post(EBCollectionChanged(id, false, type))
}
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(object : Response<ResponseBody>() {
override fun onResponse(response: ResponseBody?) {
super.onResponse(response)
listener.onSuccess()
EventBus.getDefault().post(EBCollectionChanged(id, false, type))
}
override fun onFailure(e: HttpException?) {
super.onFailure(e)
listener.onError()
}
})
override fun onFailure(e: HttpException?) {
super.onFailure(e)
listener.onError()
}
})
}

View File

@ -5,21 +5,21 @@ import android.view.LayoutInflater
import android.view.View
import android.widget.LinearLayout
import android.widget.TextView
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.common.json.json
import com.gh.common.util.CommentUtils.copyText
import com.gh.gamecenter.common.view.BugFixedPopupWindow
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.manager.UserManager
import com.gh.gamecenter.login.user.UserManager
import com.gh.gamecenter.qa.comment.OnCommentOptionClickListener
import com.gh.gamecenter.common.retrofit.Response
import com.gh.gamecenter.retrofit.RetrofitManager
import com.halo.assistant.HaloApp
import com.lightgame.utils.Utils
@ -162,7 +162,8 @@ object CommentHelper {
}
if (questionId != null &&
commentEntity.me?.isModerator == true &&
(commentEntity.me?.moderatorPermissions?.highlightAnswer ?: Permissions.GUEST) > Permissions.GUEST && !commentEntity.choiceness
(commentEntity.me?.moderatorPermissions?.highlightAnswer
?: Permissions.GUEST) > Permissions.GUEST && !commentEntity.choiceness
) {
dialogOptions.add("加精选")
}
@ -237,8 +238,6 @@ object CommentHelper {
}
articleId != null -> {
PostCommentUtils.reportCommunityArticleComment(
communityId,
articleId,
commentEntity.id,
reportType,
commentListener
@ -440,11 +439,7 @@ object CommentHelper {
context, highlight, highlightDialogHintContent,
"确定", "取消", {
RetrofitManager.getInstance().api
.highlightCommunityArticleComment(
communityId,
articleId,
comment.id
)
.highlightCommunityArticleComment(comment.id)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.subscribe(highlightObserver)
@ -502,7 +497,7 @@ object CommentHelper {
context, hide, hideDialogHintContent,
"确定", "取消", {
RetrofitManager.getInstance().api
.hideCommunityArticleComment(communityId, articleId, comment.id)
.hideCommunityArticleComment(comment.id)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.subscribe(hideObserver)

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