Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix potential lock screen race condition #2066

Merged
merged 4 commits into from
Jan 6, 2022

Conversation

joeljfischer
Copy link
Contributor

@joeljfischer joeljfischer commented Jan 4, 2022

Fixes #2063

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

Fixed broken unit tests to expect messages, not notifications

Core Tests

  • Connect, then enable and disable driver distraction

Core version / branch / commit hash / module tested against: Sync 3.4
HMI name / version / branch / commit hash / module tested against: Sync 3.4

Summary

This PR updates the lock screen manager and lock screen status manager to fix a potential race condition. The LSM owns the LSSM, so instead of observing the same notifications, we have the LSM message the LSSM when the HMI status or driver distraction notifications change.

Changelog

Bug Fixes
  • Fixed a potential race condition between the lock screen manager and lock screen status manager. This could result in undefined lock screen behavior.

Tasks Remaining:

n/a

CLA

* Now receives its driver distraction / hmi status values from the lock screen manager
* Lock screen fix b/c accidentally removed dispatcher assignment
* Lock screen status log clarifications
@joeljfischer joeljfischer added bug A defect in the library manager-lockscreen Relating to the manager layer - lockscreen labels Jan 4, 2022
@joeljfischer joeljfischer self-assigned this Jan 4, 2022
@codecov
Copy link

codecov bot commented Jan 4, 2022

Codecov Report

Merging #2066 (0b534d8) into develop (c5442d2) will decrease coverage by 0.00%.
The diff coverage is 95.00%.

@@             Coverage Diff             @@
##           develop    #2066      +/-   ##
===========================================
- Coverage    85.83%   85.83%   -0.01%     
===========================================
  Files          447      447              
  Lines        23371    23377       +6     
===========================================
+ Hits         20061    20066       +5     
- Misses        3310     3311       +1     

@joeljfischer joeljfischer linked an issue Jan 4, 2022 that may be closed by this pull request
@joeljfischer joeljfischer marked this pull request as ready for review January 4, 2022 18:57
@joeljfischer joeljfischer merged commit c182283 into develop Jan 6, 2022
@joeljfischer joeljfischer deleted the bugfix/issue-2063-lockscreen-race-conditions branch January 6, 2022 13:48
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug A defect in the library manager-lockscreen Relating to the manager layer - lockscreen
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lock Screen Race Conditions
2 participants