修改参数类型

This commit is contained in:
liujing
2021-09-28 11:27:17 +08:00
parent cce7094ad4
commit 875170859d
6 changed files with 14 additions and 15 deletions

View File

@@ -93,12 +93,11 @@ public class VehicleMonitoringManager implements ICheckProvider {
if (context != null) {
CheckActivity.checkMonitor(context, new ICheckResultCallBack() {
@Override
public void callBackWithErrorState(Integer hasError) {
if (hasError == 1) {
updateMonitoringStatus(MogoReceiver.ACTION_CHECK_VEHICLE_MONITORING, false);
public void callBackWithErrorState(Integer state) {
updateMonitoringStatus(MogoReceiver.ACTION_CHECK_VEHICLE_MONITORING, state);
if (state == 1) {
hasTipShow = false;
} else {
updateMonitoringStatus(MogoReceiver.ACTION_CHECK_VEHICLE_MONITORING, true);
if (hasTipShow == false) {
showDialog(context);
hasTipShow = true;//已弹框
@@ -148,12 +147,12 @@ public class VehicleMonitoringManager implements ICheckProvider {
}
@Override
public void updateMonitoringStatus(String module, boolean hasError) {
public void updateMonitoringStatus(String module, Integer state) {
List<IMogoCheckListener> listeners = mListeners.get(module);
if (listeners != null && !listeners.isEmpty()) {
for (IMogoCheckListener listener : listeners) {
if (listener != null) {
listener.updateMonitoringStatus(hasError);
listener.updateMonitoringStatus(state);
}
}
}

View File

@@ -8,5 +8,5 @@ import com.mogo.service.adas.IMogoAdasDataCallback;
* @since: 9/28/21
*/
public interface ICheckResultCallBack {
void callBackWithErrorState(Integer hasError);
void callBackWithErrorState(Integer state);
}

View File

@@ -41,6 +41,6 @@ public interface ICheckProvider extends IProvider {
/**
* 根据监测指标修改主页检测按钮
*/
void updateMonitoringStatus(String module, boolean hasError);
void updateMonitoringStatus(String module, Integer state);
}

View File

@@ -6,5 +6,5 @@ package com.mogo.eagle.core.function.api.check;
* @since: 8/26/21
*/
public interface IMogoCheckListener {
void updateMonitoringStatus(boolean hasError);
void updateMonitoringStatus(Integer state);
}

View File

@@ -49,8 +49,8 @@ public class CallerCheckManager extends CallerBase {
/**
* 根据监测指标修改主页检测按钮
*/
public static void updateMonitoringStatus(String module, boolean hasError) {
getCheckProvider().updateMonitoringStatus(module, hasError);
public static void updateMonitoringStatus(String module, Integer state) {
getCheckProvider().updateMonitoringStatus(module, state);
}
/**

View File

@@ -1402,12 +1402,12 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
}
@Override
public void updateMonitoringStatus(boolean hasError) {
public void updateMonitoringStatus(Integer state) {
Log.d(TAG, "updateCheckStatus");
if (hasError == true) {
tipImageView.setVisibility(View.VISIBLE);
} else {
if (state == 1) {
tipImageView.setVisibility(View.INVISIBLE);
} else {
tipImageView.setVisibility(View.VISIBLE);
}
}