Loading res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -3768,6 +3768,8 @@ <string name="apn_edit">Edit access point</string> <!-- Edit access point label summary text when no value has been set --> <string name="apn_not_set">Not set</string> <!-- Edit access point label summary text when no value has been set for mvno value. [CHAR LIMIT=NONE]--> <string name="apn_not_set_for_mvno">Not set</string> <!-- Edit access point labels: A label the user can give to the APN to allow him to differentiate it from the others --> <string name="apn_name">Name</string> <!-- Edit access point labels: The actual access point name--> src/com/android/settings/network/apn/ApnEditor.java +10 −2 Original line number Diff line number Diff line Loading @@ -632,7 +632,7 @@ public class ApnEditor extends SettingsPreferenceFragment checkNull(bearerMultiDescription(mBearerMulti.getValues()))); mMvnoType.setSummary( checkNull(mvnoDescription(mMvnoType.getValue()))); mMvnoMatchData.setSummary(checkNull(mMvnoMatchData.getText())); mMvnoMatchData.setSummary(checkNullforMvnoValue(mMvnoMatchData.getText())); // allow user to edit carrier_enabled for some APN final boolean ceEditable = getResources().getBoolean( R.bool.config_allow_edit_carrier_enabled); Loading Loading @@ -791,7 +791,7 @@ public class ApnEditor extends SettingsPreferenceFragment } mMvnoType.setValue((String) newValue); mMvnoType.setSummary(mvno); mMvnoMatchData.setSummary(checkNull(mMvnoMatchData.getText())); mMvnoMatchData.setSummary(checkNullforMvnoValue(mMvnoMatchData.getText())); } else if (KEY_PASSWORD.equals(key)) { mPassword.setSummary(starify(newValue != null ? String.valueOf(newValue) : "")); } else if (KEY_CARRIER_ENABLED.equals(key)) { Loading Loading @@ -1216,6 +1216,14 @@ public class ApnEditor extends SettingsPreferenceFragment return TextUtils.isEmpty(value) ? sNotSet : value; } /** * To make traslation be diversity, use another string id for MVNO value. */ private String checkNullforMvnoValue(String value) { String notSetForMvnoValue = getResources().getString(R.string.apn_not_set_for_mvno); return TextUtils.isEmpty(value) ? notSetForMvnoValue : value; } /** * Returns null if the given string {@code value} equals to {@link #sNotSet}. This method * should be used when convert a string value from preference to database. Loading Loading
res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -3768,6 +3768,8 @@ <string name="apn_edit">Edit access point</string> <!-- Edit access point label summary text when no value has been set --> <string name="apn_not_set">Not set</string> <!-- Edit access point label summary text when no value has been set for mvno value. [CHAR LIMIT=NONE]--> <string name="apn_not_set_for_mvno">Not set</string> <!-- Edit access point labels: A label the user can give to the APN to allow him to differentiate it from the others --> <string name="apn_name">Name</string> <!-- Edit access point labels: The actual access point name-->
src/com/android/settings/network/apn/ApnEditor.java +10 −2 Original line number Diff line number Diff line Loading @@ -632,7 +632,7 @@ public class ApnEditor extends SettingsPreferenceFragment checkNull(bearerMultiDescription(mBearerMulti.getValues()))); mMvnoType.setSummary( checkNull(mvnoDescription(mMvnoType.getValue()))); mMvnoMatchData.setSummary(checkNull(mMvnoMatchData.getText())); mMvnoMatchData.setSummary(checkNullforMvnoValue(mMvnoMatchData.getText())); // allow user to edit carrier_enabled for some APN final boolean ceEditable = getResources().getBoolean( R.bool.config_allow_edit_carrier_enabled); Loading Loading @@ -791,7 +791,7 @@ public class ApnEditor extends SettingsPreferenceFragment } mMvnoType.setValue((String) newValue); mMvnoType.setSummary(mvno); mMvnoMatchData.setSummary(checkNull(mMvnoMatchData.getText())); mMvnoMatchData.setSummary(checkNullforMvnoValue(mMvnoMatchData.getText())); } else if (KEY_PASSWORD.equals(key)) { mPassword.setSummary(starify(newValue != null ? String.valueOf(newValue) : "")); } else if (KEY_CARRIER_ENABLED.equals(key)) { Loading Loading @@ -1216,6 +1216,14 @@ public class ApnEditor extends SettingsPreferenceFragment return TextUtils.isEmpty(value) ? sNotSet : value; } /** * To make traslation be diversity, use another string id for MVNO value. */ private String checkNullforMvnoValue(String value) { String notSetForMvnoValue = getResources().getString(R.string.apn_not_set_for_mvno); return TextUtils.isEmpty(value) ? notSetForMvnoValue : value; } /** * Returns null if the given string {@code value} equals to {@link #sNotSet}. This method * should be used when convert a string value from preference to database. Loading