fix#修改接口调用逻辑
This commit is contained in:
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.provider.Settings;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
@@ -162,9 +163,9 @@ public class V2XModuleProvider implements
|
||||
FatigueDrivingUtils.refreshAccOnTime();
|
||||
// 刷新配置文件
|
||||
refreshStrategyConfig();
|
||||
if (V2XServiceManager.getMoGoStatusManager().isMainPageOnResume()) {
|
||||
V2XServiceManager.getV2XRefreshModel().queryRoadData(Utils.getSn());
|
||||
}
|
||||
// if (V2XServiceManager.getMoGoStatusManager().isMainPageOnResume()) {
|
||||
// V2XServiceManager.getV2XRefreshModel().queryRoadData(Utils.getSn());
|
||||
// }
|
||||
} else {
|
||||
// 记录关机时间
|
||||
SharedPrefsMgr.getInstance(V2XUtils.getApp())
|
||||
@@ -320,12 +321,14 @@ public class V2XModuleProvider implements
|
||||
SharedPrefsMgr.getInstance(V2XUtils.getApp()).putBoolean("descriptor_" + descriptor, isTrue);
|
||||
if (descriptor == StatusDescriptor.ACC_STATUS) {
|
||||
if (isTrue) {
|
||||
// if (V2XServiceManager.getMoGoStatusManager().isMainPageOnResume()) {
|
||||
V2XServiceManager.getV2XRefreshModel().queryRoadData(Utils.getSn());
|
||||
// }
|
||||
|
||||
// 记录开机时间
|
||||
FatigueDrivingUtils.refreshAccOnTime();
|
||||
initCarForHelpStatus();
|
||||
if (V2XServiceManager.getMoGoStatusManager().isMainPageOnResume()) {
|
||||
V2XServiceManager.getV2XRefreshModel().queryRoadData(Utils.getSn());
|
||||
}
|
||||
|
||||
} else {
|
||||
// 记录关机时间
|
||||
SharedPrefsMgr.getInstance(V2XUtils.getApp())
|
||||
|
||||
@@ -677,6 +677,7 @@ public class V2XRefreshModel {
|
||||
|
||||
|
||||
public void queryRoadData(String sn) {
|
||||
Logger.d("V2XRefreshModel:", "sn:"+sn);
|
||||
if (mV2XApiService != null) {
|
||||
Map<String, Object> map = new ParamsProvider.Builder(mContext).build();
|
||||
map.put("sn", sn);
|
||||
@@ -692,8 +693,10 @@ public class V2XRefreshModel {
|
||||
|| v2XRoadDataRes.getResult() == null
|
||||
|| v2XRoadDataRes.getResult().getTopPoint() == null
|
||||
|| v2XRoadDataRes.getResult().getTopPoint().isEmpty()) {
|
||||
Logger.d("V2XRefreshModel:", "接口没有数据");
|
||||
return;
|
||||
}
|
||||
Logger.d("V2XRefreshModel:", v2XRoadDataRes.getResult().getTopPoint().toString());
|
||||
MogoLocation mogoLocation = new MogoLocation();
|
||||
mogoLocation.setLongitude(v2XRoadDataRes.getResult().getTopPoint().get(0));
|
||||
mogoLocation.setLatitude(v2XRoadDataRes.getResult().getTopPoint().get(1));
|
||||
|
||||
@@ -280,7 +280,8 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
|
||||
mBtnTriggerTrafficSearch.setOnClickListener(v -> V2XServiceManager.getIMogoTrafficUploadProvider().verifyCurrentTrafficStatus());
|
||||
|
||||
mBtnTriggerRecommendRouteEvent.setOnClickListener(view -> {
|
||||
V2XServiceManager.getV2XRefreshModel().queryRoadData("ZD802C1938L10797");
|
||||
// V2XServiceManager.getV2XRefreshModel().queryRoadData("ZD802C1938L10797");
|
||||
V2XServiceManager.getV2XRefreshModel().queryRoadData("ZD802B1932L00622");
|
||||
});
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user