Use CharSequence for DisplayName
Change-Id: I2601eb9dc1edf585ad3b48da9fb97c65cb1face5
This commit is contained in:
@@ -710,7 +710,7 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable
|
|||||||
/**
|
/**
|
||||||
* Build {@link TabSpec} with thin indicator, and empty content.
|
* Build {@link TabSpec} with thin indicator, and empty content.
|
||||||
*/
|
*/
|
||||||
private TabSpec buildTabSpec(String tag, String title) {
|
private TabSpec buildTabSpec(String tag, CharSequence title) {
|
||||||
return mTabHost.newTabSpec(tag).setIndicator(title).setContent(
|
return mTabHost.newTabSpec(tag).setIndicator(title).setContent(
|
||||||
mEmptyTabContent);
|
mEmptyTabContent);
|
||||||
}
|
}
|
||||||
@@ -2590,7 +2590,7 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable
|
|||||||
for (SubInfoRecord subInfo : mSubInfoList) {
|
for (SubInfoRecord subInfo : mSubInfoList) {
|
||||||
if (hasReadyMobileRadio(context, subInfo.getSubscriptionId())) {
|
if (hasReadyMobileRadio(context, subInfo.getSubscriptionId())) {
|
||||||
mTabHost.addTab(buildTabSpec(mMobileTagMap.get(subInfo.getSubscriptionId()),
|
mTabHost.addTab(buildTabSpec(mMobileTagMap.get(subInfo.getSubscriptionId()),
|
||||||
subInfo.getDisplayName().toString()));
|
subInfo.getDisplayName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -370,7 +370,11 @@ public class SimSettings extends RestrictedSettingsFragment implements Indexable
|
|||||||
} else {
|
} else {
|
||||||
for (int i = 0; i < selectableSubInfoLength; ++i) {
|
for (int i = 0; i < selectableSubInfoLength; ++i) {
|
||||||
final SubInfoRecord sir = mSelectableSubInfos.get(i);
|
final SubInfoRecord sir = mSelectableSubInfos.get(i);
|
||||||
list.add(sir.getDisplayName().toString());
|
CharSequence displayName = sir.getDisplayName();
|
||||||
|
if (displayName == null) {
|
||||||
|
displayName = "";
|
||||||
|
}
|
||||||
|
list.add(displayName.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user