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

Skip to content
Commit dce529f0 authored by Jeff Davidson's avatar Jeff Davidson
Browse files

Implement embedded subscription list APIs.

Listing embedded subscriptions is fairly simple - we just return all
subscriptions for which IS_EMBEDDED = 1. We expose these through two
new APIs which return subscriptions which are either active or
embedded; one API (for the LPA and other callers with permission)
returns all such subscriptions, and the other (for carrier apps)
returns only subscriptions accessible to the calling app.

The cache of embedded subscriptions is updated whenever the SIM state
becomes ABSENT, ERROR, or LOADED; whenever an API call happens which
impacts the list of subscriptions (like a download or a delete); or
whenever the LPA requests a refresh due to some data change.

To support this change, the update process now runs on a background
thread instead of the main thread, as IPCs can't be made from the main
thread without deadlocking, in general. (Note though that this
probably should have been done before as the update logic was still
reading from/writing to a SQLite-backed ContentProvider, and since the
phone process currently contains UI for settings).

The update process pulls all cached embedded subscriptions (omitting
non-removable ones if the update is for a removable eUICC), as well as
non-embedded subscriptions with matching IMSIs. Subscriptions are
matched with those returned by the LPA and updated; any other cached
subscription in the above list is "removed" by marking it as
IS_EMBEDDED = 0. (This is equivalent to what happens when a physical
SIM is removed).

For the nickname, we repurpose the existing DISPLAY_NAME field.
However, there are settings UIs which allow updating this field, which
means those updates will be clobbered every time the list is updated.
A follow-up CL will propagate updates to this field from Settings to
the stored nickname on the eUICC's profile so that they persist.

Bug: 35851809
Test: Unit tests; e2e tests switching back and forth between embedded
and removable eUICC.
Change-Id: Ie714c0f7fc1a9d147008a2598dfdeac865ba120c
parent 25f518f0
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