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

Handle nil displayCapabilities better in SCM #1664

Merged

Conversation

joeljfischer
Copy link
Contributor

@joeljfischer joeljfischer commented May 20, 2020

Fixes #1623

This PR is ready for review.

Risk

This PR makes no API changes.

Testing Plan

  • I have verified that I have not introduced new warnings in this PR (or explain why below)
  • I have run the unit tests with this PR
  • I have tested this PR against Core and verified behavior (if applicable, if not applicable, explain why below).

Unit Tests

  • Unit tests were updated to account for the changes to the screen manager sub-managers.
  • Unit test was added to the SCM manager to ensure that all the text / image fields are available in the particular case.

Core Tests

  • Test that SetDisplayLayout works on Sync3
  • Test that Show works on Manticore

Core version / branch / commit hash / module tested against:

  1. Sync 3, v3.4 19353_DEVTEST
  2. Manticore (Core v6.0.1)

HMI name / version / branch / commit hash / module tested against:

  1. Sync 3, v3.4 19353_DEVTEST
  2. Manticore (Generic_HMI v0.7.2)

Summary

This PR updates the SCM and screen sub-managers to better handle when displayCapabilities == nil to construct the imageFields and textFields to be fully capable. Then when displayCapabilities.imageFields == nil and displayCapabilities.textFields == nil while the displayCapabilities struct itself is not nil, then all imageFields and textFields are assumed to be unsupported.

Changelog

Bug Fixes
  • Fixed a case where when displayCapabilities.imageFields or displayCapabilities.textFields is nil intentionally, the head unit believes that everything is supported.

Tasks Remaining:

  • Run and update unit tests
  • Add SCM unit tests
  • Test with Core

CLA

* Add extensions for ImageField / TextField to handle passing all image or text fields
* Update screen sub-managers to handle `nil` ImageFields / TextFields by not enabling those fields
@joeljfischer joeljfischer added bug A defect in the library manager-system-capability Relating to the manager layer - system capability labels May 20, 2020
@joeljfischer joeljfischer self-assigned this May 20, 2020
@joeljfischer joeljfischer marked this pull request as draft May 20, 2020 18:46
@joeljfischer joeljfischer marked this pull request as ready for review May 27, 2020 13:47
@joeljfischer joeljfischer merged commit 293a737 into develop May 28, 2020
@joeljfischer joeljfischer deleted the bugfix/issue-1623-SCM-handle-nil-displaycapabilities branch May 28, 2020 19:32
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
None yet
Development

Successfully merging this pull request may close these issues.

2 participants