diff options
author | Satbir Tanda <satbirtanda@gmail.com> | 2019-08-15 18:19:38 -0700 |
---|---|---|
committer | Satbir Tanda <satbirtanda@gmail.com> | 2019-08-15 18:19:38 -0700 |
commit | 852c974c7f7747bcc3a148d144e9d0573f5ce336 (patch) | |
tree | 3efa4445cc99fbd19b3285aa63481c988b3b8d86 | |
parent | c2523d123e85c89c78599ae75e4d58ef67b56257 (diff) | |
download | sdl_ios-852c974c7f7747bcc3a148d144e9d0573f5ce336.tar.gz |
Recommended fixes
-rw-r--r-- | SmartDeviceLink/SDLEncryptionLifecycleManager.h | 2 | ||||
-rw-r--r-- | SmartDeviceLink/SDLEncryptionLifecycleManager.m | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/SmartDeviceLink/SDLEncryptionLifecycleManager.h b/SmartDeviceLink/SDLEncryptionLifecycleManager.h index 7c4eb7c58..cd6da8656 100644 --- a/SmartDeviceLink/SDLEncryptionLifecycleManager.h +++ b/SmartDeviceLink/SDLEncryptionLifecycleManager.h @@ -7,12 +7,12 @@ // #import <Foundation/Foundation.h> -#import "SDLProtocol.h" #import "SDLConnectionManagerType.h" #import "SDLProtocolListener.h" @class SDLStateMachine; @class SDLEncryptionConfiguration; +@class SDLProtocol; NS_ASSUME_NONNULL_BEGIN diff --git a/SmartDeviceLink/SDLEncryptionLifecycleManager.m b/SmartDeviceLink/SDLEncryptionLifecycleManager.m index cc5e0b181..99e5574cd 100644 --- a/SmartDeviceLink/SDLEncryptionLifecycleManager.m +++ b/SmartDeviceLink/SDLEncryptionLifecycleManager.m @@ -17,6 +17,7 @@ #import "SDLOnPermissionsChange.h" #import "SDLPermissionItem.h" #import "SDLPermissionConstants.h" +#import "SDLProtocol.h" #import "SDLError.h" @interface SDLEncryptionLifecycleManager() <SDLProtocolListener> @@ -205,7 +206,7 @@ // if startWithProtocol has not been called yet, abort here if (!self.protocol || ![self.currentHMILevel isEqualToEnum:SDLHMILevelNone]) { return; } - if (!self.isEncryptionReady) { + if (![self.encryptionStateMachine isCurrentState:SDLEncryptionLifecycleManagerStateStarting] && self.isEncryptionReady) { [self sdl_startEncryptionService]; } } |