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

Commit feafc202 authored by Robert Greenwalt's avatar Robert Greenwalt Committed by Android Git Automerger
Browse files

am fe225e25: Merge change I70e1f7a6 into eclair

Merge commit 'fe225e25' into eclair-mr2

* commit 'fe225e25':
  Fix the selection of locale from SIM mcc.
parents 756e75cf fe225e25
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -572,7 +572,6 @@ public final class MccTable
     * @param mccmnc truncated imsi with just the MCC and MNC - MNC assumed to be from 4th to end
     */
    public static void updateMccMncConfiguration(PhoneBase phone, String mccmnc) {
        Configuration config = new Configuration();
        int mcc, mnc;

        try {
@@ -586,15 +585,18 @@ public final class MccTable
        Log.d(LOG_TAG, "updateMccMncConfiguration: mcc=" + mcc + ", mnc=" + mnc);

        if (mcc != 0) {
            config.mcc = mcc;
            setTimezoneFromMccIfNeeded(phone, mcc);
            setLocaleFromMccIfNeeded(phone, mcc);
            setWifiChannelsFromMccIfNeeded(phone, mcc);
        }
        try {
            Configuration config = ActivityManagerNative.getDefault().getConfiguration();
            if (mcc != 0) {
                config.mcc = mcc;
            }
            if (mnc != 0) {
                config.mnc = mnc;
            }
        try {
            ActivityManagerNative.getDefault().updateConfiguration(config);
        } catch (RemoteException e) {
            Log.e(LOG_TAG, "Can't update configuration", e);