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

Bugfix/issue 1824 Add missing DisplayCapabilities info and window ID #1825

Merged
merged 9 commits into from
Sep 12, 2022

Conversation

JulianKast
Copy link
Contributor

@JulianKast JulianKast commented Aug 9, 2022

Fixes #1824

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).
  • I have tested Android, Java SE, and Java EE

Unit Tests

Unit test were updated in SystemCapabilityManagerTests.java

Core Tests

Tested to verify that ScreenParams and MediaClockFormats from SystemCapabilityManager DisplayCapabilities matched DisplayCapabilities from RAIR.

Test retrieving DefaultMainWindowCapability from SystemCapabilityManager modifying it then retrieving it again from SystemCapabilityManager to verify that it was not modified in the manager.

Core version / branch / commit hash / module tested against: Manticore v 2.10.0
HMI name / version / branch / commit hash / module tested against: Manticore v 2.10.0

Summary

When we get the new DisplayCapability, we update the old deprecated DisplayCapabilities based on the new DisplayCapability. When we do that, ScreenParams and MediaClockFormats which are a part of DisplayCapabilities don't get set properly.

This pr checks cached DisplayCapabilities for ScreenParams and MediaClockFormats and updates them to the updated capabilities being set in SystemCapabilityManager as well as updatesgetWindowCapability to clone and set the windowID property.

Changelog

Bug Fixes
  • Fixes updating DisplayCapabilities

CLA

@JulianKast JulianKast changed the base branch from master to develop August 9, 2022 20:25
@codecov
Copy link

codecov bot commented Aug 9, 2022

Codecov Report

Merging #1825 (8251b82) into develop (ccf0af9) will increase coverage by 0.27%.
The diff coverage is 25.00%.

❗ Current head 8251b82 differs from pull request most recent head e06a141. Consider uploading reports for the commit e06a141 to get more accurate results

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1825      +/-   ##
=============================================
+ Coverage      53.78%   54.05%   +0.27%     
- Complexity      5519     5534      +15     
=============================================
  Files            562      562              
  Lines          25809    25828      +19     
  Branches        3395     3400       +5     
=============================================
+ Hits           13881    13961      +80     
+ Misses         10660    10595      -65     
- Partials        1268     1272       +4     
Impacted Files Coverage Δ
...martdevicelink/transport/SdlBroadcastReceiver.java 3.02% <0.00%> (-0.12%) ⬇️
...anagers/lifecycle/BaseSystemCapabilityManager.java 67.76% <75.00%> (+0.08%) ⬆️
...rtdevicelink/streaming/video/SdlRemoteDisplay.java 51.21% <0.00%> (ø)
...ink/managers/screen/BaseTextAndGraphicManager.java 64.58% <0.00%> (+0.41%) ⬆️
...rc/main/java/com/android/grafika/gles/EglCore.java 44.82% <0.00%> (+2.58%) ⬆️
...nk/managers/audio/AudioDecoderCompatOperation.java 79.54% <0.00%> (+4.54%) ⬆️
.../java/com/android/grafika/gles/EglSurfaceBase.java 32.14% <0.00%> (+7.14%) ⬆️
...smartdevicelink/encoder/VirtualDisplayEncoder.java 45.69% <0.00%> (+9.60%) ⬆️
...main/java/com/android/grafika/gles/Drawable2d.java 67.92% <0.00%> (+11.32%) ⬆️
...ava/com/android/grafika/gles/Texture2dProgram.java 59.18% <0.00%> (+24.48%) ⬆️
... and 1 more

Copy link
Contributor

@noah-livio noah-livio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Admittedly, I still don't completely understand exactly why they work, but these changes do fix the targeted issue and don't seem to create any new ones. The code is clean and seems safely limited in scope.

Just requesting the removal of any empty line for formatting at this point.

@JulianKast JulianKast changed the title Bugfix/issue 1824 Bugfix/issue 1824 Add missing display capability info and window id Aug 31, 2022
@JulianKast JulianKast changed the title Bugfix/issue 1824 Add missing display capability info and window id Bugfix/issue 1824 Add missing DisplayCapabilities info and window ID Aug 31, 2022
@JulianKast JulianKast changed the title Bugfix/issue 1824 Add missing DisplayCapabilities info and window ID Bugfix/issue 1824 Add missing DisplayCapabilities info and window ID Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DisplayCapabilities ScreenParams null in SystemCapabilityManager
4 participants