Commit 2e1fc10a by 刘鹏

Merge branch 'feat/yk/adver_pop' into 'd/v4.4.08'

Feat/yk/adver pop

See merge request app_android_lib/YDL-Component!340
parents 5afb5b4e cb71585c
......@@ -2,8 +2,11 @@ package com.ydl.ydlcommon.base.config
import android.annotation.SuppressLint
import android.content.Context
import android.os.Build
import android.text.TextUtils
import com.google.gson.Gson
import com.ydl.devicesidlib.DeviceIDHelper
import com.ydl.devicesidlib.Utils
import com.ydl.ydlcommon.app.Apm
import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.bean.AuthBean
......@@ -15,6 +18,7 @@ import com.ydl.ydlcommon.data.http.GsonProvider
import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.data.http.api.ApiRequestUtil
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.utils.DeviceTool
import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
......@@ -53,6 +57,7 @@ class HttpConfig {
private const val YDL = "Ydl"
private const val UID = "uid"
private const val FFROM = "ffrom"
private const val FID = "fid"
private const val IS_FROM_APP = "isFromApp"
private const val OS_BUILD = "osBuild"
private const val TS = "ts"
......@@ -470,6 +475,17 @@ class HttpConfig {
builder.addHeader(TOKEN, loginBean.token)
.addHeader(UID, loginBean.userId)
}
// 请求头添加fid参数
if (DeviceTool.checkHasAgreeSecret()) {
val deviceId = if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.P) {
//获取imei
Utils.getIMEI(BaseApp.getApp())
} else {
//android Q及以上取oaid
DeviceIDHelper.getInstance().deviceId
}
builder.addHeader(FID, deviceId)
}
it.proceed(builder.build())
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment