OSDN Git Service

Fix enabling of submit button
authorIrfan Sheriff <isheriff@google.com>
Thu, 19 May 2011 23:05:02 +0000 (16:05 -0700)
committerIrfan Sheriff <isheriff@google.com>
Thu, 19 May 2011 23:06:31 +0000 (16:06 -0700)
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

src/com/android/settings/wifi/WifiConfigController.java

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