Commit a1c9a63b by 刘鹏

Merge branch 'fix/lp/lp_4.4.08_deviceid' into 'd/v4.4.08'

Fix/lp/lp 4.4.08 deviceid

See merge request app_android_lib/YDL-Component!329
parents ea54734e a3214a6e
...@@ -14,7 +14,7 @@ buildscript { ...@@ -14,7 +14,7 @@ buildscript {
ydlrouter_version = '1.2.3' ydlrouter_version = '1.2.3'
constrait_support_version = '1.0.2' constrait_support_version = '1.0.2'
componentVersion = "0.3.0.40" componentVersion = "0.3.0.40-SNAPSHOT"
} }
repositories { repositories {
mavenCentral() mavenCentral()
......
...@@ -164,7 +164,7 @@ ext { ...@@ -164,7 +164,7 @@ ext {
"blankUtil" : "com.blankj:utilcode:1.25.9", "blankUtil" : "com.blankj:utilcode:1.25.9",
"ydl-hnet" : "com.ydl:h-net:0.0.8", "ydl-hnet" : "com.ydl:h-net:0.0.8",
"ydl-user-router" : "com.ydl:router:1.0.0-SNAPSHOT@aar", "ydl-user-router" : "com.ydl:router:1.0.0-SNAPSHOT@aar",
"ydl-device" : "com.ydl:device-id:0.0.31", "ydl-device" : "com.ydl:device-id:0.0.34",
//flutter功能组件升级===>发布ydl-flutter组件===>引用flutter相关的业务模块 //flutter功能组件升级===>发布ydl-flutter组件===>引用flutter相关的业务模块
"ydl-flutter" : "com.ydl:ydl-flutter:0.0.57@aar", //flutter aar "ydl-flutter" : "com.ydl:ydl-flutter:0.0.57@aar", //flutter aar
// "ydl-flutter-sp" : "com.ydl:ydl-flutter-sp:0.0.2@aar", //flutter 缓存 aar // "ydl-flutter-sp" : "com.ydl:ydl-flutter-sp:0.0.2@aar", //flutter 缓存 aar
......
...@@ -4,7 +4,6 @@ import android.annotation.SuppressLint ...@@ -4,7 +4,6 @@ import android.annotation.SuppressLint
import android.app.Application import android.app.Application
import android.os.Build import android.os.Build
import com.alibaba.android.arouter.launcher.ARouter import com.alibaba.android.arouter.launcher.ARouter
import com.bun.miitmdid.core.JLibrary
import com.tencent.mmkv.MMKV import com.tencent.mmkv.MMKV
import com.ydl.ydlcommon.base.BaseApp import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.data.http.UpLoadLogUtils import com.ydl.ydlcommon.data.http.UpLoadLogUtils
...@@ -28,7 +27,7 @@ object YdlRepository { ...@@ -28,7 +27,7 @@ object YdlRepository {
// 需要在主 module 的 application 的 onCreate 方法中调用此方法 // 需要在主 module 的 application 的 onCreate 方法中调用此方法
fun initApp(app: Application,isDebug:Boolean) { fun initApp(app: Application,isDebug:Boolean) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
JLibrary.InitEntry(app) System.loadLibrary("msaoaidsec")
} }
MMKV.initialize(app); MMKV.initialize(app);
LogHelper.getInstance().deleteExpireLogSync() LogHelper.getInstance().deleteExpireLogSync()
......
...@@ -11,14 +11,12 @@ import android.text.TextUtils ...@@ -11,14 +11,12 @@ import android.text.TextUtils
import android.util.Log import android.util.Log
import com.google.gson.Gson import com.google.gson.Gson
import com.ydl.devicesidlib.DeviceIDHelper import com.ydl.devicesidlib.DeviceIDHelper
import com.ydl.devicesidlib.Utils
import com.ydl.ydlcommon.base.BaseApp import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.data.http.api.ApiRequestUtil import com.ydl.ydlcommon.data.http.api.ApiRequestUtil
import com.ydl.ydlcommon.data.http.params.ActionDataBean import com.ydl.ydlcommon.data.http.params.ActionDataBean
import com.ydl.ydlcommon.data.http.params.BaiduActionDataBean import com.ydl.ydlcommon.data.http.params.BaiduActionDataBean
import com.ydl.ydlcommon.modular.ModularServiceManager import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.router.YdlCommonOut import com.ydl.ydlcommon.router.YdlCommonOut
import com.ydl.ydlcommon.utils.ActivityManager
import com.ydl.ydlcommon.utils.DeviceTool import com.ydl.ydlcommon.utils.DeviceTool
import com.yidianling.common.tools.LogUtil import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxDeviceTool import com.yidianling.common.tools.RxDeviceTool
...@@ -151,15 +149,8 @@ class ActionCountUtils { ...@@ -151,15 +149,8 @@ class ActionCountUtils {
* 第一次安装获取失败,第二次打开就能成功 * 第一次安装获取失败,第二次打开就能成功
* 所以Utils.getIMEI(topTaskActivity)传入activity解决这个问题 * 所以Utils.getIMEI(topTaskActivity)传入activity解决这个问题
* */ * */
if (DeviceTool.checkHasAgreeSecret()){ if (DeviceTool.checkHasAgreeSecret()) {
deviceId = if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.P) { deviceId = DeviceIDHelper.getInstance().deviceId
val topTaskActivity = ActivityManager.getInstance().getTopTaskActivity()
//获取imei
Utils.getIMEI(topTaskActivity)
} else {
//android Q及以上取oaid
DeviceIDHelper.getInstance().deviceId
}
} }
actionDataParams.deviceId(deviceId) actionDataParams.deviceId(deviceId)
...@@ -271,14 +262,7 @@ class ActionCountUtils { ...@@ -271,14 +262,7 @@ class ActionCountUtils {
* */ * */
if (DeviceTool.checkHasAgreeSecret()) { if (DeviceTool.checkHasAgreeSecret()) {
deviceId = if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.P) { deviceId = DeviceIDHelper.getInstance().deviceId
val topTaskActivity = ActivityManager.getInstance().getTopTaskActivity()
//获取imei
Utils.getIMEI(topTaskActivity)
} else {
//android Q及以上取oaid
DeviceIDHelper.getInstance().deviceId
}
} }
//外部参数添加deviceid //外部参数添加deviceid
actionDataParams.deviceId(deviceId) actionDataParams.deviceId(deviceId)
...@@ -355,18 +339,11 @@ class ActionCountUtils { ...@@ -355,18 +339,11 @@ class ActionCountUtils {
actionDataParams.api = api actionDataParams.api = api
actionDataParams.appVersion(RxDeviceTool.getAppVersionName(BaseApp.getApp())) actionDataParams.appVersion(RxDeviceTool.getAppVersionName(BaseApp.getApp()))
var deviceId = "" var deviceId = ""
if (DeviceTool.checkHasAgreeSecret()){ if (DeviceTool.checkHasAgreeSecret()) {
deviceId = if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.P) { deviceId = DeviceIDHelper.getInstance().deviceId
val topTaskActivity = ActivityManager.getInstance().getTopTaskActivity()
//获取imei
Utils.getIMEI(topTaskActivity)
} else {
//android Q及以上取oaid
DeviceIDHelper.getInstance().deviceId
}
} }
actionDataParams.deviceId=deviceId actionDataParams.deviceId = deviceId
actionDataParams.time(System.currentTimeMillis()) actionDataParams.time(System.currentTimeMillis())
actionDataParams.appId(appId) actionDataParams.appId(appId)
...@@ -406,14 +383,7 @@ class ActionCountUtils { ...@@ -406,14 +383,7 @@ class ActionCountUtils {
actionDataParams.appVersion(RxDeviceTool.getAppVersionName(BaseApp.getApp())) actionDataParams.appVersion(RxDeviceTool.getAppVersionName(BaseApp.getApp()))
var deviceId = "" var deviceId = ""
if (DeviceTool.checkHasAgreeSecret()) { if (DeviceTool.checkHasAgreeSecret()) {
deviceId = if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.P) { deviceId = DeviceIDHelper.getInstance().deviceId
val topTaskActivity = ActivityManager.getInstance().getTopTaskActivity()
//获取imei
Utils.getIMEI(topTaskActivity)
} else {
//android Q及以上取oaid
DeviceIDHelper.getInstance().deviceId
}
} }
actionDataParams.deviceId = deviceId actionDataParams.deviceId = deviceId
......
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