This commit is contained in:
@ -194,7 +194,7 @@ public class DataUtils {
|
||||
* 获取应用 gid 绑定的实名信息
|
||||
*/
|
||||
@SuppressLint("CheckResult")
|
||||
private static void getDeviceCertification(String gid) {
|
||||
public static void getDeviceCertification(String gid) {
|
||||
RetrofitManager.getInstance(HaloApp.getInstance())
|
||||
.getApi()
|
||||
.getCertification()
|
||||
|
||||
@ -60,7 +60,6 @@ import com.gh.gamecenter.servers.GameServersActivity
|
||||
import com.gh.gamecenter.subject.SubjectActivity
|
||||
import com.gh.gamecenter.suggest.SuggestType
|
||||
import com.gh.gamecenter.tag.TagsActivity
|
||||
import com.gh.gamecenter.user.UserViewModel
|
||||
import com.gh.gamecenter.video.data.VideoDataActivity
|
||||
import com.gh.gamecenter.video.detail.VideoDetailActivity
|
||||
import com.gh.gamecenter.video.detail.VideoDetailContainerViewModel
|
||||
|
||||
@ -3,7 +3,6 @@ package com.gh.common.util
|
||||
import android.os.Build
|
||||
import android.preference.PreferenceManager
|
||||
import com.gh.base.BaseActivity
|
||||
import com.gh.base.CurrentActivityHolder
|
||||
import com.gh.common.constant.Constants
|
||||
import com.gh.common.exposure.ExposureUtils
|
||||
import com.gh.common.exposure.meta.MetaUtil
|
||||
@ -23,7 +22,6 @@ import com.gh.gamecenter.retrofit.Response
|
||||
import com.gh.gamecenter.retrofit.RetrofitManager
|
||||
import com.gh.gamecenter.setting.GameDownloadSettingFragment.Companion.AUTO_INSTALL_SP_KEY
|
||||
import com.gh.gamecenter.suggest.SuggestType
|
||||
import com.gh.gamecenter.user.UserViewModel
|
||||
import com.halo.assistant.HaloApp
|
||||
import com.lightgame.download.DataWatcher
|
||||
import com.lightgame.download.DownloadEntity
|
||||
|
||||
@ -133,10 +133,10 @@ object ErrorHelper {
|
||||
403022 -> Utils.toast(context, "不能回复自己")
|
||||
403056 -> Utils.toast(context, "发布失败,字数已达上限")
|
||||
403111 -> Utils.toast(context, "提交失败,评论违规")
|
||||
403119 -> Utils.toast(context, "不能重复修改实名")
|
||||
400001 -> Utils.toast(context, "字数超过500或者未填写原因")
|
||||
403102 -> Utils.toast(context, "你已经举报过该内容了哦")
|
||||
403115 -> Utils.toast(context, "请求太频繁了,稍微休息一下")
|
||||
403119 -> Utils.toast(context, "不能重复修改实名")
|
||||
|
||||
403020 -> if (showHighPriorityHint) {
|
||||
DialogHelper.showDialog(
|
||||
|
||||
@ -133,76 +133,6 @@ object NewLogUtils {
|
||||
log(json, "event", false)
|
||||
}
|
||||
|
||||
// 触发实名认证
|
||||
fun logCertificationTrigger(gameId: String, gameName: String) {
|
||||
val json = json {
|
||||
"event" to "verification_trigger"
|
||||
"game_id" to gameId
|
||||
"game_name" to gameName
|
||||
"timestamp" to System.currentTimeMillis() / 1000
|
||||
parseAndPutMeta().invoke(this)
|
||||
}
|
||||
log(json, "event", false)
|
||||
}
|
||||
|
||||
// 触发实名认证的来源 (下载触发或用户手动触发)
|
||||
fun logCertificationTriggerType(isForced: Boolean) {
|
||||
val json = json {
|
||||
"event" to "verification_page"
|
||||
"trigger" to if (isForced) "实名认证流程" else ""
|
||||
"timestamp" to System.currentTimeMillis() / 1000
|
||||
parseAndPutMeta().invoke(this)
|
||||
}
|
||||
log(json, "event", false)
|
||||
}
|
||||
|
||||
/**
|
||||
* 记录实名认证结果
|
||||
* @param result 0 失败, 1 成功但未成年 2 成功且成年
|
||||
*/
|
||||
fun logCertificationResult(isForced: Boolean, result: Int) {
|
||||
val json = json {
|
||||
"event" to "verification_finished"
|
||||
"trigger" to if (isForced) "实名认证流程" else ""
|
||||
"result" to result
|
||||
"timestamp" to System.currentTimeMillis() / 1000
|
||||
parseAndPutMeta().invoke(this)
|
||||
}
|
||||
log(json, "event", false)
|
||||
}
|
||||
|
||||
// 实名弹窗弹出(含前往实名认证选项)
|
||||
fun logCertificationHintDialogAppearance() {
|
||||
val json = json {
|
||||
"event" to "verification_pop_a_show"
|
||||
"timestamp" to System.currentTimeMillis() / 1000
|
||||
parseAndPutMeta().invoke(this)
|
||||
}
|
||||
log(json, "event", false)
|
||||
}
|
||||
|
||||
// 实名弹窗(含前往实名认证选项) 选项点击
|
||||
fun logCertificationHintDialogOptionsClicked(text: String) {
|
||||
val json = json {
|
||||
"event" to "verification_pop_a_click"
|
||||
"timestamp" to System.currentTimeMillis() / 1000
|
||||
"button" to text
|
||||
parseAndPutMeta().invoke(this)
|
||||
}
|
||||
log(json, "event", false)
|
||||
}
|
||||
|
||||
// 实名弹窗弹出(不含前往实名认证选项)
|
||||
fun logCertificationHintDialogTrigger(isForced: Boolean) {
|
||||
val json = json {
|
||||
"event" to "verification_pop_b_show"
|
||||
"timestamp" to System.currentTimeMillis() / 1000
|
||||
"trigger" to if (isForced) "实名认证流程" else ""
|
||||
parseAndPutMeta().invoke(this)
|
||||
}
|
||||
log(json, "event", false)
|
||||
}
|
||||
|
||||
// 游戏详情点击顶部标签
|
||||
fun logGameDetailTagClick(gameId: String, gameName: String, tagId: String, tagName: String) {
|
||||
val json = json {
|
||||
|
||||
@ -94,12 +94,12 @@ object PackageInstaller {
|
||||
DownloadManager.getInstance(app).allDownloadEntity.firstOrNull {
|
||||
it.path == pkgPath
|
||||
}
|
||||
if (downloadEntity != null) {
|
||||
showCertificateDialogIfNeededBeforeInstall(app, downloadEntity, pkgPath)
|
||||
} else {
|
||||
// if (downloadEntity != null) {
|
||||
// showCertificateDialogIfNeededBeforeInstall(app, downloadEntity, pkgPath)
|
||||
// } else {
|
||||
val installIntent = getInstallIntent(context, pkgPath)
|
||||
context.startActivity(installIntent)
|
||||
}
|
||||
// }
|
||||
} else {
|
||||
if (isPluggin) {
|
||||
DialogHelper.showPluginDialog(context) {
|
||||
|
||||
@ -27,6 +27,7 @@ import com.gh.common.util.DialogUtils;
|
||||
import com.gh.common.util.ExtensionsKt;
|
||||
import com.gh.common.util.GsonUtils;
|
||||
import com.gh.common.util.HomePluggableHelper;
|
||||
import com.gh.common.util.LunchType;
|
||||
import com.gh.common.util.NetworkUtils;
|
||||
import com.gh.common.util.PackageInstaller;
|
||||
import com.gh.common.util.PackageUtils;
|
||||
@ -1125,6 +1126,13 @@ public class DownloadManager implements DownloadStatusListener {
|
||||
* 更新下载请求头的相关信息
|
||||
*/
|
||||
public static void updateDownloadMetaMap() {
|
||||
String isOverwrite;
|
||||
if (LunchType.UPDATE.name().equals(SPUtils.getString(Constants.SP_INSTALL_TYPE))) {
|
||||
isOverwrite = "true";
|
||||
} else {
|
||||
isOverwrite = "false";
|
||||
}
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put(HttpDnsManager.APP_VERSION, BuildConfig.VERSION_NAME);
|
||||
map.put(HttpDnsManager.CHANNEL, HaloApp.getInstance().getChannel());
|
||||
@ -1133,6 +1141,7 @@ public class DownloadManager implements DownloadStatusListener {
|
||||
map.put(HttpDnsManager.USER_ID, UserManager.getInstance().getUserId());
|
||||
map.put(HttpDnsManager.IMEI, MetaUtil.getBase64EncodedIMEI());
|
||||
map.put(HttpDnsManager.TOKEN, UserManager.getInstance().getToken());
|
||||
map.put(HttpDnsManager.IS_OVERWRITE, isOverwrite);
|
||||
|
||||
HttpDnsManager.metaMap = map;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user