diff options
-rw-r--r-- | res/values/strings.xml | 4 | ||||
-rw-r--r-- | src/com/android/settings/sim/SimSettings.java | 14 |
2 files changed, 12 insertions, 6 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml index e188645..4b640b7 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -5499,7 +5499,7 @@ <!-- Name label of Sim Editor. [CHAR LIMIT=40] --> <string name="sim_editor_name">SIM name</string> <!-- Title label of Sim Editor. [CHAR LIMIT=40] --> - <string name="sim_editor_title">SIM card</string> + <string name="sim_editor_title">SIM slot %1$d</string> <!-- Carrier label of Sim Editor. [CHAR LIMIT=40] --> <string name="sim_editor_carrier">Carrier</string> <!-- Number label of Sim Editor. [CHAR LIMIT=40] --> @@ -5534,7 +5534,7 @@ <string name="preferred_network_offload_popup">Disabling Network Name Broadcast will prevent automatic connection to hidden networks.</string> <!-- This is a divider in the SIM cards preferences that is the header of various settings where the user chooses which SIM to use for phone calls, data, and SMS messages [CHAR LIMIT=50] --> - <string name="sim_pref_divider">Activities</string> + <string name="sim_pref_divider">Preferred SIM for</string> <!-- When a user chooses this "Ask first" preference for the SIM to use for phone calls, they'll be prompted to choose a SIM every time they initiate a call [CHAR LIMIT=50] --> <string name="sim_calls_ask_first_prefs_title">Ask first</string> <!-- When a SIM preference hasn't been selected yet, this string is displayed as the pref summary until the user chooses a SIM subscription from the preference list [CHAR LIMIT=50] --> diff --git a/src/com/android/settings/sim/SimSettings.java b/src/com/android/settings/sim/SimSettings.java index 0eb4063..d83da73 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 |