Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/smartdevicelink/sdl_ios
Browse files Browse the repository at this point in the history
…into develop
  • Loading branch information
joeljfischer committed Oct 18, 2018
2 parents 5959296 + 21fdcf9 commit c9a8023
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 0 deletions.
14 changes: 14 additions & 0 deletions SmartDeviceLink/SDLChoiceSetManager.m
Expand Up @@ -404,11 +404,25 @@ - (NSString *)currentState {

- (void)sdl_registerResponse:(SDLRPCResponseNotification *)notification {
SDLRegisterAppInterfaceResponse *response = (SDLRegisterAppInterfaceResponse *)notification.response;

if (!response.success.boolValue) { return; }
if (response.displayCapabilities == nil) {
SDLLogE(@"RegisterAppInterface succeeded but didn't send a display capabilities. A lot of things will probably break.");
return;
}

self.displayCapabilities = response.displayCapabilities;
}

- (void)sdl_displayLayoutResponse:(SDLRPCResponseNotification *)notification {
SDLSetDisplayLayoutResponse *response = (SDLSetDisplayLayoutResponse *)notification.response;

if (!response.success.boolValue) { return; }
if (response.displayCapabilities == nil) {
SDLLogE(@"SetDisplayLayout succeeded but didn't send a display capabilities. A lot of things will probably break.");
return;
}

self.displayCapabilities = response.displayCapabilities;
}

Expand Down
14 changes: 14 additions & 0 deletions SmartDeviceLink/SDLMenuManager.m
Expand Up @@ -413,11 +413,25 @@ - (void)sdl_commandNotification:(SDLRPCNotificationNotification *)notification {

- (void)sdl_registerResponse:(SDLRPCResponseNotification *)notification {
SDLRegisterAppInterfaceResponse *response = (SDLRegisterAppInterfaceResponse *)notification.response;

if (!response.success.boolValue) { return; }
if (response.displayCapabilities == nil) {
SDLLogE(@"RegisterAppInterface succeeded but didn't send a display capabilities. A lot of things will probably break.");
return;
}

self.displayCapabilities = response.displayCapabilities;
}

- (void)sdl_displayLayoutResponse:(SDLRPCResponseNotification *)notification {
SDLSetDisplayLayoutResponse *response = (SDLSetDisplayLayoutResponse *)notification.response;

if (!response.success.boolValue) { return; }
if (response.displayCapabilities == nil) {
SDLLogE(@"SetDisplayLayout succeeded but didn't send a display capabilities. A lot of things will probably break.");
return;
}

self.displayCapabilities = response.displayCapabilities;
}

Expand Down
13 changes: 13 additions & 0 deletions SmartDeviceLink/SDLSoftButtonManager.m
Expand Up @@ -355,13 +355,26 @@ - (BOOL)hasQueuedUpdate {

- (void)sdl_registerResponse:(SDLRPCResponseNotification *)notification {
SDLRegisterAppInterfaceResponse *response = (SDLRegisterAppInterfaceResponse *)notification.response;

if (!response.success.boolValue) { return; }
if (response.displayCapabilities == nil) {
SDLLogE(@"RegisterAppInterface succeeded but didn't send a display capabilities. A lot of things will probably break.");
return;
}

self.softButtonCapabilities = response.softButtonCapabilities ? response.softButtonCapabilities.firstObject : nil;
self.displayCapabilities = response.displayCapabilities;
}

- (void)sdl_displayLayoutResponse:(SDLRPCResponseNotification *)notification {
SDLSetDisplayLayoutResponse *response = (SDLSetDisplayLayoutResponse *)notification.response;

if (!response.success.boolValue) { return; }
if (response.displayCapabilities == nil) {
SDLLogE(@"SetDisplayLayout succeeded but didn't send a display capabilities. A lot of things will probably break.");
return;
}

self.softButtonCapabilities = response.softButtonCapabilities ? response.softButtonCapabilities.firstObject : nil;
self.displayCapabilities = response.displayCapabilities;

Expand Down
15 changes: 15 additions & 0 deletions SmartDeviceLink/SDLTextAndGraphicManager.m
Expand Up @@ -674,11 +674,26 @@ - (nullable SDLArtwork *)blankArtwork {

- (void)sdl_registerResponse:(SDLRPCResponseNotification *)notification {
SDLRegisterAppInterfaceResponse *response = (SDLRegisterAppInterfaceResponse *)notification.response;

if (!response.success.boolValue) { return; }
if (response.displayCapabilities == nil) {
SDLLogE(@"RegisterAppInterface succeeded but didn't send a display capabilities. A lot of things will probably break.");
return;
}

self.displayCapabilities = response.displayCapabilities;
}

- (void)sdl_displayLayoutResponse:(SDLRPCResponseNotification *)notification {
SDLSetDisplayLayoutResponse *response = (SDLSetDisplayLayoutResponse *)notification.response;

if (!response.success.boolValue) { return; }
if (!response.success.boolValue) { return; }
if (response.displayCapabilities == nil) {
SDLLogE(@"SetDisplayLayout succeeded but didn't send a display capabilities. A lot of things will probably break.");
return;
}

self.displayCapabilities = response.displayCapabilities;

// Auto-send an updated show
Expand Down

0 comments on commit c9a8023

Please sign in to comment.