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
This commit is contained in:
Ricardo Cerqueira 2016-04-18 16:53:14 +01:00
parent 4082d3a7ab
commit e5c2b92590
2 changed files with 8 additions and 2 deletions

View File

@ -396,7 +396,10 @@ public class ChooseDataSimPage extends SetupPage {
private void updateCarrierText(SubscriptionInfo subInfoRecord) { private void updateCarrierText(SubscriptionInfo subInfoRecord) {
if (mIsAttached) { 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()); ServiceState serviceState = mServiceStates.get(subInfoRecord.getSimSlotIndex());
final int slot = subInfoRecord.getSimSlotIndex(); final int slot = subInfoRecord.getSimSlotIndex();
final View v = mRows.get(slot); final View v = mRows.get(slot);

View File

@ -237,7 +237,10 @@ public class MobileDataPage extends SetupPage {
private void updateCarrierText() { private void updateCarrierText() {
if (mIsAttached) { if (mIsAttached) {
String name = String name =
mPhone.getNetworkOperatorName(SubscriptionManager.getDefaultDataSubId()); mPhone.getSimOperatorNameForSubscription(SubscriptionManager.getDefaultDataSubId());
if (TextUtils.isEmpty(name)) {
name = mPhone.getNetworkOperatorName(SubscriptionManager.getDefaultDataSubId());
}
if (TextUtils.isEmpty(name)) { if (TextUtils.isEmpty(name)) {
if (mServiceState != null && mServiceState.isEmergencyOnly()) { if (mServiceState != null && mServiceState.isEmergencyOnly()) {
name = getString(R.string.setup_mobile_data_emergency_only); name = getString(R.string.setup_mobile_data_emergency_only);