diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2019-04-23 10:14:03 -0400 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2019-04-23 10:14:03 -0400 |
commit | 02ade0d7ad88d217e1088204add6c041e6e87114 (patch) | |
tree | 2d4fedfd75b00e6feae30afba726db916e032438 | |
parent | a995cb9526eb4d4828dfde7b0a97e3f222a4ed97 (diff) | |
parent | 4fbd66c201a032e086169f50eb032d2834f9d8a3 (diff) | |
download | sdl_ios-02ade0d7ad88d217e1088204add6c041e6e87114.tar.gz |
Merge branch 'bugfix/issue_1237_example_app_reset' into bugfix/issue_1243_swift_example_autoreconnect
-rw-r--r-- | Example Apps/Example ObjC/ProxyManager.m | 9 | ||||
-rw-r--r-- | Example Apps/Example Swift/ProxyManager.swift | 6 |
2 files changed, 2 insertions, 13 deletions
diff --git a/Example Apps/Example ObjC/ProxyManager.m b/Example Apps/Example ObjC/ProxyManager.m index d61787f43..448e2cf0f 100644 --- a/Example Apps/Example ObjC/ProxyManager.m +++ b/Example Apps/Example ObjC/ProxyManager.m @@ -76,12 +76,8 @@ NS_ASSUME_NONNULL_BEGIN } - (void)reset { - if (self.sdlManager == nil) { - [self sdlex_updateProxyState:ProxyStateStopped]; - return; - } - [self.sdlManager stop]; + [self sdlex_updateProxyState:ProxyStateStopped]; } - (void)sdlex_updateProxyState:(ProxyState)newState { @@ -97,9 +93,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)startWithProxyTransportType:(ProxyTransportType)proxyTransportType { [self sdlex_updateProxyState:ProxyStateSearchingForConnection]; - // Check for previous instance of sdlManager - if (self.sdlManager) { return; } - SDLLifecycleConfiguration *lifecycleConfig = proxyTransportType == ProxyTransportTypeIAP ? [self.class sdlex_iapLifecycleConfiguration] : [self.class sdlex_tcpLifecycleConfiguration]; [self sdlex_setupConfigurationWithLifecycleConfiguration:lifecycleConfig]; } diff --git a/Example Apps/Example Swift/ProxyManager.swift b/Example Apps/Example Swift/ProxyManager.swift index 397be0878..ba199b543 100644 --- a/Example Apps/Example Swift/ProxyManager.swift +++ b/Example Apps/Example Swift/ProxyManager.swift @@ -50,12 +50,8 @@ extension ProxyManager { /// Attempts to close the connection between the this app and the car's head unit. The `SDLManagerDelegate`'s `managerDidDisconnect()` is called when connection is actually closed. func resetConnection() { - guard sdlManager != nil else { - delegate?.didChangeProxyState(ProxyState.stopped) - return - } - sdlManager.stop() + delegate?.didChangeProxyState(ProxyState.stopped) } } |