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

Skip to content
Commit e3f6e6a1 authored by Wink Saville's avatar Wink Saville
Browse files

Fix b10864885

Created getLocaleForLanguageCountry so that only one updateConfiguration
was needed to update Configuration.mcc/mnc/locale/userSetLocale. Previously
it took two updates, this streamlines the update making it more efficient.

Removed the conditional that was in setLocalFromMccIfNeeded on
getLteOnCdmaModeStatic which causes world phones that support cdma on
lte as well as gsm to not set the locale. This condiational was add to
support the multi logical SIMs for Verizon which has NV, RUIM and CSIM.

The intent of the conditional was to allow the EFpl/EFli fields of the
CSIM to be used to set the locale. But it doesn't work because of the
technique of using reading the current configuration, modifying it and
then writing it back would cause the current mode to be persisted because
of bug 11171996.

In short, bug 11171996 set the userSetLocale flag to true so when the
mcc/mnc is updated it also caused the current locale, en_US, to be
persisted not the "new" locale based on the mcc/mnc. Thus later, when the
CSIM was loaded it wouldn't be persisted anyway, because en_US was
already persisted.

Added the "persist.always.persist.locale" system property so that
you can test MccTable.updateMccMncConfiguration being called after
SetupWizard starts. Typically when starting a device that has been wiped
MccTable.updateMccMncConfigration is called before SetupWizard starts.
This means SetupWizard has the "proper" locale rather than en_US, the
default setup, when ActivityManagerService is constructed.

But, if you set persist.always.persist.locale to 1, persist.sys.language
to "en" and persist.sys.country to "US" and then reboot without wiping
SetupWizard will start first. As such SetupWizard will start with en_US
as its locale. A short time later MccTable.updateMccMncConfiguration will
be called and it will set the locale to the "proper" value based on the
mcc/mnc if you've set persist.always.persist.locale to 1. This allows the
testing of SetupWizard running first.

Finally I'm using Slog for logging as it makes it easier to debug the
interaction of MccTable, SetupWizard and ActivityManagerService.

Bug: b10864885
Change-Id: I19709ebf18f6d32af1b1b16ced511d331e145cf7
parent 76e1ee73
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