Fix setting passwd string and vpn checkbox titles.

* Add min length requirement in setting passwd string.
* Do not change vpn checkbox title with state changes.
This commit is contained in:
Hung-ying Tyan
2009-09-12 01:31:11 +08:00
parent 5f23cb39a1
commit a3aaf19e09
4 changed files with 5 additions and 12 deletions

View File

@@ -57,7 +57,7 @@ class L2tpEditor extends VpnProfileEditor {
final L2tpProfile profile = (L2tpProfile) getProfile();
CheckBoxPreference secret = mSecret = new CheckBoxPreference(c);
boolean enabled = profile.isSecretEnabled();
setSecretTitle(secret, R.string.vpn_l2tp_secret, enabled);
setCheckBoxTitle(secret, R.string.vpn_l2tp_secret);
secret.setChecked(enabled);
setSecretSummary(secret, enabled);
secret.setOnPreferenceChangeListener(
@@ -67,8 +67,6 @@ class L2tpEditor extends VpnProfileEditor {
boolean enabled = (Boolean) newValue;
profile.setSecretEnabled(enabled);
mSecretHandler.getPreference().setEnabled(enabled);
setSecretTitle(mSecret, R.string.vpn_l2tp_secret,
enabled);
setSecretSummary(mSecret, enabled);
return true;
}