summaryrefslogtreecommitdiff
path: root/javaSE
diff options
context:
space:
mode:
authorBilal Alsharifi <bilal.alsharifi@gmail.com>2020-06-19 16:33:13 -0400
committerBilal Alsharifi <bilal.alsharifi@gmail.com>2020-06-19 16:33:13 -0400
commitf18454b4442997d2b77688e87b59f0b0365faf02 (patch)
tree2c9d6c57e11a24202bfc5e1d480f68237d4d3638 /javaSE
parent61afaf40d93e4e17aae66929a61d53fddd12340e (diff)
parenta4cb87ce50fe7d97b9df68a8926bdb7a6057654f (diff)
downloadsdl_android-f18454b4442997d2b77688e87b59f0b0365faf02.tar.gz
Merge branch 'develop' into feature/use_taskmaster
Diffstat (limited to 'javaSE')
-rw-r--r--javaSE/src/main/java/com/smartdevicelink/managers/SdlManager.java8
-rw-r--r--javaSE/src/main/java/com/smartdevicelink/managers/lifecycle/LifecycleManager.java16
2 files changed, 15 insertions, 9 deletions
diff --git a/javaSE/src/main/java/com/smartdevicelink/managers/SdlManager.java b/javaSE/src/main/java/com/smartdevicelink/managers/SdlManager.java
index a711438cc..3edb6b4ea 100644
--- a/javaSE/src/main/java/com/smartdevicelink/managers/SdlManager.java
+++ b/javaSE/src/main/java/com/smartdevicelink/managers/SdlManager.java
@@ -142,14 +142,6 @@ public class SdlManager extends BaseSdlManager {
}
@Override
- void onProxyClosed(SdlDisconnectedReason reason) {
- Log.i(TAG, "Proxy is closed.");
- if (managerListener != null) {
- managerListener.onDestroy(SdlManager.this);
- }
- }
-
- @Override
public void dispose() {
if (this.permissionManager != null) {
this.permissionManager.dispose();
diff --git a/javaSE/src/main/java/com/smartdevicelink/managers/lifecycle/LifecycleManager.java b/javaSE/src/main/java/com/smartdevicelink/managers/lifecycle/LifecycleManager.java
index 4a5e3747d..77ebafd2c 100644
--- a/javaSE/src/main/java/com/smartdevicelink/managers/lifecycle/LifecycleManager.java
+++ b/javaSE/src/main/java/com/smartdevicelink/managers/lifecycle/LifecycleManager.java
@@ -35,6 +35,8 @@ package com.smartdevicelink.managers.lifecycle;
import android.support.annotation.RestrictTo;
import com.smartdevicelink.SdlConnection.SdlSession;
+import com.smartdevicelink.exception.SdlException;
+import com.smartdevicelink.proxy.rpc.enums.SdlDisconnectedReason;
import com.smartdevicelink.transport.BaseTransportConfig;
/**
@@ -54,10 +56,22 @@ public class LifecycleManager extends BaseLifecycleManager {
}
@Override
+ void cycleProxy(SdlDisconnectedReason disconnectedReason) {
+ cleanProxy();
+ if (session != null) {
+ try {
+ session.startSession();
+ } catch (SdlException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ @Override
void onTransportDisconnected(String info, boolean availablePrimary, BaseTransportConfig transportConfig) {
super.onTransportDisconnected(info, availablePrimary, transportConfig);
if (!availablePrimary) {
- onClose(info, null);
+ onClose(info, null, null);
}
}
}