Skip to content
Commit acf1eebc authored by Evan Laird's avatar Evan Laird
Browse files

Create Configuration overrides for MCC/MNC values

SystemUI currently only shows the RAT type indicator for the active
network, which may change. At the same time, the Resources system does
not track the active mobile network, which means that
`context.getResources().getConfiguration()` may return a `Configuration`
object with an incorrect MCC/MNC for the current active subscription.

This CL creates a `MobileContextProvider` class, which will lazily
generate `Context`s with a correctly overridden MCC/MNC, so that
resource overlays properly load individual carrier iconography when the
active data subscription changes.

We also will load each individual mobile icon with the proper context,
in case there is ever a need to show the RAT type indicator for multiple
subscriptions at once.

Lastly, this CL adds a new "mccmnc" arg string to demo mode so that we
can easily validate RAT type indicator overlays.

Test: atest MobileContextProviderTest
Test: use the new `mccmnc` string in sysui demo mode to manually verify
Fixes: 240555502
Change-Id: If1f7d31a46f19f335b9545ca33638786a423ba0d
parent 3315391b
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