Use CharSequence for DisplayName
Change-Id: Ib18a4d255fd2eb50125b71c89fb7ff5ba4abd690
diff --git a/src/com/android/phone/settings/PhoneAccountSettingsFragment.java b/src/com/android/phone/settings/PhoneAccountSettingsFragment.java
index b3b1d80..09083ac 100644
--- a/src/com/android/phone/settings/PhoneAccountSettingsFragment.java
+++ b/src/com/android/phone/settings/PhoneAccountSettingsFragment.java
@@ -292,7 +292,7 @@
private void initAccountList() {
for (SubInfoRecord subscription : SubscriptionManager.getActiveSubInfoList()) {
- String label = subscription.getDisplayName().toString();
+ CharSequence label = subscription.getDisplayName();
Intent intent = new Intent(TelecomManager.ACTION_SHOW_CALL_SETTINGS);
intent.putExtra(CallFeaturesSetting.SUB_ID_EXTRA, subscription.getSubscriptionId());
intent.putExtra(CallFeaturesSetting.SUB_LABEL_EXTRA, label);
diff --git a/src/com/android/services/telephony/TelecomAccountRegistry.java b/src/com/android/services/telephony/TelecomAccountRegistry.java
index ad74ca4..f4c50a7 100644
--- a/src/com/android/services/telephony/TelecomAccountRegistry.java
+++ b/src/com/android/services/telephony/TelecomAccountRegistry.java
@@ -126,12 +126,12 @@
// the network is.
description = label = mTelephonyManager.getNetworkOperatorName();
} else {
- String subDisplayName = null;
+ CharSequence subDisplayName = null;
// We can only get the real slotId from the SubInfoRecord, we can't calculate the
// slotId from the subId or the phoneId in all instances.
SubInfoRecord record = SubscriptionManager.getSubInfoForSubscriber(subId);
if (record != null) {
- subDisplayName = record.getDisplayName().toString();
+ subDisplayName = record.getDisplayName();
slotId = record.getSubscriptionId();
// Assign a "fake" color while the underlying Telephony stuff is refactored.