diff options
author | Ricardo Cerqueira <ricardo@cyngn.com> | 2016-04-18 16:53:14 +0100 |
---|---|---|
committer | Ricardo Cerqueira <ricardo@cyngn.com> | 2016-04-18 17:55:06 +0100 |
commit | e5c2b92590664cdec422768f04bfb121a3e15bad (patch) | |
tree | 2d23bc1b6d24b7a401725751db79fe9e826522ea /src/com/cyanogenmod/setupwizard/setup | |
parent | 4082d3a7ab8ef937385c6f49f930f43e490b11d7 (diff) | |
download | packages_apps_SetupWizard-e5c2b92590664cdec422768f04bfb121a3e15bad.zip packages_apps_SetupWizard-e5c2b92590664cdec422768f04bfb121a3e15bad.tar.gz packages_apps_SetupWizard-e5c2b92590664cdec422768f04bfb121a3e15bad.tar.bz2 |
Prefer SIM carrier name over network carrier
People generally identify their SIMs by the emitting carrier, not
the network they attach to. In roaming or MVNO scenarios, these
are likely not to be the same, leading to confusion in SIM selection.
Ref CYNGNOS-2496
Change-Id: I0ecd8e7511fd4229d6ce7629b1f97aa83a1a6254
Diffstat (limited to 'src/com/cyanogenmod/setupwizard/setup')
-rw-r--r-- | src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java | 5 | ||||
-rw-r--r-- | src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java b/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java index 255cbad..a0a4312 100644 --- a/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java @@ -396,7 +396,10 @@ public class ChooseDataSimPage extends SetupPage { private void updateCarrierText(SubscriptionInfo subInfoRecord) { if (mIsAttached) { - String name = mPhone.getNetworkOperatorName(subInfoRecord.getSubscriptionId()); + String name = mPhone.getSimOperatorNameForSubscription(subInfoRecord.getSubscriptionId()); + if (TextUtils.isEmpty(name)) { + name = mPhone.getNetworkOperatorName(subInfoRecord.getSubscriptionId()); + } ServiceState serviceState = mServiceStates.get(subInfoRecord.getSimSlotIndex()); final int slot = subInfoRecord.getSimSlotIndex(); final View v = mRows.get(slot); diff --git a/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java b/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java index 8940fd3..da3872e 100644 --- a/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java @@ -237,7 +237,10 @@ public class MobileDataPage extends SetupPage { private void updateCarrierText() { if (mIsAttached) { String name = - mPhone.getNetworkOperatorName(SubscriptionManager.getDefaultDataSubId()); + mPhone.getSimOperatorNameForSubscription(SubscriptionManager.getDefaultDataSubId()); + if (TextUtils.isEmpty(name)) { + name = mPhone.getNetworkOperatorName(SubscriptionManager.getDefaultDataSubId()); + } if (TextUtils.isEmpty(name)) { if (mServiceState != null && mServiceState.isEmergencyOnly()) { name = getString(R.string.setup_mobile_data_emergency_only); |