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

Skip to content
Commit 476e5324 authored by Nathan Harold's avatar Nathan Harold
Browse files

SST - Remove Double-Cached Previous SubId

For reasons that are a little unclear, a change of subId was
causing an atomic integer to be set, presumably because the
only OnSubscriptionsChangedListener didn't allow callbacks
on a particular thread, which created races. This patch
serializes updates to the subId caching, removing the atomic
in the middle entirely, and ensuring that updates to the
current and previous subId values in the SST class are done
on the Handler (and consequently thread) of the SST.

Logic is accordingly refactored slightly to simplify the
cascading assignment of curSubId -> prevSubId and then
newSubId -> curSubId.

Bug: 160681475
Test: atest ServiceStateTrackerTest
Test: manual (steps from b/160681475)
      1) selected a forbidden PLMN
      2) waited for a notification
      3) removed SIM and verified notification gone
Change-Id: Ic310a216c64f8f2f9c18c26f4300d9d100327a6c
parent 18c3831f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment