Compare commits

...

621 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
48459c84e1 fix: 隐私弹窗链接跳转至外部浏览器打开 2022-09-29 15:17:39 +08:00
8f72f80788 fix: 避免隐私政策通过前获取 rom 信息 2022-09-29 14:57:48 +08:00
13e9ba4f48 fix: 移除 android.permission.GET_TASKS 权限 2022-09-28 21:00:03 +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
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
1d96e1f92d fix: 还原在工作线程处理视频日志 2022-09-26 12:01:16 +08:00
90a8cce831 fix: 提高触发 WorkManager 的阈值,规避因为空间不足导致的各种奇怪闪退 2022-09-26 11:36:56 +08:00
9bf019530d fix: 修复游戏下载完成后将状态改为查看引起的点击闪退 2022-09-26 11:31:42 +08:00
176dc4fe02 fix: 使用工作线程调用日志上报方法,避免部分性能较差设备 ANR 2022-09-26 11:20:43 +08:00
739413f450 fix: 修复首页列表分页刷新时偶发的数组越界问题 2022-09-26 09:53:22 +08:00
63f315e294 chore: 版本更新至 5.12.7 2022-09-21 11:33:30 +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
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
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
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
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
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
1e96f3e11b fix: 版本更新至 5.12.4 2022-09-09 11:30:10 +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
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
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
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
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
2ff948dab1 fix: 缓存畅玩游戏游玩时间和占用空间,修复畅玩游戏 newIntent 时 tab 定位不生效的问题 2022-08-30 15:33:47 +08:00
7dd0bdfd73 Merge remote-tracking branch 'origin/release' into dev 2022-08-30 14:10:14 +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
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
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
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
5a7001dd66 fix: 修复部分设备不能获取已安装应用列表的问题 2022-08-24 17:36:12 +08:00
39d3c4d3c8 fix: 修复未安装畅玩游戏在列表中会找不到的问题 2022-08-19 17:59:52 +08:00
443c8d7eaf fix: 修复备份畅玩游戏异常, 2022-08-19 17:53:52 +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
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
6b6a7dd81e fix: 修复畅玩游戏管理页面lottie开关动画闪退问题 2022-08-17 17:45:50 +08:00
22c06286c2 fix: 修改首页游戏卡片下载按钮不会根据下载状态变更显示样式问题 2022-08-17 16:57:00 +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
d9665a8464 fix: 修复应用启动时没有安装畅玩助手也会出发连接尝试的问题 2022-08-17 10:46:36 +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
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
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
2bf662ee27 fix: 修复首页游戏大图卡片副标题超长时与下载按钮重叠的问题 2022-08-11 16:00:59 +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
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
9009567226 feat: 更新微博 SDK (避免初始化获取 MAC 地址) 2022-08-08 17:25:25 +08:00
5d21f4e29f feat: 畅玩游戏发布相关准备 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2000 2022-08-08 15:38:27 +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
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
140012e000 chore: 版本更新至 5.11.1 2022-07-18 16:38:44 +08:00
dd29cd586f Merge remote-tracking branch 'origin/legacy-release' into release
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/SearchActivity.kt
#	app/src/main/java/com/gh/gamecenter/SuggestionActivity.java
#	dependencies.gradle
2022-07-18 16:12:02 +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
8088627de3 Merge branch 'hotfix-v5.10.4-554-crash_log_feedback' into 'legacy-release'
fix: 修复反馈的闪退记录有机率不能上报到后台的问题

See merge request halo/android/assistant-android!292
2022-07-15 14:32:50 +08:00
1042ed675f fix: 修复反馈的闪退记录有机率不能上报到后台的问题 2022-07-15 14:31:37 +08:00
cad0233509 Merge branch 'hotfix-v5.10.4-554-crashes' into 'legacy-release'
fix: 修复游戏详情副标题、查看大图页面的闪退问题

See merge request halo/android/assistant-android!291
2022-07-15 11:17:39 +08:00
bbf20c20a2 fix: 修复游戏详情副标题、查看大图页面的闪退问题 2022-07-15 10:42:18 +08:00
5e662ef5fe Merge branch 'hotfix-v5.10.4-554-generic_crashs' into 'legacy-release'
捕抓一些非关键异常

See merge request halo/android/assistant-android!290
2022-07-15 10:41:19 +08:00
01830c7e81 fix: 捕抓插入数据库异常 2022-07-15 10:39:26 +08:00
dd2116a12b fix: 捕抓跳转 QQ 反馈的异常 2022-07-15 10:39:02 +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
772d5de3d9 Merge branch 'hotfix-v5.10.4-554-libao_crash' into 'legacy-release'
修改礼包搜索闪退问题

See merge request halo/android/assistant-android!289
2022-07-14 10:15:48 +08:00
8f55051748 fix: 修改礼包搜索闪退问题 2022-07-14 10:12:40 +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
163ffd9308 Merge branch 'hotfix-v5.11.0-570-game_detail_scroll_top_crash' into 'release'
fix:修复游戏详情页点击标题栏回到顶部时的数组越界问题

See merge request halo/android/assistant-android!288
2022-07-12 15:40:42 +08:00
762c43bd6f fix: 修复重新下载取消任务时会触发异常安装的问题,修复未下载完成的任务也可能触发安装的问题 2022-07-12 15:39:00 +08:00
lyr
0660e132aa fix:修复游戏详情页点击标题栏回到顶部时的数组越界问题 2022-07-12 15:24:09 +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
b0f2d3f068 chore: 版本更新至 5.10.4 2022-07-11 14:36:43 +08:00
a25cd0a07f Merge branch 'hotfix-v5.10.3-553-download_red_dot_and_input_keyboard' into 'legacy-release'
fix: 还原 LG Library, 处理首页红点问题, 处理进入搜索页的软键盘唤起问题

See merge request halo/android/assistant-android!287
2022-07-11 14:34:46 +08:00
1fc43ca588 fix: 还原 LG Library, 处理首页红点问题, 处理进入搜索页的软键盘唤起问题 2022-07-11 14:31:45 +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
2be268b2e6 Merge branch 'hotfix-v5.11.0-570-image_viewer' into 'release'
fix: 修复游戏详情查看大图动画位置出现异常的问题

See merge request halo/android/assistant-android!286
2022-07-08 16:48:28 +08:00
8f5aee3a8c fix: 修复游戏详情查看大图动画位置出现异常的问题 2022-07-08 16:45:48 +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
ad12b3f9ef build: 补充编译时需要移除的夜间模式资源位置 2022-07-08 14:53:01 +08:00
7bf56cc342 Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	dependencies.gradle
2022-07-08 14:05:13 +08:00
176d4dd940 fix: 版本更新至 5.10.3 2022-07-08 13:36:55 +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
e7c4ffdd8a Merge remote-tracking branch 'origin/release' into dev 2022-07-08 11:51:47 +08:00
05747c2ecf Merge branch 'hotfix-v5.10.2-552-provider-crash' into 'release'
fix: contentProvider部分机型闪退

See merge request halo/android/assistant-android!285
2022-07-08 11:50:08 +08:00
3241ff9935 fix: contentProvider部分机型闪退 2022-07-08 11:49:39 +08:00
6e40349f20 Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	dependencies.gradle
2022-07-08 11:31:43 +08:00
0675eab81a Merge branch 'hotfix-v5.10.2-552-crashes' into 'release'
fix: 修复游戏详情副标题、查看大图页面的闪退问题

See merge request halo/android/assistant-android!284
2022-07-08 11:30:13 +08:00
8c9b1371dc fix: 修复游戏详情副标题、查看大图页面的闪退问题 2022-07-08 11:24:50 +08:00
e6daee0faf Merge branch 'hotfix-v5.10.2-552-fix_download_hint' into 'release'
fix: 修复首页红点更新异常

See merge request halo/android/assistant-android!283
2022-07-08 11:03:15 +08:00
45d8e5a869 fix: 修复首页红点更新异常 2022-07-08 11:02:30 +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
lyr
919db31ec3 fix:修复升级Loghub数据库时未添加默认值的错误 2022-07-08 09:28:07 +08:00
f716712f14 Merge branch 'hotfix-v5.10.2-552-disk_full_crash' into 'release'
fix:修复下载添加Worker时因手机可用存储空间不足导致的闪退问题

See merge request halo/android/assistant-android!280
2022-07-07 18:21:59 +08:00
lyr
30a110e83b fix:修复下载添加Worker时因手机可用存储空间不足导致的闪退问题 2022-07-07 18:18:07 +08:00
c62dd66ad7 fix: 修复因混淆后导致的类型转换错误问题 2022-07-07 16:23:38 +08:00
ff876a55ba fix: 全局替换fragment的tag为xx.class.java.name 2022-07-07 16:22:09 +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
8b00b1bb2a Merge branch 'hotfix-v5.10.2-552-class_cast_error' into 'release'
修复因混淆后导致的类型转换错误问题

See merge request halo/android/assistant-android!279
2022-07-07 15:32:04 +08:00
923bdc1639 fix: 修复因混淆后导致的类型转换错误问题 2022-07-07 15:18:22 +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
0b1991e34d Merge branch 'hotfix-v5.10.2-552-toolbox' into 'release'
fix:修复工具箱页面回到前台时出现空白的最近使用列表的问题

See merge request halo/android/assistant-android!276
2022-07-07 14:13:24 +08:00
lyr
78d5d4b39f feat:升级Loghub数据库 2022-07-07 14:09:20 +08:00
83199b6a4e fix:修复工具箱页面回到前台时出现空白的最近使用列表的问题 2022-07-07 14:07:35 +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
lyr
040de6d458 feat:增加平铺埋点功能 2022-07-07 10:26:29 +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
ba763e9d9c fix:【夜间模式】UI测试调整问题汇总(7月第1周)(第6点遗漏)https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1957 2022-07-06 15:11:39 +08:00
928bb54f27 fix:【夜间模式】UI测试调整问题汇总(7月第1周)(第6点遗漏)https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1957 2022-07-06 14:54:30 +08:00
db1da76ff6 fix: 【光环助手V5.11.0】同步正式相关问题汇总(0706反馈) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1958 2022-07-06 13:52:30 +08:00
425fcf0554 fix: 修复5.0以下系统夜间模式切换浮窗按钮显示不正常的问题 2022-07-06 11:05:10 +08:00
89c2a58914 fix:【夜间模式】UI测试调整问题汇总(7月第1周)https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1957 2022-07-06 09:31:56 +08:00
850b80688a fix:修复矢量图在5.0以下系统造成的闪退 2022-07-06 09:23:19 +08:00
60d5f1244e fix: 【光环助手V5.11.0】同步正式相关问题汇总(3) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1958 2022-07-05 17:22:32 +08:00
lyr
979081dd7b fix:【光环助手V5.11.0】同步正式相关问题汇总(2) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1958 2022-07-05 11:49:09 +08:00
9348f324d0 chore: 版本更新至 5.10.2 2022-07-04 15:36:31 +08:00
0b2148b105 perf: 移除无用的速度限制代码 2022-07-04 11:59:55 +08:00
427e219677 Merge remote-tracking branch 'origin/release' into dev 2022-07-01 15:32:28 +08:00
d0abf6c536 fix:修复浏览器安装变量未初始化造成的闪退 2022-07-01 15:27:20 +08:00
efbaa821a1 Merge branch 'hotfix-v5.10.1-551-browser_install_crash' into 'release'
fix:修复浏览器安装变量未初始化造成的闪退

See merge request halo/android/assistant-android!273
2022-07-01 15:26:21 +08:00
72d96dae47 fix:修复浏览器安装变量未初始化造成的闪退 2022-07-01 15:24:14 +08:00
9f53652a00 fix:【夜间模式】UI测试调整问题汇总(6月第1周)(0630测试问题汇总) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1901
【夜间模式】UI测试调整问题汇总(6月第2周)(0630测试问题汇总) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1915
2022-07-01 15:19:23 +08:00
7c8670d82c Merge remote-tracking branch 'origin/release' into dev 2022-07-01 14:13:02 +08:00
lyr
fb26e77c78 fix: 修复社区首页获取顶部背景宽高为0的问题 2022-07-01 14:12:21 +08:00
75e7b6620d feat: 添加实名认证页面跳转 scheme 2022-07-01 12:02:40 +08:00
cfd9e61ad2 fix: 处理合并冲突 2022-07-01 11:58:18 +08:00
7d922f9620 Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/forum/home/ForumFragment.kt
#	app/src/main/java/com/gh/gamecenter/retrofit/service/ApiService.java
#	dependencies.gradle
2022-07-01 11:34:26 +08:00
05bd26605b Merge branch 'hotfix-v5.10.0-551-browser_install' into 'release'
fix:修复某些机型端口占用导致浏览器安装失败的问题

See merge request halo/android/assistant-android!272
2022-06-30 15:16:10 +08:00
a91af5035d fix:修复某些机型端口占用导致浏览器安装失败的问题 2022-06-30 15:12:43 +08:00
e5de70af66 feat: 【光环助手V_5.11.0】国际服游戏下载弹窗优化 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1933 2022-06-30 11:06:12 +08:00
3f7996f523 处理 SonarQube 问题 2022-06-29 13:49:44 +08:00
78b0c2e1cd fix:【夜间模式】UI测试调整问题汇总(6月第2周)https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1915 2022-06-29 11:06:06 +08:00
b0047717bf 处理 SonarQube 问题 2022-06-27 09:39:33 +08:00
4f1a18479e fix:【光环助手V5.11.0】多版本下载面板-求版本优化(UI测试问题汇总1-2) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1893 2022-06-24 15:07:38 +08:00
3df078bbd6 fix:【光环助手V5.11.0】前端优化汇总6月第3周(8) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1928 2022-06-24 13:57:30 +08:00
d841dc635a fix: 修复外部 url 跳转反馈页闪退问题 2022-06-24 12:01:34 +08:00
ea0633e903 fix:【光环助手V5.11.0】多版本下载面板-求版本优化(0622测试1) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1893 2022-06-23 17:51:50 +08:00
cc34fc3a29 fix: 【光环助手V5.11.0】前端优化汇总6月第3周(9-12) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1928 2022-06-23 10:24:04 +08:00
3144c49764 fix:【光环助手V5.11.0】前端优化汇总6月第3周(8) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1928 2022-06-22 16:20:12 +08:00
lyr
45cc25e873 fix:【光环助手V5.11.0】前端优化汇总6月第3周(7(1))https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1928 2022-06-22 14:46:35 +08:00
0fba6239ce Merge branch 'cherry-pick-eb91e53a' into 'dev'
fix:修复社区-论坛滑动轮播图闪退问题

See merge request halo/android/assistant-android!271
2022-06-22 14:25:26 +08:00
lyr
9eb1bc5f4d fix:修复社区-论坛滑动轮播图闪退问题
(cherry picked from commit eb91e53a7b)
2022-06-22 14:24:34 +08:00
56e5fb6a40 fix:【光环助手V5.11.0】多版本下载面板-求版本优化(上传进度改为显示真实进度) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1893 2022-06-22 11:38:24 +08:00
lyr
4b343e0185 fix:【光环助手V5.11.0】前端优化汇总6月第3周(6) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1928 2022-06-21 16:19:17 +08:00
4bcc0bc961 fix: 修改游戏-评论详情底部的阴影显示异常 2022-06-20 16:41:07 +08:00
lyr
952a56508a fix:【光环助手V5.11.0】前端优化汇总6月第3周(1)https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1928 2022-06-20 16:34:48 +08:00
47583a1837 feat: 【光环助手V5.11.0】前端优化汇总6月第3周(4) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1928 2022-06-20 15:37:12 +08:00
09a357c1c2 fix: 修复无法切换测试环境和正式环境的问题 2022-06-20 15:18:01 +08:00
73c5da28d3 fix:【光环助手V5.11.0】多版本下载面板-求版本优化(0617测试2) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1893 2022-06-20 14:04:57 +08:00
9f7514079a Merge branch 'release' of git.shanqu.cc:halo/android/assistant-android into release 2022-06-17 17:36:50 +08:00
8c1f8dd5ec Merge branch 'hotfix-v5.10.0-550-video_comment_ui' into 'release'
修改视频流评论页面无数据显示问题

See merge request halo/android/assistant-android!269
2022-06-17 17:36:12 +08:00
93ce3fcfc8 修改视频流评论页面无数据显示问题 2022-06-17 17:32:55 +08:00
5e11211b4c chore: 版本更新至 5.10.1 2022-06-17 13:53:45 +08:00
a12199f847 Merge branch 'legacy-release-rebase' into 'release'
合并 5.9.x 代码变更

See merge request halo/android/assistant-android!268
2022-06-16 14:48:45 +08:00
64a70c5ab3 fix: 合并冲突 2022-06-16 14:45:18 +08:00
lyr
27a7474c92 1.V5.9.2UI问题 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1922;
2.fix:修复社区-论坛滑动轮播图闪退问题
2022-06-16 13:59:54 +08:00
eba6b4b660 fix: 修复 OAID 获取异常造成推广包接口失效问题 2022-06-16 13:59:39 +08:00
1ea147d43d feat: 实名认证功能 https://git.shanqu.cc/pm/halo-plugin-issues/-/issues/221 2022-06-16 13:59:39 +08:00
084169db8f Merge branch 'hotfix-release-forum_banner_crash' into 'release'
fix:修复社区-论坛滑动轮播图闪退问题

See merge request halo/android/assistant-android!267
2022-06-16 10:02:41 +08:00
lyr
eb91e53a7b fix:修复社区-论坛滑动轮播图闪退问题 2022-06-16 10:01:31 +08:00
29b31d64e7 fix:【夜间模式】UI测试调整问题汇总(6月第1周)https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/1901 2022-06-15 17:59:46 +08:00
d5a2b9f705 refactor: 整理闪屏页代码 2022-06-15 15:57:37 +08:00
b34134d9ed fix: 处理部分引导页代码 warning 2022-06-15 09:58:30 +08:00
8d0719f642 perf: 移除首页无用的 MTA 停留时长统计代码 2022-06-15 09:53:50 +08:00
22a09f2775 Merge branch 'hotfix-v5.10.0-550-oaid_null_pointer' into 'release'
fix: 修复 oaid 获取为空时的接口问题

See merge request halo/android/assistant-android!263
2022-06-14 13:46:43 +08:00
ead2f04bd3 fix: 修复 oaid 获取为空时的接口问题 2022-06-14 13:45:24 +08:00
bed6b9190f Merge branch 'hotfix-v5.10.0-550_crashes' into 'release'
修改sentry上的闪退问题

See merge request halo/android/assistant-android!262
2022-06-14 10:58:11 +08:00
d95519252d fix: 修改sentry上的闪退问题 2022-06-14 10:51:35 +08:00
aa21a8b9af build: 暂时关闭 AndResguard 2022-06-14 10:26:25 +08:00
d099181247 chore: 版本更新至 5.11.0 2022-06-14 10:07:56 +08:00
622accea9a Merge remote-tracking branch 'origin/dev' into dev-5.11.0 2022-06-14 10:00:15 +08:00
00627842a6 fix: 合并冲突 2022-06-14 09:38:38 +08:00
198d3d7159 Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionAmwayAdapter.kt
#	app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionBannerAdapter.kt
#	dependencies.gradle
2022-06-14 09:22:31 +08:00
lyr
c6352aa901 【光环助手v5.11.0】论坛详情页相关优化(1)https://git.shanqu.cc/pm/halo-app-issues/-/issues/1880 2022-06-13 17:03:21 +08:00
lyr
f15abb14e2 【光环助手v5.11.0】论坛详情页相关优化(2、3)https://git.shanqu.cc/pm/halo-app-issues/-/issues/1880 2022-06-13 16:23:12 +08:00
e3c2d9509a feat:【光环助手V5.11.0】多版本下载面板-求版本优化(遗漏) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1893 2022-06-13 14:58:54 +08:00
93515bdc17 feat:【光环助手V5.11.0】多版本下载面板-求版本优化 https://git.shanqu.cc/pm/halo-app-issues/-/issues/1893 2022-06-13 11:11:07 +08:00
56ca7631ad feat:【光环助手V5.11.0】多版本下载面板-求版本优化 https://git.shanqu.cc/pm/halo-app-issues/-/issues/1893 2022-06-13 10:51:47 +08:00
lyr
bde31622b4 fix:修复消息中心页面重建后变空白了问题 2022-06-13 10:18:42 +08:00
00825e7d8e fix: 修复实名认证页面以 X 结尾的身份证号无法去敏的问题 2022-06-13 09:56:33 +08:00
lyr
fb5bbeada6 【光环助手V5.10.0】同步正式环境后测试问题汇总(15)https://git.shanqu.cc/pm/halo-app-issues/-/issues/1900 2022-06-10 11:27:51 +08:00
lyr
6a8757d152 【光环助手V5.10.0】同步正式环境后测试问题汇总(12)https://git.shanqu.cc/pm/halo-app-issues/-/issues/1900 2022-06-09 18:09:13 +08:00
f9c32c3bb7 fix:【光环助手V5.10.0】同步正式环境后测试问题汇总(第5点)https://git.shanqu.cc/pm/halo-app-issues/-/issues/1900 2022-06-09 16:38:38 +08:00
5ca0e26775 fix:【光环助手V5.10.0】同步正式环境后测试问题汇总(第5点测试)https://git.shanqu.cc/pm/halo-app-issues/-/issues/1900 2022-06-09 10:49:36 +08:00
b87138bf58 feat: 【光环助手v5.11.0】外链分享旧链接替换 https://git.shanqu.cc/pm/halo-app-issues/-/issues/1902 2022-06-09 10:20:49 +08:00
lyr
89563a17ea 【光环助手V5.10.0】同步正式环境后测试问题汇总(0608测试反馈第8点)https://git.shanqu.cc/pm/halo-app-issues/-/issues/1900#note_152656 2022-06-09 10:05:48 +08:00
lyr
931903490a 【光环助手V5.10.0】同步正式环境后测试问题汇总(6)https://git.shanqu.cc/pm/halo-app-issues/-/issues/1900 2022-06-08 16:20:58 +08:00
lyr
4fc2e2a0f0 【光环助手V5.10.0】同步正式环境后测试问题汇总(6、8) 2022-06-08 11:37:01 +08:00
a0180b78d7 build: 修改升级至 AGP7 以后字节码插桩优化不可用 https://git.shanqu.cc/halo/android/assistant-android/-/issues/71 2022-06-07 15:28:20 +08:00
ddbf2a9fba Merge branch 'feature-agp7' into 'dev-5.11.0'
perf: 更新 AGP 到最新的 7.X

See merge request halo/android/assistant-android!259
2022-06-06 14:43:01 +08:00
84fe77c6ac docs: 把 Commit message 规范添加到 README 2022-06-06 14:34:25 +08:00
74455c40a1 fix: 测试用渠道选择异常 2022-06-06 14:30:34 +08:00
9a106534fb fix: 测试用渠道选择异常 2022-06-06 14:29:42 +08:00
eed764b16e Merge branch 'new-issues-66' into 'dev'
优化渠道获取的相关代码

See merge request halo/android/assistant-android!258
2022-06-06 13:46:31 +08:00
3a652b4d4f 优化渠道获取的相关代码 https://git.shanqu.cc/halo/android/assistant-android/-/issues/66 2022-06-06 13:46:31 +08:00
3c18ed9a31 Merge branch 'hotfix-v5.9.1-533-minor_ui_tuned' into 'release'
修复游戏详情页下载区域阴影显示异常

See merge request halo/android/assistant-android!257
2022-06-06 10:31:15 +08:00
f02621d564 修复游戏详情页下载区域阴影显示异常 2022-06-06 10:29:13 +08:00
443f7b29c9 【光环助手V5.10.0】游戏副标题相关需求(20220602UI测试补充) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1839 2022-06-02 20:54:21 +08:00
b926af3b67 为详情页面添加业务 ID (修复businessId为空造成的闪退) https://git.shanqu.cc/halo/android/assistant-android/-/issues/68 2022-06-02 18:10:30 +08:00
f288688951 【光环助手V5.10.0】游戏副标题相关需求(20220602UI测试补充) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1839 2022-06-02 18:09:30 +08:00
8b78054a05 更新至 AGP7 2022-06-02 17:04:01 +08:00
90e802c03b 处理 SonarQube 问题 2022-06-02 15:08:11 +08:00
lyr
16c091d77a 处理SonarQube问题 2022-06-02 10:29:08 +08:00
abb76e1d4d 修复点开第三方登录页闪退的问题 2022-06-02 09:35:57 +08:00
lyr
0e8cb56b2b 处理SonarQube问题 2022-06-01 17:37:49 +08:00
db51af9493 修复无网络时启动的闪退问题 2022-06-01 17:20:46 +08:00
650734ee9f 修复测试包无法切换至测试环境的问题 2022-06-01 17:20:15 +08:00
a7cd598bba 【光环助手V5.10.0】游戏副标题相关需求(20220601测试补充) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1839 2022-06-01 15:51:12 +08:00
5cff7337d6 添加简陋的日夜间模式切换浮窗 2022-06-01 15:22:03 +08:00
d592b1104e 修复 BaseActivity 部分测试代码会出现在正式包的问题 2022-06-01 15:07:39 +08:00
4d1411e5a1 Merge branch 'dev' of git.shanqu.cc:halo/android/assistant-android into dev 2022-06-01 13:50:04 +08:00
0afefdffb6 将BUILD_TIME、IS_NIGHT_MODE_ON移动到module_common/build.gradle中 2022-06-01 11:56:42 +08:00
fdbdd1bd02 处理SonarQube问题 2022-06-01 11:06:52 +08:00
7bef39e71a 处理SonarQube问题 2022-06-01 10:22:34 +08:00
7e237d963b 【光环助手V5.10.0】游戏副标题相关需求(20220531UI测试 遗漏) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1839 2022-06-01 10:10:14 +08:00
b7d1a989ce 【光环助手V5.10.0】游戏副标题相关需求(20220531UI测试2、测试反馈补充) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1839 2022-05-31 21:51:29 +08:00
30a3cb6b35 【光环助手V5.10.0】游戏副标题相关需求(20220531UI测试2、测试反馈补充) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1839 2022-05-31 21:16:48 +08:00
lyr
924a3e6698 【光环助手v5.10.0】消息中心-新增评论详情页(0531新增优化) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1829#note_151082 2022-05-31 19:31:32 +08:00
587237ab51 为详情页面添加业务 ID (修改为onActivityStarted时记录当前activity) https://git.shanqu.cc/halo/android/assistant-android/-/issues/68 2022-05-31 17:46:32 +08:00
79f04baae2 【光环助手V5.10.0】游戏副标题相关需求(20220531UI测试1-2) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1839 2022-05-31 17:38:34 +08:00
lyr
8df30d586b 【光环助手v5.10.0】消息中心-新增评论详情页(同步游戏单类型右上角选项操作逻辑) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1829 2022-05-31 17:12:44 +08:00
lyr
db536c7a9b 优化游戏单详情页面网络错误显示 2022-05-31 17:06:49 +08:00
221447d6d2 【光环助手V5.10.0】游戏副标题相关需求(20220531测试反馈1-2) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1839 2022-05-31 16:46:38 +08:00
7995f14050 为详情页面添加业务 ID https://git.shanqu.cc/halo/android/assistant-android/-/issues/68 2022-05-31 16:09:10 +08:00
b340397716 【光环助手V5.10.0】游戏副标题相关需求(修复游戏搜索不显示副标题的问题) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1839 2022-05-31 15:30:14 +08:00
lyr
83d0f14c6a 【光环助手v5.10.0】消息中心-新增评论详情页(优化右上角选项操作逻辑) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1829 2022-05-31 15:09:07 +08:00
lyr
4de770ede8 【光环助手v5.10.0】消息通知相关优化(【光环助手v5.10.0】消息通知相关优化-UI测试问题汇总) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1830#note_150071 2022-05-31 12:52:52 +08:00
084ba2208a 修复游戏详情页下载区域阴影显示异常 2022-05-31 11:58:19 +08:00
ae3da941eb 【光环助手v5.10.0】前端优化汇总5月第3周(8) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1858 2022-05-31 11:56:26 +08:00
f9bcb1c559 【光环助手V5.10.0】前端优化汇总5月第2周(0527UI测试) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1845 2022-05-31 11:44:32 +08:00
lyr
97a37ef4ed 【光环助手v5.10.0】前端优化汇总5月第3周 (19) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1858#note_150514 2022-05-31 09:23:43 +08:00
lyr
0706096792 【光环助手v5.10.0】前端优化汇总5月第3周 (UI测试 11.遗留、16) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1858#note_150721 2022-05-30 17:49:06 +08:00
005ec81929 【光环助手V5.10.0】游戏副标题相关需求 https://git.shanqu.cc/pm/halo-app-issues/-/issues/1839 2022-05-30 17:11:01 +08:00
lyr
7671e0b4e1 【光环助手v5.10.0】前端优化汇总5月第3周 (15) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1858#note_150514 2022-05-30 15:58:09 +08:00
lyr
7daee24e10 【光环助手v5.10.0】前端优化汇总5月第3周 (UI测试) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1858#note_150514 2022-05-30 15:40:08 +08:00
1bd2b462c3 Merge branches 'dev' and 'dev' of git.shanqu.cc:halo/android/assistant-android into dev 2022-05-30 14:32:48 +08:00
8fb2b1c829 版本更新至 5.9.1 2022-05-30 11:53:00 +08:00
1ce24661ad 【光环助手V5.10.0】游戏单活动:游戏单征集计划vol.1(首页视频广告添加上报入口)https://git.shanqu.cc/pm/halo-app-issues/-/issues/1779 2022-05-30 11:51:40 +08:00
lyr
33fa255fd4 【光环助手v5.10.0】消息中心-新增评论详情页(0525测试反馈 1 / 0526测试反馈 2 / 0527测试反馈 6) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1829 2022-05-30 11:45:50 +08:00
lyr
64371f3b9a 【光环助手v5.10.0】消息中心-新增评论详情页(0524测试反馈 1) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1829#note_149715 2022-05-30 09:46:42 +08:00
lyr
8e00b1c67e 【光环助手v5.10.0】前端优化汇总5月第3周 (10-18 除15点) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1858 2022-05-27 18:43:30 +08:00
0b56e19da6 【光环助手V5.10.0】游戏副标题相关需求 https://git.shanqu.cc/pm/halo-app-issues/-/issues/1839 2022-05-27 18:34:14 +08:00
0ea7edb60e 【光环助手V5.10.0】前端优化汇总5月第2周(0527UI测试) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1845 2022-05-27 18:31:22 +08:00
f3f51c5344 revert commit 375b1e4b 2022-05-27 18:18:46 +08:00
e4267336b8 Merge branch 'dev' of git.shanqu.cc:halo/android/assistant-android into dev 2022-05-27 18:13:41 +08:00
4885abbb32 修改首页有多个论坛tab导致跳转错误 2022-05-27 18:13:36 +08:00
f994b03d06 【光环助手V5.10.0】游戏单活动:游戏单征集计划vol.1(0527测试2)https://git.shanqu.cc/pm/halo-app-issues/-/issues/1779 2022-05-27 17:16:18 +08:00
fd59e3b838 处理合并冲突 2022-05-27 16:23:23 +08:00
c7d5dbb59c Merge remote-tracking branch 'origin/release' into dev
# Conflicts:
#	dependencies.gradle
2022-05-27 16:08:57 +08:00
120e98a81f Merge remote-tracking branch 'origin/dev' into dev
# Conflicts:
#	app/src/main/java/com/gh/common/util/NewLogUtils.kt
2022-05-27 10:27:14 +08:00
8964ce704c 【光环助手V5.10.0】游戏单活动:游戏单征集计划vol.1(0526测试1、3)https://git.shanqu.cc/pm/halo-app-issues/-/issues/1779 2022-05-26 16:59:57 +08:00
lyr
15f2fe8e63 【光环助手v5.10.0】消息通知相关优化(埋点部分) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1830 2022-05-26 16:57:30 +08:00
lyr
3500da75fa 删除多余代码 2022-05-26 15:55:02 +08:00
lyr
26f45d343b 【光环助手v5.10.0】消息中心-赞同/邀请消息通知样式优化(完善展示) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1831#note_149932 2022-05-26 15:15:45 +08:00
lyr
1582f449bd 【光环助手v5.10.0】消息中心-新增评论详情页(完善右上角选项) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1829 2022-05-26 15:13:05 +08:00
a195ea9889 【光环助手V5.10.0】游戏单活动:游戏单征集计划vol.1(增加js获取入口方法)https://git.shanqu.cc/pm/halo-app-issues/-/issues/1779 2022-05-26 12:00:11 +08:00
0712dfc3be Merge branch 'dev' of git.shanqu.cc:halo/android/assistant-android into dev 2022-05-26 11:19:19 +08:00
56946a1212 【光环助手V5.10.0】数据埋点需求(0526测试) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1835 2022-05-26 11:09:13 +08:00
d9fcdbb7c4 Merge branch 'dev' of git.shanqu.cc:halo/android/assistant-android into dev 2022-05-25 18:14:00 +08:00
lyr
521e8fead8 【光环助手v5.10.0】消息中心-新增评论详情页(0524测试反馈 7、8) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1829#note_149715 2022-05-25 18:10:23 +08:00
a8fa9e50cc 【光环助手V5.10.0】数据埋点需求(0524测试) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1835 2022-05-25 16:21:26 +08:00
lyr
b7d3eb308b 【光环助手v5.10.0】消息通知相关优化(区分普通帖/视频贴的评论回复和评论回复的回复) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1830#note_149103 2022-05-25 10:41:54 +08:00
lyr
2c712da2b9 【光环助手v5.10.0】消息通知相关优化(区分普通帖/视频贴的评论回复和评论回复的回复) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1830#note_149103 2022-05-25 10:40:03 +08:00
lyr
dfffaf0f15 【光环助手v5.10.0】消息中心-赞同/邀请消息通知样式优化(邀请部分) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1831 2022-05-25 10:29:06 +08:00
054061a4f7 【光环助手V5.10.0】游戏库功能优化(0524测试2) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1834 2022-05-25 09:08:33 +08:00
lyr
ed28614abb 【光环助手v5.10.0】消息通知相关优化(修改评论消息的父评论的图片展示和点赞消息的图片展示) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1830 2022-05-24 19:07:38 +08:00
lyr
30f2cfd32d 【光环助手v5.10.0】消息中心-赞同/邀请消息通知样式优化(点赞部分) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1831 2022-05-24 18:13:33 +08:00
1ded43174a Merge branch 'dev' of git.shanqu.cc:halo/android/assistant-android into dev 2022-05-24 17:49:33 +08:00
e21769eea8 修改游戏库tab显示问题 2022-05-24 15:13:36 +08:00
lyr
1c4ca0e1bc 【光环助手v5.10.0】消息通知相关优化(评论列表仅首次进入时接口增加"top_comment_id"参数) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1830 2022-05-24 14:14:07 +08:00
lyr
dbd3530019 【光环助手v5.10.0】评论回复相关优化(一)https://git.shanqu.cc/pm/halo-app-issues/-/issues/1847 2022-05-24 10:53:18 +08:00
38d1646fc0 处理部分 SonarQube 问题 2022-05-24 10:22:09 +08:00
lyr
4a9a955841 【光环助手v5.10.0】个人主页-回答跳转优化 https://git.shanqu.cc/pm/halo-app-issues/-/issues/1827 2022-05-23 18:56:51 +08:00
71d5207ecd Merge branch 'cherry-pick-7a86e44b' into 'dev'
【光环助手v5.10.0】消息通知相关优化(除埋点外完成) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1830

