Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 88c39610 authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Synchronize updates of missed call counts and add more logging.

When the missed call count stored in MissedCallNotifierImpl was updated,
there was a rare chance for the missed call count to be cleared while it
was being updated.  mMissedCallCounts is a concurrent hash map and the
references it stores are AtomicIntegers; getting an element and then
updating it can't be guaranteed to be thread safe.  Also, in the case of
updating the missed call count we'd update the value and then re-fetch it
when sending the intent to dialer; this means it could have been cleared
in the process of being updated.

Test: Ran MissedCallNotifierImpl tests.
Test: Performed missed call regression testing to verify that missed call
notifications and clearing takes place in Dialer as expected.
Test: Added unit tests for dialer-handled set/clear of missed call count.
This doesn't test concurrency per se, but it helps improve test coverage.
Fixes: 168695531

Change-Id: I76389500bf8d91f029123178060db6ff38e398eb
parent c01de52d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment