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

Commit 49d962da authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Settings: Carrier name in mobile plan doesn't translate into English"

parents 43c4e3d5 3a85b690
Loading
Loading
Loading
Loading
+13 −0
Original line number Original line Diff line number Diff line
@@ -160,6 +160,7 @@ public class WirelessSettings extends SettingsPreferenceFragment
                    // Use NetworkOperatorName as second choice in case there is no
                    // Use NetworkOperatorName as second choice in case there is no
                    // SPN (Service Provider Name on the SIM). Such as with T-mobile.
                    // SPN (Service Provider Name on the SIM). Such as with T-mobile.
                    operatorName = mTm.getNetworkOperatorName();
                    operatorName = mTm.getNetworkOperatorName();
                    operatorName = getLocaleString(getActivity().getBaseContext(), operatorName);
                    if (TextUtils.isEmpty(operatorName)) {
                    if (TextUtils.isEmpty(operatorName)) {
                        mManageMobilePlanMessage = resources.getString(
                        mManageMobilePlanMessage = resources.getString(
                                R.string.mobile_unknown_sim_operator);
                                R.string.mobile_unknown_sim_operator);
@@ -168,6 +169,7 @@ public class WirelessSettings extends SettingsPreferenceFragment
                                R.string.mobile_no_provisioning_url, operatorName);
                                R.string.mobile_no_provisioning_url, operatorName);
                    }
                    }
                } else {
                } else {
                    operatorName = getLocaleString(getActivity().getBaseContext(), operatorName);
                    mManageMobilePlanMessage = resources.getString(
                    mManageMobilePlanMessage = resources.getString(
                            R.string.mobile_no_provisioning_url, operatorName);
                            R.string.mobile_no_provisioning_url, operatorName);
                }
                }
@@ -185,6 +187,17 @@ public class WirelessSettings extends SettingsPreferenceFragment
        }
        }
    }
    }


    private String getLocaleString(Context context, String networkName) {
        log("networkName: " + networkName);
        if (networkName != null) {
            networkName = android.util.NativeTextHelper.getInternalLocalString(context,
                    networkName,
                    R.array.origin_carrier_names,
                    R.array.locale_carrier_names);
        }
        return networkName;
    }

    private void initSmsApplicationSetting() {
    private void initSmsApplicationSetting() {
        log("initSmsApplicationSetting:");
        log("initSmsApplicationSetting:");
        Collection<SmsApplicationData> smsApplications =
        Collection<SmsApplicationData> smsApplications =