summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicoleYarroch <nicole@livio.io>2020-04-01 10:02:04 -0400
committerNicoleYarroch <nicole@livio.io>2020-04-01 10:02:04 -0400
commitd7a6d7b2f8d12482853aa17a9eef0c2bf035276a (patch)
tree74b6bfedd845dadd76d76be115ce13faa4a9c072
parentdeb24443b5cb6925b1e5b7e9c00574620509b23b (diff)
downloadsdl_ios-d7a6d7b2f8d12482853aa17a9eef0c2bf035276a.tar.gz
Moved access sync to stop method
-rw-r--r--SmartDeviceLink/SDLChoiceSetManager.m19
1 files changed, 10 insertions, 9 deletions
diff --git a/SmartDeviceLink/SDLChoiceSetManager.m b/SmartDeviceLink/SDLChoiceSetManager.m
index c9bb71e58..cdacd7f23 100644
--- a/SmartDeviceLink/SDLChoiceSetManager.m
+++ b/SmartDeviceLink/SDLChoiceSetManager.m
@@ -129,7 +129,9 @@ UInt16 const ChoiceCellCancelIdMin = 1;
}
- (void)stop {
- [self.stateMachine transitionToState:SDLChoiceManagerStateShutdown];
+ [self sdl_runSyncOnQueue:^{
+ [self.stateMachine transitionToState:SDLChoiceManagerStateShutdown];
+ }];
}
+ (NSDictionary<SDLState *, SDLAllowableStateTransitions *> *)sdl_stateTransitionDictionary {
@@ -168,18 +170,17 @@ UInt16 const ChoiceCellCancelIdMin = 1;
- (void)didEnterStateShutdown {
SDLLogV(@"Manager shutting down");
+ _currentHMILevel = SDLHMILevelNone;
+
[self.transactionQueue cancelAllOperations];
self.transactionQueue = [self sdl_newTransactionQueue];
- _vrOptional = YES;
- _currentHMILevel = SDLHMILevelNone;
+ _preloadedMutableChoices = [NSMutableSet set];
+ _pendingMutablePreloadChoices = [NSMutableSet set];
_pendingPresentationSet = nil;
- [self sdl_runSyncOnQueue:^{
- self->_preloadedMutableChoices = [NSMutableSet set];
- self->_pendingMutablePreloadChoices = [NSMutableSet set];
- self->_nextChoiceId = ChoiceCellIdMin;
- self->_nextCancelId = ChoiceCellCancelIdMin;
- }];
+ _vrOptional = YES;
+ _nextChoiceId = ChoiceCellIdMin;
+ _nextCancelId = ChoiceCellCancelIdMin;
}
- (void)didEnterStateCheckingVoiceOptional {