Commit 6754791a authored by mengcuiguang2's avatar mengcuiguang2

代码优化

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