summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicoleYarroch <nicole@livio.io>2020-04-08 07:45:30 -0400
committerGitHub <noreply@github.com>2020-04-08 07:45:30 -0400
commitadccb55b2b9b87b2e56c0fdb7000480cf9622499 (patch)
treeb404084148b32b8ca2fadfd574757e2956dba3aa
parent4ff78c0d2caa6aa04fa7204d77fe77ceed973f8b (diff)
downloadsdl_ios-adccb55b2b9b87b2e56c0fdb7000480cf9622499.tar.gz
Apply suggestions from code review
Co-Authored-By: Joel Fischer <joeljfischer@gmail.com>
-rw-r--r--SmartDeviceLink/SDLBackgroundTaskManager.m4
-rw-r--r--SmartDeviceLink/SDLSecondaryTransportManager.m8
2 files changed, 6 insertions, 6 deletions
diff --git a/SmartDeviceLink/SDLBackgroundTaskManager.m b/SmartDeviceLink/SDLBackgroundTaskManager.m
index 201a9da30..3cf10318e 100644
--- a/SmartDeviceLink/SDLBackgroundTaskManager.m
+++ b/SmartDeviceLink/SDLBackgroundTaskManager.m
@@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
@implementation SDLBackgroundTaskManager
- (instancetype)initWithBackgroundTaskName:(NSString *)backgroundTaskName {
- SDLLogV(@"Creating manager with name %@", backgroundTaskName);
+ SDLLogV(@"Creating background task manager with name %@", backgroundTaskName);
self = [super init];
if (!self) {
return nil;
@@ -42,7 +42,7 @@ NS_ASSUME_NONNULL_BEGIN
__weak typeof(self) weakSelf = self;
self.currentBackgroundTaskId = [[UIApplication sharedApplication] beginBackgroundTaskWithName:self.backgroundTaskName expirationHandler:^{
__strong typeof(weakSelf) strongSelf = weakSelf;
- SDLLogD(@"The %@ background task expired", strongSelf.backgroundTaskName);
+ SDLLogD(@"The background task %@ expired", strongSelf.backgroundTaskName);
[strongSelf endBackgroundTask];
}];
diff --git a/SmartDeviceLink/SDLSecondaryTransportManager.m b/SmartDeviceLink/SDLSecondaryTransportManager.m
index ba5624f4b..28d318a42 100644
--- a/SmartDeviceLink/SDLSecondaryTransportManager.m
+++ b/SmartDeviceLink/SDLSecondaryTransportManager.m
@@ -688,22 +688,22 @@ struct TransportProtocolUpdated {
strongSelf.backgroundTaskManager.taskEndedHandler = [strongSelf sdl_backgroundTaskEndedHandler];
[strongSelf.backgroundTaskManager startBackgroundTask];
} else {
- SDLLogD(@"TCP transport already disconnected");
+ SDLLogD(@"TCP transport already disconnected, will not start a background task.");
}
} else if (notification.name == UIApplicationDidBecomeActiveNotification) {
SDLLogD(@"App entered the foreground");
if ([strongSelf.stateMachine isCurrentState:SDLSecondaryTransportStateRegistered]) {
- SDLLogD(@"TCP transport has not yet been shutdown");
+ SDLLogD(@"In the registered state; TCP transport has not yet been shutdown. Ending the background task.");
[strongSelf.backgroundTaskManager endBackgroundTask];
} else if ([strongSelf.stateMachine isCurrentState:SDLSecondaryTransportStateConfigured]
&& strongSelf.secondaryTransportType == SDLSecondaryTransportTypeTCP
&& [strongSelf sdl_isTCPReady]
&& [strongSelf sdl_isHMILevelNonNone]) {
- SDLLogD(@"Restarting the TCP transport");
+ SDLLogD(@"In the configured state; restarting the TCP transport. Ending the background task.");
[strongSelf.backgroundTaskManager endBackgroundTask];
[strongSelf.stateMachine transitionToState:SDLSecondaryTransportStateConnecting];
} else {
- SDLLogD(@"TCP transport not ready to start");
+ SDLLogD(@"TCP transport not ready to start, our current state is: %@, strongSelf.stateMachine.currentState");
}
}
});