From e1028fe45ecc934decb83f1e632d16168992a96d Mon Sep 17 00:00:00 2001 From: NicoleYarroch Date: Wed, 4 Oct 2017 12:10:53 -0400 Subject: Debugging Signed-off-by: NicoleYarroch --- SmartDeviceLink/SDLLifecycleManager.m | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'SmartDeviceLink/SDLLifecycleManager.m') diff --git a/SmartDeviceLink/SDLLifecycleManager.m b/SmartDeviceLink/SDLLifecycleManager.m index 6a70e6675..759a576d5 100644 --- a/SmartDeviceLink/SDLLifecycleManager.m +++ b/SmartDeviceLink/SDLLifecycleManager.m @@ -71,7 +71,6 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready"; // Private properties @property (copy, nonatomic) SDLManagerReadyBlock readyHandler; -@property (assign, nonatomic) BOOL firstHMINonNoneOccurred; @end @@ -105,7 +104,6 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready"; _notificationDispatcher = [[SDLNotificationDispatcher alloc] init]; _responseDispatcher = [[SDLResponseDispatcher alloc] initWithNotificationDispatcher:_notificationDispatcher]; _registerResponse = nil; - _firstHMINonNoneOccurred = NO; // Managers _fileManager = [[SDLFileManager alloc] initWithConnectionManager:self]; @@ -184,6 +182,10 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready"; self.proxy = [SDLProxyFactory buildSDLProxyWithListener:self.notificationDispatcher]; } #pragma clang diagnostic pop + + if (self.streamManager != nil) { + [self.streamManager startWithProtocol:self.proxy.protocol]; + } } - (void)didEnterStateStopped { @@ -208,7 +210,6 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready"; self.hmiLevel = nil; self.audioStreamingState = nil; self.systemContext = nil; - self.proxy = nil; // Due to a race condition internally with EAStream, we cannot immediately attempt to restart the proxy, as we will randomly crash. @@ -442,16 +443,6 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready"; return YES; } -- (void)sdl_onFirstHMINonNone { - // If we are a nav / projection app and desire to stream, we need to be in HMI background, limited, or full and perform additional setup when that occurs - if (self.streamManager == nil) { - return; - } - - [self.streamManager startWithProtocol:self.proxy.protocol]; -} - - #pragma mark SDL notification observers - (void)transportDidConnect { @@ -484,11 +475,6 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready"; self.systemContext = hmiStatusNotification.systemContext; SDLLogD(@"HMI level changed from %@ to %@", oldHMILevel, self.hmiLevel); - - if (!self.firstHMINonNoneOccurred && ![self.hmiLevel isEqualToEnum:SDLHMILevelNone]) { - self.firstHMINonNoneOccurred = YES; - [self sdl_onFirstHMINonNone]; - } if ([self.lifecycleStateMachine isCurrentState:SDLLifecycleStateSettingUpHMI]) { [self.lifecycleStateMachine transitionToState:SDLLifecycleStateReady]; -- cgit v1.2.1