diff --git a/SmartDeviceLink/private/SDLLifecycleManager.m b/SmartDeviceLink/private/SDLLifecycleManager.m index 8d25b79f7..8fe6b6f9a 100644 --- a/SmartDeviceLink/private/SDLLifecycleManager.m +++ b/SmartDeviceLink/private/SDLLifecycleManager.m @@ -14,7 +14,6 @@ #import "SDLLifecycleRPCAdapter.h" #import "SDLAsynchronousRPCOperation.h" #import "SDLAsynchronousRPCRequestOperation.h" -#import "SDLBackgroundTaskManager.h" #import "SDLChangeRegistration.h" #import "SDLConfiguration.h" #import "SDLConnectionManagerType.h" @@ -107,7 +106,6 @@ @interface SDLLifecycleManager () @property (copy, nonatomic) SDLManagerReadyBlock readyHandler; @property (copy, nonatomic) dispatch_queue_t lifecycleQueue; @property (assign, nonatomic) int32_t lastCorrelationId; -@property (copy, nonatomic) SDLBackgroundTaskManager *backgroundTaskManager; @property (strong, nonatomic) SDLLanguage currentVRLanguage; // RPC Handlers @@ -190,8 +188,6 @@ - (instancetype)initWithConfiguration:(SDLConfiguration *)configuration delegate [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(hmiStatusDidChange:) name:SDLDidChangeHMIStatusNotification object:_notificationDispatcher]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(remoteHardwareDidUnregister:) name:SDLDidReceiveAppUnregisteredNotification object:_notificationDispatcher]; - _backgroundTaskManager = [[SDLBackgroundTaskManager alloc] initWithBackgroundTaskName:BackgroundTaskTransportName]; - return self; } @@ -254,9 +250,6 @@ - (SDLState *)lifecycleState { } - (void)didEnterStateStarted { - // Start a background task so a session can be established even when the app is backgrounded. - [self.backgroundTaskManager startBackgroundTask]; - // Start up the internal protocol, transport, and other internal managers self.secondaryTransportManager = nil; SDLLifecycleConfiguration *lifecycleConfig = self.configuration.lifecycleConfig; @@ -357,9 +350,6 @@ - (void)sdl_stopManagersAndRestart:(BOOL)shouldRestart { if (shouldRestart) { [strongSelf sdl_transitionToState:SDLLifecycleStateStarted]; - } else { - // End the background task because a session will not be established - [strongSelf.backgroundTaskManager endBackgroundTask]; } }); } @@ -586,9 +576,6 @@ - (void)didEnterStateReady { if ([self.delegate respondsToSelector:@selector(videoStreamingState:didChangetoState:)]) { [self.delegate videoStreamingState:SDLVideoStreamingStateNotStreamable didChangetoState:self.videoStreamingState]; } - - // Stop the background task now that setup has completed - [self.backgroundTaskManager endBackgroundTask]; } - (void)didEnterStateUnregistering {