碰撞预警对外接口调通
This commit is contained in:
@@ -2,6 +2,7 @@ package com.mogo.service.impl.v2x;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.nfc.Tag;
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
@@ -28,11 +29,11 @@ public class V2XManager implements IV2XProvider {
|
||||
@Override
|
||||
public void registerIntentListener(String intent, IV2XListener listener) {
|
||||
if (listener == null || intent == null) {
|
||||
Log.d("V2XManager", "listener/intent 为null");
|
||||
Log.d("V2XManager","listener == null || intent == null");
|
||||
return;
|
||||
}
|
||||
Log.d("V2XManager", "intent=="+intent+"/listener=="+listener);
|
||||
if (!mListeners.containsKey(intent)) {
|
||||
Log.d("V2XManager","intent=="+intent+"listener"+listener);
|
||||
mListeners.put(intent, new CopyOnWriteArrayList<>());
|
||||
}
|
||||
mListeners.get(intent).add(listener);
|
||||
@@ -46,7 +47,7 @@ public class V2XManager implements IV2XProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void warningChangedWithType(int type, String command) {
|
||||
public void warningChangedForListenerWithType(int type, String command) {
|
||||
List<IV2XListener> listeners = mListeners.get(command);
|
||||
if (listeners != null && !listeners.isEmpty()) {
|
||||
Iterator<IV2XListener> iterator = listeners.iterator();
|
||||
|
||||
Reference in New Issue
Block a user