smartdevicelink / sdl_ios

Get your app connected to the 🚙, make your users feel like a 🌟
www.smartdevicelink.com
BSD 3-Clause "New" or "Revised" License
169 stars 105 forks source link

2093 - Soft button manager image upload fix #2094

Closed joeljfischer closed 2 years ago

joeljfischer commented 2 years ago

Fixes #2093

Risk

This PR makes no API changes.

Testing Plan

Unit Tests

Unit test added for softButtonCapabilities.imageSupported = YES and displayCapabilities.graphicEnabled = NO, as well as visa-versa.

Core Tests

Tested that existing behavior continues to

Core version / branch / commit hash / module tested against: Sync 3.4 TDK (19353_DEVTEST) HMI name / version / branch / commit hash / module tested against: Sync 3.4 TDK (19353_DEVTEST)

Summary

This PR works around a bug when connecting to Sync 2.0 head units that causes the app to attempt to upload soft button images that will never work. This wastes bandwidth and time.

The issues happens because Sync 2.0 doesn't support softButtonCapabilities, so the library assumes all capabilities are available. However, Sync 2.0 does report that all graphics are unsupported in RAIR.displayCapabilities.graphicSupported.

Changelog

Bug Fixes

Tasks Remaining:

n/a

CLA

codecov[bot] commented 2 years ago

Codecov Report

Merging #2094 (f9fc42d) into develop (4580b82) will decrease coverage by 0.02%. The diff coverage is 75.00%.

:exclamation: Current head f9fc42d differs from pull request most recent head f62311c. Consider uploading reports for the commit f62311c to get more accurate results

@@             Coverage Diff             @@
##           develop    #2094      +/-   ##
===========================================
- Coverage    85.38%   85.35%   -0.03%     
===========================================
  Files          447      447              
  Lines        22598    22646      +48     
===========================================
+ Hits         19295    19330      +35     
- Misses        3303     3316      +13