fix#修改接口请求逻辑

This commit is contained in:
jeff
2021-01-12 00:31:10 +08:00
parent 95773fad02
commit 7c38f180a8

View File

@@ -40,6 +40,7 @@ import com.mogo.module.v2x.scenario.impl.V2XScenarioManager;
import com.mogo.module.v2x.scenario.scene.livecar.V2XVoiceCallLiveBiz;
import com.mogo.module.v2x.scenario.scene.park.V2XIllegalParkWindow;
import com.mogo.module.v2x.utils.FatigueDrivingUtils;
import com.mogo.module.v2x.utils.TimeConstants;
import com.mogo.module.v2x.utils.TimeUtils;
import com.mogo.module.v2x.utils.TrackUtils;
import com.mogo.module.v2x.utils.V2XUtils;
@@ -229,6 +230,8 @@ public class V2XModuleProvider implements
.registerMogoMapListener(V2XConst.MODULE_NAME, this);
V2XServiceManager.getMoGoStatusManager()
.registerStatusChangedListener(MODULE_NAME, StatusDescriptor.ACC_STATUS, this);
V2XServiceManager.getMoGoStatusManager()
.registerStatusChangedListener(MODULE_NAME, StatusDescriptor.MAIN_PAGE_RESUME, this);
V2XServiceManager.getMoGoStatusManager()
.registerStatusChangedListener(MODULE_NAME, StatusDescriptor.SEEK_HELPING, this);
@@ -321,10 +324,6 @@ 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();
@@ -336,6 +335,15 @@ public class V2XModuleProvider implements
}
} else if (descriptor == StatusDescriptor.SEEK_HELPING) {
refreshMeSeekHelp(isTrue);
} else if (descriptor == StatusDescriptor.MAIN_PAGE_RESUME) {
String localAccONTime = SharedPrefsMgr.getInstance(V2XUtils.getApp())
.getString(V2XConst.V2X_ACC_ON_TIME_STR);
long timeSpan = TimeUtils.getTimeSpan(TimeUtils.getNowString(), localAccONTime, TimeConstants.MIN);
if (timeSpan < 5) {
V2XServiceManager.getV2XRefreshModel().queryRoadData(Utils.getSn());
}
}
}