summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSanket Padawe <sanketpadawe@google.com>2014-10-15 11:25:34 -0700
committerSanket Padawe <sanketpadawe@google.com>2014-10-20 12:33:50 -0700
commit9d276ca5972a07058c01f9e6a009956ad9f177f9 (patch)
treee94b46ff647cfde7e683c92b81c4e04692748433 /src
parent6b68b000da5db8df9228ae9f589dfb1f2b38759b (diff)
downloadpackages_apps_Settings-9d276ca5972a07058c01f9e6a009956ad9f177f9.tar.gz
packages_apps_Settings-9d276ca5972a07058c01f9e6a009956ad9f177f9.tar.bz2
packages_apps_Settings-9d276ca5972a07058c01f9e6a009956ad9f177f9.zip
Changing settings UI changes related to strings to be displayed
Change-Id: I4e722d7cac3914ce93ad28c806787851949028bd
Diffstat (limited to 'src')
-rw-r--r--src/com/android/settings/sim/SimSettings.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/com/android/settings/sim/SimSettings.java b/src/com/android/settings/sim/SimSettings.java
index 0eb40637d..d83da7322 100644
--- a/src/com/android/settings/sim/SimSettings.java
+++ b/src/com/android/settings/sim/SimSettings.java
@@ -390,10 +390,13 @@ public class SimSettings extends RestrictedSettingsFragment implements Indexable
public void update() {
final Resources res = getResources();
- setTitle(res.getString(R.string.sim_card_number_title, mSlotId + 1));
if (mSubInfoRecord != null) {
- setSummary(res.getString(R.string.sim_settings_summary,
- mSubInfoRecord.displayName, mSubInfoRecord.number));
+ if(TextUtils.isEmpty(mSubInfoRecord.displayName)) {
+ setTitle(getCarrierName());
+ } else {
+ setTitle(mSubInfoRecord.displayName);
+ }
+ setSummary(mSubInfoRecord.number.toString());
setEnabled(true);
} else {
setSummary(R.string.sim_slot_empty);
@@ -428,6 +431,8 @@ public class SimSettings extends RestrictedSettingsFragment implements Indexable
}
public void createEditDialog(SimPreference simPref) {
+ final Resources res = getResources();
+
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
final View dialogLayout = getActivity().getLayoutInflater().inflate(
@@ -443,7 +448,8 @@ public class SimSettings extends RestrictedSettingsFragment implements Indexable
TextView carrierView = (TextView)dialogLayout.findViewById(R.id.carrier);
carrierView.setText(getCarrierName());
- builder.setTitle(R.string.sim_editor_title);
+ builder.setTitle(String.format(res.getString(R.string.sim_editor_title),
+ (mSubInfoRecord.slotId + 1)));
builder.setPositiveButton(R.string.okay, new DialogInterface.OnClickListener() {
@Override