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

Skip to content
Commit e1ed8e95 authored by Jack Yu's avatar Jack Yu
Browse files

Fixed a race when slot-to-sub mapping table is rebuilding

When updateSubscriptionInfoByIccId is called, we always clear
the slot-to-sub id map first and then rebuild it. If other threads
access this map while the rebuilding is ongoing, subscription
controller returns an empty map that leads other threads think we
don't have any valid subscription at that moment. This indeed caused
some issues such like no data connection or device issued unexpected
LTE detach request to the mobile network.

Adding a lock to protect the entire rebuilding process and the map
might be an option but actually the Telephony provider, which
also has its own lock, has dependency on this map. The reverse lock
acuisition orders can cause deadlock, which eventually leads to an
ANR.

A workaround here is that we only clear the map when one/some SIMs
are gone.

A more comprehensive refactoring for building this slot-to-sub map
will be added in future releases.

Test: Manual + unit tests
bug: 63949982, 64004402, 63872700, 64176629
Change-Id: I88992d9cc92d18f7e344b58ea49b1d3007b50b41
parent 5ddb6ec3
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