Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty displayCapabilities in setDisplayLayout response prevents display update #1536

Closed
djs98052 opened this issue Jan 29, 2020 · 2 comments · Fixed by #1575
Closed

Empty displayCapabilities in setDisplayLayout response prevents display update #1536

djs98052 opened this issue Jan 29, 2020 · 2 comments · Fixed by #1575
Assignees
Labels
bug A defect in the library manager-system-capability Relating to the manager layer - system capability
Projects

Comments

@djs98052
Copy link

djs98052 commented Jan 29, 2020

Bug Report

While processing the response to setDisplayLayout, the sdl_displayLayoutResponse method assumes the presence of response.displayCapabilities while the protocol specification indicates this is an optional field in the response. If the response contains an empty displayCapabilities field, then the cached value for displayCapabilities gets overwritten and subsequent attempts to update the display fail because the capabilities of the display cannot be determined.

Reproduction Steps
  1. Call screenManager.setDisplayLayout
  2. Call screenManager.beginUpdates()
  3. Call screenManager.title = "Title"
  4. Call screenManager.endUpdates()
Expected Behavior

Title is shown on the screen

Observed Behavior

Title is not shown on the screen

OS & Version Information
  • iOS Version: Simulator 11.4, iPhone 8+ 12.4
  • SDL iOS Version: 6.4.1
  • Testing Against: Emulator
Test Case, Sample Code, and / or Example App
smartDeviceLinkManager.sdlManager.send(request: setLayoutRequest) { _, response, error in
    guard response?.success.boolValue ?? false == true else {
        logError("Error setting display layout: \(String(describing: error))")
        return
    }
    let screenManager = self.smartDeviceLinkManager.sdlManager.screenManager
    screenManager.beginUpdates()
    screenManager.title = NSLocalizedString("My Title", comment: "")
    screenManager.primaryGraphic = self.logoArtwork
    screenManager.softButtonObjects = [self.meetingListButton, self.meetingRoomButton]
    screenManager.endUpdates()
}
@joeljfischer joeljfischer added bug A defect in the library manager-screen Relating to the manager layer - screen managers labels Jan 30, 2020
@joeljfischer joeljfischer added this to To do in v6.6.0 Feb 6, 2020
@joeljfischer joeljfischer added manager-system-capability Relating to the manager layer - system capability and removed manager-screen Relating to the manager layer - screen managers labels Feb 6, 2020
@joeljfischer
Copy link
Contributor

After investigation, this particular example appears to not be an issue. We always send the templateTitle even if the head unit doesn't support it. The emulator you are using probably does not support a template title.

With that said, in the course of the investigation, we found that the underlying issue is valid for other text fields and image fields.

@joeljfischer
Copy link
Contributor

@djs98052 do you remember which emulator you were using?

@joeljfischer joeljfischer mentioned this issue Apr 29, 2020
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect in the library manager-system-capability Relating to the manager layer - system capability
Projects
No open projects
v6.6.0
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants