summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSanket Padawe <sanketpadawe@google.com>2014-10-20 21:09:07 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-20 21:09:07 +0000
commit5e5e55c9f07f4e4d8a2f76ac50507482d4138821 (patch)
tree8b7ba9019445c4069c3f4f0cde2f3cf30587c6f5 /src
parent36ae926a84516f639bdf4530a321b608848ed87a (diff)
parent8299d519de97ca081ea8ab0cdd3256aae48c8f43 (diff)
downloadpackages_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.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