预警方向传值添加,方法名称修改
This commit is contained in:
@@ -6,5 +6,5 @@ package com.mogo.service.v2x;
|
||||
* @since: 2021/3/24
|
||||
*/
|
||||
public interface IV2XListener {
|
||||
void warningChangedWithType(int type);
|
||||
void warningChangedWithDirection(int direction);
|
||||
}
|
||||
|
||||
@@ -14,5 +14,5 @@ public interface IV2XProvider extends IProvider {
|
||||
|
||||
public void unregisterIntentListener(String intent, IV2XListener listener);
|
||||
|
||||
public void warningChangedForListenerWithType(int type, String command);
|
||||
public void warningChangedForListenerWithDirection(int direction, String command);
|
||||
}
|
||||
|
||||
@@ -47,14 +47,14 @@ public class V2XManager implements IV2XProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void warningChangedForListenerWithType(int type, String command) {
|
||||
public void warningChangedForListenerWithDirection(int direction, String command) {
|
||||
List<IV2XListener> listeners = mListeners.get(command);
|
||||
if (listeners != null && !listeners.isEmpty()) {
|
||||
Iterator<IV2XListener> iterator = listeners.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
IV2XListener listener = iterator.next();
|
||||
if (listener != null) {
|
||||
listener.warningChangedWithType(type);
|
||||
listener.warningChangedWithDirection(direction);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user