|
@@ -443,7 +443,6 @@ class MainActivity : BaseActivity<MainViewModel, ActivityMainBinding>(),Download
|
443
|
443
|
}
|
444
|
444
|
|
445
|
445
|
viewModel.viewModelScope.launch {
|
446
|
|
-
|
447
|
446
|
viewModel.netWhiteListData.collect {
|
448
|
447
|
it?.let {
|
449
|
448
|
StrategyUtils.setNetWhiteList(it)
|
|
@@ -1075,7 +1074,9 @@ class MainActivity : BaseActivity<MainViewModel, ActivityMainBinding>(),Download
|
1075
|
1074
|
location.address=addrStr
|
1076
|
1075
|
try {
|
1077
|
1076
|
val lastLocation = PadLocationConst.lastLocation
|
1078
|
|
- if (location.lat!=null&&location.lon!=null&&(lastLocation.lon!=location.lon&&lastLocation.lat!=location.lat)&&!addrStr.isNullOrBlank()){
|
|
1077
|
+ //经纬度变动,并且上次传值时间超过一分钟才能再次发送定位。
|
|
1078
|
+ if (location.lat!=null&&location.lon!=null&&(lastLocation.lon!=location.lon&&lastLocation.lat!=location.lat)&&!addrStr.isNullOrBlank()&&System.currentTimeMillis()-PadLocationConst.lastTimeLong>1000*60){
|
|
1079
|
+ PadLocationConst.lastTimeLong=System.currentTimeMillis()
|
1079
|
1080
|
lastLocation.lat=location.lat
|
1080
|
1081
|
lastLocation.lon=location.lon
|
1081
|
1082
|
ManageApplication.getDeviceInfo()?.let {
|