diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2018-11-08 15:57:42 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-08 15:57:42 -0500 |
commit | 34e59fdcb1d813fbf32470e8df586b3af0478392 (patch) | |
tree | aff77d3f2ffec21e0121a1be6eeb563786f8a745 | |
parent | d9038217201242e2c63dbebcfffde394d8a0f645 (diff) | |
parent | 8ed68395c8bee12e3497ac0c313b3a7908331ed4 (diff) | |
download | sdl_ios-34e59fdcb1d813fbf32470e8df586b3af0478392.tar.gz |
Merge pull request #1125 from smartdevicelink/bugs/issue_1124_debug_log_duplication
Remove duplicate logs
-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]) { |