Fix enabling of submit button

Change I478c915b introduced a regression where the submit
button is enabled even if no password is entered for a secure
network.

This happened because our checks would override a password
check when IP and proxy settings are valid (which is the default
setting)

Bug: 4462439
Change-Id: Icd3fde90759f33fa391ec79ae8075b6d8388d2e9
This commit is contained in:
Irfan Sheriff
2011-05-19 16:05:02 -07:00
parent d779e5dfbf
commit 990c3ad530

View File

@@ -271,13 +271,11 @@ public class WifiConfigController implements TextWatcher,
(mAccessPointSecurity == AccessPoint.SECURITY_PSK && mPasswordView.length() < 8)))) { (mAccessPointSecurity == AccessPoint.SECURITY_PSK && mPasswordView.length() < 8)))) {
enabled = false; enabled = false;
} else { } else {
enabled = true; if (ipAndProxyFieldsAreValid()) {
} enabled = true;
} else {
if (ipAndProxyFieldsAreValid()) { enabled = false;
enabled = true; }
} else {
enabled = false;
} }
submit.setEnabled(enabled); submit.setEnabled(enabled);
} }