See merge request halo/android/assistant-android!254
2022-05-23 16:56:09 +08:00
lyr
d45538d1f9 【光环助手v5.10.0】消息通知相关优化(除埋点外完成) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1830
(cherry picked from commit 7a86e44be127f91c42e02a6bd4adf2b0b04af22a)
2022-05-23 16:46:14 +08:00
44e5b218e3 模块/组件化前期改造 https://git.shanqu.cc/halo/android/assistant-android/-/issues/64 2022-05-23 16:07:46 +08:00
0e0689a90e Merge remote-tracking branch 'origin/dev-5.10.0' into dev 2022-05-23 11:42:27 +08:00
670d0100c8 Merge remote-tracking branch 'origin/dev' into dev 2022-05-23 11:38:34 +08:00
cf2de0449e 处理部分 SonarQube 问题 2022-05-23 11:38:29 +08:00
ec9797e932 模块/组件化前期改造 https://git.shanqu.cc/halo/android/assistant-android/-/issues/64 2022-05-23 11:33:38 +08:00
04f2312e03 处理 SonarQube 问题 2022-05-23 11:32:33 +08:00
e57d15d650 Merge remote-tracking branch 'origin/dev-5.10.0' into dev
# Conflicts:
#	app/src/main/java/com/gh/common/view/RichEditor.java
#	app/src/main/java/com/gh/gamecenter/video/detail/VideoDetailContainerViewModel.kt
2022-05-23 10:47:18 +08:00
c99b5d9940 【光环助手V5.10.0】前端优化汇总5月第2周(2) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1845 2022-05-23 10:35:22 +08:00
lyr
7f68763047 【光环助手v5.10.0】消息通知相关优化(处理评论字段冲突) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1830 2022-05-20 19:00:15 +08:00
lyr
6a1503d8c9 【光环助手v5.10.0】消息通知相关优化(大致完成) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1830 2022-05-20 18:50:55 +08:00
c05dfebf1b 模块/组件化前期改造(解耦ToolBarActivity) https://git.shanqu.cc/halo/android/assistant-android/-/issues/64 2022-05-20 17:00:50 +08:00
6401711f7e 修复无法切换测试环境和正式环境的问题 2022-05-20 16:56:04 +08:00
lyr
b815a17747 1.【光环助手v5.10.0】消息通知相关优化(完成UI和部分跳转) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1830
2.【光环助手v5.10.0】消息中心-新增评论详情页(大致完成) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1829
2022-05-19 18:49:50 +08:00
dec1deada9 【光环助手V5.10.0】数据埋点需求 https://git.shanqu.cc/pm/halo-app-issues/-/issues/1835 2022-05-19 18:27:47 +08:00
aa580c27cc 【光环助手V5.10.0】游戏单活动:游戏单征集计划vol.1(增加跳转创建游戏单加入重复游戏的判断)https://git.shanqu.cc/pm/halo-app-issues/-/issues/1779 2022-05-19 18:10:00 +08:00
375b1e4b4a 【光环助手V5.10.0】更新通用模块的跳转链接类型 https://git.shanqu.cc/pm/halo-app-issues/-/issues/1838 2022-05-19 16:37:03 +08:00
f9ebb5342c 【光环助手V5.10.0】数据埋点需求 https://git.shanqu.cc/pm/halo-app-issues/-/issues/1835 2022-05-19 16:07:26 +08:00
b661337133 【光环助手V5.10.0】游戏单活动:游戏单征集计划vol.1(实现跳转创建游戏单页面自动添加活动标签、加入对应游戏)https://git.shanqu.cc/pm/halo-app-issues/-/issues/1779 2022-05-18 17:53:19 +08:00
d73e246538 修复组件化导致的一些问题 2022-05-18 16:44:56 +08:00
94cc44c277 Merge branch 'dev-5.10.0' of git.shanqu.cc:halo/android/assistant-android into dev-5.10.0 2022-05-17 17:34:28 +08:00
116702f7f0 模块/组件化前期改造 https://git.shanqu.cc/halo/android/assistant-android/-/issues/64 2022-05-17 17:34:21 +08:00
cb54a0e780 添加简单的日夜间模式切换测试按钮 2022-05-17 11:41:12 +08:00
0d44d4e54a 补充启动页的简单的夜间模式适配 2022-05-17 11:40:30 +08:00
3db6d1288d 调整移除夜间模式的脚本 2022-05-17 10:25:31 +08:00
1bb240c964 日夜间模式的切换(修复首页排行榜tab、新分类2.0tab日夜间模式切换没有变色的问题) https://git.shanqu.cc/halo/android/assistant-android/-/issues/65 2022-05-16 16:38:21 +08:00
a1be8352f0 【光环助手V5.10.0】游戏库功能优化 https://git.shanqu.cc/pm/halo-app-issues/-/issues/1834 2022-05-16 15:09:03 +08:00
lyr
5ef4f1d14c 【光环助手v5.10.0】前端优化汇总5月第3周(2) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1858 2022-05-16 14:35:51 +08:00
lyr
6330e004ba 日夜间模式的切换(光能中心页面) https://git.shanqu.cc/halo/android/assistant-android/-/issues/65 2022-05-16 11:33:34 +08:00
44bed82f08 【光环助手v5.10.0】前端优化汇总5月第3周(4) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1858 2022-05-16 10:23:54 +08:00
e9b170503b 日夜间模式的切换(修复分类、新分类、新分类2.0部分列表Item在日夜模式切换时未刷新颜色问题) https://git.shanqu.cc/halo/android/assistant-android/-/issues/65 2022-05-14 22:17:27 +08:00
lyr
ccd6a866dc 日夜间模式的切换(开服表页面) https://git.shanqu.cc/halo/android/assistant-android/-/issues/65 2022-05-13 19:07:06 +08:00
1ae37710ca 【光环助手5.10.0】论坛主页热度值展示优化(5.13测试反馈) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1856 2022-05-13 18:14:14 +08:00
202c546922 删除部分无用代码 2022-05-13 16:22:50 +08:00
d2f5d35403 删除部分无用代码 2022-05-13 15:51:29 +08:00
44c2219753 模块/组件化前期改造 https://git.shanqu.cc/halo/android/assistant-android/-/issues/64 2022-05-13 15:34:22 +08:00
c627bfb994 删除部分无用代码 2022-05-13 14:13:16 +08:00
5e7b0dd169 【光环助手5.10.0】论坛主页热度值展示优化 https://git.shanqu.cc/pm/halo-app-issues/-/issues/1856 2022-05-13 10:09:17 +08:00
lyr
8ae7ef421c 日夜间模式的切换(我的游戏页面) https://git.shanqu.cc/halo/android/assistant-android/-/issues/65 2022-05-12 16:56:09 +08:00
96b92d9212 删除无用代码 2022-05-12 16:19:17 +08:00
e6f9beeace Merge branch 'feature-modular' into 'dev-5.10.0'
处理编译问题

See merge request halo/android/assistant-android!245
2022-05-12 15:52:27 +08:00
f4f4807ce8 处理编译问题 2022-05-12 15:38:22 +08:00
f1d52fdc80 Merge branch 'dev-5.10.0' into feature-modular
# Conflicts:
#	app/src/main/java/com/gh/common/util/QuickLoginHelper.kt
#	app/src/main/java/com/gh/common/view/ConfigFilterView.kt
#	app/src/main/java/com/gh/gamecenter/AboutActivity.java
#	app/src/main/java/com/gh/gamecenter/CollectionActivity.java
#	app/src/main/java/com/gh/gamecenter/ConcernInfoActivity.java
#	app/src/main/java/com/gh/gamecenter/DownloadManagerActivity.java
#	app/src/main/java/com/gh/gamecenter/HelpAndFeedbackActivity.kt
#	app/src/main/java/com/gh/gamecenter/InfoActivity.java
#	app/src/main/java/com/gh/gamecenter/LibaoDetailActivity.java
#	app/src/main/java/com/gh/gamecenter/MessageActivity.java
#	app/src/main/java/com/gh/gamecenter/MessageInviteActivity.java
#	app/src/main/java/com/gh/gamecenter/MessageKeFuActivity.java
#	app/src/main/java/com/gh/gamecenter/MessageVoteActivity.java
#	app/src/main/java/com/gh/gamecenter/QaActivity.kt
#	app/src/main/java/com/gh/gamecenter/SettingActivity.kt
#	app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java
#	app/src/main/java/com/gh/gamecenter/SuggestionActivity.java
#	app/src/main/java/com/gh/gamecenter/WebActivity.kt
#	app/src/main/java/com/gh/gamecenter/catalog/CatalogActivity.kt
#	app/src/main/java/com/gh/gamecenter/catalog/NewCatalogListActivity.kt
#	app/src/main/java/com/gh/gamecenter/catalog/NewCatalogListFragment.kt
#	app/src/main/java/com/gh/gamecenter/catalog/SpecialCatalogSubjectAdapter.kt
#	app/src/main/java/com/gh/gamecenter/catalog/SubCatalogAdapter.kt
#	app/src/main/java/com/gh/gamecenter/catalog/SubCatalogFragment.kt
#	app/src/main/java/com/gh/gamecenter/category/CategoryDirectoryActivity.kt
#	app/src/main/java/com/gh/gamecenter/category/CategoryListActivity.kt
#	app/src/main/java/com/gh/gamecenter/category/NewCategoryHorizontalAdapter.kt
#	app/src/main/java/com/gh/gamecenter/category2/CategoryDirectoryAdapter.kt
#	app/src/main/java/com/gh/gamecenter/category2/CategoryV2Activity.kt
#	app/src/main/java/com/gh/gamecenter/forum/detail/ForumArticleAskListAdapter.kt
#	app/src/main/java/com/gh/gamecenter/forum/home/CommunityHomeFragment.kt
#	app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleListAdapter.kt
#	app/src/main/java/com/gh/gamecenter/forum/list/ForumListActivity.kt
#	app/src/main/java/com/gh/gamecenter/forum/moderator/ApplyModeratorActivity.kt
#	app/src/main/java/com/gh/gamecenter/forum/moderator/ModeratorListActivity.kt
#	app/src/main/java/com/gh/gamecenter/fragment/MainWrapperViewModel.kt
#	app/src/main/java/com/gh/gamecenter/game/columncollection/detail/ColumnCollectionDetailActivity.kt
#	app/src/main/java/com/gh/gamecenter/game/commoncollection/detail/CommonCollectionDetailActivity.kt
#	app/src/main/java/com/gh/gamecenter/game/upload/GameSubmissionActivity.kt
#	app/src/main/java/com/gh/gamecenter/gamecollection/choose/AddSearchGameFragment.kt
#	app/src/main/java/com/gh/gamecenter/gamecollection/choose/AddUserPlayedGameFragment.kt
#	app/src/main/java/com/gh/gamecenter/gamecollection/choose/ChooseGamesAdapter.kt
#	app/src/main/java/com/gh/gamecenter/gamecollection/choose/ChooseGamesFragment.kt
#	app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionDetailAdapter.kt
#	app/src/main/java/com/gh/gamecenter/gamecollection/mine/MyGameCollectionFragment.kt
#	app/src/main/java/com/gh/gamecenter/gamecollection/publish/ChooseGameCollectionCoverTypeDialog.kt
#	app/src/main/java/com/gh/gamecenter/gamecollection/publish/ChooseGameCollectionDefaultCoverDialog.kt
#	app/src/main/java/com/gh/gamecenter/gamecollection/tag/GameCollectionTagAdapter.kt
#	app/src/main/java/com/gh/gamecenter/gamecollection/tag/GameCollectionTagSelectFragment.kt
#	app/src/main/java/com/gh/gamecenter/help/HelpContainerFragment.kt
#	app/src/main/java/com/gh/gamecenter/help/HelpQaAdapter.kt
#	app/src/main/java/com/gh/gamecenter/help/HelpQaCategoryFragment.kt
#	app/src/main/java/com/gh/gamecenter/help/QaFeedbackDialogFragment.kt
#	app/src/main/java/com/gh/gamecenter/history/HistoryActivity.kt
#	app/src/main/java/com/gh/gamecenter/libao/LibaoFragment.java
#	app/src/main/java/com/gh/gamecenter/newsdetail/NewsDetailAdapter.java
#	app/src/main/java/com/gh/gamecenter/personal/DeliveryInfoActivity.kt
#	app/src/main/java/com/gh/gamecenter/personalhome/PersonalItemViewHolder.kt
#	app/src/main/java/com/gh/gamecenter/personalhome/background/BackgroundPreviewActivity.kt
#	app/src/main/java/com/gh/gamecenter/personalhome/background/PersonalityBackgroundFragment.kt
#	app/src/main/java/com/gh/gamecenter/personalhome/border/AvatarBorderActivity.kt
#	app/src/main/java/com/gh/gamecenter/personalhome/fans/FansActivity.kt
#	app/src/main/java/com/gh/gamecenter/personalhome/followers/FollowersActivity.kt
#	app/src/main/java/com/gh/gamecenter/personalhome/home/UserHistoryAdapter.kt
#	app/src/main/java/com/gh/gamecenter/personalhome/home/game/UserGameFragment.kt
#	app/src/main/java/com/gh/gamecenter/personalhome/rating/RatingActivity.kt
#	app/src/main/java/com/gh/gamecenter/qa/answer/detail/SimpleAnswerDetailActivity.kt
#	app/src/main/java/com/gh/gamecenter/qa/article/detail/ArticleDetailActivity.kt
#	app/src/main/java/com/gh/gamecenter/qa/article/detail/comment/ArticleDetailCommentFragment.kt
#	app/src/main/java/com/gh/gamecenter/qa/article/draft/ArticleDraftActivity.kt
#	app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentAdapter.kt
#	app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentFragment.kt
#	app/src/main/java/com/gh/gamecenter/qa/editor/GameActivity.kt
#	app/src/main/java/com/gh/gamecenter/qa/editor/InsertGameCollectionWrapperActivity.kt
#	app/src/main/java/com/gh/gamecenter/qa/editor/InsertVideoWrapperActivity.kt
#	app/src/main/java/com/gh/gamecenter/qa/editor/LocalMediaActivity.kt
#	app/src/main/java/com/gh/gamecenter/qa/myqa/MyAskActivity.java
#	app/src/main/java/com/gh/gamecenter/qa/questions/draft/QuestionDraftActivity.kt
#	app/src/main/java/com/gh/gamecenter/qa/questions/invite/QuestionsInviteActivity.java
#	app/src/main/java/com/gh/gamecenter/qa/questions/newdetail/NewQuestionDetailActivity.kt
#	app/src/main/java/com/gh/gamecenter/qa/video/detail/ForumVideoDetailActivity.kt
#	app/src/main/java/com/gh/gamecenter/qa/video/publish/VideoPublishActivity.kt
#	app/src/main/java/com/gh/gamecenter/security/BindPhoneActivity.kt
#	app/src/main/java/com/gh/gamecenter/security/BindPhoneFragment.kt
#	app/src/main/java/com/gh/gamecenter/security/SecurityActivity.kt
#	app/src/main/java/com/gh/gamecenter/setting/GameDownloadSettingActivity.kt
#	app/src/main/java/com/gh/gamecenter/setting/GameDownloadSettingFragment.kt
#	app/src/main/java/com/gh/gamecenter/setting/VideoSettingActivity.kt
#	app/src/main/java/com/gh/gamecenter/setting/VideoSettingFragment.kt
#	app/src/main/java/com/gh/gamecenter/subject/SubjectActivity.kt
#	app/src/main/java/com/gh/gamecenter/tag/TagsActivity.kt
#	app/src/main/java/com/gh/gamecenter/toolbox/ToolBoxBlockActivity.kt
#	app/src/main/java/com/gh/gamecenter/toolbox/ToolBoxItemAdapter.kt
#	app/src/main/java/com/gh/gamecenter/video/VideoItemViewHolder.kt
#	app/src/main/java/com/gh/gamecenter/video/data/VideoDataFragment.kt
#	app/src/main/java/com/gh/gamecenter/video/game/GameVideoFragment.kt
#	app/src/main/java/com/gh/gamecenter/video/label/VideoLabelAdapter.kt
#	app/src/main/res/layout/activity_background_clip.xml
#	app/src/main/res/layout/community_answer_item.xml
#	app/src/main/res/layout/user_history_item.xml
#	app/src/main/res/values-night/colors.xml
#	app/src/main/res/values/colors.xml
#	app/src/main/res/values/strings.xml
#	module_common/src/main/java/com/gh/gamecenter/common/base/fragment/BaseDialogFragment.java
#	module_common/src/main/java/com/gh/gamecenter/common/utils/NightModeUtils.kt
#	module_core/src/main/java/com/gh/gamecenter/core/AppExecutor.kt
2022-05-12 11:10:46 +08:00
lyr
1002e4b808 日夜间模式的切换(模拟器游戏页面) https://git.shanqu.cc/halo/android/assistant-android/-/issues/65 2022-05-11 18:18:55 +08:00
2d651572d0 日夜间模式的切换(修复首页tab日夜间模式切换变色异常) https://git.shanqu.cc/halo/android/assistant-android/-/issues/65 2022-05-11 17:55:52 +08:00
lyr
5af3894ae3 日夜间模式的切换(模拟器游戏页面) https://git.shanqu.cc/halo/android/assistant-android/-/issues/65 2022-05-11 17:42:09 +08:00
lyr
2d5a363215 日夜间模式的切换(账号与安全页面) https://git.shanqu.cc/halo/android/assistant-android/-/issues/65 2022-05-11 16:20:27 +08:00
lyr
a15dd256f0 日夜间模式的切换(浏览记录页面) https://git.shanqu.cc/halo/android/assistant-android/-/issues/65 2022-05-11 15:13:09 +08:00
9d4c6f660a 内联 getter 方法,移除重复初始化赋值 2022-05-11 14:34:23 +08:00
lyr
21fa841e3a 日夜间模式的切换(帮助与反馈页面) https://git.shanqu.cc/halo/android/assistant-android/-/issues/65 2022-05-11 11:48:49 +08:00
lyr
fb4e38e50f 日夜间模式的切换(账号与安全页面) https://git.shanqu.cc/halo/android/assistant-android/-/issues/65 2022-05-11 11:46:36 +08:00
lyr
9628af4168 日夜间模式的切换(账号与安全页面) https://git.shanqu.cc/halo/android/assistant-android/-/issues/65 2022-05-10 16:01:11 +08:00
e59b4b42cf 游戏评论页日夜间模式 2022-05-10 14:34:46 +08:00
64ae5d02fb 日夜间模式的切换(视频、我的收藏部分) https://git.shanqu.cc/halo/android/assistant-android/-/issues/65 2022-05-10 10:47:15 +08:00
lyr
029a12c481 日夜间模式的切换(旧分类页面) https://git.shanqu.cc/halo/android/assistant-android/-/issues/65 2022-05-10 10:31:40 +08:00
3fc4d9276d 日夜间模式更新状态栏底色替换为Extensions方法 2022-05-09 18:31:35 +08:00
531e11748d Merge remote-tracking branch 'origin/dev' into dev-5.10.0 2022-05-09 17:50:49 +08:00
8f99db1841 Merge remote-tracking branch 'origin/dev-5.10.0' into dev-5.10.0 2022-05-09 17:42:45 +08:00
7bd779b8e3 日夜间模式的切换(社区帖子部分) https://git.shanqu.cc/halo/android/assistant-android/-/issues/65 2022-05-09 17:31:02 +08:00
e5cffac98a Merge remote-tracking branch 'origin/dev' into dev-5.10.0 2022-05-09 17:08:30 +08:00
lyr
8a8184a4a9 日夜间模式的切换(新分类2.0页面) https://git.shanqu.cc/halo/android/assistant-android/-/issues/65 2022-05-09 15:36:37 +08:00
lyr
373cec9ff2 日夜间模式的切换(新分类2.0页面) https://git.shanqu.cc/halo/android/assistant-android/-/issues/65 2022-05-09 15:19:42 +08:00
2938e843f0 版本升级为 5.10.0 2022-05-09 14:15:17 +08:00
eaba77b3a7 【光环助手V5.10.0】前端优化汇总5月第2周(3) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1845 2022-05-09 11:57:36 +08:00
963e8da89c Merge branch 'dev-5.9.0' into feature-modular
# Conflicts:
#	app/src/main/java/com/gh/base/BaseActivity_TabLayout.java
#	app/src/main/java/com/gh/common/dialog/PrivacyDialogFragment.kt
#	app/src/main/java/com/gh/common/dialog/WelcomeDialog.kt
#	app/src/main/java/com/gh/common/util/EntranceUtils.java
#	app/src/main/java/com/gh/common/view/FlexLinearLayout.kt
#	app/src/main/java/com/gh/common/view/WelcomeDialog.kt
#	app/src/main/java/com/gh/gamecenter/AboutActivity.java
#	app/src/main/java/com/gh/gamecenter/DownloadManagerActivity.java
#	app/src/main/java/com/gh/gamecenter/LibaoDetailActivity.java
#	app/src/main/java/com/gh/gamecenter/MessageActivity.java
#	app/src/main/java/com/gh/gamecenter/SettingActivity.kt
#	app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java
#	app/src/main/java/com/gh/gamecenter/SuggestionActivity.java
#	app/src/main/java/com/gh/gamecenter/catalog/BannerAdapter.kt
#	app/src/main/java/com/gh/gamecenter/catalog/SpecialCatalogFragment.kt
#	app/src/main/java/com/gh/gamecenter/category2/CategoryV2Fragment.kt
#	app/src/main/java/com/gh/gamecenter/category2/CategoryV2ListFragment.kt
#	app/src/main/java/com/gh/gamecenter/download/UpdatableGameFragment.kt
#	app/src/main/java/com/gh/gamecenter/fragment/MainWrapperFragment.java
#	app/src/main/java/com/gh/gamecenter/fragment/WelcomeDialogFragment.kt
#	app/src/main/java/com/gh/gamecenter/gamedetail/desc/DescAdapter.kt
#	app/src/main/java/com/gh/gamecenter/gamedetail/fuli/FuLiAdapter.kt
#	app/src/main/java/com/gh/gamecenter/gamedetail/history/HistoryApkListFragment.kt
#	app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingFragment.kt
#	app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyActivity.kt
#	app/src/main/java/com/gh/gamecenter/gamedetail/rating/logs/CommentLogsActivity.kt
#	app/src/main/java/com/gh/gamecenter/home/HomeRecommendItemViewHolder.kt
#	app/src/main/java/com/gh/gamecenter/info/ConcernFragment.java
#	app/src/main/java/com/gh/gamecenter/info/StrategyDialogAdapter.java
#	app/src/main/java/com/gh/gamecenter/libao/Libao1Fragment.java
#	app/src/main/java/com/gh/gamecenter/libao/Libao2Fragment.java
#	app/src/main/java/com/gh/gamecenter/libao/Libao2FragmentAdapter.java
#	app/src/main/java/com/gh/gamecenter/libao/Libao3Fragment.java
#	app/src/main/java/com/gh/gamecenter/libao/Libao3FragmentAdapter.java
#	app/src/main/java/com/gh/gamecenter/libao/LibaoFragment.java
#	app/src/main/java/com/gh/gamecenter/libao/LibaoHistoryAdapter.java
#	app/src/main/java/com/gh/gamecenter/libao/LibaoNewAdapter.kt
#	app/src/main/java/com/gh/gamecenter/libao/LibaoSearchAdapter.kt
#	app/src/main/java/com/gh/gamecenter/libao/LibaoSearchFragment.java
#	app/src/main/java/com/gh/gamecenter/personal/NewPersonalFunctionGroupAdapter.kt
#	app/src/main/java/com/gh/gamecenter/personalhome/home/UserHistoryViewModel.kt
#	app/src/main/java/com/gh/gamecenter/setting/GameDownloadSettingFragment.kt
#	app/src/main/java/com/gh/gamecenter/setting/VideoSettingFragment.kt
#	app/src/main/java/com/gh/gamecenter/suggest/SuggestSelectGameAdapter.java
#	app/src/main/java/com/gh/gamecenter/tag/TagsActivity.kt
#	app/src/main/java/com/gh/gamecenter/teenagermode/PasswordSettingFragment.kt
#	app/src/main/java/com/gh/gamecenter/teenagermode/TeenagerModeFragment.kt
#	app/src/main/java/com/gh/gamecenter/toolbox/ToolBoxBlockAdapter.kt
#	app/src/main/res/layout/fragment_forum.xml
#	app/src/main/res/values-night/colors.xml
#	app/src/main/res/values-night/styles.xml
#	app/src/main/res/values/colors.xml
#	app/src/main/res/values/styles.xml
#	module_common/src/main/java/com/gh/gamecenter/common/base/fragment/BaseFragment_TabLayout.java
#	module_core/src/main/java/com/gh/gamecenter/core/utils/DisplayUtils.java
2022-05-05 10:24:37 +08:00
7f419a2ce7 Merge branch 'dev-5.9.0' into feature-modular
# Conflicts:
#	app/src/main/java/com/gh/common/util/EntranceUtils.java
#	app/src/main/java/com/gh/gamecenter/qa/article/detail/ArticleDetailActivity.kt
#	app/src/main/java/com/gh/gamecenter/qa/article/detail/ArticleDetailFragment.kt
#	app/src/main/java/com/gh/gamecenter/qa/questions/newdetail/NewQuestionDetailFragment.kt
#	app/src/main/java/com/gh/gamecenter/qa/subject/AskSubjectAdapter.java
#	app/src/main/java/com/gh/gamecenter/qa/subject/AskSubjectFragment.java
#	app/src/main/java/com/gh/gamecenter/qa/subject/AskSubjectViewHolder.java
#	app/src/main/java/com/gh/gamecenter/qa/video/detail/ForumVideoDetailActivity.kt
2022-04-25 11:53:45 +08:00
33af47b01b Merge branch 'dev-5.9.0' into feature-modular
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/forum/home/CommunityHomeFragment.kt
#	app/src/main/java/com/gh/gamecenter/forum/home/ForumActivityFragment.kt
#	app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleAskItemViewHolder.kt
#	app/src/main/java/com/gh/gamecenter/forum/home/ForumFragment.kt
#	app/src/main/java/com/gh/gamecenter/forum/home/ForumRecordsAdapter.kt
#	app/src/main/java/com/gh/gamecenter/forum/home/ForumViewModel.kt
#	app/src/main/java/com/gh/gamecenter/forum/home/HorizontalForumsAdapter.kt
#	app/src/main/java/com/gh/gamecenter/game/GameFragmentAdapter.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/gamecollection/square/GameCollectionSquareAdapter.kt
#	app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareFragment.kt
#	app/src/main/java/com/gh/gamecenter/qa/answer/CommunityAnswerItemViewHolder.kt
#	app/src/main/java/com/gh/gamecenter/qa/article/MyArticleAdapter.kt
#	app/src/main/res/layout/community_answer_item.xml
#	app/src/main/res/layout/fragment_game_collection_square.xml
#	app/src/main/res/values-night/colors.xml
#	app/src/main/res/values/attrs.xml
#	app/src/main/res/values/colors.xml
2022-04-24 15:35:57 +08:00
7a89ef3e74 处理一些合并后导包错误问题 2022-04-18 10:06:38 +08:00
10b696f78d Merge branch 'dev-5.9.0' into feature-modular
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/forum/detail/ForumTopLinkAdapter.kt
#	app/src/main/java/com/gh/gamecenter/gamecollection/publish/GameCollectionEditActivity.kt
#	app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentAdapter.kt
#	app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentFragment.kt
#	app/src/main/java/com/gh/gamecenter/qa/video/detail/comment/VideoCommentFragment.kt
#	app/src/main/java/com/gh/gamecenter/qa/video/publish/VideoPublishActivity.kt
#	app/src/main/res/values-night/colors.xml
#	app/src/main/res/values/colors.xml
2022-04-18 09:53:20 +08:00
e9ac9aab7f 模块/组件化前期改造 https://git.shanqu.cc/halo/android/assistant-android/-/issues/64 2022-04-09 19:48:45 +08:00
2329 changed files with 36359 additions and 22525 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

3
.gitmodules vendored
View File

