diff options
author | Sanket Padawe <sanketpadawe@google.com> | 2014-10-20 21:09:07 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-10-20 21:09:07 +0000 |
commit | 5e5e55c9f07f4e4d8a2f76ac50507482d4138821 (patch) | |
tree | 8b7ba9019445c4069c3f4f0cde2f3cf30587c6f5 /src | |
parent | 36ae926a84516f639bdf4530a321b608848ed87a (diff) | |
parent | 8299d519de97ca081ea8ab0cdd3256aae48c8f43 (diff) | |
download | packages_apps_Settings-5e5e55c9f07f4e4d8a2f76ac50507482d4138821.tar.gz packages_apps_Settings-5e5e55c9f07f4e4d8a2f76ac50507482d4138821.tar.bz2 packages_apps_Settings-5e5e55c9f07f4e4d8a2f76ac50507482d4138821.zip |
am 8299d519: am 4bcd973d: am fbde7619: am bdedbb85: Merge "Changing settings UI changes related to strings to be displayed" into lmp-sprout-dev
* commit '8299d519de97ca081ea8ab0cdd3256aae48c8f43':
Changing settings UI changes related to strings to be displayed
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/sim/SimSettings.java | 14 |
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 |