修改参数类型
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -41,6 +41,6 @@ public interface ICheckProvider extends IProvider {
|
||||
/**
|
||||
* 根据监测指标修改主页检测按钮
|
||||
*/
|
||||
void updateMonitoringStatus(String module, boolean hasError);
|
||||
void updateMonitoringStatus(String module, Integer state);
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user