@ -5,3 +5,6 @@
[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

View File

@ -12,12 +12,13 @@
2. 尽量使 View 在被销毁之后仍能恢复状态,处理方式可参考 [保存界面状态](https://developer.android.com/topic/libraries/architecture/saving-states)
3. 尽量参考原有文件结构及命名规范,即以 大模块 - 小模块 的形式生成包关系
4. 遵循最小改动原则,在提交代码前务必先检查变动的代码,尽量以可控的变动规模来构成一个 commit ,以便日后追踪问题
5. 代码规范可参考 [AOSP Java 风格](https://source.android.com/setup/contribute/code-style)
6. 尽量使用 Kotlin 来写新文件
7. 尽量不要使用 DataBinding
8. Commit 前请确保不带入非项目必须文件,可手动修改 [.gitignore](https://stackoverflow.com/questions/8527597/how-do-i-ignore-files-in-a-directory-in-git) 文件忽略
9. 优先使用 ViewBinding 获取 View 对象
10. No AsyncTask!
5. Commit message 提交规范可参考 [Conventional Commits](https://www.conventionalcommits.org/zh-hans/v1.0.0/)
6. 代码规范可参考 [AOSP Java 风格](https://source.android.com/setup/contribute/code-style)
7. 尽量使用 Kotlin 来写新文件
8. 不要使用 DataBinding
9. Commit 前请确保不带入非项目必须文件,可手动修改 [.gitignore](https://stackoverflow.com/questions/8527597/how-do-i-ignore-files-in-a-directory-in-git) 文件忽略
10. 优先使用 ViewBinding 获取 View 对象
11. No AsyncTask!
### 公用部分

View File

@ -43,22 +43,14 @@ android {
}
defaultConfig {
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
javaCompileOptions {
annotationProcessorOptions {
arguments = [eventBusIndex: 'com.gh.EventBusIndex']
}
}
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
@ -80,19 +72,13 @@ 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}\""
/**
* Build Time 供区分 jenkins 打包时间用
* IS_NIGHT_MODE_ON 供区分夜间模式功能是否启用
*/
buildConfigField "long", "BUILD_TIME", "0"
buildConfigField "boolean", "IS_NIGHT_MODE_ON", "true"
}
// gradle 2.2以上默认同时启用v1和v2优先用于Android N
@ -107,6 +93,12 @@ android {
}
}
kapt {
arguments {
arg("AROUTER_MODULE_NAME", project.name)
}
}
buildTypes {
debug {
debuggable true
@ -146,10 +138,10 @@ android {
sourceSets {
publish {
java.srcDirs = ['src/main/java']
java.srcDirs = ['src/main/java', "src/default/java"]
}
internal {
java.srcDirs = ['src/main/java']
java.srcDirs = ['src/main/java', "src/default/java"]
}
tea {
java.srcDirs = ['src/main/java', 'src/tea/java']
@ -164,14 +156,16 @@ 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}\""
}
// 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}\""
}
tea {
@ -179,6 +173,7 @@ android {
buildConfigField "String", "DEV_API_HOST", "\"${API_HOST}\""
buildConfigField "String", "NEW_DEV_API_HOST", "\"${NEW_API_HOST}\""
buildConfigField "String", "DEV_VAPI_HOST", "\"${VAPI_HOST}\""
manifestPlaceholders.put("APPLOG_SCHEME", "rangersapplog.byAx6uYt".toLowerCase())
}
@ -200,86 +195,44 @@ dependencies {
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
teaImplementation fileTree(include: ['*.jar', '*.aar'], dir: 'src/tea/libs')
testImplementation 'junit:junit:4.12'
debugImplementation "com.squareup.leakcanary:leakcanary-android:${leakcanary}"
debugImplementation "com.squareup.okhttp3:logging-interceptor:${okHttp}"
// debugImplementation "com.gu.android:toolargetool:${toolargetool}" // 需要使用调试时才启用
debugImplementation "com.github.nichbar:WhatTheStack:${whatTheStack}"
debugImplementation "io.github.didi.dokit:dokitx:${dokit}"
implementation "androidx.core:core-ktx:${core}"
implementation "androidx.fragment:fragment-ktx:${fragment}"
implementation "androidx.multidex:multidex:${multiDex}"
implementation "androidx.appcompat:appcompat:${appCompat}"
implementation "androidx.cardview:cardview:${cardView}"
implementation "androidx.annotation:annotation:${annotation}"
implementation "androidx.constraintlayout:constraintlayout:${constraintLayout}"
implementation "androidx.recyclerview:recyclerview:${recyclerView}"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifeCycle"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifeCycle"
implementation "androidx.lifecycle:lifecycle-common-java8:$lifeCycle"
implementation "androidx.lifecycle:lifecycle-extensions:$lifeCycleExtensions"
implementation "androidx.room:room-runtime:${room}"
implementation "androidx.room:room-rxjava2:${room}"
implementation "androidx.core:core-ktx:${ktx}"
implementation "androidx.viewpager2:viewpager2:${viewpager2}"
implementation "androidx.webkit:webkit:${webkit}"
kapt "androidx.room:room-compiler:${room}"
implementation "com.google.android.material:material:${material}"
implementation "androidx.multidex:multidex:${multiDex}"
implementation "androidx.fragment:fragment-ktx:${fragment}"
implementation "androidx.annotation:annotation:${annotation}"
implementation "androidx.viewpager2:viewpager2:${viewpager2}"
kapt "androidx.room:room-compiler:${room}"
implementation "com.kyleduo.switchbutton:library:${switchButton}"
implementation "com.facebook.fresco:fresco:${fresco}"
implementation "com.facebook.fresco:animated-gif-lite:${fresco}"
implementation "com.facebook.fresco:animated-drawable:${fresco}"
implementation "com.facebook.fresco:animated-webp:${fresco}"
implementation "com.facebook.fresco:webpsupport:${fresco}"
implementation "com.squareup.okhttp3:okhttp:${okHttp}"
implementation "com.leon.channel:helper:${apkChannelPackage}"
implementation "com.squareup.retrofit2:retrofit:${retrofit}"
implementation "com.squareup.retrofit2:converter-gson:${retrofit}" // include gson 2.7
implementation "com.squareup.retrofit2:adapter-rxjava2:${retrofit}"
implementation "com.j256.ormlite:ormlite-android:${ormlite}"
implementation "com.j256.ormlite:ormlite-core:${ormlite}"
implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"
implementation "org.greenrobot:eventbus:${eventbus}"
kapt "org.greenrobot:eventbus-annotation-processor:${eventbusApt}"
implementation "io.reactivex.rxjava2:rxjava:${rxJava2}"
implementation "io.reactivex.rxjava2:rxandroid:${rxAndroid2}"
implementation "com.jakewharton.rxbinding2:rxbinding:${rxBinding2}"
implementation "com.google.zxing:core:${zxing}"
implementation "com.google.zxing:android-core:${zxing}"
implementation "com.daimajia.swipelayout:library:${swipeLayout}"
implementation "com.google.android:flexbox:${flexbox}"
implementation "pub.devrel:easypermissions:${easypermissions}"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "com.contrarywind:Android-PickerView:${pickerView}"
implementation "com.scwang.smartrefresh:SmartRefreshLayout:${smartRefreshLayout}"
implementation "net.cachapa.expandablelayout:expandablelayout:${expandableLayout}"
// 用于比较 versionName 是大于小于或等于
implementation "com.g00fy2:versioncompare:${versioncompare}"
implementation "top.zibin:Luban:${luban}"
implementation "com.squareup.picasso:picasso:${picasso}"
// for video streaming
implementation("com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-java:$gsyVideo", {
exclude module: "gsyvideoplayer-androidvideocache"
@ -287,42 +240,19 @@ 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.github.tbruyelle:rxpermissions:${rxPermissions}"
implementation "com.lg:skeleton:${skeleton}"
implementation "com.tencent.mm.opensdk:wechat-sdk-android-without-mta:${mta}"
implementation "com.github.nichbar:AndroidRomChecker:${romChecker}"
debugImplementation "com.github.nichbar.chucker:library:${chucker}"
releaseImplementation "com.github.nichbar.chucker:library-no-op:${chucker}"
teaImplementation "com.bytedance.applog:RangersAppLog-Lite-cn:${bytedanceApplog}"
implementation "com.aliyun.dpa:oss-android-sdk:${oss}"
implementation "com.airbnb.android:lottie:${lottie}"
implementation "net.lingala.zip4j:zip4j:${zip4j}"
implementation "io.sentry:sentry-android:4.3.0"
implementation("com.github.piasy:BigImageViewer:${bigImageViewer}", {
exclude group: 'com.squareup.okhttp3'
exclude group: 'androidx.swiperefreshlayout'
exclude group: 'com.github.bumptech.glide'
exclude group: 'com.facebook.fresco'
})
implementation "com.github.PhilJay:MPAndroidChart:${chart}"
implementation "com.lahm.library:easy-protector-release:${easyProtector}"
implementation "com.github.hsiafan:apk-parser:${apkParser}"
implementation "org.nanohttpd:nanohttpd:${nanohttpd}"
implementation "com.aliyun.openservices:aliyun-log-android-sdk:${aliyunLog}"
implementation "com.lg:easyfloat:${easyFloat}"
implementation "io.github.florent37:shapeofview:${shapeOfView}"
@ -333,13 +263,14 @@ dependencies {
implementation "com.lg:gid:${gid}"
implementation "com.louiscad.splitties:splitties-fun-pack-android-base-with-views-dsl:${splitties}"
compileOnly "com.github.axen1314.lancet:lancet-base:${lancet_version}"
kapt "com.alibaba:arouter-compiler:$arouterVersion"
implementation project(':libraries:LGLibrary')
implementation project(':libraries:QQShare')
implementation project(':libraries:Matisse')
implementation project(':vspace-bridge:vspace')
implementation (project(':module_common')) {
exclude group: 'androidx.swiperefreshlayout'
}
}
File propFile = file('sign.properties')
if (propFile.exists()) {
@ -470,6 +401,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",
@ -595,4 +529,4 @@ project.afterEvaluate {
}
}
}
}
}

View File

@ -14,8 +14,11 @@
}
#--------- remove logs end ----------------
# inline getter method
-allowaccessmodification
#--------- remove useless mtahelper class --------
-assumenosideeffects class com.gh.common.util.MtaHelper {
-assumenosideeffects class com.gh.gamecenter.core.utils.MtaHelper {
public static void onEvent(...);
public static void onEventWithTime(...);
public static void onEventWithBasicDeviceInfo(...);
@ -36,6 +39,9 @@
-keepclassmembers interface com.j256.* { *; }
-dontwarn com.j256.**
# 避免 gson 找不到 enum
-keepclassmembers enum * { *; }
### AutoScrollViewPager
-keep class cn.trinea.android.* { *; }
-keepclassmembers class cn.trinea.android.* { *; }
@ -65,6 +71,7 @@
-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.* {*;}
@ -155,3 +162,12 @@
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

@ -0,0 +1,26 @@
package com.gh.gamecenter.provider
import android.app.Application
import android.text.TextUtils
import com.gh.gamecenter.common.constant.Config
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.common.utils.PackageFlavorHelper
import com.gh.gamecenter.core.utils.SPUtils
import com.leon.channel.helper.ChannelReaderUtil
class ChannelProviderImp : ChannelProvider {
override fun getChannelStr(application: Application): String {
var channel = ChannelReaderUtil.getChannel(application)
if (channel == null || TextUtils.isEmpty(channel.trim())) {
channel = if (PackageFlavorHelper.IS_TEST_FLAVOR) {
Config.DEFAULT_CHANNEL
} else {
Config.DEFAULT_CHANNEL_FOR_RELEASE
}
}
if (PackageFlavorHelper.IS_TEST_FLAVOR) {
channel = SPUtils.getString(Constants.SP_TEST_FLAVOR_CHANNEL, channel)
}
return channel
}
}

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,6 +24,9 @@
<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"/>
@ -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"
@ -732,10 +742,22 @@
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" />
<activity
android:name=".qa.comment.NewCommentDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name="${applicationId}.wxapi.WXEntryActivity"
android:exported="true"
@ -760,16 +782,22 @@
</provider>
<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>
android:name="com.gh.gamecenter.provider.GhContentProvider"
android:authorities="${applicationId}.provider"
android:enabled="true"
android:exported="true"/>
<!-- <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"

File diff suppressed because one or more lines are too long

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

@ -1,134 +0,0 @@
package com.gh.base;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Looper;
import android.preference.PreferenceManager;
import android.util.Log;
import com.gh.common.constant.Config;
import com.gh.common.util.DataCollectionUtils;
import com.gh.common.util.DataUtils;
import com.gh.gamecenter.SplashScreenActivity;
import com.lightgame.config.CommonDebug;
import com.lightgame.download.FileUtils;
import com.lightgame.utils.AppManager;
import com.lightgame.utils.Utils;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.lang.Thread.UncaughtExceptionHandler;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.concurrent.TimeoutException;
import io.sentry.Sentry;
public class AppUncaughtHandler implements UncaughtExceptionHandler {
private Context mContext;
public AppUncaughtHandler(Context context) {
// 获取系统默认的UncaughtException处理器
mContext = context;
}
@Override
public void uncaughtException(Thread t, Throwable e) {
if (("FinalizerWatchdogDaemon").equals(t.getName())
&& e instanceof TimeoutException) {
// ignore timeoutException
// detail can be found in this didi tech blog post https://mp.weixin.qq.com/s?__biz=MzU1ODEzNjI2NA==&mid=2247487185&idx=2&sn=cf2d9e10053f625bde0f61d246f14870&source=41#wechat_redirect
} else {
new Thread(() -> {
Looper.prepare();
Utils.toast(mContext.getApplicationContext(), "\"光环助手\"发生错误");
Looper.loop();
});
saveLocalLog(mContext, e);
restart(mContext);
Sentry.captureException(e);
}
}
public static void restart(final Context context) {
// S450 这机器会无限重启循环 : (
if ("S450".equals(Build.MODEL)) return;
// 防止重复奔溃导致助手一直重启20秒内不做处理
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
long curTime = System.currentTimeMillis();
long time = sp.getLong("last_restart_time", 0);
if (curTime - time > 20 * 1000) {
sp.edit().putLong("last_restart_time", curTime).apply();
Intent intent = new Intent(context, SplashScreenActivity.class);
intent.setAction(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
PendingIntent restartIntent = PendingIntent.getActivity(context, 0, intent,
PendingIntent.FLAG_UPDATE_CURRENT);
// 退出程序并重启
AlarmManager mgr = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
mgr.set(AlarmManager.RTC, curTime + 3000, restartIntent); // 1秒钟后重启应用
}
//error restart
// System.exit(2);
AppManager.getInstance().finishAllActivity();
}
// 保存log到本地
public static void saveLocalLog(Context context, Throwable ex) {
String errorMsg = Log.getStackTraceString(ex);
Config.setExceptionMsg(errorMsg);
// 保存到本地
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.getDefault());
File file = new File(FileUtils.getLogPath(context.getApplicationContext(),
format.format(new Date()) + "_gh_assist" + ".log"));
FileWriter writer = null;
try {
file.createNewFile();
writer = new FileWriter(file);
writer.write(errorMsg);
writer.flush();
} catch (IOException e1) {
e1.printStackTrace();
} finally {
if (writer != null) {
try {
writer.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
/**
* 下次应用启动再上报
*
* @param context
* @param throwable
*/
public static void reportException(Context context, Throwable throwable) {
CommonDebug.logMethodWithParams(context, "ERRMSG", throwable);
// 上传错误数据
try {
DataCollectionUtils.uploadError(context, Log.getStackTraceString(throwable));
} catch (Exception e) {
}
DataUtils.onError(context, throwable);
}
}

View File

@ -14,12 +14,16 @@ import android.widget.CheckBox
import android.widget.FrameLayout
import android.widget.TextView
import androidx.lifecycle.Observer
import com.gh.common.AppExecutor
import com.gh.common.runOnIoThread
import com.gh.common.util.*
import com.gh.common.util.DialogUtils
import com.gh.common.util.NewLogUtils
import com.gh.common.view.RichEditor
import com.gh.gamecenter.CropImageActivity
import com.gh.gamecenter.R
import com.gh.gamecenter.common.base.activity.ToolBarActivity
import com.gh.gamecenter.common.utils.*
import com.gh.gamecenter.core.AppExecutor
import com.gh.gamecenter.core.runOnIoThread
import com.gh.gamecenter.core.utils.*
import com.gh.gamecenter.entity.*
import com.gh.gamecenter.qa.editor.*
import com.gh.gamecenter.qa.entity.AnswerEntity
@ -37,6 +41,7 @@ import org.json.JSONArray
import org.json.JSONObject
import java.io.File
// TODO: 移动到module_bbs模块
abstract class BaseRichEditorActivity<VM : BaseRichEditorViewModel> : ToolBarActivity(),
KeyboardHeightObserver, UploadVideoListener {
@ -205,6 +210,7 @@ abstract class BaseRichEditorActivity<VM : BaseRichEditorViewModel> : ToolBarAct
mViewModel.setUploadVideoListener(this)
mKeyboardHeightProvider = KeyboardHeightProvider(this)
mRichEditor.post { mKeyboardHeightProvider?.start() }
mRichEditor.enableForceDark(NightModeUtils.isNightMode(this))
// 防止个别手机在Js里无法获取粘贴内容
mRichEditor.addJavascriptInterface(OnPasteListener(), "onPasteListener")
mRichEditor.addJavascriptInterface(OnCursorChangeListener(), "OnCursorChangeListener")
@ -735,6 +741,14 @@ abstract class BaseRichEditorActivity<VM : BaseRichEditorViewModel> : ToolBarAct
abstract fun provideViewModel(): VM
abstract fun getVideoGuideKey(): String
override fun isAutoResetViewBackgroundEnabled(): Boolean =true
override fun onNightModeChange() {
super.onNightModeChange()
updateStatusBarColor(R.color.background_white, R.color.background_white)
mRichEditor.enableForceDark(NightModeUtils.isNightMode(this))
}
companion object {
const val ELEMENT_NAME_BOLD = " b "
const val ELEMENT_NAME_ITALIC = " i "

View File

@ -9,15 +9,16 @@ import android.text.TextUtils
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.MediatorLiveData
import androidx.lifecycle.MutableLiveData
import com.gh.base.fragment.WaitingDialogFragment
import com.gh.common.runOnUiThread
import com.gh.common.util.*
import com.gh.gamecenter.common.base.fragment.WaitingDialogFragment
import com.gh.gamecenter.core.runOnUiThread
import com.gh.gamecenter.R
import com.gh.gamecenter.common.utils.*
import com.gh.gamecenter.core.utils.*
import com.gh.gamecenter.entity.ErrorEntity
import com.gh.gamecenter.entity.LocalVideoEntity
import com.gh.gamecenter.entity.QuoteCountEntity
import com.gh.gamecenter.qa.BbsType
import com.gh.gamecenter.retrofit.Response
import com.gh.gamecenter.common.retrofit.Response
import com.gh.gamecenter.retrofit.RetrofitManager
import com.gh.gamecenter.retrofit.service.ApiService
import com.gh.gamecenter.video.upload.OnUploadListener
@ -40,6 +41,7 @@ import kotlin.collections.find
import kotlin.collections.forEach
import kotlin.collections.set
// TODO: 移动到module_bbs模块
abstract class BaseRichEditorViewModel(application: Application) : AndroidViewModel(application) {
val mApi: ApiService = RetrofitManager.getInstance().api
val processDialog = MediatorLiveData<WaitingDialogFragment.WaitingDialogData>()
@ -189,7 +191,8 @@ abstract class BaseRichEditorViewModel(application: Application) : AndroidViewMo
fun uploadPoster(picturePath: String) {
processDialog.postValue(WaitingDialogFragment.WaitingDialogData("封面上传中...", true))
uploadImageSubscription =
UploadImageUtils.compressAndUploadImage(UploadImageUtils.UploadType.poster,
UploadImageUtils.compressAndUploadImage(
UploadImageUtils.UploadType.poster,
picturePath,
false,
object : UploadImageUtils.OnUploadImageListener {
@ -308,7 +311,8 @@ abstract class BaseRichEditorViewModel(application: Application) : AndroidViewMo
return
}
uploadImageSubscription =
UploadImageUtils.compressAndUploadImage(UploadImageUtils.UploadType.poster,
UploadImageUtils.compressAndUploadImage(
UploadImageUtils.UploadType.poster,
localVideoPoster,
false,
object : UploadImageUtils.OnUploadImageListener {

View File

@ -1,53 +0,0 @@
package com.gh.base
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import com.gh.gamecenter.R
class CustomLayoutInflaterFactory(
private val mAppCompatActivity: AppCompatActivity
) : LayoutInflater.Factory2 {
override fun onCreateView(
parent: View?,
name: String,
context: Context,
attrs: AttributeSet
): View? {
val view: View?
try {
view = mAppCompatActivity.delegate.createView(parent, name, context, attrs)
?: mAppCompatActivity.onCreateView(parent, name, context, attrs)
?: mAppCompatActivity.layoutInflater.createView(name, null, attrs)
} catch (e: Exception) {
return null
}
val n = attrs.attributeCount
for (i in 0 until n) {
val attributeName = attrs.getAttributeName(i).toString()
if (attributeName.contains("background")) {
view?.setTag(TAG_BACKGROUND_ID, attrs.getAttributeValue(i))
} else if (attributeName.contains("textColor")) {
view?.setTag(TAG_TEXT_COLOR_ID, attrs.getAttributeValue(i))
}
}
return view
}
override fun onCreateView(name: String, context: Context, attrs: AttributeSet): View? {
return mAppCompatActivity.onCreateView(name, context, attrs)
}
companion object {
const val TAG_BACKGROUND_ID = R.string.background_id
const val TAG_TEXT_COLOR_ID = R.string.text_color_id
}
}

View File

@ -0,0 +1,111 @@
package com.gh.base
import android.os.Bundle
import android.text.TextUtils
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
import com.gh.gamecenter.common.base.activity.ToolBarActivity
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.common.utils.viewModelProvider
import com.gh.gamecenter.core.utils.DisplayUtils
import com.gh.gamecenter.core.utils.SPUtils.getBoolean
import com.gh.gamecenter.entity.GameUpdateEntity
import com.gh.gamecenter.eventbus.EBDownloadStatus
import com.gh.gamecenter.packagehelper.PackageViewModel
import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode
// TODO:移动到module_download模块中
abstract class DownloadToolbarActivity : ToolBarActivity() {
private var mDownloadCountHint: TextView? = null
private var mPackageViewModel: PackageViewModel? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (!getBoolean(Constants.SP_TEENAGER_MODE) && showDownloadMenu()) {
mPackageViewModel = viewModelProvider(PackageViewModel.Factory())
mPackageViewModel?.filterSameUpdateLiveData?.observe(this) { updateList: List<GameUpdateEntity> ->
updateDownloadCountHint(updateList)
}
}
}
override fun setToolbarMenu(res: Int) {
// 青少年模式下要隐藏下载按钮
if (getBoolean(Constants.SP_TEENAGER_MODE) && res == R.menu.menu_download) return
super.setToolbarMenu(res)
}
override fun inflateMenu(res: Int) {
super.inflateMenu(res)
if (showDownloadMenu()) {
createDownloadMenu(res)
}
}
private fun createDownloadMenu(res: Int) {
if (res != R.menu.menu_download) {
menuInflater.inflate(R.menu.menu_download, mActionMenuView.menu)
}
if (mPackageViewModel != null) {
updateDownloadCountHint(mPackageViewModel?.filterSameUpdateLiveData?.value)
}
val downloadMenuView = mActionMenuView.menu.findItem(R.id.menu_download).actionView
mDownloadCountHint = downloadMenuView.findViewById(R.id.menu_download_count_hint)
}
override fun onMenuItemClick(item: MenuItem?): Boolean {
if (item!!.itemId == R.id.menu_download) {
// MtaHelper.onEvent("下载管理", "下载管理入口", getActivityNameInChinese());
val intent = DownloadManagerActivity.getDownloadMangerIntent(this, mEntrance)
startActivity(intent)
return true
}
return super.onMenuItemClick(item)
}
private fun updateDownloadCountHint(updateList: List<GameUpdateEntity>?) {
if (mDownloadCountHint == null || updateList.isNullOrEmpty()) return
val count = DownloadManager.getInstance().getDownloadOrUpdateCount(updateList)
if (count != null) {
mDownloadCountHint!!.visibility = View.VISIBLE
mDownloadCountHint!!.text = count
val params = mDownloadCountHint!!.layoutParams
if (TextUtils.isEmpty(count)) {
params.width = DisplayUtils.dip2px(6f)
params.height = DisplayUtils.dip2px(6f)
} else {
params.width = DisplayUtils.dip2px(12f)
params.height = DisplayUtils.dip2px(12f)
}
mDownloadCountHint!!.layoutParams = params
} else {
mDownloadCountHint!!.visibility = View.GONE
}
}
protected open fun showDownloadMenu(): Boolean {
return false
}
@Subscribe(threadMode = ThreadMode.MAIN)
fun onEventMainThread(status: EBDownloadStatus?) {
if (!getBoolean(Constants.SP_TEENAGER_MODE) && showDownloadMenu() && mPackageViewModel != null) {
updateDownloadCountHint(mPackageViewModel?.filterSameUpdateLiveData?.value)
}
}
override fun onNightModeChange() {
super.onNightModeChange()
if (showDownloadMenu() && getMenuItem(R.id.menu_download) != null) {
(getMenuItem(R.id.menu_download).actionView.findViewById(R.id.menu_download_iv) as ImageView).setImageResource(R.drawable.toolbar_download)
}
}
}

View File

@ -1,229 +0,0 @@
//package com.gh.base
//
//import android.app.Notification
//import android.app.NotificationChannel
//import android.app.NotificationManager
//import android.app.PendingIntent
//import android.content.Context
//import android.content.Intent
//import android.os.Build
//import android.os.Bundle
//import android.preference.PreferenceManager
//import android.text.TextUtils
//import android.view.View
//import androidx.core.app.NotificationCompat
//import androidx.core.text.htmlEncode
//import com.gh.common.notifier.Notifier
//import com.gh.common.util.*
//import com.gh.gamecenter.R
//import com.gh.gamecenter.entity.PushEntity
//import com.gh.gamecenter.entity.PushMessageEntity
//import com.gh.gamecenter.entity.PushMessageUnreadEntity
//import com.gh.gamecenter.entity.PushNotificationEntity
//import com.gh.gamecenter.manager.UserManager
//import com.gh.gamecenter.message.MessageUnreadRepository
//import com.gh.gamecenter.qa.answer.detail.AnswerDetailActivity
//import com.gh.gamecenter.receiver.UmengMessageReceiver
//import com.gh.gamecenter.receiver.UmengMessageReceiver.Companion.TYPE_CLICK
//import com.gh.gamecenter.receiver.UmengMessageReceiver.Companion.TYPE_REMOVE
//import com.gh.gamecenter.retrofit.Response
//import com.gh.gamecenter.retrofit.RetrofitManager
//import com.google.gson.Gson
//import com.umeng.message.UmengMessageService
//import io.reactivex.android.schedulers.AndroidSchedulers
//import io.reactivex.schedulers.Schedulers
//import okhttp3.MediaType
//import okhttp3.RequestBody
//import okhttp3.ResponseBody
//import org.android.agoo.common.AgooConstants
//import org.json.JSONObject
//import retrofit2.HttpException
//import java.util.*
//
//class GHUmengNotificationService : UmengMessageService() {
//
// companion object {
// const val ACTION_UMENG = "com.gh.gamecenter.UMENG"
// const val MESSAGE_FROM_SYSTEM = "message_from_system"
// const val HALO_MESSAGE_DIALOG = "HALO_MESSAGE_DIALOG"
// const val HALO_MESSAGE_CENTER = "HALO_MESSAGE_CENTER"
// const val ANSWER = "answer"
// const val FOLLOW_QUESTION = "follow_question"
// const val NOTIFICATION_ID = 2015
// const val DISPLAY_TYPE_NOTIFICATION = "notification"
// const val DISPLAY_TYPE_CUSTOM = "custom"
// const val MESSAGE_ID = "message_id"
// const val NOTIFICATION_MESSAGE_ID = "notification_message_id" // 通知中心消息 ID
// const val PUSH_ID = "push_id"
// }
//
// val notificationTags = arrayOf("GH_UMENG_TAG_1", "GH_UMENG_TAG_2", "GH_UMENG_TAG_3")
// val gson = Gson()
//
// override fun onMessage(context: Context, intent: Intent) {
// val message = intent.getStringExtra(AgooConstants.MESSAGE_BODY)
// val isMessageFromSystem = intent.getBooleanExtra(MESSAGE_FROM_SYSTEM, false)
//
// try {
// val pushData = message.toObject<PushEntity>()
// pushData?.let { handlePushData(context, it, message, isMessageFromSystem) }
// } catch (e: Exception) {
// e.printStackTrace()
// }
// }
//
// private fun handlePushData(context: Context, pushData: PushEntity, message: String, isMessageFromSystem: Boolean) {
// val notificationManager = context.applicationContext.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
//
// if (pushData.displayType == DISPLAY_TYPE_NOTIFICATION) {
// // 其它类型的透传信息
// // 显示到通知栏
// val msg = message.toObject<PushNotificationEntity>()
// val data = msg?.extra?.data
//
// // 系统推送(非自定义信息),直接处理跳转
// if (isMessageFromSystem) {
// val intent = Intent()
// intent.setClass(context, UmengMessageReceiver::class.java)
// intent.putExtra(EntranceUtils.KEY_DATA, data?.link)
// intent.putExtra(EntranceUtils.KEY_TYPE, UmengMessageReceiver.DIRECT_ONLY)
// intent.putExtra(EntranceUtils.KEY_MESSAGE, message)
// intent.putExtra(NOTIFICATION_MESSAGE_ID, data?.messageId)
// context.sendBroadcast(intent)
// return
// }
//
// // 用户未登录的情况下不生成消息中心通知,避免用户掉登录了还收到跳转至消息中心的通知
// if (data != null
// && data.link?.link == "system"
// && !UserManager.getInstance().isLoggedIn) {
// return
// }
//
// val clickIntent = Intent()
// val removeIntent = Intent()
//
// clickIntent.setClass(context, UmengMessageReceiver::class.java)
// clickIntent.putExtra(EntranceUtils.KEY_DATA, data?.link)
// clickIntent.putExtra(EntranceUtils.KEY_MESSAGE, message)
// clickIntent.putExtra(MESSAGE_ID, msg?.msgId)
// clickIntent.putExtra(PUSH_ID, data?.pushId)
// clickIntent.putExtra(NOTIFICATION_MESSAGE_ID, data?.messageId)
// clickIntent.putExtra(EntranceUtils.KEY_TYPE, TYPE_CLICK)
//
// removeIntent.setClass(context, UmengMessageReceiver::class.java)
// removeIntent.putExtra(EntranceUtils.KEY_TYPE, TYPE_REMOVE)
// removeIntent.putExtra(EntranceUtils.KEY_MESSAGE, message)
//
// val clickPendingIntent = PendingIntent.getBroadcast(context, System.currentTimeMillis().toInt(),
// clickIntent, PendingIntent.FLAG_UPDATE_CURRENT)
//
// val deletePendingIntent = PendingIntent.getBroadcast(context, System.currentTimeMillis().toInt() + 1,
// removeIntent, PendingIntent.FLAG_UPDATE_CURRENT)
//
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
// val channel = NotificationChannel("Halo_Push", "Halo_Push", NotificationManager.IMPORTANCE_DEFAULT)
// notificationManager.createNotificationChannel(channel)
// }
//
// val notification = NotificationCompat.Builder(context, "Halo_Push")
// .setSmallIcon(R.drawable.ic_notification)
// .setTicker(pushData.body?.ticker)
// .setContentTitle(pushData.body?.title)
// .setContentText(pushData.body?.text?.fromHtml())
// .setContentIntent(clickPendingIntent)
// .setDeleteIntent(deletePendingIntent)
// .build()
// notification.flags = notification.flags or Notification.FLAG_AUTO_CANCEL
//
// notificationManager.notify(getNotificationTag(context), NOTIFICATION_ID, notification)
// } else {
// if (UserManager.getInstance().isLoggedIn &&
// HALO_MESSAGE_DIALOG == pushData.body?.custom &&
// MessageUnreadRepository.unreadLiveData.value != null) {
// // 回答了问题或者关注了问题的消息
// val msg = gson.fromJson(message, PushMessageEntity::class.java)
// val data = msg?.extra?.data
//
// val type = if (ANSWER == data?.type) {
// "回答了你的问题"
// } else {
// "回答了你关注的问题"
// }
//
// val userName = StringUtils.shrinkStringWithDot(data?.userEntity?.name, 8)
// val displayText = userName + type
//
// if (Notifier.isActivityValid(CurrentActivityHolder.getCurrentActivity()) &&
// Notifier.shouldShowNotifier(data?.answer?.id + displayText)) {
// Notifier.create(CurrentActivityHolder.getCurrentActivity())
// .setText(displayText)
// .setDuration(5000)
// .setIcon(data?.userEntity?.icon)
// .setOnClickListener(View.OnClickListener {
// val bundle = Bundle()
// bundle.putString(EntranceUtils.KEY_ANSWER_ID, data?.answer?.id)
// bundle.putString(EntranceUtils.KEY_ENTRANCE, EntranceUtils.ENTRANCE_UMENG)
// bundle.putString(EntranceUtils.KEY_TO, AnswerDetailActivity::class.java.name)
// EntranceUtils.jumpActivity(context, bundle)
//
// MtaHelper.onEvent("消息弹窗", type, "Does not contains any parameter.")
//
// // 标记已读
// val jsonObject = JSONObject()
// jsonObject.put("type", type)
// val body = RequestBody.create(MediaType.parse("application/json"), jsonObject.toString())
//
// RetrofitManager.getInstance().api.postMessageRead(UserManager.getInstance().userId, data?.id, body)
// .subscribeOn(Schedulers.io())
// .observeOn(AndroidSchedulers.mainThread())
// .subscribe(object : Response<ResponseBody>() {
// override fun onResponse(response: ResponseBody?) {
// super.onResponse(response)
// MessageUnreadRepository.loadMessageUnreadData()
// }
//
// override fun onFailure(e: HttpException?) {
// e?.printStackTrace()
// }
// })
// Notifier.hide()
// })
// .show(false)
// Notifier.tagNotifierAsShowed(data?.answer?.id + displayText)
// }
// } else if (HALO_MESSAGE_CENTER == pushData.body?.custom) {
// // 消息中心逻辑
// val msg = gson.fromJson(message, PushMessageUnreadEntity::class.java)
// val data = msg?.extra?.data
// data?.let { MessageUnreadRepository.loadMessageUnreadData() }
// }
// }
// }
//
// /**
// * 规则:最多三条消息,以旧换新
// *
// * @return NotificationTag
// */
// private fun getNotificationTag(context: Context): String {
// val sp = PreferenceManager.getDefaultSharedPreferences(context)
// val edit = sp.edit()
//
// val timeTagMap = HashMap<Long, String>()
// for (tag in notificationTags) {
// val time = sp.getLong(tag, 0)
// if (time == 0L) {
// edit.putLong(tag, System.currentTimeMillis()).apply()
// return tag
// } else {
// timeTagMap[time] = tag
// }
// }
//
// val minTime = Collections.min(timeTagMap.keys)
// val tag = timeTagMap[minTime]
// edit.putLong(tag, System.currentTimeMillis()).apply()
// return if (TextUtils.isEmpty(tag)) notificationTags[0] else tag!!
// }
//}

View File

@ -3,34 +3,33 @@ package com.gh.base
import android.app.Activity
import android.app.Application
import android.os.Bundle
import com.gh.common.notifier.Notifier
import com.gh.common.util.DataUtils
import androidx.appcompat.app.AppCompatActivity
import com.gh.common.util.FloatingBackViewManager
import com.gh.download.DownloadManager
import com.gh.gamecenter.MainActivity
import com.gh.gamecenter.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
import com.lightgame.utils.AppManager
// TODO移动到对应的模块
class GlobalActivityLifecycleObserver : Application.ActivityLifecycleCallbacks {
override fun onActivityCreated(activity: Activity, savedInstanceState: Bundle?) {
AppManager.getInstance().addActivity(activity)
// do nothing
}
override fun onActivityStarted(activity: Activity) {
GlobalActivityManager.currentActivity = activity
}
override fun onActivityResumed(activity: Activity) {
CurrentActivityHolder.activitySet.add(activity)
// 判断是否需要显示或隐藏返回小浮窗
if (FloatingBackViewManager.getType().isNotEmpty()) {
if (activity is EnergyCenterActivity
@ -47,7 +46,6 @@ class GlobalActivityLifecycleObserver : Application.ActivityLifecycleCallbacks {
}
if (HaloApp.isUserAcceptPrivacyPolicy(activity)) {
DataUtils.onResume(activity)
// FIXME 这里应该只是部分Activity需要
try {
// 初始化gameMap
@ -58,6 +56,14 @@ class GlobalActivityLifecycleObserver : Application.ActivityLifecycleCallbacks {
e.printStackTrace()
}
}
if (PackageFlavorHelper.IS_TEST_FLAVOR && activity is AppCompatActivity) {
NightModeSwitchHelper.showNightModeSwitchFloatingView(activity)
}
if (activity is AppCompatActivity && activity !is SplashScreenActivity) {
VHelper.showFeedbackDialogIfLastSuccessfulLaunchedGameExitUnexpectedly(activity)
}
}
private fun shouldShowActivityBackView(activity: Activity): Boolean {
@ -70,28 +76,22 @@ class GlobalActivityLifecycleObserver : Application.ActivityLifecycleCallbacks {
}
override fun onActivityPaused(activity: Activity) {
CurrentActivityHolder.activitySet.remove(activity)
FloatingBackViewManager.dismissBackView()
if (HaloApp.isUserAcceptPrivacyPolicy(activity)) {
DataUtils.onPause(activity)
}
if (activity.isFinishing) {
AppManager.getInstance().finishActivity(activity)
if (PackageFlavorHelper.IS_TEST_FLAVOR && activity is AppCompatActivity) {
NightModeSwitchHelper.dismissNightModeSwitchFloatingView()
}
}
override fun onActivityStopped(activity: Activity) {
Notifier.hide()
// do nothing
}
override fun onActivitySaveInstanceState(activity: Activity, outState: Bundle) {
// do nothing
}
override fun onActivityDestroyed(activity: Activity) {
AppManager.getInstance().finishActivity(activity)
// do nothing
}
}

View File

@ -0,0 +1,14 @@
package com.gh.base
import android.app.Activity
import java.lang.ref.WeakReference
object GlobalActivityManager {
private var mCurrentActivityWeakRef: WeakReference<Activity>? = null
var currentActivity: Activity?
get() = mCurrentActivityWeakRef?.get()
set(activity) {
mCurrentActivityWeakRef = WeakReference<Activity>(activity)
}
}

View File

@ -0,0 +1,107 @@
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

@ -1,5 +0,0 @@
package com.gh.common
object Base64ImageHolder {
var image: String = ""
}

View File

@ -8,16 +8,27 @@ import android.webkit.JavascriptInterface
import androidx.annotation.Keep
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.FragmentActivity
import com.gh.base.CurrentActivityHolder
import com.gh.common.constant.Constants
import com.gh.common.loghub.LoghubUtils
import com.gh.common.tracker.Tracker
import com.gh.common.util.*
import com.gh.common.view.dsbridge.CompletionHandler
import com.gh.common.util.LogUtils
import com.gh.gamecenter.*
import com.gh.gamecenter.common.callback.BiCallback
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.common.entity.NotificationUgc
import com.gh.gamecenter.common.loghub.LoghubUtils
import com.gh.gamecenter.common.tracker.Tracker
import com.gh.gamecenter.common.utils.*
import com.gh.gamecenter.common.view.dsbridge.CompletionHandler
import com.gh.gamecenter.core.AppExecutor
import com.gh.gamecenter.core.runOnIoThread
import com.gh.gamecenter.core.runOnUiThread
import com.gh.gamecenter.core.utils.CurrentActivityHolder
import com.gh.gamecenter.core.utils.DisplayUtils
import com.gh.gamecenter.core.utils.MtaHelper
import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.energy.EnergyCenterActivity
import com.gh.gamecenter.energy.EnergyHouseActivity
import com.gh.gamecenter.entity.*
import com.gh.gamecenter.entity.Badge
import com.gh.gamecenter.entity.MtaEvent
import com.gh.gamecenter.help.QaFeedbackDialogFragment
import com.gh.gamecenter.manager.UserManager
import com.gh.gamecenter.personalhome.border.AvatarBorderActivity
@ -32,7 +43,7 @@ import java.io.File
import java.io.FileOutputStream
import java.util.*
class DefaultJsApi(var context: Context) {
class DefaultJsApi(var context: Context, val entrance: String = "") {
private var mLoginHandler: CompletionHandler<Any>? = null
@ -181,7 +192,7 @@ class DefaultJsApi(var context: Context) {
fun openBase64Image(event: Any) {
val context = CurrentActivityHolder.getCurrentActivity()
Base64ImageHolder.image = event.toString()
ImageViewerActivity.base64Image = event.toString()
context?.startActivity(ImageViewerActivity.getBase64Intent(context, true))
}
@ -232,7 +243,7 @@ class DefaultJsApi(var context: Context) {
fun shareBase64Image(event: Any) {
val imageShareEvent = event.toString().toObject() ?: ImageShareEvent()
val context = CurrentActivityHolder.getCurrentActivity()
Base64ImageHolder.image = imageShareEvent.image.run {
ImageViewerActivity.base64Image = imageShareEvent.image.run {
if (this.startsWith("data:image/png;base64")) this.split(",")[1] else this
}
MessageShareUtils.getInstance(context).shareFromWeb(context, imageShareEvent.type)
@ -243,7 +254,7 @@ class DefaultJsApi(var context: Context) {
val inviteEvent = event.toString().toObject() ?: InviteFriendsEvent()
val context = CurrentActivityHolder.getCurrentActivity()
if ("poster" == inviteEvent.type) {
Base64ImageHolder.image = inviteEvent.poster.run {
ImageViewerActivity.base64Image = inviteEvent.poster.run {
if (this.startsWith("data:image/png;base64")) this.split(",")[1] else this
}
MessageShareUtils.getInstance(context).shareInviteFriends(context, inviteEvent.way)
@ -420,6 +431,11 @@ class DefaultJsApi(var context: Context) {
GameActivityDownloadHelper.postExposureEvent(gameActivityEvent)
}
@JavascriptInterface
fun getEntrance(msg: Any): String {
return entrance
}
@Keep
internal data class ImageEvent(var imageList: ArrayList<String> = arrayListOf(), var position: Int = 0)

View File

@ -5,8 +5,8 @@ import android.content.Intent
import android.net.Uri
import android.text.TextUtils
import android.util.Base64
import com.gh.base.CurrentActivityHolder
import com.gh.common.constant.Constants
import com.gh.gamecenter.core.utils.CurrentActivityHolder
import com.gh.gamecenter.common.constant.Constants
import com.gh.common.util.*
import com.gh.common.util.DirectUtils.directToFeedback
import com.gh.common.util.DirectUtils.directToGameDetailVideoStreaming
@ -15,11 +15,16 @@ import com.gh.common.util.DirectUtils.directToGameVideo
import com.gh.common.util.DirectUtils.directToLegacyVideoDetail
import com.gh.common.util.DirectUtils.directToLinkPage
import com.gh.common.util.DirectUtils.directToQa
import com.gh.common.util.GsonUtils.gson
import com.gh.gamecenter.core.utils.GsonUtils.gson
import com.gh.gamecenter.LibaoDetailActivity
import com.gh.gamecenter.MainActivity
import com.gh.gamecenter.NewsDetailActivity
import com.gh.gamecenter.WebActivity
import com.gh.gamecenter.common.constant.EntranceConsts
import com.gh.gamecenter.core.AppExecutor
import com.gh.gamecenter.common.utils.DialogHelper
import com.gh.gamecenter.common.utils.EnvHelper
import com.gh.gamecenter.core.utils.ToastUtils
import com.gh.gamecenter.entity.*
import com.gh.gamecenter.gamecollection.publish.GameCollectionEditActivity
import com.gh.gamecenter.qa.BbsType
@ -78,7 +83,7 @@ object DefaultUrlHandler {
e.printStackTrace()
}
EntranceUtils.HOST_QQ_QUN -> {
EntranceConsts.HOST_QQ_QUN -> {
val key = uri.getQueryParameter("key")
if (!DirectUtils.directToQqGroup(context, key)) {
Utils.toast(context, "请检查是否已经安装手机QQ")
@ -103,6 +108,8 @@ object DefaultUrlHandler {
}
"question" -> DirectUtils.directToQuestionDetail(context, id, entrance, "文章链接")
"real_name" -> DirectUtils.directToRealName(context)
"community" -> {
val community = CommunityEntity()
community.id = id
@ -146,7 +153,7 @@ object DefaultUrlHandler {
)
}
}
EntranceUtils.HOST_UPLOAD_VIDEO -> {
EntranceConsts.HOST_UPLOAD_VIDEO -> {
val titleParameter = uri.getQueryParameter("title")
val title = if (titleParameter.isNullOrEmpty()) "" else "#$titleParameter#"
val categoryId = uri.getQueryParameter("category_id") ?: ""
@ -157,16 +164,16 @@ object DefaultUrlHandler {
val tagActivityName = uri.getQueryParameter("tagActivityName") ?: ""
val linkEntity = VideoLinkEntity(title, categoryId, link, tagActivityId, tagActivityName)
val simpleGameEntity = SimpleGameEntity(gameId, gameName)
CheckLoginUtils.checkLogin(context, null, true, EntranceUtils.ENTRANCE_BROWSER) {
DirectUtils.directToVideoManager(context, linkEntity, simpleGameEntity, EntranceUtils.ENTRANCE_BROWSER, "")
CheckLoginUtils.checkLogin(context, null, true, EntranceConsts.ENTRANCE_BROWSER) {
DirectUtils.directToVideoManager(context, linkEntity, simpleGameEntity, EntranceConsts.ENTRANCE_BROWSER, "")
}
}
EntranceUtils.HOST_USERHOME -> {
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, "")
}
EntranceUtils.HOST_VIDEO_MORE -> {
EntranceConsts.HOST_VIDEO_MORE -> {
val referer = uri.getQueryParameter("referer") ?: ""
val type = uri.getQueryParameter("type") ?: ""
val act = uri.getQueryParameter("act") ?: ""
@ -198,48 +205,48 @@ object DefaultUrlHandler {
sectionName
)
}
EntranceUtils.HOST_VIDEO_DETAIL -> {
EntranceConsts.HOST_VIDEO_DETAIL -> {
DirectUtils.directToVideoDetail(context, id, entrance, path)
}
EntranceUtils.HOST_VIDEO_SINGLE -> {
EntranceConsts.HOST_VIDEO_SINGLE -> {
val referer = uri.getQueryParameter("referer") ?: ""
DirectUtils.directToVideoDetail(
context, id, VideoDetailContainerViewModel.Location.SINGLE_VIDEO.value,
false, "", entrance, "", if (TextUtils.isEmpty(referer)) "" else referer
)
}
EntranceUtils.HOST_VIDEO_STREAMING_HOME -> {
EntranceConsts.HOST_VIDEO_STREAMING_HOME -> {
intent = Intent(context, MainActivity::class.java)
intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TOP
intent.putExtra(MainActivity.SWITCH_TO_VIDEO, true)
context.startActivity(intent)
}
EntranceUtils.HOST_VIDEO_STREAMING_DESC -> {
EntranceConsts.HOST_VIDEO_STREAMING_DESC -> {
directToGameDetailVideoStreaming(context, id, entrance)
}
EntranceUtils.HOST_VIDEO_COLLECTION -> {
EntranceConsts.HOST_VIDEO_COLLECTION -> {
directToGameVideo(context, id, entrance, "")
}
EntranceUtils.HOST_CATEGORY -> {
EntranceConsts.HOST_CATEGORY -> {
val title = uri.getQueryParameter("title")
DirectUtils.directCategoryDirectory(context, id, title ?: "", entrance, "")
}
EntranceUtils.HOST_COLUMN_COLLECTION -> {
EntranceConsts.HOST_COLUMN_COLLECTION -> {
val name = uri.getQueryParameter("name")
DirectUtils.directToColumnCollection(context, id, -1, entrance, name ?: "")
}
EntranceUtils.HOST_COLUMN -> {
DirectUtils.directToSubject(context, id, uri.getQueryParameter(EntranceUtils.KEY_NAME), entrance)
EntranceConsts.HOST_COLUMN -> {
DirectUtils.directToSubject(context, id, uri.getQueryParameter(EntranceConsts.KEY_NAME), entrance)
}
EntranceUtils.HOST_COMMUNITY_QUESTION_LABEL_DETAIL -> {
EntranceConsts.HOST_COMMUNITY_QUESTION_LABEL_DETAIL -> {
val community = CommunityEntity()
community.id = uri.getQueryParameter("community_id") ?: ""
community.name = uri.getQueryParameter("community_name") ?: ""
val tag = uri.getQueryParameter("tag") ?: ""
DirectUtils.directAskColumnLabelDetail(context, tag, community, entrance, "")
}
EntranceUtils.HOST_COMMUNITY_COLUMN_DETAIL -> {
EntranceConsts.HOST_COMMUNITY_COLUMN_DETAIL -> {
val community = CommunityEntity()
community.id = uri.getQueryParameter("community_id") ?: ""
community.name = uri.getQueryParameter("community_name") ?: ""
@ -247,42 +254,42 @@ object DefaultUrlHandler {
DirectUtils.directAskColumnDetail(context, columnId, community, entrance, "")
}
EntranceUtils.HOST_BLOCK -> {
EntranceConsts.HOST_BLOCK -> {
val name = uri.getQueryParameter("name")
?: ""
val entity = SubjectRecommendEntity(link = id, name = name, text = name)
DirectUtils.directToBlock(context, entity, entrance)
}
EntranceUtils.HOST_SERVER_BLOCK -> {
EntranceConsts.HOST_SERVER_BLOCK -> {
DirectUtils.directToGameServers(context, entrance = entrance, path = "")
}
EntranceUtils.HOST_AMWAY_BLOCK -> {
EntranceConsts.HOST_AMWAY_BLOCK -> {
DirectUtils.directToAmway(context, entrance = entrance, path = "")
}
EntranceUtils.HOST_HELP -> {
EntranceConsts.HOST_HELP -> {
val name = uri.getQueryParameter("name")
?: ""
DirectUtils.directToQa(context, name, id)
}
EntranceUtils.HOST_HELP_COLLECTION -> {
EntranceConsts.HOST_HELP_COLLECTION -> {
val name = uri.getQueryParameter("name")
?: ""
DirectUtils.directToQaCollection(context, name, id)
}
EntranceUtils.HOST_GAME_UPLOAD -> {
EntranceConsts.HOST_GAME_UPLOAD -> {
DirectUtils.directGameUpload(context, entrance = entrance, path = "")
}
EntranceUtils.HOST_GAME_ZONE -> {
EntranceConsts.HOST_GAME_ZONE -> {
val zoneUrl = uri.getQueryParameter("url") ?: ""
DirectUtils.directGameZone(context, id, zoneUrl, entrance)
}
EntranceUtils.HOST_LINK -> {
EntranceConsts.HOST_LINK -> {
try {
val dataString = uri.getQueryParameter("data")
if (!TextUtils.isEmpty(dataString)) {
@ -296,43 +303,43 @@ object DefaultUrlHandler {
}
}
EntranceUtils.HOST_GAME_NEWS -> {
EntranceConsts.HOST_GAME_NEWS -> {
DirectUtils.directToGameNews(
context,
uri.getQueryParameter(EntranceUtils.KEY_GAME_ID),
uri.getQueryParameter(EntranceUtils.KEY_GAME_NAME),
uri.getQueryParameter(EntranceConsts.KEY_GAME_ID),
uri.getQueryParameter(EntranceConsts.KEY_GAME_NAME),
entrance
);
}
EntranceUtils.HOST_GAME_CALENDAR -> {
directToGameServerCalendar(context, uri.getQueryParameter(EntranceUtils.KEY_GAME_ID))
EntranceConsts.HOST_GAME_CALENDAR -> {
directToGameServerCalendar(context, uri.getQueryParameter(EntranceConsts.KEY_GAME_ID))
}
EntranceUtils.HOST_HISTORY_APK -> {
DirectUtils.directToHistoryApk(context, uri.getQueryParameter(EntranceUtils.KEY_GAME_ID))
EntranceConsts.HOST_HISTORY_APK -> {
DirectUtils.directToHistoryApk(context, uri.getQueryParameter(EntranceConsts.KEY_GAME_ID))
}
EntranceUtils.HOST_FORUM_DETAIL -> {
EntranceConsts.HOST_FORUM_DETAIL -> {
DirectUtils.directForumDetail(context, id, entrance)
}
EntranceUtils.HOST_GAME_RATING_DETAIL -> {
EntranceConsts.HOST_GAME_RATING_DETAIL -> {
DirectUtils.directToGameRatingDetail(
context,
uri.getQueryParameter(EntranceUtils.KEY_GAME_ID),
uri.getQueryParameter(EntranceUtils.KEY_COMMENT_ID),
EntranceUtils.ENTRANCE_BROWSER
uri.getQueryParameter(EntranceConsts.KEY_GAME_ID),
uri.getQueryParameter(EntranceConsts.KEY_COMMENT_ID),
EntranceConsts.ENTRANCE_BROWSER
)
}
EntranceUtils.HOST_FORUM -> {
val position = uri.getQueryParameter(EntranceUtils.KEY_POSITION)?.toInt()
EntranceConsts.HOST_FORUM -> {
val position = uri.getQueryParameter(EntranceConsts.KEY_POSITION)?.toInt()
DirectUtils.directToForum(context, position ?: 0)
}
EntranceUtils.HOST_UPLOAD_VIDEO_NEW -> {
EntranceConsts.HOST_UPLOAD_VIDEO_NEW -> {
val activityName = uri.getQueryParameter("activity_name") ?: ""
val activityId = uri.getQueryParameter("activity_id") ?: ""
val original = uri.getQueryParameter("original") ?: ""
@ -370,39 +377,39 @@ object DefaultUrlHandler {
)
}
EntranceUtils.HOST_SUGGESTION -> {
val platform = uri.getQueryParameter(EntranceUtils.KEY_PLATFORM)
EntranceConsts.HOST_SUGGESTION -> {
val platform = uri.getQueryParameter(EntranceConsts.KEY_PLATFORM)
val platformName = PlatformUtils.getInstance(context).getPlatformName(platform)
val gameId = uri.getQueryParameter(EntranceUtils.KEY_GAMEID)
val packageMd5 = uri.getQueryParameter(EntranceUtils.KEY_PACKAGE_MD5)
val isQaFeedback = uri.getQueryParameter(EntranceUtils.KEY_IS_QA_FEEDBACK) == "true"
val gameId = uri.getQueryParameter(EntranceConsts.KEY_GAMEID)
val packageMd5 = uri.getQueryParameter(EntranceConsts.KEY_PACKAGE_MD5)
val isQaFeedback = uri.getQueryParameter(EntranceConsts.KEY_IS_QA_FEEDBACK) == "true"
val content = if (TextUtils.isEmpty(gameId) || TextUtils.isEmpty(packageMd5)) String.format(
"%s-%s-V%s",
uri.getQueryParameter(EntranceUtils.KEY_GAME_NAME),
uri.getQueryParameter(EntranceConsts.KEY_GAME_NAME),
if (TextUtils.isEmpty(platformName)) platform else platformName,
uri.getQueryParameter(EntranceUtils.KEY_VERSION)
uri.getQueryParameter(EntranceConsts.KEY_VERSION)
) else String.format(
"%s-%s-V%s\n游戏ID%s\n游戏包MD5%s\n",
uri.getQueryParameter(EntranceUtils.KEY_GAME_NAME),
uri.getQueryParameter(EntranceConsts.KEY_GAME_NAME),
if (TextUtils.isEmpty(platformName)) platform else platformName,
uri.getQueryParameter(EntranceUtils.KEY_VERSION), gameId, packageMd5
uri.getQueryParameter(EntranceConsts.KEY_VERSION), gameId, packageMd5
)
val qaId = uri.getQueryParameter("qa_id") ?: ""
val qaContentId = uri.getQueryParameter(EntranceUtils.KEY_QA_CONTENT_ID) ?: ""
val qaTitle = uri.getQueryParameter(EntranceUtils.KEY_QA_TITLE)
val qaContentId = uri.getQueryParameter(EntranceConsts.KEY_QA_CONTENT_ID) ?: ""
val qaTitle = uri.getQueryParameter(EntranceConsts.KEY_QA_TITLE)
if (!TextUtils.isEmpty(qaId)) {
directToQa(context, qaTitle, qaId)
} else {
directToFeedback(context, content, null, isQaFeedback, qaContentId, EntranceUtils.ENTRANCE_BROWSER)
directToFeedback(context, content, null, isQaFeedback, qaContentId, EntranceConsts.ENTRANCE_BROWSER)
}
}
EntranceUtils.HOST_HELP_AND_FEEDBACK -> {
EntranceConsts.HOST_HELP_AND_FEEDBACK -> {
val position = uri.getQueryParameter("position") ?: ""
DirectUtils.directToHelpAndFeedback(context, position.toInt())
}
EntranceUtils.HOST_HELP_DETAIL -> {
EntranceConsts.HOST_HELP_DETAIL -> {
var url = uri.getQueryParameter("url")
if (!url.isNullOrEmpty()) {
context.startActivity(WebActivity.getIntent(context, url, false))
@ -419,16 +426,19 @@ object DefaultUrlHandler {
}
}
EntranceUtils.HOST_GAME_COLLECTION_DETAIL -> {
EntranceConsts.HOST_GAME_COLLECTION_DETAIL -> {
DirectUtils.directToGameCollectionDetail(context, id, entrance)
}
EntranceUtils.HOST_GAME_COLLECTION_SQUARE -> {
EntranceConsts.HOST_GAME_COLLECTION_SQUARE -> {
DirectUtils.directToGameCollectionSquare(context, entrance)
}
EntranceUtils.HOST_GAME_COLLECTION_EDIT -> {
context.startActivity(GameCollectionEditActivity.getIntent(context, entrance))
EntranceConsts.HOST_GAME_COLLECTION_EDIT -> {
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))
}
else -> {
@ -492,6 +502,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"
@ -503,8 +520,7 @@ object DefaultUrlHandler {
uri.path?.apply {
when {
contains("game") -> {
val gameId = uri.getQueryParameter("gameId") ?: uri.pathSegments.last()
?: ""
val gameId = uri.getQueryParameter("gameId") ?: uri.pathSegments.last() ?: ""
DirectUtils.directToGameDetail(context, gameId, entrance, autoDownload = false, traceEvent = null)
}
contains("question") -> {
@ -570,6 +586,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

@ -2,13 +2,14 @@ package com.gh.common
import com.gh.common.exposure.ExposureManager
import com.gh.common.filter.RegionSettingHelper
import com.gh.common.loghub.LoghubUtils
import com.gh.common.util.doOnMainProcessOnly
import com.gh.common.util.tryCatchInRelease
import com.gh.common.videolog.VideoRecordUtils
import com.gh.download.DownloadDataHelper
import com.gh.gamecenter.common.loghub.LoghubUtils
import com.gh.gamecenter.common.retrofit.Response
import com.gh.gamecenter.common.utils.doOnMainProcessOnly
import com.gh.gamecenter.common.utils.tryCatchInRelease
import com.gh.gamecenter.core.runOnUiThread
import com.gh.gamecenter.entity.TimeEntity
import com.gh.gamecenter.retrofit.Response
import com.gh.gamecenter.retrofit.RetrofitManager
import com.halo.assistant.HaloApp
import io.reactivex.schedulers.Schedulers
@ -47,7 +48,9 @@ object FixedRateJobHelper {
// 提交曝光数据
if ((mExecuteCount * CHECKER_PERIOD) % EXPOSURE_PERIOD == 0L) {
ExposureManager.commitSavedExposureEvents(true)
runOnUiThread {
ExposureManager.commitSavedExposureEvents(true)
}
}
// 分片检测下载进度
@ -60,7 +63,9 @@ object FixedRateJobHelper {
// 提交普通 loghub 数据
if ((mExecuteCount * CHECKER_PERIOD) % LOGHUB_PERIOD == 0L) {
LoghubUtils.commitSavedLoghubEvents()
runOnUiThread {
LoghubUtils.commitSavedLoghubEvents(true)
}
}
// 更新游戏屏蔽信息

View File

@ -1,39 +0,0 @@
//package com.gh.common
//
//import android.content.BroadcastReceiver
//import android.content.Context
//import android.content.Intent
//import com.gh.common.im.ImManager
//import com.gh.gamecenter.manager.UserManager
//import com.gh.gamecenter.retrofit.RetrofitManager
//import com.halo.assistant.HaloApp
//import com.m7.imkfsdk.chat.ChatActivity
//import io.reactivex.schedulers.Schedulers
//
///**
// * 可使用 [LocalBroadcastManager] 来进行简单的模块间消息通知
// */
//
//class LocalBroadcastReceiver : BroadcastReceiver() {
//
// override fun onReceive(context: Context?, intent: Intent?) {
// intent?.let {
// when (intent.action) {
// ChatActivity.ACTION_DISMISS_FLOATING_WINDOW -> {
// ImManager.dismissFloatingWindow()
//
// RetrofitManager.getInstance().api.postImEnding(UserManager.getInstance().userId)
// .subscribeOn(Schedulers.io())
// .subscribe()
// }
//
// ChatActivity.ACTION_HIDE_UNREAD_DOT -> {
// ImManager.updateShouldShowFloatingWindowDot(false)
// }
//
// else -> return
// }
// }
// }
//
//}

View File

@ -1,117 +0,0 @@
package com.gh.common
import android.annotation.SuppressLint
import com.gh.gamecenter.entity.AliasEntity
import com.halo.assistant.HaloApp
object PushManager {
var deviceToken: String? = ""
private var mPreviousAlias: AliasEntity? = null
private var mApplication = HaloApp.getInstance().application
const val SP_PUSH_ALIAS = "push_alias"
@JvmStatic
fun init(channel: String) {
// tryWithDefaultCatch {
// //初始化友盟推送
// UMConfigure.init(mApplication, Config.UMENG_APPKEY, channel, UMConfigure.DEVICE_TYPE_PHONE, Config.UMENG_MESSAGE_SECRET)
//
// val pushAgent = PushAgent.getInstance(mApplication)
//
// runOnIoThread { registerDevice() }
//
// // 注册小米、华为和魅族通道
// MiPushRegistar.register(mApplication, Config.MIPUSH_APPID, Config.MIPUSH_APPKEY)
// HuaWeiRegister.register(mApplication)
// MeizuRegister.register(mApplication, BuildConfig.MEIZUPUSH_APPID, BuildConfig.MEIZUPUSH_APPKEY)
//
// val aliasInSp = PreferenceManager.getDefaultSharedPreferences(mApplication).getString(SP_PUSH_ALIAS, "")
// mPreviousAlias = aliasInSp?.toObject()
//
// if (mPreviousAlias == null) {
// getAndSetAlias()
// }
//
// // 完全自定义处理(透传)
// pushAgent.setPushIntentServiceClass(GHUmengNotificationService::class.java)
// }
}
private fun registerDevice() {
// PushAgent.getInstance(mApplication).register(object : IUmengRegisterCallback {
// override fun onSuccess(dToken: String) {
// //注册成功会返回device token
// deviceToken = dToken
// getAndSetAlias()
// Utils.log("deviceToken::$dToken")
// }
//
// override fun onFailure(s: String, s1: String) {
// Utils.log("deviceToken::" + "注册失败")
// }
// })
}
@SuppressLint("CheckResult")
@JvmStatic
fun getAndSetAlias() {
// if (deviceToken.isNullOrEmpty()) {
// registerDevice()
// return
// }
//
// val meta = MetaUtil.getMeta()
//
// val jsonObject = JSONObject()
// jsonObject.put("device_token", deviceToken)
// jsonObject.put("imei", meta.imei)
// jsonObject.put("android_id", meta.android_id)
// jsonObject.put("model", meta.model)
// jsonObject.put("manufacturer", meta.manufacturer)
// jsonObject.put("os", meta.os)
// jsonObject.put("os_version", meta.android_version)
// jsonObject.put("mac", meta.mac)
// jsonObject.put("gid", meta.gid)
//
// val body = RequestBody.create(MediaType.parse("application/json"), jsonObject.toString())
//
// RetrofitManager.getInstance().api.getAlias(body)
// .subscribeOn(Schedulers.io())
// .subscribe(
// { setAlias(it) },
// { it.printStackTrace() }
// )
}
@JvmStatic
fun setAlias(alias: AliasEntity) {
// val pushAgent = PushAgent.getInstance(mApplication)
//
// mPreviousAlias = alias
// PreferenceManager.getDefaultSharedPreferences(mApplication).edit {
// putString(SP_PUSH_ALIAS, mPreviousAlias?.toJson())
// }
//
// pushAgent.setAlias(alias.alias, alias.aliasType) { b, s ->
// Utils.log("注册别名 $b + $s")
// }
}
@JvmStatic
fun deleteAlias() {
// val pushAgent = PushAgent.getInstance(mApplication)
//
// mPreviousAlias?.let {
// pushAgent.deleteAlias(it.alias, it.aliasType) { b, s ->
// Utils.log("删除别名 $b + $s")
// }
// }
// PreferenceManager.getDefaultSharedPreferences(mApplication).edit {
// putString(SP_PUSH_ALIAS, "")
// }
// mPreviousAlias = null
}
}

View File

@ -1,27 +1,31 @@
package com.gh.common.constant;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Build;
import android.preference.PreferenceManager;
import android.text.TextUtils;
import com.gh.common.util.EnvHelper;
import com.gh.common.util.GsonUtils;
import androidx.annotation.Nullable;
import com.gh.gamecenter.common.utils.EnvHelper;
import com.gh.gamecenter.common.constant.Constants;
import com.gh.gamecenter.core.utils.GsonUtils;
import com.gh.common.util.PackageHelper;
import com.gh.common.util.PackageUtils;
import com.gh.common.util.SPUtils;
import com.gh.gamecenter.BuildConfig;
import com.gh.gamecenter.SuggestionActivity;
import com.gh.gamecenter.core.utils.SPUtils;
import com.gh.gamecenter.entity.GameGuidePopupEntity;
import com.gh.gamecenter.entity.NewSettingsEntity;
import com.gh.gamecenter.entity.NewsEntity;
import com.gh.gamecenter.entity.SettingsEntity;
import com.gh.gamecenter.entity.VSetting;
import com.gh.gamecenter.eventbus.EBReuse;
import com.gh.gamecenter.retrofit.BiResponse;
import com.gh.gamecenter.retrofit.Response;
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;
@ -33,8 +37,6 @@ import java.io.IOException;
import java.util.List;
import java.util.Locale;
import androidx.annotation.Nullable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
import okhttp3.ResponseBody;
@ -44,10 +46,7 @@ public class Config {
// 这个 API_HOST 在测试包里会随着选择的环境切换,正式包里会一直保持正式 host
public static final String API_HOST = EnvHelper.getHost();
public static final String NEW_API_HOST = EnvHelper.getNewHost();
/**
* 需要配置的请使用{@link PreferenceManager#getDefaultSharedPreferences(Context)}
*/
public static final String VAPI_HOST = EnvHelper.getVHost();
// Third-Party confs
public static final String WECHAT_APPID = BuildConfig.WECHAT_APPID;
@ -59,13 +58,11 @@ public class Config {
// http://www.ghzs666.com/article/${articleId}.html
public static final String URL_ARTICLE = "http://www.ghzs666.com/article/"; // ghzs/ghzs666 统一
public static final String DEFAULT_CHANNEL = "GH_TEST3";
public static final String DEFAULT_CHANNEL_FOR_RELEASE = "GH_LOST"; // 正式包的缺省渠道,避免因渠道丢失而回落到测试渠道
private static String SETTINGS_KEY = "settingsKey";
private static final String SETTINGS_KEY = "settingsKey";
private static SettingsEntity mSettingsEntity;
private static NewSettingsEntity mNewSettingsEntity;
private static VSetting mVSetting;
private static GameGuidePopupEntity mGameGuidePopupEntity;
private static SharedPreferences mDefaultSharedPreferences;
@ -93,13 +90,7 @@ public class Config {
return false;
}
public static String getExceptionMsg() {
return getPreferences().getString("errMsg", null);
}
public static void setExceptionMsg(String errMsg) {
SPUtils.setString(getPreferences(), "errMsg", errMsg); //先用apply(),保存不了再用commit() 9.0机型保存不了信息
}
public static boolean isShowDownload(String gameId) {
@ -125,6 +116,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();
@ -195,6 +197,9 @@ public class Config {
// 加载完设置后刷新下
PackageHelper.initList();
// 初始化畅玩相关的东西
VHelper.init(HaloApp.getInstance());
}
@Nullable
@ -227,6 +232,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;
@ -270,13 +290,6 @@ public class Config {
return false;
}
public static boolean isGameDomeSwitchOpen() {
return getSettings() != null && getSettings().getGameDomeSwitch().equals("on");
}
public static boolean isPermissionPopupSwitchOpen() {
return getSettings() != null && getSettings().getPermissionPopupSwitch().equals("on");
}
public static void fixHideFunction() {
SharedPreferences preferences = PreferenceManager.
getDefaultSharedPreferences(HaloApp.getInstance().getApplication());
@ -327,6 +340,17 @@ public class Config {
}
});
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));
}
});
RetrofitManager.getInstance()
.getApi().getGameGuidePopup(Build.MANUFACTURER, Build.VERSION.RELEASE, Build.MODEL, channel, BuildConfig.VERSION_NAME)
.subscribeOn(Schedulers.io())

View File

@ -13,10 +13,10 @@ import android.widget.PopupWindow
import androidx.core.content.ContextCompat
import androidx.databinding.BindingAdapter
import androidx.recyclerview.widget.LinearLayoutManager
import com.gh.base.OnViewClickListener
import com.gh.common.util.dip2px
import com.gh.common.util.toDrawable
import com.gh.common.view.BugFixedPopupWindow
import com.gh.gamecenter.common.callback.OnViewClickListener
import com.gh.gamecenter.common.utils.dip2px
import com.gh.gamecenter.common.utils.toDrawable
import com.gh.gamecenter.common.view.BugFixedPopupWindow
import com.gh.gamecenter.R
import com.gh.gamecenter.databinding.KaifuAddItemBinding
import com.gh.gamecenter.databinding.LayoutAddKaifuPopupBinding
@ -87,8 +87,8 @@ object AddKaiFuBindingAdapter {
})
if (i == list.size - 1) {
binding.kaifuAddTime.background = R.drawable.bg_add_kaifu_bottom_left.toDrawable()
binding.kaifuAddServerName.background = R.drawable.bg_add_kaifu_bottom_right.toDrawable()
binding.kaifuAddTime.background = R.drawable.bg_add_kaifu_bottom_left.toDrawable(view.context)
binding.kaifuAddServerName.background = R.drawable.bg_add_kaifu_bottom_right.toDrawable(view.context)
}
}
}

View File

@ -19,35 +19,28 @@ import androidx.core.content.ContextCompat;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.facebook.drawee.view.SimpleDraweeView;
import com.gh.base.OnViewClickListener;
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.DataUtils;
import com.gh.common.util.DialogUtils;
import com.gh.common.util.DisplayUtils;
import com.gh.common.util.DownloadDialogHelper;
import com.gh.common.util.ExtensionsKt;
import com.gh.common.util.GameUtils;
import com.gh.common.util.GameViewUtils;
import com.gh.common.util.ImageUtils;
import com.gh.common.util.LogUtils;
import com.gh.common.util.MtaHelper;
import com.gh.common.util.NewsUtils;
import com.gh.common.util.NumberUtils;
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.DrawableView;
import com.gh.common.view.GameIconView;
import com.gh.download.DownloadManager;
import com.gh.download.dialog.DownloadDialog;
@ -56,6 +49,14 @@ 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.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.view.DrawableView;
import com.gh.gamecenter.core.utils.DisplayUtils;
import com.gh.gamecenter.core.utils.MtaHelper;
import com.gh.gamecenter.core.utils.NumberUtils;
import com.gh.gamecenter.databinding.KaifuDetailItemRowBinding;
import com.gh.gamecenter.entity.ApkEntity;
import com.gh.gamecenter.entity.GameEntity;
@ -68,6 +69,8 @@ import com.gh.gamecenter.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;
@ -357,36 +360,45 @@ public class BindingAdapters {
switch (progressBar.getDownloadType()) {
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;
}
}
}
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));
VHelper.validateVSpaceBeforeAction(v.getContext(), gameEntity, true, () -> {
GamePermissionDialogFragment.show((AppCompatActivity) v.getContext(), gameEntity, gameEntity.getInfo(), () -> {
BrowserInstallHelper.showBrowserInstallHintDialog(v.getContext(), gameEntity.isVGame(), () -> {
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));
});
});
});
});
@ -394,9 +406,7 @@ public class BindingAdapters {
});
});
});
});
} else {
RealNameHelper.checkIfAuth(v.getContext(), gameEntity, () -> {
} else {
GamePermissionDialogFragment.show((AppCompatActivity) v.getContext(), gameEntity, gameEntity.getInfo(), () -> {
CertificationDialog.showCertificationDialog(v.getContext(), gameEntity, () -> {
DialogUtils.showVersionNumberDialog(v.getContext(), gameEntity, () -> {
@ -409,7 +419,7 @@ public class BindingAdapters {
});
});
});
});
}
}
break;
case LAUNCH_OR_OPEN:
@ -428,7 +438,12 @@ public class BindingAdapters {
}
return;
}
DataUtils.onGameLaunchEvent(v.getContext(), gameEntity.getName(), gameEntity.getApk().get(0).getPlatform(), location);
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(
@ -442,20 +457,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);
});
});
});
@ -550,7 +570,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()) {
@ -581,6 +601,7 @@ public class BindingAdapters {
case uncertificated:
case unqualified:
case unavailable:
case banned:
break;
default:
break;
@ -595,7 +616,7 @@ public class BindingAdapters {
*/
private static void restoreDialogFragment(DownloadProgressBar progressBar) {
GamePermissionDialogFragment gamePermissionDialogFragment =
((GamePermissionDialogFragment) ((AppCompatActivity) progressBar.getContext()).getSupportFragmentManager().findFragmentByTag(GamePermissionDialogFragment.class.getSimpleName()));
((GamePermissionDialogFragment) ((AppCompatActivity) progressBar.getContext()).getSupportFragmentManager().findFragmentByTag(GamePermissionDialogFragment.class.getName()));
if (gamePermissionDialogFragment != null) {
gamePermissionDialogFragment.dismissAllowingStateLoss();
}
@ -652,8 +673,6 @@ public class BindingAdapters {
ApkEntity apkEntity = gameEntity.getApk().get(0);
String msg = FileUtils.isCanDownload(progressBar.getContext(), apkEntity.getSize());
if (TextUtils.isEmpty(msg)) {
DataUtils.onGameDownloadEvent(progressBar.getContext(), gameEntity.getName(), apkEntity.getPlatform(), entrance, "下载开始", method);
DownloadManager.createDownload(progressBar.getContext(),
apkEntity,
gameEntity,
@ -696,15 +715,16 @@ public class BindingAdapters {
tagStyle.add(typeTag);
} else {
TagStyleEntity typeTag = new TagStyleEntity();
boolean isNightMode = NightModeUtils.INSTANCE.isNightMode(layout.getContext());
typeTag.setName(test.getType() != null ? test.getType() : "");
typeTag.setBackground("FFF3E0");
typeTag.setColor("FA8500");
typeTag.setBackground("1AFFA142");
typeTag.setColor(isNightMode ? "EB9238" : "FFA142");
tagStyle.add(typeTag);
TagStyleEntity timeTag = new TagStyleEntity();
timeTag.setName(GameViewUtils.getGameTestDate(test.getStart()));
timeTag.setBackground("E0FFF9");
timeTag.setColor("00A887");
timeTag.setBackground("1A06CEA8");
timeTag.setColor(isNightMode ? "07A385" : "06CEA8");
tagStyle.add(timeTag);
}
} else {
@ -777,7 +797,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,12 +6,12 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import com.gh.base.fragment.BaseDialogFragment
import com.gh.gamecenter.common.base.fragment.BaseDialogFragment
import com.gh.common.util.DirectUtils
import com.gh.common.util.EntranceUtils
import com.gh.common.util.SpanBuilder
import com.gh.common.util.dip2px
import com.gh.common.view.CustomLinkMovementMethod
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.databinding.DialogApplyModeratorBinding
@ -27,7 +27,7 @@ class ApplyModeratorDialogFragment : BaseDialogFragment() {
requireArguments().run {
mGroupNumber = getString(KEY_GROUP_NUMBER) ?: ""
mGroupKey = getString(KEY_GROUP_KEY) ?: ""
mParentTag = getString(EntranceUtils.KEY_PARENT_TAG) ?: ""
mParentTag = getString(EntranceConsts.KEY_PARENT_TAG) ?: ""
}
}
@ -83,11 +83,11 @@ class ApplyModeratorDialogFragment : BaseDialogFragment() {
arguments = Bundle().apply {
putString(KEY_GROUP_NUMBER, number)
putString(KEY_GROUP_KEY, key)
putString(EntranceUtils.KEY_PARENT_TAG, tag)
putString(EntranceConsts.KEY_PARENT_TAG, tag)
}
}.show(
activity.supportFragmentManager,
ApplyModeratorDialogFragment::class.java.simpleName
ApplyModeratorDialogFragment::class.java.name
)
}
}

View File

@ -14,12 +14,16 @@ import android.view.View
import android.widget.CheckBox
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import com.gh.common.avoidcallback.AvoidOnResultManager
import com.gh.common.avoidcallback.Callback
import com.gh.common.constant.Constants
import com.gh.gamecenter.common.avoidcallback.AvoidOnResultManager
import com.gh.gamecenter.common.avoidcallback.Callback
import com.gh.gamecenter.common.constant.Constants
import com.gh.common.util.*
import com.gh.gamecenter.R
import com.gh.gamecenter.ShellActivity
import com.gh.gamecenter.common.callback.ConfirmListener
import com.gh.gamecenter.common.constant.EntranceConsts
import com.gh.gamecenter.core.utils.GsonUtils
import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.entity.AuthDialogEntity
import com.gh.gamecenter.entity.AuthDialogLevel
import com.gh.gamecenter.entity.GameEntity
@ -28,7 +32,7 @@ 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: DialogUtils.ConfirmListener) :
class CertificationDialog(context: Context, private val authDialogEntity: AuthDialogEntity, val gameId: String, val listener: ConfirmListener) :
Dialog(context, R.style.GhAlertDialog) {
private lateinit var view: View
@ -134,7 +138,7 @@ class CertificationDialog(context: Context, private val authDialogEntity: AuthDi
context,
ShellActivity.Type.REAL_NAME_INFO,
).apply {
putExtra(EntranceUtils.KEY_GAME_ID, gameId)
putExtra(EntranceConsts.KEY_GAME_ID, gameId)
}, object : Callback {
override fun onActivityResult(resultCode: Int, data: Intent?) {
if (resultCode == Activity.RESULT_OK && data != null) {
@ -152,7 +156,7 @@ class CertificationDialog(context: Context, private val authDialogEntity: AuthDi
companion object {
@JvmStatic
fun showCertificationDialog(context: Context, game: GameEntity, listener: DialogUtils.ConfirmListener) {
fun showCertificationDialog(context: Context, game: GameEntity, listener: ConfirmListener) {
//1.先判断是否登录 是执行2 否执行3
//2.判断是否实名认证 是终止 否执行3
//3.判断是否需要弹出认证弹窗接口
@ -168,7 +172,7 @@ class CertificationDialog(context: Context, private val authDialogEntity: AuthDi
}
@SuppressLint("CheckResult")
private fun authDialog(context: Context, game: GameEntity, listener: DialogUtils.ConfirmListener) {
private fun authDialog(context: Context, game: GameEntity, listener: ConfirmListener) {
var authDialog: AuthDialogEntity? = null
if (game.authDialog != null) {
authDialog = game.authDialog

View File

@ -19,10 +19,14 @@ import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import androidx.viewpager2.widget.ViewPager2
import com.facebook.drawee.view.SimpleDraweeView
import com.gh.common.constant.Constants
import com.gh.common.util.*
import com.gh.gamecenter.common.constant.Constants
import com.gh.download.DownloadManager
import com.gh.gamecenter.R
import com.gh.gamecenter.core.utils.GsonUtils
import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.common.utils.countDownTimer
import com.gh.gamecenter.core.utils.DisplayUtils
import com.gh.gamecenter.common.utils.ImageUtils
import com.gh.gamecenter.databinding.DialogDeviceRemindBinding
import com.gh.gamecenter.entity.DeviceDialogEntity
import com.gh.gamecenter.entity.GameEntity

View File

@ -10,18 +10,16 @@ import android.view.ViewGroup
import android.widget.LinearLayout
import android.widget.TextView
import androidx.core.text.HtmlCompat
import com.gh.base.fragment.BaseDialogFragment
import com.gh.gamecenter.common.base.fragment.BaseDialogFragment
import com.gh.common.util.DirectUtils
import com.gh.common.util.dip2px
import com.gh.common.util.toColor
import com.gh.gamecenter.common.utils.dip2px
import com.gh.gamecenter.common.utils.toColor
import com.gh.gamecenter.R
import com.gh.gamecenter.databinding.DialogGameOffServiceBinding
import com.gh.gamecenter.entity.GameEntity
// 游戏关闭下载弹窗
class GameOffServiceDialogFragment
// : BaseTrackableDialogFragment()
: BaseDialogFragment() {
class GameOffServiceDialogFragment : BaseDialogFragment() {
private var mDialog: GameEntity.Dialog? = null
private var mBinding: DialogGameOffServiceBinding? = null
@ -78,14 +76,6 @@ class GameOffServiceDialogFragment
return super.onCreateDialog(savedInstanceState).apply { setCanceledOnTouchOutside(true) }
}
// override fun getEvent(): String {
// return "游戏下载状态按钮"
// }
//
// override fun getKey(): String {
// return "查看详情弹窗"
// }
companion object {
const val KEY_DIALOG = "dialog"

View File

@ -13,16 +13,20 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.FragmentTransaction
import com.airbnb.lottie.LottieAnimationView
import com.gh.common.constant.Config
import com.gh.common.constant.Constants
import com.gh.common.util.*
import com.gh.common.util.PermissionHelper.INSTALL_PERMISSION_CODE
import com.gh.common.xapk.XapkInstaller
import com.gh.gamecenter.R
import com.gh.gamecenter.common.base.fragment.BaseDialogFragment
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.common.utils.PermissionHelper
import com.gh.gamecenter.common.utils.PermissionHelper.INSTALL_PERMISSION_CODE
import com.gh.gamecenter.common.utils.getExtension
import com.gh.gamecenter.common.utils.goneIf
import com.gh.gamecenter.core.utils.SPUtils
import com.lightgame.download.DownloadEntity
import com.lightgame.utils.Utils
import kotlin.random.Random
class InstallPermissionDialogFragment : BaseTrackableDialogFragment() {
class InstallPermissionDialogFragment : BaseDialogFragment() {
lateinit var mView: View
var isXapk = false
@ -55,18 +59,15 @@ class InstallPermissionDialogFragment : BaseTrackableDialogFragment() {
}
closeTv.setOnClickListener {
MtaHelper.onEvent(getEvent(), getKey(), "文案样式_点击以后再说")
if (isXapk) {
mCallBack?.invoke(false)
}
dismiss()
}
closeIv.setOnClickListener {
MtaHelper.onEvent(getEvent(), getKey(), "图标样式_点击关闭")
dismiss()
}
activateTv.setOnClickListener {
MtaHelper.onEvent(getEvent(), getKey(), if (randomNumber == 0) "文案样式_点击立即开启" else "图标样式_点击立即开启")
PermissionHelper.toInstallPermissionSetting(requireActivity())
if (isXapk) {
SPUtils.setString(Constants.SP_XAPK_UNZIP_ACTIVITY, requireActivity().javaClass.name)
@ -87,10 +88,6 @@ class InstallPermissionDialogFragment : BaseTrackableDialogFragment() {
}
}
override fun getEvent(): String = "安装引导弹窗"
override fun getKey(): String = "引导弹窗"
companion object {
@JvmStatic
fun show(activity: AppCompatActivity, downloadEntity: DownloadEntity, callBack: ((isFromPermissionGrantedCallback: Boolean) -> Unit)?) {
@ -117,7 +114,7 @@ class InstallPermissionDialogFragment : BaseTrackableDialogFragment() {
return
}
}
var installPermissionDialogFragment = activity.supportFragmentManager.findFragmentByTag(InstallPermissionDialogFragment::class.java.simpleName) as? InstallPermissionDialogFragment
var installPermissionDialogFragment = activity.supportFragmentManager.findFragmentByTag(InstallPermissionDialogFragment::class.java.name) as? InstallPermissionDialogFragment
if (installPermissionDialogFragment != null) {
installPermissionDialogFragment.mCallBack = callBack
installPermissionDialogFragment.isXapk = isXapk
@ -131,7 +128,7 @@ class InstallPermissionDialogFragment : BaseTrackableDialogFragment() {
this.isXapk = isXapk
this.url = downloadEntity.url
}
installPermissionDialogFragment.show(activity.supportFragmentManager, InstallPermissionDialogFragment::class.java.simpleName)
installPermissionDialogFragment.show(activity.supportFragmentManager, InstallPermissionDialogFragment::class.java.name)
}
}
}

View File

@ -0,0 +1,166 @@
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,12 +15,16 @@ import androidx.fragment.app.FragmentTransaction
import androidx.lifecycle.Lifecycle
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.gh.base.BaseRecyclerViewHolder
import com.gh.common.constant.Constants
import com.gh.gamecenter.common.base.BaseRecyclerViewHolder
import com.gh.gamecenter.common.constant.Constants
import com.gh.common.util.*
import com.gh.common.view.CustomLinkMovementMethod
import com.gh.common.util.LogUtils
import com.gh.gamecenter.common.view.CustomLinkMovementMethod
import com.gh.download.DownloadManager
import com.gh.gamecenter.R
import com.gh.gamecenter.common.callback.ConfirmListener
import com.gh.gamecenter.common.utils.*
import com.gh.gamecenter.core.utils.*
import com.gh.gamecenter.databinding.FragmentPackageCheckBinding
import com.gh.gamecenter.databinding.PackageCheckItemBinding
import com.gh.gamecenter.entity.DetectionObjectEntity
@ -52,7 +56,7 @@ class PackageCheckDialogFragment : BaseDialogFragment() {
private var mAdapter: PackageCheckAdapter? = null
private var mAllInstalledPackages = PackageUtils.getInstalledPackages(HaloApp.getInstance().application, 0)
var gameEntity: GameEntity? = null
var callBack: DialogUtils.ConfirmListener? = null
var callBack: ConfirmListener? = null
private val dataWatcher = object : DataWatcher() {
override fun onDataChanged(downloadEntity: DownloadEntity) {
@ -318,7 +322,7 @@ class PackageCheckDialogFragment : BaseDialogFragment() {
companion object {
@JvmStatic
fun show(activity: AppCompatActivity, gameEntity: GameEntity, callBack: DialogUtils.ConfirmListener) {
fun show(activity: AppCompatActivity, gameEntity: GameEntity, callBack: ConfirmListener) {
val packageDialogEntity = gameEntity.packageDialog
if (packageDialogEntity == null) {
callBack.onConfirm()
@ -346,12 +350,12 @@ class PackageCheckDialogFragment : BaseDialogFragment() {
if (!activity.lifecycle.currentState.isAtLeast(Lifecycle.State.RESUMED)) return
var dialogFragment =
activity.supportFragmentManager.findFragmentByTag(PackageCheckDialogFragment::class.java.simpleName) as? PackageCheckDialogFragment
activity.supportFragmentManager.findFragmentByTag(PackageCheckDialogFragment::class.java.name) as? PackageCheckDialogFragment
if (dialogFragment == null) {
dialogFragment = PackageCheckDialogFragment()
dialogFragment.gameEntity = gameEntity
dialogFragment.callBack = callBack
dialogFragment.show(activity.supportFragmentManager, PackageCheckDialogFragment::class.java.simpleName)
dialogFragment.show(activity.supportFragmentManager, PackageCheckDialogFragment::class.java.name)
} else {
dialogFragment.gameEntity = gameEntity
dialogFragment.callBack = callBack

View File

@ -12,14 +12,14 @@ import android.view.*
import androidx.core.content.ContextCompat
import androidx.fragment.app.FragmentActivity
import androidx.fragment.app.FragmentTransaction
import com.gh.base.fragment.BaseDialogFragment
import com.gh.common.constant.Constants
import com.gh.common.util.SPUtils
import com.gh.common.util.dip2px
import com.gh.common.util.fromHtml
import com.gh.common.view.CustomLinkMovementMethod
import com.gh.gamecenter.R
import com.gh.gamecenter.WebActivity
import com.gh.gamecenter.common.base.fragment.BaseDialogFragment
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.common.utils.dip2px
import com.gh.gamecenter.common.utils.fromHtml
import com.gh.gamecenter.common.view.CustomLinkMovementMethod
import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.databinding.DialogPrivacyProtocolBinding
import com.gh.gamecenter.entity.DialogEntity
import com.lightgame.utils.AppManager
@ -167,7 +167,7 @@ class PrivacyPolicyDialogFragment : BaseDialogFragment() {
fun show(activity: FragmentActivity,
privacyPolicyEntity: DialogEntity.PrivacyPolicyEntity? = null,
callBack: ((isSuccess: Boolean) -> Unit)?) {
var privacyDialogFragment = activity.supportFragmentManager.findFragmentByTag(PrivacyPolicyDialogFragment::class.java.simpleName) as? PrivacyPolicyDialogFragment
var privacyDialogFragment = activity.supportFragmentManager.findFragmentByTag(PrivacyPolicyDialogFragment::class.java.name) as? PrivacyPolicyDialogFragment
if (privacyDialogFragment != null) {
privacyDialogFragment.mCallBack = callBack
val transaction: FragmentTransaction = activity.supportFragmentManager.beginTransaction()
@ -183,7 +183,7 @@ class PrivacyPolicyDialogFragment : BaseDialogFragment() {
}
privacyDialogFragment.show(
activity.supportFragmentManager,
PrivacyPolicyDialogFragment::class.java.simpleName
PrivacyPolicyDialogFragment::class.java.name
)
}
}

View File

@ -1,4 +1,4 @@
package com.gh.common.view
package com.gh.common.dialog
import android.os.Bundle
import android.view.LayoutInflater
@ -6,12 +6,13 @@ import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.gh.base.BaseRecyclerViewHolder
import com.gh.base.fragment.BaseDialogFragment
import com.gh.common.util.ImageUtils
import com.gh.common.util.fromHtml
import com.gh.gamecenter.common.base.BaseRecyclerViewHolder
import com.gh.gamecenter.common.base.fragment.BaseDialogFragment
import com.gh.gamecenter.common.utils.ImageUtils
import com.gh.gamecenter.common.utils.fromHtml
import com.gh.gamecenter.GameDetailActivity
import com.gh.gamecenter.R
import com.gh.gamecenter.common.view.FixLinearLayoutManager
import com.gh.gamecenter.databinding.DialogReserveBinding
import com.gh.gamecenter.databinding.DialogReserveItemBinding
import com.gh.gamecenter.entity.SimpleGameEntity

View File

@ -1,384 +0,0 @@
//package com.gh.common.dialog
//
//import android.annotation.SuppressLint
//import android.app.Application
//import android.os.Bundle
//import android.text.Html
//import android.view.*
//import android.view.animation.AnimationUtils
//import android.widget.EditText
//import android.widget.TextView
//import androidx.lifecycle.AndroidViewModel
//import androidx.lifecycle.MutableLiveData
//import androidx.lifecycle.Observer
//import butterknife.BindView
//import butterknife.ButterKnife
//import butterknife.OnClick
//import com.gh.base.fragment.BaseDialogFragment
//import com.gh.common.AppExecutor
//import com.gh.common.constant.Config
//import com.gh.common.history.HistoryHelper
//import com.gh.common.repository.ReservationRepository
//import com.gh.common.util.*
//import com.gh.gamecenter.R
//import com.gh.gamecenter.entity.GameEntity
//import com.gh.gamecenter.entity.NotificationUgc
//import com.gh.gamecenter.manager.UserManager
//import com.gh.gamecenter.retrofit.BiResponse
//import com.gh.gamecenter.retrofit.RetrofitManager
//import com.halo.assistant.HaloApp
//import com.lightgame.utils.Utils
//import io.reactivex.android.schedulers.AndroidSchedulers
//import io.reactivex.schedulers.Schedulers
//import okhttp3.ResponseBody
//import org.json.JSONArray
//import org.json.JSONObject
//
//// 预约弹窗
//@Deprecated("v5.6.0废弃")
//class ReserveDialogFragment
// : BaseDialogFragment(), KeyboardHeightObserver {
//// : BaseTrackableDialogFragment() {
//
// @BindView(R.id.reserve_hint_tv)
// lateinit var reserveHintTv: TextView
//
// @BindView(R.id.reserve_content_tv)
// lateinit var reserveContentTv: TextView
//
// @BindView(R.id.reserve_completed_content_tv)
// lateinit var reserveCompletedContentTv: TextView
//
// @BindView(R.id.mobile_et)
// lateinit var mobileEt: EditText
//
// @BindView(R.id.reserve_container)
// lateinit var reserveContainer: View
//
// @BindView(R.id.reserve_completed_container)
// lateinit var reserveCompletedContainer: View
//
// @BindView(R.id.customizable_btn)
// lateinit var customizableBtn: TextView
//
// @BindView(R.id.content_container)
// lateinit var contentContainer: View
//
// @BindView(R.id.mobile_index_container)
// lateinit var mobileIndexContainer: View
//
// @BindView(R.id.mobile_index_reserve)
// lateinit var mobileIndexReserve: TextView
//
// @BindView(R.id.mobile_index_user)
// lateinit var mobileIndexUser: TextView
//
// @BindView(R.id.mobile_et_delete)
// lateinit var mobileEtDelete: View
//
// @BindView(R.id.layout_container)
// lateinit var layoutContainer: View
//
// private lateinit var mViewModel: ReserveViewModel
//
// var successCallback: SuccessCallback? = null
//
// private var mGame: GameEntity? = null
// private var mGameId: String = ""
// private var mGameName: String = ""
//
// private var mKeyboardHeightProvider: KeyboardHeightProvider? = null
//
// override fun onCreate(savedInstanceState: Bundle?) {
// super.onCreate(savedInstanceState)
//
// mGame = requireArguments().getParcelable(EntranceUtils.KEY_GAME)
// mGameId = mGame?.id ?:""
// mGameName = mGame?.name ?:""
//
// mViewModel = viewModelProvider()
// mKeyboardHeightProvider = KeyboardHeightProvider(activity)
// mKeyboardHeightProvider?.start()
// }
//
// override fun onActivityCreated(savedInstanceState: Bundle?) {
// super.onActivityCreated(savedInstanceState)
// dialog?.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
// }
//
// override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
// return inflater.inflate(R.layout.dialog_reserve_game, null)
// }
//
//// override fun getEvent(): String {
//// return "预约游戏"
//// }
////
//// override fun getKey(): String {
//// return "预约功能操作"
//// }
//
// @Suppress("DEPRECATION")
// @SuppressLint("SetTextI18n")
// override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
// super.onViewCreated(view, savedInstanceState)
// ButterKnife.bind(this, view)
//
// val reserveContent = "游戏上线,您将收到<font color='#1383EB'>免费短信</font>提醒"
// reserveContentTv.text = Html.fromHtml(reserveContent)
//
//
// mobileEt.setTextChangedListener { s, _, _, _ ->
// mobileIndexContainer.visibility = View.GONE
// mobileEtDelete.goneIf(s.trim().isEmpty())
// }
//
// mViewModel.reservation.observeNonNull(this) {
// if (it.success) {
// showSuccessDialog(it.withMobile, it.boundWechat)
// successCallback?.onSuccess()
// HistoryHelper.insertGameEntity(mGame!!)
// }
// }
//
// mViewModel.reserveMobile.observe(viewLifecycleOwner, Observer {
// setMobileIndexHint(it)
// })
//
// dialog?.setCanceledOnTouchOutside(true)
// }
//
// private fun showSuccessDialog(withMobile: Boolean, boundWechat: Boolean) {
// reserveHintTv.text = "游戏预约成功"
// reserveContainer.visibility = View.GONE
// reserveCompletedContainer.visibility = View.VISIBLE
//
// val reservation = Config.getSettings()?.appointment
// val dialogConfig = if (withMobile) reservation?.withMobile else reservation?.withoutMobile
//
// reserveCompletedContentTv.text = dialogConfig?.htmlContent?.fromHtml()
// if (dialogConfig?.text.isNullOrEmpty()
// || (dialogConfig?.type == "wechat_bind" && boundWechat)) {
// customizableBtn.visibility = View.GONE
// } else {
// customizableBtn.text = dialogConfig?.text
// customizableBtn.setOnClickListener {
//// MtaHelper.onEvent("预约游戏", "预约功能操作", "点击跳转按钮")
// DirectUtils.directToLinkPage(
// requireContext(),
// dialogConfig!!.toLinkEntity(),
// "(游戏预约)",
// "")
// dismissAllowingStateLoss()
// }
// }
// }
//
// private fun setMobileIndexHint(reserveMobile: String?) {
// var userMobile = UserManager.getInstance().userInfoEntity?.mobile
// if (reserveMobile == userMobile) userMobile = null
//
// if (!reserveMobile.isNullOrEmpty()) {
// mobileIndexReserve.visibility = View.VISIBLE
// mobileIndexReserve.text = reserveMobile
// } else {
// mobileIndexReserve.visibility = View.GONE
// }
//
// if (!userMobile.isNullOrEmpty()) {
// mobileIndexUser.visibility = View.VISIBLE
// mobileIndexUser.text = userMobile
// } else {
// mobileIndexUser.visibility = View.GONE
// }
// mobileIndexContainer.goneIf(mobileIndexUser.visibility == View.GONE && mobileIndexReserve.visibility == View.GONE)
// if (mobileIndexContainer.visibility ==View.VISIBLE) {
// mobileIndexContainer.animation = AnimationUtils.loadAnimation(requireContext(), R.anim.reserve_dialog_index_anim)
// }
// }
//
// @OnClick(R.id.reserve_with_mobile_btn,
// R.id.reserve_without_mobile_btn,
// R.id.content_container,
// R.id.close_btn,
// R.id.customizable_btn,
// R.id.mobile_index_reserve,
// R.id.mobile_index_user,
// R.id.mobile_et_delete,
// R.id.mobile_et,
// R.id.layout_container)
// fun onClick(view: View) {
// when (view.id) {
// R.id.reserve_without_mobile_btn -> {
//// MtaHelper.onEvent("预约游戏", "预约功能操作", "点击无手机号预约")
// if (mobileIndexContainer.visibility == View.VISIBLE) {
// mobileIndexContainer.visibility = View.GONE
// return
// }
//
// mViewModel.reserve(gameId = mGameId, gameName = mGameName)
// }
//
// R.id.reserve_with_mobile_btn -> {
// if (mobileIndexContainer.visibility == View.VISIBLE) {
// mobileIndexContainer.visibility = View.GONE
// return
// }
//
// val mobile = mobileEt.text.toString()
// if (mobile.length < 11 || !mobile.startsWith("1")) {
// Utils.toast(context, "手机号格式错误,请检查并重新输入")
// return
// }
//
//// MtaHelper.onEvent("预约游戏", "预约功能操作", "点击立即预约")
// mViewModel.reserve(gameId = mGameId, gameName = mGameName, mobile = mobile)
// }
//
// R.id.close_btn -> {
//// MtaHelper.onEvent("预约游戏", "预约功能操作", "点击关闭")
// dismissAllowingStateLoss()
// AppExecutor.uiExecutor.executeWithDelay(Runnable {
// NotificationHelper.showNotificationHintDialog(NotificationUgc.RESERVE_GAME)
// }, 1000)
// }
// R.id.content_container -> {
// mobileIndexContainer.visibility = View.GONE
// }
// R.id.mobile_index_reserve -> {
// mobileEt.setText(mobileIndexReserve.text.toString())
// mobileEt.setSelection(mobileEt.text.length)
// mobileIndexContainer.visibility = View.GONE
// }
// R.id.mobile_index_user -> {
// mobileEt.setText(mobileIndexUser.text.toString())
// mobileEt.setSelection(mobileEt.text.length)
// mobileIndexContainer.visibility = View.GONE
// }
// R.id.mobile_et_delete -> {
// mobileEt.setText("")
// }
// R.id.mobile_et -> {
// mobileIndexContainer.visibility = View.GONE
// }
// R.id.layout_container -> {
// dismissAllowingStateLoss()
// }
// }
// }
//
// override fun onResume() {
// super.onResume()
// if (HaloApp.getInstance().mCacheKeyboardHeight > 0) {
// val attributes = dialog?.window?.attributes
// val heightPixels = requireContext().resources.displayMetrics.heightPixels
// val mCacheKeyboardHeight = HaloApp.getInstance().mCacheKeyboardHeight
// val statusBarHeight = DisplayUtils.getStatusBarHeight(requireContext().resources)
// dialog?.window?.attributes?.height = heightPixels - mCacheKeyboardHeight - statusBarHeight
// attributes?.gravity = Gravity.TOP
// dialog?.window?.attributes = attributes
// }
// mKeyboardHeightProvider?.setKeyboardHeightObserver(this)
// }
//
// override fun onPause() {
// super.onPause()
// mKeyboardHeightProvider?.setKeyboardHeightObserver(null)
// }
//
// override fun onDestroy() {
// super.onDestroy()
// mKeyboardHeightProvider?.close()
// }
//
// override fun onKeyboardHeightChanged(height: Int, orientation: Int) {
// if (height > 0) {
// val attributes = dialog?.window?.attributes
// attributes?.gravity = Gravity.CENTER
// dialog?.window?.attributes = attributes
// HaloApp.getInstance().mCacheKeyboardHeight = height
// }
// }
//
// companion object {
// @JvmStatic
// fun getInstance(gameEntity: GameEntity, successCallback: SuccessCallback) = ReserveDialogFragment().apply {
// arguments = Bundle().apply {
// putParcelable(EntranceUtils.KEY_GAME, gameEntity)
// }
// this.successCallback = successCallback
// }
// }
//
// interface SuccessCallback {
// fun onSuccess()
// }
//}
//
//class ReserveViewModel(application: Application) : AndroidViewModel(application) {
// val reservation = MutableLiveData<Reservation>()
//
// val reserveMobile = MutableLiveData<String>()
//
// init {
// getAppointmentMobile()
// }
//
// @SuppressLint("CheckResult")
// fun reserve(gameId: String, gameName: String, mobile: String = "") {
//
// val requestMap = hashMapOf<String, String>()
// requestMap["game_id"] = gameId
// if (mobile.isNotEmpty()) {
// requestMap["mobile"] = mobile
// }
//
// RetrofitManager.getInstance().api
// .createNewGameReservation(requestMap.createRequestBody())
// .subscribeOn(Schedulers.io())
// .subscribe(object : BiResponse<ResponseBody>() {
// override fun onSuccess(data: ResponseBody) {
// var boundWechat = false
// tryWithDefaultCatch {
// boundWechat = JSONObject(data.string() ?: "").getBoolean("wechat_bind")
// }
//
// reservation.postValue(Reservation(success = true, withMobile = mobile.isNotEmpty(), boundWechat = boundWechat))
// ReservationRepository.addReservationToMemoryAndRefresh(gameId)
//
//// MtaHelper.onEvent("预约游戏", "预约", gameName)
// }
//
// override fun onFailure(exception: Exception) {
// Utils.toast(getApplication(), exception.message)
// }
// })
// }
//
// @SuppressLint("CheckResult")
// private fun getAppointmentMobile() {
// RetrofitManager.getInstance().api
// .getAppointmentMobile(UserManager.getInstance().userId)
// .subscribeOn(Schedulers.io())
// .observeOn(AndroidSchedulers.mainThread())
// .subscribe(object : BiResponse<ResponseBody>() {
// override fun onSuccess(data: ResponseBody) {
// var mobile: String? = null
// tryCatchInRelease {
// val jsonArray = JSONArray(data.string())
// if (jsonArray.length() > 0) {
// mobile = jsonArray.get(0).toString()
// }
// }
//
// reserveMobile.postValue(mobile)
// }
//
// override fun onFailure(exception: Exception) {
// reserveMobile.postValue(null)
// }
// })
// }
//
// class Reservation(var success: Boolean = false, var withMobile: Boolean = false, var boundWechat: Boolean = false)
//}

View File

@ -1,61 +0,0 @@
package com.gh.common.exposure
import androidx.room.TypeConverter
import com.gh.common.exposure.meta.Meta
import com.gh.common.util.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

@ -4,21 +4,20 @@ import android.os.Parcelable
import androidx.annotation.Keep
import androidx.room.Entity
import androidx.room.PrimaryKey
import com.gh.common.constant.Constants
import com.gh.common.exposure.meta.Meta
import com.gh.common.exposure.meta.MetaUtil
import com.gh.common.exposure.time.TimeUtil
import com.gh.common.util.getFirstElementDividedByDivider
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.gamecenter.common.utils.getFirstElementDividedByDivider
import com.gh.gamecenter.entity.GameEntity
import com.lightgame.download.DownloadEntity
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>,
@ -26,8 +25,9 @@ data class ExposureEvent(
val event: ExposureType,
val meta: Meta = MetaUtil.getMeta(),
val time: Int = TimeUtil.currentTime(),
val timeInMillisecond: Long = System.currentTimeMillis(),
@PrimaryKey
val id: String = UUID.randomUUID().toString()
val id: String = UUID.randomUUID().toString(),
) : Parcelable {
companion object {

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

@ -1,13 +1,11 @@
package com.gh.common.exposure
import com.aliyun.sls.android.producer.Log
import com.gh.common.loghub.LoghubHelper
import com.gh.common.util.toJson
import com.gh.common.util.tryWithDefaultCatch
import com.gh.gamecenter.BuildConfig
import com.halo.assistant.HaloApp
import com.gh.gamecenter.common.loghub.LoghubHelper
import com.gh.gamecenter.common.utils.FixedSizeLinkedHashSet
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.
@ -25,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}")
}
}
@ -66,51 +41,36 @@ 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)
}
}
@ -120,25 +80,13 @@ 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()
}
class FixedSizeLinkedHashSet<T>(var maxSize: Int) : LinkedHashSet<T>() {
override fun add(element: T): Boolean {
if (size == maxSize) {
pop()
}
return super.add(element);
}
private fun pop() {
if (size > 0) {
remove(iterator().next())
}
}
}
}

View File

@ -3,15 +3,17 @@ package com.gh.common.exposure
import android.text.TextUtils
import com.g00fy2.versioncompare.Version
import com.gh.common.util.PackageUtils
import com.gh.common.util.toObject
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
object ExposureUtils {
private val mDownloadCompleteTraceEventIdSet = ExposureManager.FixedSizeLinkedHashSet<String>(3)
private val mDownloadCompleteTraceEventIdSet = FixedSizeLinkedHashSet<String>(3)
@JvmStatic
fun logADownloadExposureEvent(
@ -74,12 +76,18 @@ 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 if (isVGame) {
if (PackagesManager.isCanUpdate(gameId, apkEntity.packageName)) {
DownloadType.FUN_UPDATE
} else {
DownloadType.FUN_DOWNLOAD
}
} else if (PackageUtils.isInstalled(
HaloApp.getInstance().application,
apkEntity.packageName
)
@ -142,6 +150,10 @@ object ExposureUtils {
PLUGIN_UPDATE,
PLUGIN_DOWNLOAD
PLUGIN_DOWNLOAD,
FUN_DOWNLOAD,
FUN_UPDATE
}
}

View File

@ -5,17 +5,45 @@ 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

@ -1,14 +1,14 @@
package com.gh.common.filter
import android.annotation.SuppressLint
import com.gh.common.constant.Constants
import com.gh.common.util.SPUtils
import com.gh.common.util.debounceActionWithInterval
import com.gh.common.util.toJson
import com.gh.common.util.toObject
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.common.utils.debounceActionWithInterval
import com.gh.gamecenter.common.utils.toJson
import com.gh.gamecenter.common.utils.toObject
import com.gh.gamecenter.R
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.retrofit.BiResponse
import com.gh.gamecenter.common.retrofit.BiResponse
import com.gh.gamecenter.retrofit.RetrofitManager
import com.halo.assistant.HaloApp
import io.reactivex.functions.Function
@ -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,11 @@ 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 +65,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 +99,8 @@ object RegionSettingHelper {
mFilterGameIdSet = data.filterGameIdSet
mDisplayMirrorIfoGameIdSet = data.mirrorGameIdSet
mChannelControl = data.channelControl
mGameH5DownloadList = data.gameH5DownloadList
mGameSpecialDownloadInfoList = data.gameSpecialDownloadInfoList
}
/**

View File

@ -1,10 +1,10 @@
package com.gh.common.history
import com.gh.common.runOnIoThread
import com.gh.common.util.clearHtmlFormatCompletely
import com.gh.common.util.removeInsertedContent
import com.gh.common.util.removeVideoContent
import com.gh.common.util.tryCatchInRelease
import com.gh.gamecenter.common.utils.clearHtmlFormatCompletely
import com.gh.gamecenter.common.utils.removeInsertedContent
import com.gh.gamecenter.common.utils.removeVideoContent
import com.gh.gamecenter.common.utils.tryCatchInRelease
import com.gh.gamecenter.core.runOnIoThread
import com.gh.gamecenter.entity.*
import com.gh.gamecenter.qa.entity.AnswerDetailEntity
import com.gh.gamecenter.qa.entity.AnswerEntity
@ -108,7 +108,7 @@ 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)) } }
}

View File

@ -1,67 +0,0 @@
//package com.gh.common.im
//
//import android.app.Activity
//import androidx.core.view.ViewCompat
//import android.view.View
//import android.view.ViewGroup
//
//object ImHintHelper {
//
// @JvmStatic
// fun show(activity: Activity?) {
// activity?.let {
// var hintView = retrieveHintViewFromActivity(it)
// if (hintView == null) {
// hintView = ImHintView(it)
// hintView.showDot(ImManager.shouldShowFloatingWindowDot)
//
// val decorView = it.window.decorView as ViewGroup
// it.runOnUiThread {
// decorView.addView(hintView)
// }
// } else {
// hintView.showDot(ImManager.shouldShowFloatingWindowDot)
// }
// }
// }
//
// @JvmStatic
// fun dismiss(activity: Activity?) {
// activity?.let {
// clearCurrent(it)
// }
// }
//
// private fun retrieveHintViewFromActivity(activity: Activity?) : ImHintView? {
// (activity?.window?.decorView as? ViewGroup)?.let {
// for (i in 0..it.childCount) {
// val childView = if (it.getChildAt(i) is ImHintView) it.getChildAt(i) as ImHintView else null
// if (childView != null && childView.windowToken != null) {
// return childView
// }
// }
// return null
// }
// return null
// }
//
// private fun clearCurrent(activity: Activity?) {
// (activity?.window?.decorView as? ViewGroup)?.let {
// for (i in 0..it.childCount) {
// val childView = if (it.getChildAt(i) is ImHintView) it.getChildAt(i) as ImHintView else null
// if (childView != null && childView.windowToken != null) {
// ViewCompat.animate(childView).alpha(0f).withEndAction(getRemoveViewRunnable(childView))
// }
// }
// }
// }
//
// private fun getRemoveViewRunnable(childView: View?): Runnable {
// return Runnable {
// childView?.let {
// (childView.parent as? ViewGroup)?.removeView(childView)
// }
// }
// }
//
//}

View File

@ -1,45 +0,0 @@
//package com.gh.common.im
//
//import android.app.Activity
//import android.content.Context
//import android.util.AttributeSet
//import android.util.TypedValue
//import android.view.View
//import android.widget.RelativeLayout
//import androidx.core.view.ViewCompat
//import com.gh.common.util.DisplayUtils
//import com.gh.gamecenter.R
//import kotlinx.android.synthetic.main.view_im_hint.view.*
//
//class ImHintView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyle: Int = 0)
// : RelativeLayout(context, attrs, defStyle) {
//
// init {
// inflate(context, R.layout.view_im_hint, this)
//
// ViewCompat.setTranslationZ(this, Integer.MAX_VALUE.toFloat() - 1)
//
// ivContainer.setOnClickListener {
// if (context is Activity) {
// ImManager.startChatActivity(context)
// ImManager.removeNotification()
// }
// }
//
// val lp = ivContainer.layoutParams as RelativeLayout.LayoutParams
//
// lp.setMargins(0, 0, dp2px(30f), dp2px(106f) + DisplayUtils.retrieveNavigationHeight(context))
// }
//
// fun showDot(show: Boolean) {
// if (show) {
// unreadDot.visibility = View.VISIBLE
// } else {
// unreadDot.visibility = View.GONE
// }
// }
//
// private fun dp2px(dp: Float): Int {
// return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, context.applicationContext.resources.displayMetrics).toInt()
// }
//}

View File

@ -1,145 +0,0 @@
package com.gh.common.im
import android.app.Activity
import com.gh.gamecenter.HelpAndFeedbackActivity
import com.gh.gamecenter.MainActivity
import com.gh.gamecenter.MessageActivity
object ImManager {
const val IM_KEY = "893be270-9c75-11e8-a344-212975ba32b9"
const val SP_FLOATING_WINDOW_KEY = "IM_FLOATING_WINDOW"
const val SP_FLOATING_WINDOW_DOT_KEY = "IM_FLOATING_WINDOW_DOT"
var shouldShowFloatingWindow = false
var shouldShowFloatingWindowDot = false
// 记录当前用户 ID 避免重复初始化
var currentUserId = ""
@JvmStatic
fun attachIm() {
// try {
// if (UserManager.getInstance().userInfoEntity != null &&
// currentUserId != UserManager.getInstance().userId) {
// currentUserId = UserManager.getInstance().userId
// MoorUtils.init(HaloApp.getInstance().application)
// Utils.init(HaloApp.getInstance().application)
// IMChatManager.getInstance().init(
// HaloApp.getInstance().application,
// ImReceiver.UNIQUE_BROADCAST_ACTION,
// IM_KEY,
// UserManager.getInstance().userInfoEntity?.name + "(" + UserManager.getInstance().userId + ")",
// UserManager.getInstance().userId)
//
// shouldShowFloatingWindow = SPUtils.getBoolean(SP_FLOATING_WINDOW_KEY + UserManager.getInstance().userId)
// shouldShowFloatingWindowDot = SPUtils.getBoolean(SP_FLOATING_WINDOW_DOT_KEY + UserManager.getInstance().userId)
// updateFloatingWindow()
// }
// } catch (e: Exception) {
// e.printStackTrace()
// }
}
@JvmStatic
fun detachIm() {
// try {
// IMChatManager.getInstance().quitSDk()
// shouldShowFloatingWindow = false
// updateFloatingWindow()
// removeNotification()
// } catch (e: Exception) {
// e.printStackTrace()
// }
}
@JvmStatic
fun startChatActivity(activity: Activity, inputContent: String? = "", requestCode: Int? = null) {
// if (!UserManager.getInstance().userId.isNullOrEmpty()) {
// try {
// SPUtils.setBoolean(SP_FLOATING_WINDOW_DOT_KEY + UserManager.getInstance().userId, false)
// shouldShowFloatingWindowDot = false
// val chatHelper = KfStartHelper(activity, UserManager.getInstance().userInfoEntity?.icon, inputContent, requestCode)
// chatHelper.initSdkChat(
// ImReceiver.UNIQUE_BROADCAST_ACTION,
// IM_KEY,
// UserManager.getInstance().userInfoEntity?.name + "(" + UserManager.getInstance().userId + ")"
// + "[" + BuildConfig.VERSION_NAME + "]",
// UserManager.getInstance().userId)
// } catch (e: Exception) {
// e.printStackTrace()
// }
// }
}
@JvmStatic
fun showFloatingWindow() {
updateShouldShowFloatingWindow(true)
updateShouldShowFloatingWindowDot(true)
updateFloatingWindow()
}
@JvmStatic
fun dismissFloatingWindow() {
updateShouldShowFloatingWindow(false)
updateShouldShowFloatingWindowDot(false)
updateFloatingWindow()
}
@JvmStatic
fun removeNotification() {
// val notificationManager = HaloApp.getInstance().application?.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
// notificationManager.cancel(ImReceiver.NOTIFICATION_ID)
}
@JvmStatic
fun updateFloatingWindow() {
// try {
// CurrentActivityHolder.getCurrentActivity()?.let {
// if (isActivityValid(it)) {
// if (shouldShowFloatingWindow) {
// ImHintHelper.show(it)
// } else {
// ImHintHelper.dismiss(it)
// removeNotification()
// }
// }
// }
// } catch (e: Exception) {
// e.printStackTrace()
// }
}
@JvmStatic
fun sendFeedbackMessage(message: String) {
// val fromToMessage = IMMessage.createTxtMessage(message)
// runOnIoThread {
// tryWithDefaultCatch {
// IMChat.getInstance().sendMessage(fromToMessage, object : ChatListener {
// override fun onProgress(p0: Int) {}
// override fun onSuccess() {}
// override fun onFailed() {}
// })
// }
// }
}
fun updateShouldShowFloatingWindow(show: Boolean) {
// SPUtils.setBoolean(SP_FLOATING_WINDOW_KEY + UserManager.getInstance().userId, show)
// shouldShowFloatingWindow = show
}
fun updateShouldShowFloatingWindowDot(show: Boolean) {
// SPUtils.setBoolean(SP_FLOATING_WINDOW_DOT_KEY + UserManager.getInstance().userId, show)
// shouldShowFloatingWindowDot = show
}
private fun isActivityValid(activity: Activity): Boolean {
return when (activity) {
is MainActivity -> true
is HelpAndFeedbackActivity -> true
is MessageActivity -> true
else -> false
}
}
}

View File

@ -1,68 +0,0 @@
package com.gh.common.im
import android.app.NotificationManager
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
class ImReceiver : BroadcastReceiver() {
companion object {
const val UNIQUE_BROADCAST_ACTION = "com.gh.im"
const val NOTIFICATION_ID: Int = 987321
}
var notificationManager: NotificationManager? = null
override fun onReceive(context: Context?, intent: Intent?) {
// context?.doOnMainProcessOnly {
// intent?.let {
// if (intent.action == IMChatManager.NEW_MSG_ACTION) {
// notificationManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
// // 判断 ImActivity 是否在最顶端
// if (CurrentActivityHolder.getCurrentActivity() is ChatActivity) {
// ImManager.showFloatingWindow()
// ImManager.updateShouldShowFloatingWindowDot(false)
// } else {
// val contentIntent = Intent(Utils.getApp(), ChatActivity::class.java)
//
// contentIntent.putExtra("PeerId", "")
// contentIntent.putExtra("type", "peedId")
//
// contentIntent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
// val resultPendingIntent = PendingIntent.getActivity(
// Utils.getApp(),
// 0,
// contentIntent,
// PendingIntent.FLAG_UPDATE_CURRENT
// )
//
// // 新的通知
// val builder = NotificationCompat.Builder(Utils.getApp(), "Halo_IM")
// val notification = builder.setTicker("您有新的消息")
// .setDefaults(Notification.DEFAULT_ALL)
// .setSmallIcon(R.drawable.ic_notification)
// .setWhen(System.currentTimeMillis())
// .setContentIntent(resultPendingIntent)
// .setContentTitle("光环助手客服回复")
// .setContentText("您有新的消息")
// .setAutoCancel(true)
// .build()
//
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
// val channel = NotificationChannel("Halo_IM", "Halo_IM", NotificationManager.IMPORTANCE_DEFAULT)
// notificationManager?.createNotificationChannel(channel)
// }
//
// if (notification != null) {
// notificationManager?.notify(NOTIFICATION_ID, notification)
// ImManager.showFloatingWindow()
// }
// }
// } else if (intent.action == IMChatManager.FINISH_ACTION) {
// ImManager.dismissFloatingWindow()
// }
// }
// }
}
}

View File

@ -1,21 +0,0 @@
package com.gh.common.loghub
import android.content.Context
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
@Database(entities = [LoghubEvent::class], version = 1, exportSchema = false)
abstract class LoghubDatabase : RoomDatabase() {
companion object {
private const val DATABASE = "gh_loghub_database"
fun buildDatabase(context: Context): LoghubDatabase {
return Room.databaseBuilder(context, LoghubDatabase::class.java, DATABASE)
.fallbackToDestructiveMigration()
.build()
}
}
abstract fun logHubEventDao(): LoghubEventDao
}

View File

@ -1,17 +0,0 @@
package com.gh.common.loghub
import android.os.Parcelable
import androidx.annotation.Keep
import androidx.room.Entity
import androidx.room.PrimaryKey
import kotlinx.parcelize.Parcelize
import java.util.*
@Keep
@Parcelize
@Entity(tableName = "loghubEvent")
data class LoghubEvent(@PrimaryKey
val id: String = UUID.randomUUID().toString(),
var time: String,
var content: String,
var logStore: String) : Parcelable

View File

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

View File

@ -1,110 +0,0 @@
package com.gh.common.loghub
import android.app.Application
import androidx.annotation.Keep
import com.aliyun.sls.android.producer.Log
import com.gh.common.exposure.ExposureEntity
import com.gh.common.exposure.meta.Meta
import com.gh.common.util.tryWithDefaultCatch
import org.json.JSONObject
import java.util.concurrent.ExecutorService
object LoghubUtils {
private const val STORE_SIZE = 100
private lateinit var mApplication: Application
private val loghubEventSet by lazy { hashSetOf<LoghubEvent>() }
private var loghubEventExecutor: ExecutorService? = null
private val loghubEventDao by lazy { LoghubDatabase.buildDatabase(mApplication).logHubEventDao() }
@JvmStatic
fun init(application: Application, executor: ExecutorService) {
mApplication = application
loghubEventExecutor = executor
loghubEventExecutor?.execute {
tryWithDefaultCatch {
val eventList = loghubEventDao.getAll()
loghubEventSet.addAll(eventList)
}
}
}
@JvmStatic
fun log(logJson: JSONObject, logStore: String, forcedUpload: Boolean) {
loghubEventExecutor?.execute {
try {
val event = LoghubEvent(time = (System.currentTimeMillis() / 1000L).toString(), content = logJson.toString(), logStore = logStore)
loghubEventSet.add(event)
loghubEventDao.insert(event)
} catch (e: Exception) {
e.printStackTrace()
}
if (forcedUpload || loghubEventSet.size >= STORE_SIZE) {
commitSavedLoghubEvents()
}
}
}
@JvmStatic
fun log(jsonString: String, logStore: String, forcedUpload: Boolean) {
loghubEventExecutor?.execute {
try {
val event = LoghubEvent(time = (System.currentTimeMillis() / 1000L).toString(), content = jsonString, logStore = logStore)
loghubEventSet.add(event)
loghubEventDao.insert(event)
} catch (e: Exception) {
e.printStackTrace()
}
if (forcedUpload || loghubEventSet.size >= STORE_SIZE) {
commitSavedLoghubEvents()
}
}
}
fun commitSavedLoghubEvents() {
loghubEventExecutor?.execute {
// TODO 初始化 loghubHelper 去掉这个 tryCatch 块
tryWithDefaultCatch {
if (loghubEventSet.isEmpty()) return@execute
val exposureList = loghubEventSet.toList()
uploadEvents()
loghubEventSet.removeAll(exposureList)
loghubEventDao.deleteMany(exposureList)
}
}
}
private fun uploadEvents() {
for (event in loghubEventSet) {
val log = Log()
// 特殊处理以下logStore不需要用content包裹数据
if (event.logStore == "collection" || event.logStore == "common" || event.logStore == "halo-api-device-installed") {
val contentJson = JSONObject(event.content)
for (key in contentJson.keys()) {
log.putContent(key, contentJson.get(key).toString())
}
} else {
log.putContent("current time ", event.time)
log.putContent("content", event.content)
}
LoghubHelper.uploadLog(log, event.logStore)
}
}
}
@Keep
data class SimpleLogContainerEntity(
var event: String? = null,
var action: String? = null,
var meta: Meta? = null,
var payload: ExposureEntity? = null,
var timestamp: Long? = 0)

View File

@ -1,170 +0,0 @@
package com.gh.common.notifier
import android.app.Activity
import androidx.core.view.ViewCompat
import android.view.View
import android.view.ViewGroup
import com.gh.common.util.SPUtils
import com.gh.gamecenter.*
import java.lang.ref.WeakReference
@Suppress("DEPRECATION")
class Notifier private constructor() {
companion object {
private var activityWeakReference: WeakReference<Activity>? = null
private const val SP_VIEWED_NOTIFIER = "viewed_notifier"
/**
* 根据内容决定是否显示 Notifier
*/
@JvmStatic
fun shouldShowNotifier(content: String): Boolean {
val viewedNotifierCollection = SPUtils.getString(SP_VIEWED_NOTIFIER)
return !viewedNotifierCollection.contains(content)
}
/**
* 标记相应内容的 Notifier 已经显示过了
*/
@JvmStatic
fun tagNotifierAsShowed(content: String) {
val viewedNotifierCollection = SPUtils.getString(SP_VIEWED_NOTIFIER)
if (viewedNotifierCollection.length > 3000) {
SPUtils.setString(SP_VIEWED_NOTIFIER, content)
} else {
SPUtils.setString(SP_VIEWED_NOTIFIER, viewedNotifierCollection + content)
}
}
@JvmStatic
fun create(activity: Activity?): Notifier {
if (activity == null) {
throw IllegalArgumentException("Activity cannot be null!")
}
val notifier = Notifier()
// Hide current NotifierView, if one is active
clearCurrent(activity)
notifier.setActivity(activity)
notifier.notifierView = NotifierView(activity)
return notifier
}
@JvmStatic
fun isActivityValid(activity: Activity?): Boolean {
if (activity == null) return false
return when (activity) {
is MessageActivity -> false
is DownloadManagerActivity -> false
is CleanApkActivity -> false
is SplashScreenActivity -> false
else -> isNotExistInActivity(activity)
}
}
@JvmStatic
fun isNotExistInActivity(activity: Activity?): Boolean {
if (activity == null) return false
(activity.window?.decorView as? ViewGroup)?.let {
//Find all NotifierView Views in Parent layout
for (i in 0..it.childCount) {
val childView = if (it.getChildAt(i) is NotifierView) it.getChildAt(i) as NotifierView else null
if (childView != null && childView.windowToken != null) {
return false
}
}
}
return true
}
/**
* Cleans up the currently showing notifierView view, if one is present
*
* @param activity The current Activity
*/
@JvmStatic
fun clearCurrent(activity: Activity?) {
(activity?.window?.decorView as? ViewGroup)?.let {
//Find all NotifierView Views in Parent layout
for (i in 0..it.childCount) {
val childView = if (it.getChildAt(i) is NotifierView) it.getChildAt(i) as NotifierView else null
if (childView != null && childView.windowToken != null) {
ViewCompat.animate(childView).alpha(0f).withEndAction(getRemoveViewRunnable(childView))
}
}
}
}
@JvmStatic
fun hide() {
activityWeakReference?.get()?.let { clearCurrent(it) }
}
private fun getRemoveViewRunnable(childView: NotifierView?): Runnable {
return Runnable {
childView?.let {
(childView.parent as? ViewGroup)?.removeView(childView)
}
}
}
}
private var notifierView: NotifierView? = null
private val activityDecorView: ViewGroup?
get() {
var decorView: ViewGroup? = null
activityWeakReference?.get()?.let {
decorView = it.window.decorView as ViewGroup
}
return decorView
}
fun show(showVerticalTranslateAnimation: Boolean, delay: Long? = 0): NotifierView? {
activityWeakReference?.get()?.let {
it.runOnUiThread {
activityDecorView?.postDelayed({
notifierView?.showVerticalTranslateAnimation = showVerticalTranslateAnimation
activityDecorView?.addView(notifierView)
}, delay!!)
}
}
return notifierView
}
fun setIcon(url: String?): Notifier {
url?.let { notifierView?.setIcon(it) }
return this
}
fun setText(text: String?): Notifier {
notifierView?.setText(text)
return this
}
fun setDuration(time: Long): Notifier {
notifierView?.duration = time
return this
}
fun setOnClickListener(onClickListener: View.OnClickListener): Notifier {
notifierView?.findViewById<View>(R.id.cardView)?.setOnClickListener(onClickListener)
return this
}
private fun setActivity(activity: Activity) {
activityWeakReference = WeakReference(activity)
}
}

View File

@ -1,312 +0,0 @@
package com.gh.common.notifier
import android.animation.*
import android.content.Context
import android.graphics.Path
import android.text.TextUtils
import android.util.AttributeSet
import android.util.Log
import android.util.TypedValue
import android.view.Gravity
import android.view.MotionEvent
import android.view.View
import android.view.ViewGroup
import android.widget.FrameLayout
import android.widget.TextView
import androidx.cardview.widget.CardView
import androidx.core.view.ViewCompat
import com.facebook.drawee.view.SimpleDraweeView
import com.gh.common.util.DisplayUtils
import com.gh.common.util.ImageUtils
import com.gh.common.util.doOnEnd
import com.gh.common.util.doOnStart
import com.gh.gamecenter.R
class NotifierView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyle: Int = 0)
: FrameLayout(context, attrs, defStyle) {
companion object {
const val SCALE_MINI = 0.2F
const val SCALE_DEFAULT = 1F
const val DEFAULT_DURATION = 500L
}
var onShowListener: OnShowNotificationListener? = null
var onHideListener: OnHideNotificationListener? = null
lateinit var expandAnimator: ValueAnimator
lateinit var shrinkAnimator: ValueAnimator
lateinit var translateUpAnimator: ObjectAnimator
lateinit var translateDownAnimator: ObjectAnimator
lateinit var translateToLeftAnimator: ObjectAnimator
lateinit var translateToRightAnimator: ObjectAnimator
lateinit var zoomInAnimator: ObjectAnimator
lateinit var zoomOutAnimator: ObjectAnimator
var showAnimatorSet: AnimatorSet
var hideAnimatorSet: AnimatorSet
var rightToLeftPath: Path
var leftToRightPath: Path
var veryRight: Float = 0F
var veryBottom: Float = 0F
var centerX: Float = 0F
var navigationHeight = 0
var textWidth: Int = 0
var cardViewWidth: Int = 0
var verticalAnimationOffset: Int = 0
var duration = DEFAULT_DURATION
var showVerticalTranslateAnimation: Boolean = true
private var mCardView: CardView
private var mContentTv: TextView
private var mIconIv: SimpleDraweeView
init {
inflate(context, R.layout.view_notifier, this)
ViewCompat.setTranslationZ(this, Integer.MAX_VALUE.toFloat())
mCardView = findViewById(R.id.cardView)
mContentTv = findViewById(R.id.tvText)
mIconIv = findViewById(R.id.ivIcon)
mCardView.scaleX = SCALE_MINI
mCardView.scaleY = SCALE_MINI
verticalAnimationOffset = dp2px(100F)
navigationHeight = DisplayUtils.retrieveNavigationHeight(context)
rightToLeftPath = Path()
leftToRightPath = Path()
showAnimatorSet = AnimatorSet()
hideAnimatorSet = AnimatorSet()
}
override fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int) {
super.onLayout(changed, left, top, right, bottom)
centerX = (left + right - cardViewWidth) / 2F
// TODO Provide method to change these absolute offset.
val r = right - dp2px(72F).toFloat()
val b = bottom - dp2px(145F).toFloat() - navigationHeight
// Only set
if (veryRight != r || veryBottom != b) {
veryRight = r
veryBottom = b
rightToLeftPath.moveTo(r, b)
rightToLeftPath.lineTo(centerX, b)
leftToRightPath.moveTo(centerX, b)
leftToRightPath.lineTo(r, b)
initAnimator()
}
}
private fun initAnimator() {
expandAnimator = ValueAnimator.ofFloat(0F, 1F)
expandAnimator.duration = DEFAULT_DURATION
expandAnimator.addUpdateListener { a ->
val progress = a?.animatedValue as Float
mContentTv.width = (textWidth * progress).toInt()
}
expandAnimator.doOnEnd {
enableSwipeToDismiss()
shrinkAfterDelay()
}
shrinkAnimator = ValueAnimator.ofFloat(1F, 0F)
shrinkAnimator.duration = DEFAULT_DURATION
shrinkAnimator.addUpdateListener { a ->
val progress = a?.animatedValue as Float
mContentTv.width = (textWidth * progress).toInt()
}
shrinkAnimator.doOnEnd {
val lp = FrameLayout.LayoutParams(mCardView.layoutParams)
lp.gravity = Gravity.NO_GRAVITY
mCardView.layoutParams = lp
disableSwipeToDismiss()
}
translateToLeftAnimator = ObjectAnimator.ofFloat(mCardView, "translationX", veryRight, centerX)
translateToLeftAnimator.duration = DEFAULT_DURATION
translateToLeftAnimator.doOnEnd {
onShowListener?.onShow()
val lp = FrameLayout.LayoutParams(mCardView.layoutParams)
lp.gravity = Gravity.CENTER_HORIZONTAL
mCardView.layoutParams = lp
mCardView.translationX = 0f
expandAnimator.start()
}
translateToRightAnimator = ObjectAnimator.ofFloat(mCardView, "translationX", centerX, veryRight)
translateToRightAnimator.duration = DEFAULT_DURATION
translateUpAnimator = ObjectAnimator.ofFloat(mCardView, "translationY", veryBottom + verticalAnimationOffset, veryBottom)
translateUpAnimator.duration = DEFAULT_DURATION
translateUpAnimator.doOnStart { mCardView.translationX = veryRight }
translateDownAnimator = ObjectAnimator.ofFloat(mCardView, "translationY", veryBottom, veryBottom + verticalAnimationOffset)
translateDownAnimator.duration = DEFAULT_DURATION
zoomInAnimator = ObjectAnimator.ofPropertyValuesHolder(mCardView, PropertyValuesHolder.ofFloat("scaleX", SCALE_DEFAULT),
PropertyValuesHolder.ofFloat("scaleY", SCALE_DEFAULT))
zoomInAnimator.duration = DEFAULT_DURATION
zoomInAnimator.doOnStart { mCardView.translationX = veryRight }
zoomInAnimator.doOnStart { mCardView.translationY = veryBottom }
zoomOutAnimator = ObjectAnimator.ofPropertyValuesHolder(mCardView, PropertyValuesHolder.ofFloat("scaleX", SCALE_MINI),
PropertyValuesHolder.ofFloat("scaleY", SCALE_MINI))
zoomOutAnimator.duration = DEFAULT_DURATION
zoomOutAnimator.doOnEnd { removeFromParent() }
if (showVerticalTranslateAnimation) {
showAnimatorSet.play(translateUpAnimator).with(zoomInAnimator).before(translateToLeftAnimator)
} else {
showAnimatorSet.play(zoomInAnimator).before(translateToLeftAnimator)
}
showAnimatorSet.start()
}
private fun enableSwipeToDismiss() {
mCardView?.setOnTouchListener(SwipeDismissTouchListener(mCardView, object : SwipeDismissTouchListener.DismissCallbacks {
override fun canDismiss(): Boolean {
return true
}
override fun onDismiss(view: View) {
removeFromParent()
}
override fun onTouch(view: View, touch: Boolean) {
// Ignore.
}
}))
}
private fun disableSwipeToDismiss() {
mCardView?.setOnTouchListener(null)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
showAnimatorSet.cancel()
hideAnimatorSet.cancel()
try {
removeAllListeners(expandAnimator,
shrinkAnimator,
translateUpAnimator,
translateDownAnimator,
translateToLeftAnimator,
translateToRightAnimator)
} catch (e: Exception) {
e.printStackTrace()
}
}
private fun removeAllListeners(vararg ts: Animator) {
for (a in ts) {
a.removeAllListeners()
if (a is ValueAnimator) {
a.removeAllUpdateListeners()
}
}
}
override fun onTouchEvent(event: MotionEvent): Boolean {
performClick()
return super.onTouchEvent(event)
}
private fun shrinkAfterDelay() {
postDelayed({ shrink() }, duration)
}
private fun shrink() {
shrinkAnimator.doOnEnd { hide() }
shrinkAnimator.start()
}
private fun removeFromParent() {
clearAnimation()
visibility = View.GONE
postDelayed(object : Runnable {
override fun run() {
try {
if (parent == null) {
Log.e(javaClass.simpleName, "getParent() returning Null")
} else {
try {
(parent as ViewGroup).removeView(this@NotifierView)
onHideListener?.onHide()
} catch (ex: Exception) {
Log.e(javaClass.simpleName, "Cannot remove from parent layout")
}
}
} catch (ex: Exception) {
Log.e(javaClass.simpleName, Log.getStackTraceString(ex))
}
}
}, 100)
}
fun setText(text: String?) {
if (!TextUtils.isEmpty(text)) {
mContentTv.text = text
mContentTv.measure(0, 0)
textWidth = mContentTv.measuredWidth
mContentTv.width = 0
mCardView.measure(0, 0)
cardViewWidth = mCardView.measuredWidth
}
}
fun hide() {
if (showVerticalTranslateAnimation) {
hideAnimatorSet.play(translateDownAnimator).with(zoomOutAnimator).after(translateToRightAnimator)
} else {
hideAnimatorSet.play(zoomOutAnimator).after(translateToRightAnimator)
}
hideAnimatorSet.start()
}
fun setIcon(url: String) {
ImageUtils.display(mIconIv, url)
}
private fun dp2px(dp: Float): Int {
return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, context.applicationContext.resources.displayMetrics).toInt()
}
interface OnShowNotificationListener {
fun onShow()
}
interface OnHideNotificationListener {
fun onHide()
}
}

View File

@ -1,238 +0,0 @@
package com.gh.common.notifier
/*
* Copyright 2013 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Modifications Copyright (C) 2017 David Kwon
*/
import android.animation.Animator
import android.animation.AnimatorListenerAdapter
import android.animation.ValueAnimator
import android.os.Build
import androidx.annotation.RequiresApi
import android.view.MotionEvent
import android.view.VelocityTracker
import android.view.View
import android.view.ViewConfiguration
/**
* A [View.OnTouchListener] that makes any [View] dismissable when the
* user swipes (drags her finger) horizontally across the view.
*
* @param view The view to make dismissable.
* @param callbacks The callback to trigger when the user has indicated that she would like to
* dismiss this view.
*/
class SwipeDismissTouchListener(
private val mView: View,
private val mCallbacks: DismissCallbacks) : View.OnTouchListener {
// Cached ViewConfiguration and system-wide constant values
private val mSlop: Int
private val mMinFlingVelocity: Int
private val mAnimationTime: Long
private var mViewWidth = 1 // 1 and not 0 to prevent dividing by zero
// Transient properties
private var mDownX: Float = 0.toFloat()
private var mDownY: Float = 0.toFloat()
private var mSwiping: Boolean = false
private var mSwipingSlop: Int = 0
private var mVelocityTracker: VelocityTracker? = null
private var mTranslationX: Float = 0.toFloat()
init {
val vc = ViewConfiguration.get(mView.context)
mSlop = vc.scaledTouchSlop
mMinFlingVelocity = vc.scaledMinimumFlingVelocity * 16
mAnimationTime = mView.context.resources.getInteger(
android.R.integer.config_shortAnimTime).toLong()
}
@RequiresApi(api = Build.VERSION_CODES.HONEYCOMB_MR1)
override fun onTouch(view: View, motionEvent: MotionEvent): Boolean {
// offset because the view is translated during swipe
motionEvent.offsetLocation(mTranslationX, 0f)
if (mViewWidth < 2) {
mViewWidth = mView.width
}
when (motionEvent.actionMasked) {
MotionEvent.ACTION_DOWN -> {
mDownX = motionEvent.rawX
mDownY = motionEvent.rawY
if (mCallbacks.canDismiss()) {
mVelocityTracker = VelocityTracker.obtain()
mVelocityTracker!!.addMovement(motionEvent)
}
mCallbacks.onTouch(view, true)
return false
}
MotionEvent.ACTION_UP -> {
mVelocityTracker?.run {
val deltaX = motionEvent.rawX - mDownX
this.addMovement(motionEvent)
this.computeCurrentVelocity(1000)
val velocityX = this.xVelocity
val absVelocityX = Math.abs(velocityX)
val absVelocityY = Math.abs(this.yVelocity)
var dismiss = false
var dismissRight = false
if (Math.abs(deltaX) > mViewWidth / 2 && mSwiping) {
dismiss = true
dismissRight = deltaX > 0
} else if (mMinFlingVelocity <= absVelocityX && absVelocityY < absVelocityX && mSwiping) {
// dismiss only if flinging in the same direction as dragging
dismiss = velocityX < 0 == deltaX < 0
dismissRight = this.xVelocity > 0
}
if (dismiss) {
// dismiss
mView.animate()
.translationX((if (dismissRight) mViewWidth else -mViewWidth).toFloat())
.alpha(0f)
.setDuration(mAnimationTime)
.setListener(object : AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator) {
performDismiss()
}
})
} else if (mSwiping) {
// cancel
mView.animate()
.translationX(0f)
.alpha(1f)
.setDuration(mAnimationTime)
.setListener(null)
mCallbacks.onTouch(view, false)
}
this.recycle()
mVelocityTracker = null
mTranslationX = 0f
mDownX = 0f
mDownY = 0f
mSwiping = false
}
}
MotionEvent.ACTION_CANCEL -> {
mVelocityTracker?.run {
mView.animate()
.translationX(0f)
.alpha(1f)
.setDuration(mAnimationTime)
.setListener(null)
this.recycle()
mVelocityTracker = null
mTranslationX = 0f
mDownX = 0f
mDownY = 0f
mSwiping = false
}
}
MotionEvent.ACTION_MOVE -> {
mVelocityTracker?.run {
this.addMovement(motionEvent)
val deltaX = motionEvent.rawX - mDownX
val deltaY = motionEvent.rawY - mDownY
if (Math.abs(deltaX) > mSlop && Math.abs(deltaY) < Math.abs(deltaX) / 2) {
mSwiping = true
mSwipingSlop = if (deltaX > 0) mSlop else -mSlop
mView.parent.requestDisallowInterceptTouchEvent(true)
// Cancel listview's touch
val cancelEvent = MotionEvent.obtain(motionEvent)
cancelEvent.action = MotionEvent.ACTION_CANCEL or (motionEvent.actionIndex shl MotionEvent.ACTION_POINTER_INDEX_SHIFT)
mView.onTouchEvent(cancelEvent)
cancelEvent.recycle()
}
if (mSwiping) {
mTranslationX = deltaX
mView.translationX = deltaX - mSwipingSlop
// TODO: use an ease-out interpolator or such
mView.alpha = Math.max(0f, Math.min(1f,
1f - 2f * Math.abs(deltaX) / mViewWidth))
return true
}
}
}
else -> {
view.performClick()
return false
}
}
return false
}
@RequiresApi(api = Build.VERSION_CODES.HONEYCOMB)
private fun performDismiss() {
// Animate the dismissed view to zero-height and then fire the dismiss callback.
// This triggers layout on each animation frame; in the future we may want to do something
// smarter and more performant.
val lp = mView.layoutParams
val originalHeight = mView.height
val animator = ValueAnimator.ofInt(originalHeight, 1).setDuration(mAnimationTime)
animator.addListener(object : AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator) {
mCallbacks.onDismiss(mView)
// Reset view presentation
mView.alpha = 1f
mView.translationX = 0f
lp.height = originalHeight
mView.layoutParams = lp
}
})
animator.addUpdateListener { valueAnimator ->
lp.height = valueAnimator.animatedValue as Int
mView.layoutParams = lp
}
animator.start()
}
/**
* The callback interface used by [SwipeDismissTouchListener] to inform its client
* about a successful dismissal of the view for which it was created.
*/
interface DismissCallbacks {
/**
* Called to determine whether the view can be dismissed.
*
* @return boolean The view can dismiss.
*/
fun canDismiss(): Boolean
/**
* Called when the user has indicated they she would like to dismiss the view.
*
* @param view The originating [View]
*/
fun onDismiss(view: View)
/**
* Called when the user touches the view or release the view.
*
* @param view The originating [View]
* @param touch The view is being touched.
*/
fun onTouch(view: View, touch: Boolean)
}
}

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.ActivationHelper
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IActivationProvider
@Route(path = RouteConsts.provider.activation, name = "ActivationHelper暴露服务")
class ActivationProviderImpl : IActivationProvider {
override fun init(context: Context?) {
}
override fun sendActivationInfo() {
ActivationHelper.sendActivationInfo()
}
}

View File

@ -0,0 +1,55 @@
package com.gh.common.provider
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.gamecenter.R
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IAppProvider
import com.halo.assistant.HaloApp
@Route(path = RouteConsts.provider.app, name = "Application暴露服务")
class AppProviderImpl : IAppProvider {
override fun init(context: Context?) {
}
override fun getAppName(): String {
return HaloApp.getInstance().getString(R.string.app_name)
}
override fun getGid(): String {
return HaloApp.getInstance().gid ?: ""
}
override fun refreshGid() {
HaloApp.getInstance().refreshGid()
}
override fun getOaid(): String {
return HaloApp.getInstance().oaid ?: ""
}
override fun getChannel(): String {
return HaloApp.getInstance().channel ?: ""
}
override fun getUserAgent(): String {
return HaloApp.getInstance().userAgent ?: ""
}
override fun getServerUserMark(): String {
return HaloApp.getInstance().serverUserMark ?: ""
}
override fun getDeviceRamSize(): Long {
return HaloApp.getInstance().deviceRamSize
}
override fun getTemporaryLocalDeviceId(): String {
return HaloApp.getInstance().temporaryLocalDeviceId ?: ""
}
override fun isUserAcceptPrivacyPolicy(context: Context): Boolean {
return HaloApp.isUserAcceptPrivacyPolicy(context)
}
}

View File

@ -0,0 +1,34 @@
package com.gh.common.provider
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.gamecenter.BuildConfig
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IBuildConfigProvider
@Route(path = RouteConsts.provider.buildConfig, name = "BuildConfig暴露服务")
class BuildConfigImpl : IBuildConfigProvider {
override fun init(context: Context?) {
}
override fun getApplicationId(): String = BuildConfig.APPLICATION_ID
override fun getVersionName(): String = BuildConfig.VERSION_NAME
override fun getExposureVersion(): String = BuildConfig.EXPOSURE_VERSION
override fun isDebug(): Boolean = BuildConfig.DEBUG
override fun getApiHost(): String = BuildConfig.API_HOST
override fun getDevApiHost(): String = BuildConfig.DEV_API_HOST
override fun getNewApiHost(): String = BuildConfig.NEW_API_HOST
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

@ -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.CheckLoginUtils
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.ICheckLoginProvider
@Route(path = RouteConsts.provider.checkLogin, name = "CheckLoginUtils暴露服务")
class CheckLoginProviderImpl : ICheckLoginProvider {
override fun checkLogin(context: Context, entrance: String, action: (() -> Unit)?) {
CheckLoginUtils.checkLogin(context, entrance, action)
}
override fun init(context: Context?) {
}
}

View File

@ -0,0 +1,62 @@
package com.gh.common.provider
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.common.constant.Config
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IConfigProvider
@Route(path = RouteConsts.provider.config, name = "Config暴露服务")
class ConfigProviderImpl : IConfigProvider {
override fun getTencentAppId(): String {
return Config.TENCENT_APPID
}
override fun getWechatAppId(): String {
return Config.WECHAT_APPID
}
override fun getUploadLimitSize(): Long {
return Config.getSettings()?.image?.uploadLimitSize ?: 0L
}
override fun getSize(): Int {
return Config.getSettings()?.image?.size ?: 0
}
override fun getRatio(): Int {
return Config.getSettings()?.image?.ratio ?: 0
}
override fun getQuality(): Int {
return Config.getSettings()?.image?.quality ?: 0
}
override fun getGif(): String {
return Config.getSettings()?.image?.oss?.gif ?: ""
}
override fun getJpeg(): String {
return Config.getSettings()?.image?.oss?.jpeg ?: ""
}
override fun getWebp(): String {
return Config.getSettings()?.image?.oss?.webp ?: ""
}
override fun getGitThumb(): String {
return Config.getSettings()?.image?.oss?.gitThumb ?: ""
}
override fun getGifWaterMark(): String {
return Config.getSettings()?.image?.oss?.gifWaterMark ?: ""
}
override fun getQQ(): String {
return Config.getSettings()?.support?.qq ?: ""
}
override fun init(context: Context?) {
}
}

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.DefaultUrlHandler
import com.gh.gamecenter.common.constant.RouteConsts
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 init(context: Context?) {
}
}

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.DialogUtils
import com.gh.gamecenter.common.callback.CancelListener
import com.gh.gamecenter.common.callback.ConfirmListener
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IDialogUtilsProvider
@Route(path = RouteConsts.provider.dialogUtils, name = "DialogUtils暴露服务")
class DialogUtilsProviderImpl : IDialogUtilsProvider {
override fun showRegulationTestDialog(context: Context, confirm: () -> Unit, cancel: () -> Unit) {
DialogUtils.showRegulationTestDialog(context, object : ConfirmListener {
override fun onConfirm() {
confirm.invoke()
}
}, object :CancelListener{
override fun onCancel() {
cancel.invoke()
}
})
}
override fun init(context: Context?) {
}
}

View File

@ -0,0 +1,27 @@
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.core.provider.IDirectProvider
@Route(path = RouteConsts.provider.directUtils, name = "DirectUtils暴露服务")
class DirectProviderImpl : IDirectProvider {
override fun directToWebView(context: Context, url: String, entrance: String?) {
DirectUtils.directToWebView(context, url, entrance)
}
override fun directToRegulationTestPage(context: Context) {
DirectUtils.directToRegulationTestPage(context)
}
override fun directToQqConversation(context: Context, qq: String) {
DirectUtils.directToQqConversation(context, qq)
}
override fun init(context: Context?) {
}
}

View File

@ -0,0 +1,21 @@
package com.gh.common.provider
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.download.DownloadManager
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IDownloadManagerProvider
import com.lightgame.download.DownloadEntity
@Route(path = RouteConsts.provider.downloadManager, name = "DownloadManager暴露服务")
class DownloadManagerProviderImpl : IDownloadManagerProvider {
override fun getDownloadEntityByUrl(url: String): DownloadEntity? {
return DownloadManager.getInstance().getDownloadEntityByUrl(url)
}
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.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

@ -0,0 +1,23 @@
package com.gh.common.provider
import android.content.Context
import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.common.util.EntranceUtils
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IEntranceUtilsProvider
@Route(path = RouteConsts.provider.entranceUtils, name = "EntranceUtils暴露服务")
class EntranceUtilsProviderImpl: IEntranceUtilsProvider {
override fun jumpActivity(context: Context, bundle: Bundle) {
EntranceUtils.jumpActivity(context, bundle)
}
override fun saveShortcut(activityName: String, bundle: Bundle?) {
EntranceUtils.saveShortcut(activityName, bundle)
}
override fun init(context: Context?) {
}
}

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.PackageHelper
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IPackageHelperProvider
@Route(path = RouteConsts.provider.packageHelper, name = "PackageHelper暴露服务")
class PackageHelperProviderImpl : IPackageHelperProvider {
override fun getLocalPackageNameSet(): HashSet<String> {
return PackageHelper.localPackageNameSet
}
override fun init(context: Context?) {
}
}

View File

@ -0,0 +1,24 @@
package com.gh.common.provider
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.common.util.PackageInstaller
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IPackageInstallerProvider
import com.lightgame.download.DownloadEntity
@Route(path = RouteConsts.provider.packageInstaller, name = "PackageInstaller暴露服务")
class PackageInstallerProviderImpl : IPackageInstallerProvider {
override fun install(context: Context, downloadEntity: DownloadEntity, showUnzipToast: Boolean) {
PackageInstaller.install(context, downloadEntity, showUnzipToast)
}
override fun uninstall(context: Context, path: String) {
PackageInstaller.uninstall(context, path)
}
override fun init(context: Context?) {
}
}

View File

@ -0,0 +1,39 @@
package com.gh.common.provider
import android.content.Context
import android.content.pm.PackageInfo
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.common.util.PackageUtils
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IPackageUtilsProvider
@Route(path = RouteConsts.provider.packageUtils, name = "PackageUtils暴露服务")
class PackageUtilsProviderImpl : IPackageUtilsProvider {
override fun obtainProcessName(context: Context): String? {
return PackageUtils.obtainProcessName(context)
}
override fun getGhVersionName(): String {
return PackageUtils.getGhVersionName()
}
override fun getGhVersionCode(): Int {
return PackageUtils.getGhVersionCode()
}
override fun getInstalledPackages(context: Context, flag: Int): List<PackageInfo> {
return PackageUtils.getInstalledPackages(context, flag)
}
override fun getApkSignatureByPackageName(context: Context, packageName: String): Array<String> {
return PackageUtils.getApkSignatureByPackageName(context, packageName)
}
override fun getSideLoadedInfo(): MutableMap<String, String>? {
return PackageUtils.getSideLoadedInfo()
}
override fun init(context: Context?) {
}
}

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.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,38 @@
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.IUserManagerProvider
import com.gh.gamecenter.manager.UserManager
@Route(path = RouteConsts.provider.userManager, name = "UserManager暴露服务")
class UserManagerProviderImpl : IUserManagerProvider {
override fun userShouldTakeRegulationBaseOnLastRemind(): Boolean {
return UserManager.getInstance().userShouldTakeRegulationBaseOnLastRemind()
}
override fun getUserId(): String {
return UserManager.getInstance().userId ?: ""
}
override fun getToken(): String {
return UserManager.getInstance().token ?: ""
}
override fun refreshToken(accessToken: String, success: () -> Unit, fail: (String?) -> Unit) {
UserManager.getInstance().refreshToken(accessToken, object : UserManager.refreshCallBack {
override fun onLogin() {
success.invoke()
}
override fun onLoginFailure(errorMessage: String?) {
fail.invoke(errorMessage)
}
})
}
override fun init(context: Context?) {
}
}

View File

@ -0,0 +1,19 @@
package com.gh.common.provider
import android.content.Context
import android.content.Intent
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.gamecenter.WebActivity
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IWebProvider
@Route(path = RouteConsts.provider.webActivity, name = "WebActivity暴露服务")
class WebProviderImpl : IWebProvider {
override fun getIntent(context: Context, url: String, autoCompletionTitle: Boolean): Intent {
return WebActivity.getIntent(context, url, autoCompletionTitle)
}
override fun init(context: Context?) {
}
}

View File

@ -2,7 +2,7 @@ package com.gh.common.repository
import com.gh.common.filter.RegionSettingHelper
import com.gh.common.util.ApkActiveUtils
import com.gh.common.util.RandomUtils
import com.gh.gamecenter.core.utils.RandomUtils
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.retrofit.RetrofitManager
import io.reactivex.Observable

View File

@ -3,7 +3,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.retrofit.BiResponse
import com.gh.gamecenter.common.retrofit.BiResponse
import com.gh.gamecenter.retrofit.RetrofitManager
import com.halo.assistant.HaloApp
import com.lightgame.utils.Utils

View File

@ -9,12 +9,16 @@ import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import androidx.constraintlayout.widget.ConstraintLayout
import com.g00fy2.versioncompare.Version
import com.gh.common.AppExecutor.uiExecutor
import com.gh.common.constant.Constants
import com.gh.common.dialog.TrackableDialog
import com.gh.common.util.*
import com.gh.common.util.LogUtils
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
import com.gh.gamecenter.entity.TrackableEntity
@ -70,7 +74,7 @@ class SimulatorDownloadManager private constructor() {
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)
DownloadManager.getInstance().cancel(downloadEntity.url, false, true, false)
val activity = mContextRef?.get() as? AppCompatActivity
if (activity?.isFinishing == false) {
downloadDialog?.dismiss()
@ -94,6 +98,9 @@ class SimulatorDownloadManager private constructor() {
DownloadStatus.unavailable == downloadEntity.status -> {
ToastUtils.showToast("该游戏未接入防沉迷系统,暂不支持下载")
}
DownloadStatus.banned == downloadEntity.status -> {
ToastUtils.showToast("网络异常")
}
DownloadStatus.hijack == downloadEntity.status -> {
ToastUtils.showToast("网络劫持,请稍后重试")
}
@ -108,53 +115,59 @@ class SimulatorDownloadManager private constructor() {
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 = 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
)
},
mtaEvent = trackableEntity.event, mtaKey = trackableEntity.key,
extraConfig = DialogHelper.Config(centerTitle = true, centerContent = true)
)
DialogHelper.showDialog(
context,
title,
message,
positiveText,
negativeText,
trackMtaEvent = true,
cancelClickCallback = {
if (shouldShowUpdate && isInstalled) {
cancelCallback?.invoke()
MtaHelper.onEvent(trackableEntity.event, trackableEntity.key, "点击下次再说")
}
},
confirmClickCallback = {
showDownloadingDialog(context, simulator)
MtaHelper.onEvent(
trackableEntity.event,
trackableEntity.key,
if (shouldShowUpdate && isInstalled) "点击更新" else "点击下载"
)
},
mtaEvent = trackableEntity.event, mtaKey = trackableEntity.key,
extraConfig = DialogHelper.Config(centerTitle = true, centerContent = true)
)
}
})
}
private fun showDownloadingDialog(context: Context, simulator: SimulatorEntity?) {

View File

@ -7,15 +7,21 @@ import android.graphics.Bitmap
import android.net.Uri
import android.text.TextUtils
import com.g00fy2.versioncompare.Version
import com.gh.common.json.json
import com.gh.common.util.*
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.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.ToastUtils
import com.gh.gamecenter.core.utils.UrlFilterUtils
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.entity.SimulatorGameRecordEntity
import com.gh.gamecenter.manager.UserManager
import com.gh.gamecenter.retrofit.BiResponse
import com.gh.gamecenter.retrofit.EmptyResponse
import com.gh.gamecenter.retrofit.Response
import com.gh.gamecenter.retrofit.RetrofitManager
import com.gh.gamecenter.room.AppDatabase
import com.halo.assistant.HaloApp
@ -68,7 +74,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) {

View File

@ -1,98 +0,0 @@
package com.gh.common.syncpage.example
import android.content.Context
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.gh.common.constant.ItemViewType
import com.gh.common.syncpage.ISyncAdapterHandler
import com.gh.gamecenter.R
import com.gh.gamecenter.adapter.viewholder.FooterViewHolder
import com.gh.gamecenter.baselist.ListAdapter
import com.gh.gamecenter.databinding.CommunityAnswerItemBinding
import com.gh.gamecenter.manager.UserManager
import com.gh.gamecenter.qa.answer.CommunityAnswerItemViewHolder
import com.gh.gamecenter.qa.answer.detail.AnswerDetailActivity
import com.gh.gamecenter.qa.article.detail.ArticleDetailActivity
import com.gh.gamecenter.qa.entity.AnswerEntity
import com.gh.gamecenter.qa.entity.Questions
class ExampleAdapter(context: Context) : ListAdapter<AnswerEntity>(context), ISyncAdapterHandler {
override fun areItemsTheSame(oldItem: AnswerEntity?, newItem: AnswerEntity?): Boolean {
return oldItem?.id == newItem?.id
}
override fun getItemViewType(position: Int): Int {
if (position == itemCount - 1) return ItemViewType.ITEM_FOOTER
return ItemViewType.ITEM_BODY
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
val view: View
return when (viewType) {
ItemViewType.ITEM_FOOTER -> {
view = mLayoutInflater.inflate(R.layout.refresh_footerview, parent, false)
FooterViewHolder(view)
}
else -> {
view = mLayoutInflater.inflate(R.layout.community_answer_item, parent, false)
CommunityAnswerItemViewHolder(CommunityAnswerItemBinding.bind(view))
}
}
}
override fun getItemCount(): Int {
return if (mEntityList.isNotEmpty()) mEntityList.size + FOOTER_ITEM_COUNT else 0
}
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
when (getItemViewType(position)) {
ItemViewType.ITEM_BODY -> {
val answer = mEntityList[position]
if ("community_article" == answer.type) {
val questions = Questions()
questions.title = answer.articleTitle
answer.questions = questions
}
val answerViewHolder = holder as CommunityAnswerItemViewHolder
val binding = answerViewHolder.binding
answerViewHolder.bindAnswerItem(answer, "", getPath())
binding.title.setOnClickListener {
if ("community_article" == answer.type) {
mContext.startActivity(ArticleDetailActivity.getIntent(mContext, UserManager.getInstance().community, answer.id!!, "", getPath()))
}
// else {
// val questions = answer.questions
// mContext.startActivity(QuestionsDetailActivity.getIntent(mContext, questions.id, "", getPath()))
// }
}
answerViewHolder.itemView.setOnClickListener {
if ("community_article" == answer.type) {
mContext.startActivity(ArticleDetailActivity.getIntent(mContext, UserManager.getInstance().community, answer.id!!, "", getPath()))
} else {
mContext.startActivity(AnswerDetailActivity.getIntent(mContext, answer.id, "", getPath()))
}
}
}
ItemViewType.ITEM_FOOTER -> {
val footerViewHolder = holder as FooterViewHolder
footerViewHolder.initItemPadding()
footerViewHolder.initFooterViewHolder(mIsLoading, mIsNetworkError, mIsOver)
}
}
}
override fun getSyncData(position: Int): Pair<String, AnswerEntity>? {
if (position >= mEntityList.size) return null
val entity = mEntityList[position]
return Pair(entity.id ?: "", entity)
}
fun getPath(): String {
return "问答-推荐-按时间"
}
}

View File

@ -1,65 +0,0 @@
package com.gh.common.syncpage.example
import android.os.Bundle
import android.view.View
import androidx.lifecycle.ViewModelProviders
import androidx.recyclerview.widget.RecyclerView
import com.gh.common.view.VerticalItemDecoration
import com.gh.gamecenter.baselist.ListFragment
import com.gh.gamecenter.baselist.NormalListViewModel
import com.gh.gamecenter.manager.UserManager
import com.gh.gamecenter.qa.entity.AnswerEntity
import com.gh.gamecenter.retrofit.RetrofitManager
import com.halo.assistant.HaloApp
import io.reactivex.Observable
class ExampleFragment : ListFragment<AnswerEntity, NormalListViewModel<AnswerEntity>>() {
private var mAdapter: ExampleAdapter? = null
override fun provideListAdapter(): ExampleAdapter {
if (mAdapter == null) {
mAdapter = ExampleAdapter(requireContext())
}
return mAdapter!!
}
override fun getItemDecoration(): RecyclerView.ItemDecoration {
return VerticalItemDecoration(context, 8F, false)
}
override fun provideDataObservable(page: Int): Observable<MutableList<AnswerEntity>> {
return RetrofitManager.getInstance().api.getCommunitiesRecommendNewest(UserManager.getInstance().community.id, page)
}
override fun provideListViewModel(): NormalListViewModel<AnswerEntity> {
val factory = NormalListViewModel.Factory(HaloApp.getInstance().application, this)
return ViewModelProviders.of(this, factory).get(NormalListViewModel::class.java) as NormalListViewModel<AnswerEntity>
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
// SyncPageRepository.syncPageLiveData.observe(this, Observer {
// it ?: return@Observer
// val adapter = mListRv.adapter
// if (adapter !is ISyncAdapterHandler) return@Observer
// for(position in 0 until adapter.itemCount) {
// val syncKey = adapter.getSyncData(position)
// for (syncDataEntity in it) {
// if (syncDataEntity.syncId == syncKey?.first) {
// val isSuccess = SyncPageRepository.handleSyncData(syncKey.second, syncDataEntity)
// if (isSuccess) adapter.notifyItemChanged(position)
// }
// }
// }
// })
}
override fun provideSyncAdapter(): RecyclerView.Adapter<*>? {
return mListRv.adapter
}
override fun addSyncPageObserver(): Boolean {
return true
}
}

View File

@ -1,6 +1,7 @@
package com.gh.common.util
import com.gh.gamecenter.retrofit.Response
import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.common.retrofit.Response
import com.gh.gamecenter.retrofit.RetrofitManager
import io.reactivex.schedulers.Schedulers
import okhttp3.ResponseBody

View File

@ -3,9 +3,10 @@ package com.gh.common.util
import android.annotation.SuppressLint
import androidx.lifecycle.MutableLiveData
import com.gh.common.constant.Config
import com.gh.gamecenter.common.utils.NetworkUtils
import com.gh.gamecenter.entity.SettingsEntity
import com.gh.gamecenter.entity.StartupAdEntity
import com.gh.gamecenter.retrofit.BiResponse
import com.gh.gamecenter.common.retrofit.BiResponse
import com.gh.gamecenter.retrofit.RetrofitManager
import com.halo.assistant.HaloApp
import io.reactivex.schedulers.Schedulers
@ -16,7 +17,6 @@ object AdHelper {
const val LOCATION_SEARCH_EMPTY = "search_empty"
const val LOCATION_GAME_REQUEST_VERSION = "game_request_version"
const val LOCATION_SUGGESTION_FUNCTION = "suggestion_function"
const val LOCATION_DISCOVER = "discover"
const val LOCATION_SIMULATOR_GAME = "simulator_game"
@JvmField
@ -50,20 +50,6 @@ object AdHelper {
return null
}
fun getDiscoverAds(): List<SettingsEntity.AD> {
val adList = Config.getSettings()?.adList ?: return listOf()
val discoverAdList = arrayListOf<SettingsEntity.AD>()
for (ad in adList) {
if (ad.location == LOCATION_DISCOVER) {
discoverAdList.add(ad)
}
}
return discoverAdList
}
fun getAdForLocation(location: String): SettingsEntity.AD? {
val adList = Config.getSettings()?.adList ?: return null

View File

@ -1,10 +0,0 @@
package com.gh.common.util
object AntiBotHelper {
// @JvmStatic
// val manager by lazy {
// SecurityGuardManager.getInstance(HaloApp.getInstance().application).getInterface(IJAQAVMPSignComponent::class.java).apply {
// this.initialize()
// }
// }
}

View File

@ -9,15 +9,19 @@ import android.view.View
import android.view.Window
import androidx.core.widget.doOnTextChanged
import androidx.recyclerview.widget.LinearLayoutManager
import com.gh.base.CurrentActivityHolder
import com.gh.common.json.json
import com.gh.common.view.VerticalItemDecoration
import com.gh.gamecenter.core.utils.CurrentActivityHolder
import com.gh.gamecenter.common.json.json
import com.gh.gamecenter.common.view.VerticalItemDecoration
import com.gh.gamecenter.R
import com.gh.gamecenter.SuggestionActivity
import com.gh.gamecenter.adapter.ReportReasonAdapter
import com.gh.gamecenter.core.utils.ToastUtils
import com.gh.gamecenter.common.utils.toColor
import com.gh.gamecenter.common.utils.toObject
import com.gh.gamecenter.common.utils.toRequestBody
import com.gh.gamecenter.databinding.DialogReportReasonBinding
import com.gh.gamecenter.entity.SettingsEntity
import com.gh.gamecenter.retrofit.BiResponse
import com.gh.gamecenter.common.retrofit.BiResponse
import com.gh.gamecenter.retrofit.RetrofitManager
import com.halo.assistant.HaloApp
import io.reactivex.android.schedulers.AndroidSchedulers

View File

@ -4,15 +4,18 @@ import android.annotation.SuppressLint
import android.app.Activity
import android.app.Application
import android.os.Bundle
import com.gh.base.CurrentActivityHolder
import com.gh.base.GHThreadFactory
import com.gh.gamecenter.core.utils.CurrentActivityHolder
import com.gh.gamecenter.core.GHThreadFactory
import com.gh.gamecenter.MainActivity
import com.gh.gamecenter.core.utils.ToastUtils
import com.gh.gamecenter.common.utils.isPublishEnv
import com.gh.gamecenter.common.utils.tryWithDefaultCatch
import com.gh.gamecenter.forum.detail.ForumDetailActivity
import com.gh.gamecenter.qa.article.detail.ArticleDetailActivity
import com.gh.gamecenter.qa.comment.CommentActivity
import com.gh.gamecenter.qa.questions.newdetail.NewQuestionDetailActivity
import com.gh.gamecenter.qa.video.detail.ForumVideoDetailActivity
import com.gh.gamecenter.retrofit.BiResponse
import com.gh.gamecenter.common.retrofit.BiResponse
import com.gh.gamecenter.retrofit.RetrofitManager
import com.halo.assistant.HaloApp
import io.reactivex.android.schedulers.AndroidSchedulers

View File

@ -5,9 +5,12 @@ import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils;
import com.gh.base.CurrentActivityHolder;
import com.gh.common.constant.Constants;
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.common.utils.NetworkUtils;
import com.gh.gamecenter.core.utils.SPUtils;
import com.gh.gamecenter.manager.UserManager;
import com.lightgame.utils.Utils;
@ -36,8 +39,8 @@ public class CheckLoginUtils {
} else {
// 有可能App未启动
Bundle bundle = new Bundle();
bundle.putString(EntranceUtils.KEY_ENTRANCE, entrance);
bundle.putString(EntranceUtils.KEY_TO, LoginActivity.class.getName());
bundle.putString(EntranceConsts.KEY_ENTRANCE, entrance);
bundle.putString(EntranceConsts.KEY_TO, LoginActivity.class.getName());
EntranceUtils.jumpActivity(context, bundle);
}
} else {
@ -55,8 +58,8 @@ public class CheckLoginUtils {
// 有可能App未启动
Bundle bundle = new Bundle();
bundle.putString(EntranceUtils.KEY_ENTRANCE, entrance);
bundle.putString(EntranceUtils.KEY_TO, LoginActivity.class.getName());
bundle.putString(EntranceConsts.KEY_ENTRANCE, entrance);
bundle.putString(EntranceConsts.KEY_TO, LoginActivity.class.getName());
EntranceUtils.jumpActivity(context, nextToBundle, bundle, (resultCode, data) -> {
if (isTriggerNextStep && listener != null && isLogin()) {
listener.onLogin();

View File

@ -3,7 +3,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.retrofit.Response
import com.gh.gamecenter.common.retrofit.Response
import com.gh.gamecenter.retrofit.RetrofitManager
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers

View File

@ -1,8 +0,0 @@
package com.gh.common.util
import com.gh.gamecenter.room.AppDatabase
import com.gh.gamecenter.room.dao.CommentDraftDao
object CommentDraftContainer {
val commentDraftDao: CommentDraftDao by lazy { AppDatabase.getInstance().commentDraftDao() }
}

View File

@ -5,18 +5,21 @@ import android.view.LayoutInflater
import android.view.View
import android.widget.LinearLayout
import android.widget.TextView
import com.gh.common.constant.Constants
import com.gh.common.json.json
import com.gh.common.util.CommentUtils.copyText
import com.gh.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.qa.comment.OnCommentOptionClickListener
import com.gh.gamecenter.retrofit.Response
import com.gh.gamecenter.retrofit.RetrofitManager
import com.halo.assistant.HaloApp
import com.lightgame.utils.Utils
@ -45,7 +48,7 @@ object CommentHelper {
showConversation = showConversation,
articleId = articleId,
communityId = communityId,
isShowTop = isShowTop,
isShowTopOrAccept = isShowTop,
ignoreModerator = ignoreModerator,
listener = listener
)
@ -84,7 +87,7 @@ object CommentHelper {
showConversation = showConversation,
videoId = videoId,
isVideoAuthor = isVideoAuthor,
isShowTop = isShowTop,
isShowTopOrAccept = isShowTop,
listener = listener
)
}
@ -101,7 +104,7 @@ object CommentHelper {
commentEntity = commentEntity,
showConversation = false,
questionId = questionId,
isShowTop = isShowTop,
isShowTopOrAccept = isShowTop,
ignoreModerator = true,
listener = listener
)
@ -133,18 +136,19 @@ object CommentHelper {
questionId: String? = null,
videoId: String? = null,
gameCollectionId: String? = null,
isShowTop: Boolean = false,
isShowTopOrAccept: Boolean = false,
ignoreModerator: Boolean = false,
isVideoAuthor: Boolean = false,
listener: OnCommentOptionClickListener? = null
) {
val context = view.context
val dialogOptions = ArrayList<String>()
val isContentAuthor = commentEntity.me?.isContentAuthor == true
if (isShowTop && (articleId != null || questionId != null || videoId != null) && commentEntity.me?.isContentAuthor == true) {
if (isShowTopOrAccept && (articleId != null || questionId != null || videoId != null) && isContentAuthor) {
dialogOptions.add(if (commentEntity.isTop) "取消置顶" else "置顶")
}
if (questionId != null && commentEntity.me?.isContentAuthor == true) {
if (isShowTopOrAccept && questionId != null && isContentAuthor) {
if (commentEntity.accept) {
dialogOptions.add("取消采纳")
} else {
@ -170,7 +174,7 @@ object CommentHelper {
) {
dialogOptions.add("取消精选")
}
if (commentEntity.user.id == UserManager.getInstance().userId || commentEntity.me?.isModerator == true || commentEntity.me?.isContentAuthor == true) {
if (commentEntity.user.id == UserManager.getInstance().userId || commentEntity.me?.isModerator == true || isContentAuthor) {
dialogOptions.add("删除评论")
}
@ -233,8 +237,6 @@ object CommentHelper {
}
articleId != null -> {
PostCommentUtils.reportCommunityArticleComment(
communityId,
articleId,
commentEntity.id,
reportType,
commentListener
@ -436,11 +438,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)
@ -498,7 +496,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)

View File

@ -17,12 +17,18 @@ import androidx.core.content.ContextCompat;
import com.gh.gamecenter.CommentDetailActivity;
import com.gh.gamecenter.R;
import com.gh.gamecenter.adapter.viewholder.CommentViewHolder;
import com.gh.gamecenter.common.callback.SimpleCallback;
import com.gh.gamecenter.common.retrofit.BiResponse;
import com.gh.gamecenter.common.retrofit.Response;
import com.gh.gamecenter.common.utils.ExtensionsKt;
import com.gh.gamecenter.common.utils.ImageUtils;
import com.gh.gamecenter.core.utils.DisplayUtils;
import com.gh.gamecenter.core.utils.NumberUtils;
import com.gh.gamecenter.core.utils.ToastUtils;
import com.gh.gamecenter.entity.CommentEntity;
import com.gh.gamecenter.entity.MeEntity;
import com.gh.gamecenter.entity.UserInfoEntity;
import com.gh.gamecenter.manager.UserManager;
import com.gh.gamecenter.retrofit.BiResponse;
import com.gh.gamecenter.retrofit.Response;
import com.gh.gamecenter.retrofit.RetrofitManager;
import com.halo.assistant.HaloApp;
import com.lightgame.utils.Utils;
@ -129,23 +135,20 @@ public class CommentUtils {
0, DisplayUtils.dip2px(context, 12));
container.addView(reportTv);
reportTv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialog.cancel();
switch (reportTv.getText().toString()) {
case "复制":
copyText(commentEntity.getContent(), context);
break;
case "投诉":
CheckLoginUtils.checkLogin(context, patch + "-投诉",
() -> showReportTypeDialog(commentEntity, context));
reportTv.setOnClickListener(v -> {
dialog.cancel();
switch (reportTv.getText().toString()) {
case "复制":
copyText(commentEntity.getContent(), context);
break;
case "投诉":
CheckLoginUtils.checkLogin(context, patch + "-投诉",
() -> showReportTypeDialog(commentEntity, context));
break;
case "查看对话":
context.startActivity(CommentDetailActivity.getIntent(context, commentEntity.getId(), null));
break;
}
break;
case "查看对话":
context.startActivity(CommentDetailActivity.getIntent(context, commentEntity.getId(), null));
break;
}
});
}
@ -295,7 +298,7 @@ public class CommentUtils {
commentLikeCountTv.setText(NumberUtils.transSimpleCount(commentEntity.getVote()));
commentLikeCountTv.setVisibility(View.VISIBLE);
PostCommentUtils.likeComment(answerId, articleId, articleCommunityId, videoId, questionId, commentEntity.getId(),
PostCommentUtils.likeComment(answerId, articleId, videoId, questionId, commentEntity.getId(),
new PostCommentUtils.PostCommentListener() {
@Override
public void postSuccess(JSONObject response) {
@ -349,7 +352,7 @@ public class CommentUtils {
String entrance = "视频流-评论-点赞";
CheckLoginUtils.checkLogin(context, entrance, () -> {
PostCommentUtils.likeComment(answerId, articleId, articleCommunityId, videoId, "", commentEntity.getId(),
PostCommentUtils.likeComment(answerId, articleId, videoId, "", commentEntity.getId(),
new PostCommentUtils.PostCommentListener() {
@Override
public void postSuccess(JSONObject response) {
@ -417,7 +420,7 @@ public class CommentUtils {
commentLikeCountTv.setVisibility(View.VISIBLE);
try {
if (e != null && e.response().errorBody() != null) {
ErrorHelper.handleError(context, e.response().errorBody().string(), false);
ErrorHelper.handleError(context, e.response().errorBody().string(), false, null);
}
} catch (IOException ex) {
ex.printStackTrace();

View File

@ -1,47 +0,0 @@
package com.gh.common.util
import com.gh.gamecenter.packagehelper.PackageRepository
import com.gh.gamecenter.qa.entity.CommunitySelectEntity
object CommunityHelper {
/**
* 为已开通的社区排序
* 排序规则为将本地存在已安装游戏或已关联游戏的社区置顶
*/
fun sortOpenedCommunity(rawList: List<CommunitySelectEntity>?): ArrayList<CommunitySelectEntity> {
val sortedList = ArrayList<CommunitySelectEntity>()
rawList?.let {
for (game in rawList) {
var thisGameIsInstalled = false
for (installGame in PackageRepository.gameInstalled) {
if (PackageHelper.downloadPackageNameBlackList.contains(installGame.packageName)) {
continue
}
// 判断是否已安装
if (installGame.id == game.game.id) {
thisGameIsInstalled = true
break
}
// 判断是否关联了别游戏
for (relatedGameId in game.game.relation) {
if (installGame.id == relatedGameId) {
thisGameIsInstalled = true
break
}
}
}
// 将已安装的置顶
if (thisGameIsInstalled) {
sortedList.add(0, game)
} else {
sortedList.add(game)
}
}
}
return sortedList
}
}

View File

@ -7,6 +7,8 @@ import android.widget.LinearLayout;
import com.facebook.drawee.drawable.ScalingUtils;
import com.facebook.drawee.view.SimpleDraweeView;
import com.gh.gamecenter.ImageViewerActivity;
import com.gh.gamecenter.core.utils.DisplayUtils;
import com.gh.gamecenter.common.utils.ImageUtils;
import java.util.ArrayList;
import java.util.List;
@ -31,7 +33,7 @@ public class ConcernContentUtils {
ll = new LinearLayout(context);
ll.setOrientation(LinearLayout.HORIZONTAL);
for (int j = 0; j < 3; j++) {
SimpleDraweeView draweeView = getImageView(context, list, entrance, index, width, 0);
SimpleDraweeView draweeView = getImageView(context, list, index, width, 0);
imageViewList.add(draweeView);
int position = index;
draweeView.setOnClickListener(v -> {
@ -45,7 +47,7 @@ public class ConcernContentUtils {
count -= 3;
break;
case 1:
SimpleDraweeView draweeView = getImageView(context, list, entrance, index, width, 1);
SimpleDraweeView draweeView = getImageView(context, list, index, width, 1);
imageViewList.add(draweeView);
int position1 = index;
draweeView.setOnClickListener(v -> {
@ -60,7 +62,7 @@ public class ConcernContentUtils {
ll = new LinearLayout(context);
ll.setOrientation(LinearLayout.HORIZONTAL);
for (int j = 0; j < 2; j++) {
SimpleDraweeView imageView = getImageView(context, list, entrance, index, width, 2);
SimpleDraweeView imageView = getImageView(context, list, index, width, 2);
imageViewList.add(imageView);
int position2 = index;
imageView.setOnClickListener(v -> {
@ -77,8 +79,11 @@ public class ConcernContentUtils {
}
}
private static SimpleDraweeView getImageView(final Context context, final List<String> list, final String entrance,
final int position, int width, int type) {
private static SimpleDraweeView getImageView(final Context context,
final List<String> list,
final int position,
int width,
int type) {
SimpleDraweeView imageView;
LinearLayout.LayoutParams lparams;
switch (type) {

View File

@ -4,7 +4,7 @@ import android.content.Context
import android.text.TextUtils
import com.gh.gamecenter.eventbus.EBConcernChanged
import com.gh.gamecenter.manager.UserManager
import com.gh.gamecenter.retrofit.Response
import com.gh.gamecenter.common.retrofit.Response
import com.gh.gamecenter.retrofit.RetrofitManager
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers

View File

@ -3,7 +3,9 @@ package com.gh.common.util;
import android.content.Context;
import android.os.Build;
import com.gh.common.constant.Constants;
import com.gh.gamecenter.common.constant.Constants;
import com.gh.gamecenter.common.constant.EntranceConsts;
import com.gh.gamecenter.common.utils.NetworkUtils;
import com.gh.gamecenter.entity.GameEntity;
import com.gh.gamecenter.entity.NewsDetailEntity;
import com.gh.gamecenter.manager.DataCollectionManager;
@ -49,7 +51,7 @@ public class DataCollectionUtils {
map.put("platform", PlatformUtils.getInstance(context).getPlatformName(downloadEntity.getPlatform()));
map.put("status", status);
map.put("location", downloadEntity.getLocation());
map.put(EntranceUtils.KEY_ENTRANCE, downloadEntity.getEntrance());
map.put(EntranceConsts.KEY_ENTRANCE, downloadEntity.getEntrance());
map.put("installed", downloadEntity.getInstalled());
map.put("network", NetworkUtils.getConnectedType(context));
DataCollectionManager.onEvent(context, "download", map);

View File

@ -1,19 +1,31 @@
package com.gh.common.util;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Application;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.net.Uri;
import android.os.Build;
import android.preference.PreferenceManager;
import android.text.TextUtils;
import android.util.Log;
import com.gh.base.GlobalActivityManager;
import androidx.annotation.RequiresApi;
import com.gh.common.AppExecutor;
import com.gh.common.constant.Constants;
import com.gh.common.exposure.meta.MetaUtil;
import com.gh.gamecenter.BuildConfig;
import com.gh.gamecenter.common.base.activity.BaseActivity;
import com.gh.gamecenter.common.constant.Constants;
import com.gh.gamecenter.common.exposure.meta.MetaUtil;
import com.gh.gamecenter.common.retrofit.BiResponse;
import com.gh.gamecenter.core.AppExecutor;
import com.gh.gamecenter.core.utils.GsonUtils;
import com.gh.gamecenter.core.utils.MtaHelper;
import com.gh.gamecenter.core.utils.SPUtils;
import com.gh.gamecenter.entity.IdCardEntity;
import com.gh.gamecenter.entity.UserInfoEntity;
import com.gh.gamecenter.retrofit.BiResponse;
import com.gh.gamecenter.provider.GhContentProvider;
import com.gh.gamecenter.retrofit.RetrofitManager;
import com.gh.gid.GidCallback;
import com.gh.gid.GidHelper;
@ -24,99 +36,27 @@ import com.lightgame.utils.Utils;
import java.util.HashMap;
import java.util.Map;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
import io.sentry.Sentry;
import io.sentry.android.core.SentryAndroid;
import kotlin.Pair;
/**
* Created by LGT on 2016/6/15.
* 数据收集 工具类 TalkingData、MTA
* 数据收集工具类
*/
public class DataUtils {
/**
* 初始化各种统计工具仅在release build非debug模式启用统计
*
* @param context
* @param channel
*/
public static void init(final Application context, String channel) {
if (CommonDebug.IS_DEBUG) {
return;
}
// 初始化 Sentry 约占用 90ms这里切换到子线程初始化
AppExecutor.getIoExecutor().execute(() -> initSentry(context, channel));
//TalkingData
// try {
// TCAgent.LOG_ON = false;
// TCAgent.init(context, Config.TALKINGDATA_APPID, channel);
// /**
// *
// * 不要启用!!!!不要启用,全部由{@link com.gh.base.AppUncaughtHandler}处理
// */
// TCAgent.setReportUncaughtExceptions(false);
// } catch (Exception e) {
// e.printStackTrace();
// }
//MTA
// try {
// /**
// *
// * 不要启用!!!!全部由{@link com.gh.base.AppUncaughtHandler}处理
// */
// StatConfig.setAutoExceptionCaught(false);
//
// StatCrashReporter crashReporter = StatCrashReporter.getStatCrashReporter(context);
// crashReporter.setJavaCrashHandlerStatus(false);
//// crashReporter.setEnableInstantReporting(true);
//
// StatConfig.setDebugEnable(false);
//
// // 设置数据上报策略
// // 测试渠道的时候即时上传,方便查看日志
// if (Config.DEFAULT_CHANNEL.equals(HaloApp.getInstance().getChannel())) {
// StatConfig.setStatSendStrategy(StatReportStrategy.INSTANT);
// } else {
// StatConfig.setStatSendStrategy(StatReportStrategy.PERIOD);
// StatConfig.setSendPeriodMinutes(5);
// }
//
// // 设置启用Tlink
// StatConfig.setTLinkStatus(true);
//
// StatConfig.init(context);
// StatConfig.setInstallChannel(channel);
// StatConfig.setAntoActivityLifecycleStat(true);
// StatConfig.setAppVersion(PackageUtils.getVersionName());
//
// // 开启收集服务
// StatService.startStatService(context, Config.MTA_APPKEY, com.tencent.stat.common.StatConstants.VERSION);
// StatService.registerActivityLifecycleCallbacks(context);
// } catch (MtaSDkException e) {
// e.printStackTrace();
// }
// init bugly
// try {
// CrashReport.setIsDevelopmentDevice(context, Config.DEFAULT_CHANNEL.equals(channel));
//
// CrashReport.UserStrategy strategy = new CrashReport.UserStrategy(context);
// strategy.setEnableANRCrashMonitor(false);
// strategy.setEnableNativeCrashMonitor(false);
// strategy.setAppChannel(channel);
// strategy.setAppVersion(PackageUtils.getVersionName());
//
// CrashReport.initCrashReport(context, Config.BUGLY_APPID, false, strategy);
//
// } catch (Exception e) {
// e.printStackTrace();
// }
}
private static void initSentry(Context context, String channel) {
@ -129,10 +69,11 @@ public class DataUtils {
} else {
options.setAnrEnabled(false);
}
options.setDebug(BuildConfig.DEBUG);
options.setEnableSessionTracking(true);
options.setEnableAutoSessionTracking(true);
options.setEnvironment(BuildConfig.FLAVOR);
options.setEnableSystemEventBreadcrumbs(false);
options.setDsn("https://6b1caf0d17c1408e8680f3f73ff80bd0@sentry.shanqu.cc/22");
options.setBeforeSend((event, hint) -> {
@ -142,10 +83,21 @@ public class DataUtils {
return event;
}
});
options.setBeforeBreadcrumb(((breadcrumb, hint) -> {
if ("ui.lifecycle".equals(breadcrumb.getCategory()) && "started".equals(breadcrumb.getData("state")) && GlobalActivityManager.INSTANCE.getCurrentActivity() instanceof BaseActivity) {
Pair<String, String> businessId = ((BaseActivity) GlobalActivityManager.INSTANCE.getCurrentActivity()).getBusinessId();
if (businessId != null) {
breadcrumb.setData("businessId1", businessId.component1());
breadcrumb.setData("businessId2", businessId.component2());
}
}
return breadcrumb;
}));
});
Sentry.configureScope(scope -> {
if (BuildConfig.BUILD_TIME != 0L) {
if (com.gh.gamecenter.common.BuildConfig.BUILD_TIME != 0L) {
scope.setTag("alias", "内测版" + BuildConfig.VERSION_NAME);
} else {
scope.setTag("alias", "正式版" + BuildConfig.VERSION_NAME);
@ -154,14 +106,6 @@ public class DataUtils {
});
}
// MTA ->【次数统计】Key-Value参数的事件
public static void onMtaEvent(Context context, String eventId, String... kv) {
// if (CommonDebug.IS_DEBUG && (kv == null || kv.length % 2 != 0)) {
// throw new IllegalStateException("onEvent kv 必须不为空且数量为偶数");
// }
MtaHelper.onEvent(eventId, kv);
}
public static void getGid() {
GidHelper.getInstance().registerDevice(HaloApp.getInstance().getApplication(), new GidCallback() {
@Override
@ -203,113 +147,44 @@ public class DataUtils {
@Override
public void onSuccess(UserInfoEntity data) {
SPUtils.setString(Constants.SP_DEVICE_CERTIFICATION_PREFIX + gid, GsonUtils.toJson(data));
ContentValues values = new ContentValues();
IdCardEntity idCardEntity = data.getIdCard();
if (idCardEntity != null) {
values.put(GhContentProvider.KEY_IS_CERTIFICATED, !TextUtils.isEmpty(data.getIdCard().getId())); // 是否认证
values.put(GhContentProvider.KEY_IS_ADULT,
data.getIdCard().getMinor() == null
|| !data.getIdCard().getMinor()
);
} else {
values.put(GhContentProvider.KEY_IS_CERTIFICATED, false);
values.put(GhContentProvider.KEY_IS_ADULT, false);
}
// new GhContentProvider().localInsert( HaloApp.getInstance().getApplication(),values);
HaloApp.getInstance().getContentResolver().insert(Uri.parse("content://com.gh.gamecenter.provider/certification"), values);
}
});
}
public static void onEvent(Context var0, String var1, String var2) {
// Properties prop = new Properties();
// prop.setProperty(var1, var2);
// StatService.trackCustomKVEvent(var0, var1, prop);
}
/**
* 下次应用启动再上报
*
* @param context
* @param throwable
*/
public static void reportException(Context context, Throwable throwable) {
public static void onPause(Activity var0) {
// StatService.onPause(var0);
}
CommonDebug.logMethodWithParams(context, "ERRMSG", throwable);
public static void onResume(Activity var0) {
// StatService.onResume(var0);
}
// 游戏启动
public static void onGameLaunchEvent(Context context, String gameName, String platform, String page) {
Map<String, Object> kv = new HashMap<>();
kv.put("版本", platform);
kv.put("页面", page);
onEvent(context, "游戏启动", gameName, kv);
}
public static void onEvent(Context var0, String var1, String var2, Map<String, Object> var3) {
// Properties prop = new Properties();
// prop.setProperty("label", var2);
// for (String key : var3.keySet()) {
// prop.setProperty(key, var3.get(key) + "");
// }
// StatService.trackCustomKVEvent(var0, var1, prop);
}
public static void trackTimeEvent(Context context, String eventId, int costTime, String... kv) {
//
// Properties prop = new Properties();
// for (int i = 0; i < kv.length; i++) {
// if (i % 2 != 0 || i != 0) {
// String key = kv[i - 1];
// String value = kv[i];
// if (!TextUtils.isEmpty(key) && !TextUtils.isEmpty(value)) {
// prop.setProperty(key, value);
// }
// }
// }
//
// if (prop.size() == 0) return;
//
// StatService.trackCustomKVTimeIntervalEvent(context, costTime, eventId, prop);
}
// 游戏下载
public static void onGameDownloadEvent(Context context, String gameName, String platform, String entrance, String status, String method) {
Map<String, Object> kv = new HashMap<>();
platform = PlatformUtils.getInstance(HaloApp.getInstance().getApplication()).getPlatformName(platform);
kv.put("版本", platform);
kv.put("用户机型", Build.MODEL);
kv.put("设备JNFJ", MetaUtil.getBase64EncodedIMEI());
kv.put("网络状态", DeviceUtils.getNetwork(HaloApp.getInstance().getApplication()));
kv.put("光环助手版本", BuildConfig.VERSION_NAME);
kv.put("位置", entrance);
kv.put("类型", method);
kv.put("厂商", Build.MANUFACTURER);
kv.put("Android版本", Build.VERSION.RELEASE);
onEvent(context, "游戏下载", gameName, kv);
Map<String, Object> kv2 = new HashMap<>();
kv2.put("状态", status);
kv2.put("位置", entrance);
if (status.equals("开始")) {
kv2.put("版本", entrance + "-开始");
kv2.put("游戏分平台", gameName + "-" + platform + "-开始");
kv2.put("光环助手版本", BuildConfig.VERSION_NAME + "-开始");
} else {
kv2.put("版本", platform);
kv2.put("游戏分平台", gameName + "-" + platform);
kv2.put("光环助手版本", BuildConfig.VERSION_NAME);
}
onEvent(context, "游戏下载位置", gameName, kv2);
}
// 游戏更新
public static void onGameUpdateEvent(Context context, String gameName, String paltform, String status) {
Map<String, Object> kv = new HashMap<>();
kv.put("版本", paltform);
kv.put("状态", status);
onEvent(context, "游戏更新", gameName, kv);
}
public static void onError(Context context, Throwable throwable) {
//bugly 作为默认处理异常的类库,已经上报了,此处不重复上报
// 上传错误数据
try {
// CrashReport.postCatchedException(throwable);
DataCollectionUtils.uploadError(context, Log.getStackTraceString(throwable));
} catch (Exception e) {
e.printStackTrace();
}
//talkingdata
try {
// TCAgent.onError(context, throwable);
} catch (Exception e) {
}
}
}

View File

@ -4,7 +4,8 @@ import android.text.TextUtils;
import android.view.View;
import com.gh.common.constant.Config;
import com.gh.common.constant.Constants;
import com.gh.common.filter.RegionSetting;
import com.gh.common.filter.RegionSettingHelper;
import com.gh.common.repository.ReservationRepository;
import com.gh.common.simulator.SimulatorGameManager;
import com.gh.common.view.DownloadProgressBar;
@ -13,9 +14,12 @@ import com.gh.common.xapk.XapkUnzipStatus;
import com.gh.download.DownloadManager;
import com.gh.gamecenter.R;
import com.gh.gamecenter.adapter.viewholder.DetailViewHolder;
import com.gh.gamecenter.common.constant.Constants;
import com.gh.gamecenter.core.utils.SPUtils;
import com.gh.gamecenter.entity.LinkEntity;
import com.gh.gamecenter.entity.PluginLocation;
import com.gh.gamecenter.manager.PackagesManager;
import com.gh.vspace.VHelper;
import com.lightgame.download.DownloadEntity;
/**
@ -27,6 +31,9 @@ public class DetailDownloadUtils {
public static void detailInitDownload(DetailViewHolder viewHolder, boolean isCheck) {
String downloadAddWord = viewHolder.gameEntity.getDownloadAddWord();
if (viewHolder.getOverlayTv() != null) {
viewHolder.getOverlayTv().setVisibility(View.GONE);
}
if (viewHolder.gameEntity != null
&& Config.isShowDownload(viewHolder.gameEntity.getId())
@ -43,9 +50,14 @@ public class DetailDownloadUtils {
return;
}
if (viewHolder.gameEntity.isSpecialDownload()) {
viewHolder.mDownloadPb.setText("查看下载资源");
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.SPECIAL_DOWNLOAD);
return;
}
if (viewHolder.gameEntity.isReservable()) {
if (!ReservationRepository.thisGameHasBeenReserved(viewHolder.gameEntity.getId())) {
if (TextUtils.isEmpty(downloadAddWord)) {
viewHolder.mDownloadPb.setText(String.format("预约" + "《%s》", viewHolder.gameEntity.getName()));
} else {
@ -59,6 +71,54 @@ public class DetailDownloadUtils {
return;
}
final RegionSetting.GameH5Download gameH5Download = RegionSettingHelper.getGameH5DownloadByGameId(viewHolder.gameEntity.getId());
if (gameH5Download != null) {
viewHolder.mDownloadPb.setText(TextUtils.isEmpty(viewHolder.gameEntity.getDownloadOffText()) ? "查看详情" : viewHolder.gameEntity.getDownloadOffText());
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.NORMAL);
return;
}
if (viewHolder.gameEntity.isVGame() && !viewHolder.gameEntity.getApk().isEmpty()) {
String status = GameUtils.getDownloadBtnText(viewHolder.context, viewHolder.gameEntity, PluginLocation.only_game);
if (viewHolder.context.getString(R.string.launch).equals(status)) {
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.LAUNCH_OR_OPEN);
} else if (viewHolder.context.getString(R.string.install).equals(status)) {
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.INSTALL_NORMAL);
} else {
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.NORMAL);
}
String downloadText;
if (viewHolder.context.getString(R.string.launch).equals(status) || viewHolder.context.getString(R.string.install).equals(status) || viewHolder.context.getString(R.string.download).equals(status)) {
downloadText = "";
if (viewHolder.getOverlayTv() != null) {
viewHolder.getOverlayTv().setVisibility(View.VISIBLE);
}
} else if (viewHolder.context.getString(R.string.attempt).equals(status)) {
downloadText = status + getDownloadSizeText(viewHolder);
} else {
downloadText = status + (TextUtils.isEmpty(downloadAddWord) ? "" : downloadAddWord) + getDownloadSizeText(viewHolder);
}
viewHolder.mDownloadPb.setText(downloadText);
DownloadEntity downloadEntity = DownloadManager.getInstance().getDownloadEntitySnapshot(viewHolder.gameEntity);
// 在下载管理找不到下载实体,到畅玩数据库里找
if (downloadEntity == null && viewHolder.gameEntity.isVGame()) {
String packageName = viewHolder.gameEntity.getUniquePackageName();
if (!TextUtils.isEmpty(packageName)) {
downloadEntity = VHelper.getDownloadEntitySnapshot(viewHolder.gameEntity.getId(), packageName);
}
}
if (downloadEntity != null) {
viewHolder.downloadEntity = downloadEntity;
detailInvalidate(viewHolder);
}
return;
}
if (viewHolder.gameEntity.getApk().isEmpty() || viewHolder.gameEntity.getDownloadOffStatus() != null) {
LinkEntity h5LinkEntity = viewHolder.gameEntity.getH5Link();
@ -113,9 +173,18 @@ public class DetailDownloadUtils {
viewHolder.mDownloadPb.setText("选择下载你的版本" + (TextUtils.isEmpty(downloadAddWord) ? "" : "-" + downloadAddWord) + " >");
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.NORMAL);
}
if (isCheck && viewHolder.gameEntity.getApk().size() == 1) {
String url = viewHolder.gameEntity.getApk().get(0).getUrl();
DownloadEntity downloadEntity = DownloadManager.getInstance().getDownloadEntityByUrl(url);
DownloadEntity downloadEntity = DownloadManager.getInstance().getDownloadEntitySnapshot(viewHolder.gameEntity);
// 在下载管理找不到下载实体,到畅玩数据库里找
if (downloadEntity == null && viewHolder.gameEntity.isVGame()) {
String packageName = viewHolder.gameEntity.getUniquePackageName();
if (!TextUtils.isEmpty(packageName)) {
downloadEntity = VHelper.getDownloadEntitySnapshot(viewHolder.gameEntity.getId(), packageName);
}
}
if (downloadEntity != null) {
viewHolder.downloadEntity = downloadEntity;
detailInvalidate(viewHolder);
@ -140,6 +209,15 @@ public class DetailDownloadUtils {
}
viewHolder.mDownloadPb.setProgress((int) (viewHolder.downloadEntity.getPercent() * 10));
if (viewHolder.getOverlayTv() != null) {
viewHolder.getOverlayTv().setVisibility(View.GONE);
}
if (viewHolder.gameEntity.isVGame()) {
updateVStyleButton(viewHolder);
return;
}
switch (downloadEntity.getStatus()) {
case downloading:
case pause:
@ -180,6 +258,19 @@ public class DetailDownloadUtils {
}
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.INSTALL_NORMAL);
}
} else if (viewHolder.gameEntity.isVGame()) {
if (!viewHolder.mDownloadPb.getText().contains("更新")) {
if (VHelper.isInstalled(downloadEntity.getPackageName())) {
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.LAUNCH_OR_OPEN);
} else {
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.INSTALL_NORMAL);
}
viewHolder.mDownloadPb.setText("");
if (viewHolder.getOverlayTv() != null) {
viewHolder.getOverlayTv().setVisibility(View.VISIBLE);
}
}
} else {
if (SPUtils.getBoolean(Constants.SP_USE_BROWSER_TO_INSTALL)) {
viewHolder.mDownloadPb.setText(R.string.browser_install_install);
@ -201,10 +292,48 @@ public class DetailDownloadUtils {
case uncertificated:
case unqualified:
case unavailable:
case banned:
detailInitDownload(viewHolder, false);
break;
default:
break;
}
}
private static void updateVStyleButton(DetailViewHolder viewHolder) {
switch (viewHolder.downloadEntity.getStatus()) {
case downloading:
case overflow:
viewHolder.mDownloadPb.setText("游戏加载中 " + viewHolder.downloadEntity.getPercent() + "%");
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.DOWNLOADING_NORMAL);
break;
case timeout:
case neterror:
case waiting:
case subscribe:
viewHolder.mDownloadPb.setText(R.string.waiting);
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.DOWNLOADING_NORMAL);
break;
case pause:
viewHolder.mDownloadPb.setText("继续加载 " + viewHolder.downloadEntity.getPercent() + "%");
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.DOWNLOADING_NORMAL);
break;
case done:
if (!viewHolder.mDownloadPb.getText().contains("更新")) {
if (VHelper.isInstalled(viewHolder.downloadEntity.getPackageName())) {
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.LAUNCH_OR_OPEN);
} else {
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.INSTALL_NORMAL);
}
viewHolder.mDownloadPb.setText("");
if (viewHolder.getOverlayTv() != null) {
viewHolder.getOverlayTv().setVisibility(View.VISIBLE);
}
}
break;
default:
break;
}
}
}

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