预警方向传值添加,方法名称修改

This commit is contained in:
liujing
2021-03-29 14:42:41 +08:00
parent 0cb59e4a34
commit e21ad3b4fa
6 changed files with 9 additions and 9 deletions

View File

@@ -6,5 +6,5 @@ package com.mogo.service.v2x;
* @since: 2021/3/24
*/
public interface IV2XListener {
void warningChangedWithType(int type);
void warningChangedWithDirection(int direction);
}

View File

@@ -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);
}

View File

@@ -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);
}
}
}