Skip to content

Align SystemCapabilityManager with iOS (part3)#1321

Merged
bilal-alsharifi merged 18 commits intodevelopfrom
feature/scm_align_part3
Apr 9, 2020
Merged

Align SystemCapabilityManager with iOS (part3)#1321
bilal-alsharifi merged 18 commits intodevelopfrom
feature/scm_align_part3

Conversation

@bilal-alsharifi
Copy link
Copy Markdown
Contributor

@bilal-alsharifi bilal-alsharifi commented Mar 25, 2020

Fixes #1324

This PR is ready for review.

Risk

This PR makes minor 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

Added new unit tests to test getting capabilities on different HMI levels and confirm that GetSystemCapability request doesn't get sent out on HMILevel NONE

Core Tests

Did the following test on both Sync 3.2 and Core 6.0:

  • Test getCapablity() for a not cached capability on HMI NONE and confirm onError() is called
  • Test getCapablity() for a not cached capability on HMI FULL and confirm GetSystemCapbalbity request is sent to Core and the capability is received correctly
  • Test using ScreenManager and make sure it gets the DISPLAYS capability correctly and works well with no errors in logcat
  • Test streaming video and make sure it gets the VideoStraming capability correctly and works well with no errors in logcat

Summary

This PR updates SystemCapabilityManager to align with iOS:

  • Avoid sending GetSystemCapability if the app is already subscribed to the capability (since all the updated values will be received via notifications).
  • Avoid sending GetSystemCapability requests if hmilevel is NONE

CLA

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 25, 2020

Codecov Report

Merging #1321 into develop will decrease coverage by 0.04%.
The diff coverage is 0.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1321      +/-   ##
=============================================
- Coverage      47.60%   47.56%   -0.05%     
  Complexity      4403     4403              
=============================================
  Files            488      488              
  Lines          23757    23761       +4     
  Branches        2749     2751       +2     
=============================================
- Hits           11310    11301       -9     
- Misses         11753    11766      +13     
  Partials         694      694              
Impacted Files Coverage Δ Complexity Δ
...tdevicelink/managers/video/VideoStreamManager.java 35.40% <0.00%> (-2.75%) 13.00 <0.00> (-1.00)
...n/java/com/smartdevicelink/proxy/SdlProxyBase.java 8.59% <0.00%> (+0.01%) 31.00 <0.00> (+1.00)
...tdevicelink/managers/audio/AudioDecoderCompat.java 70.00% <0.00%> (-3.34%) 3.00% <0.00%> (ø%)

@bilal-alsharifi bilal-alsharifi changed the title [WIP] Align SystemCapabilityManager with iOS (part3) Align SystemCapabilityManager with iOS (part3) Mar 27, 2020
@joeljfischer joeljfischer self-requested a review April 2, 2020 18:44
@joeljfischer joeljfischer added the bug A defect in the library label Apr 2, 2020
@bilal-alsharifi
Copy link
Copy Markdown
Contributor Author

@joeljfischer The setupRpcListeners() method was formatted in a strange way. It uses spaces in some parts and tabs in others. I reformatted it to use tabs. PR is ready.

Comment thread android/sdl_android/src/main/java/com/smartdevicelink/managers/SdlManager.java Outdated
Comment thread base/src/main/java/com/smartdevicelink/proxy/interfaces/ISdl.java
Comment thread base/src/main/java/com/smartdevicelink/proxy/interfaces/ISdl.java
Comment thread javaSE/src/main/java/com/smartdevicelink/managers/lifecycle/LifecycleManager.java Outdated
bilal-alsharifi and others added 3 commits April 8, 2020 13:46
…/SdlManager.java

Co-Authored-By: Joey Grover <joeygrover@gmail.com>
…/video/VideoStreamManager.java

Co-Authored-By: Joey Grover <joeygrover@gmail.com>
# Conflicts:
#	android/sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/SystemCapabilityManagerTests.java
#	android/sdl_android/src/main/java/com/smartdevicelink/managers/SdlManager.java
#	android/sdl_android/src/main/java/com/smartdevicelink/managers/video/VideoStreamManager.java
@bilal-alsharifi bilal-alsharifi merged commit 7bf138f into develop Apr 9, 2020
@bilal-alsharifi bilal-alsharifi deleted the feature/scm_align_part3 branch April 9, 2020 19:33
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants