Commit 6754791a authored by mengcuiguang2's avatar mengcuiguang2

代码优化

parent 81a05d9b
......@@ -10,8 +10,8 @@ android {
applicationId "com.duben.shortplay"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 4
versionName "1.0.3"
versionCode 5
versionName "1.0.4"
flavorDimensions "default"
// dex突破65535的限制
......
......@@ -216,9 +216,9 @@ class DeviceInfo private constructor() {
return imei
}
val userAgent: String?
val userAgent: String
get() {
var userAgent: String? = ""
var userAgent: String = ""
try {
userAgent = System.getProperty("http.agent")
} catch (e: Exception) {
......
......@@ -199,6 +199,7 @@ class HomePresenter : BasePresenter<HomeView>() {
vo["model"] = deviceInfo.newModel
vo["uuid"] = DeviceUuidFactory().deviceUuid
vo["osversion"] = deviceInfo.oSVersion
vo["userAgent"] = deviceInfo.userAgent
vo["appversion"] = deviceInfo.versionName
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
......
......@@ -162,7 +162,7 @@ class LoginPresenter : BasePresenter<LoginView>() {
vo["uuid"] = DeviceUuidFactory().deviceUuid
vo["osversion"] = deviceInfo.oSVersion
vo["appversion"] = deviceInfo.versionName
vo["userAgent"] = deviceInfo.userAgent
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
object : BaseSubscriber<BaseResponse<Any>>() {
......
......@@ -66,6 +66,7 @@ class MyPresenter : BasePresenter<MyView>() {
vo["uuid"] = DeviceUuidFactory().deviceUuid
vo["osversion"] = deviceInfo.oSVersion
vo["appversion"] = deviceInfo.versionName
vo["userAgent"] = deviceInfo.userAgent
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
object : BaseSubscriber<BaseResponse<Any>>() {
......
......@@ -91,6 +91,7 @@ public class TrackPresenter extends BaseTrackPresenter {
vo.put("appversion", deviceInfo.getVersionName());
vo.put("oaid", MintsApplication.OAID);
vo.put("imei", deviceInfo.getIMEI());
vo.put("userAgent", deviceInfo.getUserAgent());
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
new BaseSubscriber<BaseResponse<Object>>() {
......
......@@ -104,6 +104,7 @@ class VipPresenter : BasePresenter<VipView>() {
vo["uuid"] = DeviceUuidFactory().deviceUuid
vo["osversion"] = deviceInfo.oSVersion
vo["appversion"] = deviceInfo.versionName
vo["userAgent"] = deviceInfo.userAgent
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
object : BaseSubscriber<BaseResponse<Any>>() {
......
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