Changing settings UI changes related to strings to be displayed
Change-Id: I4e722d7cac3914ce93ad28c806787851949028bd
This commit is contained in:
@@ -5487,7 +5487,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] -->
|
||||
@@ -5522,7 +5522,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] -->
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user