Skip to content

Commit f712f3d

Browse files
committed
Revert "get notification listeners in manager from LCM"
This reverts commit 07d6f95.
1 parent 07d6f95 commit f712f3d

3 files changed

Lines changed: 2 additions & 22 deletions

File tree

android/sdl_android/src/main/java/com/smartdevicelink/managers/lifecycle/LifecycleManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@ void initializeProxy() {
114114

115115
@Override
116116
void cycleProxy(SdlDisconnectedReason disconnectedReason) {
117+
cleanProxy();
118+
initializeProxy();
117119
if (!SdlDisconnectedReason.LEGACY_BLUETOOTH_MODE_ENABLED.equals(disconnectedReason) && !SdlDisconnectedReason.PRIMARY_TRANSPORT_CYCLE_REQUEST.equals(disconnectedReason)) {
118120
//We don't want to alert higher if we are just cycling for legacy bluetooth
119121
onClose("Sdl Proxy Cycled", new SdlException("Sdl Proxy Cycled", SdlExceptionCause.SDL_PROXY_CYCLED), disconnectedReason);
120122
}
121-
cleanProxy();
122-
initializeProxy();
123123
if (session != null) {
124124
try {
125125
session.startSession();

base/src/main/java/com/smartdevicelink/managers/BaseSdlManager.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,12 @@
7171
import org.json.JSONException;
7272

7373
import java.util.ArrayList;
74-
import java.util.HashMap;
7574
import java.util.List;
7675
import java.util.Map;
7776
import java.util.Queue;
7877
import java.util.Set;
7978
import java.util.Vector;
8079
import java.util.concurrent.ConcurrentLinkedQueue;
81-
import java.util.concurrent.CopyOnWriteArrayList;
8280

8381
abstract class BaseSdlManager {
8482

@@ -147,19 +145,6 @@ public void onProxyClosed(LifecycleManager lifeCycleManager, String info, Except
147145
Log.i(TAG, "Proxy is closed.");
148146
if (reason == null || !reason.equals(SdlDisconnectedReason.LANGUAGE_CHANGE)) {
149147
dispose();
150-
} else {
151-
onRPCNotificationListeners = new HashMap<>();
152-
HashMap<Integer, CopyOnWriteArrayList<OnRPCNotificationListener>> rpcNotificationListeners = lifeCycleManager.getOnRPCNotificationListeners();
153-
for (Integer key : rpcNotificationListeners.keySet()) {
154-
if (rpcNotificationListeners.get(key) != null) {
155-
for (OnRPCNotificationListener listener : rpcNotificationListeners.get(key)) {
156-
String functionName = FunctionID.getFunctionName(key);
157-
if (functionName != null) {
158-
onRPCNotificationListeners.put(FunctionID.getEnumForString(functionName), listener);
159-
}
160-
}
161-
}
162-
}
163148
}
164149
}
165150

@@ -326,7 +311,6 @@ void handleQueuedNotifications() {
326311
//Set variables to null that are no longer needed
327312
queuedNotifications = null;
328313
queuedNotificationListener = null;
329-
onRPCNotificationListeners = null;
330314
}
331315
}
332316

base/src/main/java/com/smartdevicelink/managers/lifecycle/BaseLifecycleManager.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -640,10 +640,6 @@ private void addOnRPCNotificationListener(FunctionID notificationId, OnRPCNotifi
640640
}
641641
}
642642

643-
public HashMap<Integer, CopyOnWriteArrayList<OnRPCNotificationListener>> getOnRPCNotificationListeners() {
644-
return rpcNotificationListeners;
645-
}
646-
647643
private boolean removeOnRPCNotificationListener(FunctionID notificationId, OnRPCNotificationListener listener) {
648644
synchronized (ON_NOTIFICATION_LISTENER_LOCK) {
649645
if (rpcNotificationListeners != null

0 commit comments

Comments
 (0)