diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2020-02-14 15:09:49 -0500 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2020-02-14 15:09:49 -0500 |
commit | baf0c06459abd22e87e98156ce614e3f33c05e04 (patch) | |
tree | daf964fc1962a847037e699f8e8d42e2e3adbbde /SmartDeviceLink/SDLLifecycleManager.m | |
parent | 9e103cab13a62992a6c8e801e826176da1ffac0b (diff) | |
download | sdl_ios-baf0c06459abd22e87e98156ce614e3f33c05e04.tar.gz |
Only create the secondary transport manager for specific app typesfeature/issue-1145-Secondary-Transport-Optimization
Diffstat (limited to 'SmartDeviceLink/SDLLifecycleManager.m')
-rw-r--r-- | SmartDeviceLink/SDLLifecycleManager.m | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/SmartDeviceLink/SDLLifecycleManager.m b/SmartDeviceLink/SDLLifecycleManager.m index 53f2059ac..24b858904 100644 --- a/SmartDeviceLink/SDLLifecycleManager.m +++ b/SmartDeviceLink/SDLLifecycleManager.m @@ -244,8 +244,14 @@ NSString *const BackgroundTaskTransportName = @"com.sdl.transport.backgroundTask } else if (self.configuration.lifecycleConfig.allowedSecondaryTransports == SDLSecondaryTransportsNone) { self.proxy = [SDLProxy iapProxyWithListener:self.notificationDispatcher secondaryTransportManager:nil encryptionLifecycleManager:self.encryptionLifecycleManager]; } else { - // We reuse our queue to run secondary transport manager's state machine - self.secondaryTransportManager = [[SDLSecondaryTransportManager alloc] initWithStreamingProtocolDelegate:self serialQueue:self.lifecycleQueue]; + if([self.configuration.lifecycleConfig.appType isEqualToEnum:SDLAppHMITypeNavigation] || + [self.configuration.lifecycleConfig.appType isEqualToEnum:SDLAppHMITypeProjection] || + [self.configuration.lifecycleConfig.additionalAppTypes containsObject:SDLAppHMITypeNavigation] || + [self.configuration.lifecycleConfig.additionalAppTypes containsObject:SDLAppHMITypeProjection]) { + // We reuse our queue to run secondary transport manager's state machine + self.secondaryTransportManager = [[SDLSecondaryTransportManager alloc] initWithStreamingProtocolDelegate:self serialQueue:self.lifecycleQueue]; + } + self.proxy = [SDLProxy iapProxyWithListener:self.notificationDispatcher secondaryTransportManager:self.secondaryTransportManager encryptionLifecycleManager:self.encryptionLifecycleManager]; } #pragma clang diagnostic pop |