Default sim name set to carrier name in sim settings

Default sim name in SIM settings UI should be carrier name untill user
specifies a name for SIM.

Bug: 17732079
Change-Id: I302ad00095fd06b393dbe358b135f031390a3678
This commit is contained in:
Sanket Padawe
2014-10-24 11:15:11 -07:00
committed by Wink Saville
parent 22eb414bbd
commit 745046c157

View File

@@ -479,6 +479,8 @@ public class SimSettings extends RestrictedSettingsFragment implements Indexable
if (mSubInfoRecord != null) { if (mSubInfoRecord != null) {
if(TextUtils.isEmpty(mSubInfoRecord.displayName)) { if(TextUtils.isEmpty(mSubInfoRecord.displayName)) {
setTitle(getCarrierName()); setTitle(getCarrierName());
mSubInfoRecord.displayName = getCarrierName();
SubscriptionManager.setDisplayName(getCarrierName(), mSubInfoRecord.subId);
} else { } else {
setTitle(mSubInfoRecord.displayName); setTitle(mSubInfoRecord.displayName);
} }
@@ -546,6 +548,9 @@ public class SimSettings extends RestrictedSettingsFragment implements Indexable
SubscriptionManager.setDisplayName(mSubInfoRecord.displayName, SubscriptionManager.setDisplayName(mSubInfoRecord.displayName,
mSubInfoRecord.subId); mSubInfoRecord.subId);
findRecordBySubId(mSubInfoRecord.subId).displayName =
nameText.getText().toString();
updateAllOptions(); updateAllOptions();
update(); update();
} }