diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2018-11-08 14:41:15 -0500 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2018-11-08 14:41:15 -0500 |
commit | 8ed68395c8bee12e3497ac0c313b3a7908331ed4 (patch) | |
tree | 6a1d0c83e253c939469e0ac0878257524bb16a25 | |
parent | 0095123ffeb9cf1d104f9c76653710a36a49b8a0 (diff) | |
download | sdl_ios-8ed68395c8bee12e3497ac0c313b3a7908331ed4.tar.gz |
Remove duplicate logsbugs/issue_1124_debug_log_duplication
-rw-r--r-- | SmartDeviceLink/SDLLifecycleManager.m | 13 | ||||
-rw-r--r-- | SmartDeviceLink/SDLStreamingAudioLifecycleManager.m | 1 | ||||
-rw-r--r-- | SmartDeviceLink/SDLStreamingVideoLifecycleManager.m | 6 |
3 files changed, 12 insertions, 8 deletions
diff --git a/SmartDeviceLink/SDLLifecycleManager.m b/SmartDeviceLink/SDLLifecycleManager.m index c05ac986e..6d0f75edf 100644 --- a/SmartDeviceLink/SDLLifecycleManager.m +++ b/SmartDeviceLink/SDLLifecycleManager.m @@ -670,8 +670,17 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready"; SDLSystemContext oldSystemContext = self.systemContext; self.systemContext = hmiStatusNotification.systemContext; - SDLLogD(@"HMI level changed from %@ to %@", oldHMILevel, self.hmiLevel); - SDLLogD(@"Audio streaming state changed from %@ to %@", oldStreamingState, self.audioStreamingState); + if (![oldHMILevel isEqualToEnum:self.hmiLevel]) { + SDLLogD(@"HMI level changed from %@ to %@", oldHMILevel, self.hmiLevel); + } + + if (![oldStreamingState isEqualToEnum:self.audioStreamingState]) { + SDLLogD(@"Audio streaming state changed from %@ to %@", oldStreamingState, self.audioStreamingState); + } + + if (![oldSystemContext isEqualToEnum:self.systemContext]) { + SDLLogD(@"System context changed from %@ to %@", oldSystemContext, self.systemContext); + } if ([self.lifecycleStateMachine isCurrentState:SDLLifecycleStateSettingUpHMI]) { [self sdl_transitionToState:SDLLifecycleStateReady]; diff --git a/SmartDeviceLink/SDLStreamingAudioLifecycleManager.m b/SmartDeviceLink/SDLStreamingAudioLifecycleManager.m index 215962283..3a2404ca9 100644 --- a/SmartDeviceLink/SDLStreamingAudioLifecycleManager.m +++ b/SmartDeviceLink/SDLStreamingAudioLifecycleManager.m @@ -295,7 +295,6 @@ NS_ASSUME_NONNULL_BEGIN } SDLOnHMIStatus *hmiStatus = (SDLOnHMIStatus*)notification.notification; - SDLLogD(@"HMI level changed from level %@ to level %@", self.hmiLevel, hmiStatus.hmiLevel); self.hmiLevel = hmiStatus.hmiLevel; // if startWithProtocol has not been called yet, abort here diff --git a/SmartDeviceLink/SDLStreamingVideoLifecycleManager.m b/SmartDeviceLink/SDLStreamingVideoLifecycleManager.m index 5302e287d..e49e658e3 100644 --- a/SmartDeviceLink/SDLStreamingVideoLifecycleManager.m +++ b/SmartDeviceLink/SDLStreamingVideoLifecycleManager.m @@ -549,11 +549,7 @@ typedef void(^SDLVideoCapabilityResponseHandler)(SDLVideoStreamingCapability *_N } SDLOnHMIStatus *hmiStatus = (SDLOnHMIStatus*)notification.notification; - - if (![self.hmiLevel isEqualToEnum:hmiStatus.hmiLevel]) { - SDLLogD(@"HMI level changed from level %@ to level %@", self.hmiLevel, hmiStatus.hmiLevel); - self.hmiLevel = hmiStatus.hmiLevel; - } + self.hmiLevel = hmiStatus.hmiLevel; SDLVideoStreamingState newState = hmiStatus.videoStreamingState ?: SDLVideoStreamingStateStreamable; if (![self.videoStreamingState isEqualToEnum:newState]) { |