am 85b04c19
: am 130a76c8
: am 49d660ac
: am 4e838ca9
: Merge "Use TelephonyManager api to get SPN of sim to display in UI." into lmp-mr1-dev
* commit '85b04c19ed81e74709d74d2acffd4bd42a3b07de': Use TelephonyManager api to get SPN of sim to display in UI.
This commit is contained in:
@@ -368,8 +368,14 @@ public class SimSettings extends RestrictedSettingsFragment implements Indexable
|
||||
numberView.setText(PhoneNumberUtils.formatNumber(rawNumber));
|
||||
}
|
||||
|
||||
final TelephonyManager tm =
|
||||
(TelephonyManager) getActivity().getSystemService(
|
||||
Context.TELEPHONY_SERVICE);
|
||||
String simCarrierName = tm.getSimOperatorNameForSubscription(mSubInfoRecord
|
||||
.getSubscriptionId());
|
||||
TextView carrierView = (TextView)dialogLayout.findViewById(R.id.carrier);
|
||||
carrierView.setText(mSubInfoRecord.getCarrierName());
|
||||
carrierView.setText(!TextUtils.isEmpty(simCarrierName) ? simCarrierName :
|
||||
getContext().getString(com.android.internal.R.string.unknownName));
|
||||
|
||||
builder.setTitle(String.format(res.getString(R.string.sim_editor_title),
|
||||
(mSubInfoRecord.getSimSlotIndex() + 1)));
|
||||
|
Reference in New Issue
Block a user