summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicoleYarroch <nicole@livio.io>2018-05-14 13:25:55 -0400
committerNicoleYarroch <nicole@livio.io>2018-05-14 13:25:55 -0400
commitb9674204b03769372a9d5d5e3630e5936771985f (patch)
treec63df0d1a67e0aad7f5eb0d07665e2bb661a86dd
parentc7d1402617831610a15f4d1b21f45218ecc66e29 (diff)
downloadsdl_ios-b9674204b03769372a9d5d5e3630e5936771985f.tar.gz
Added check for `vrCapability` to example apps
Signed-off-by: NicoleYarroch <nicole@livio.io>
-rw-r--r--SmartDeviceLink_Example/Classes/ProxyManager.m8
-rw-r--r--SmartDeviceLink_Example/MenuManager.swift8
2 files changed, 8 insertions, 8 deletions
diff --git a/SmartDeviceLink_Example/Classes/ProxyManager.m b/SmartDeviceLink_Example/Classes/ProxyManager.m
index b8c76baaa..8a8e48f44 100644
--- a/SmartDeviceLink_Example/Classes/ProxyManager.m
+++ b/SmartDeviceLink_Example/Classes/ProxyManager.m
@@ -278,10 +278,10 @@ static UInt32 choiceSetId = 100;
#pragma mark Voice Commands
- (void)sdlex_createVoiceCommands {
-// if (!self.sdlManager.systemCapabilityManager.vrCapability) {
-// SDLLogE(@"The head unit does not support voice recognition");
-// return;
-// }
+ if (!self.sdlManager.systemCapabilityManager.vrCapability) {
+ SDLLogE(@"The head unit does not support voice recognition");
+ return;
+ }
self.sdlManager.screenManager.voiceCommands = @[[self.class sdlex_voiceCommandStartWithManager:self.sdlManager], [self.class sdlex_voiceCommandStopWithManager:self.sdlManager]];
}
diff --git a/SmartDeviceLink_Example/MenuManager.swift b/SmartDeviceLink_Example/MenuManager.swift
index 44fa6fdef..57bc2d9fd 100644
--- a/SmartDeviceLink_Example/MenuManager.swift
+++ b/SmartDeviceLink_Example/MenuManager.swift
@@ -31,10 +31,10 @@ class MenuManager: NSObject {
/// - Parameter manager: The SDL Manager
/// - Returns: An array of SDLVoiceCommand objects
class func allVoiceMenuItems(with manager: SDLManager) -> [SDLVoiceCommand] {
-// guard manager.systemCapabilityManager.vrCapability else {
-// SDLLog.e("The head unit does not support voice recognition")
-// return []
-// }
+ guard manager.systemCapabilityManager.vrCapability else {
+ SDLLog.e("The head unit does not support voice recognition")
+ return []
+ }
return [voiceCommandStart(with: manager), voiceCommandStop(with: manager)]
}
}