Merge "Disable submit button when PSK pass is invalid" into oc-dev
am: 35cc22fcf2
Change-Id: I85453268629231b8c3003b207e4edbf70c140ee2
This commit is contained in:
@@ -403,12 +403,13 @@ public class WifiConfigController implements TextWatcher,
|
|||||||
&& ((mAccessPointSecurity == AccessPoint.SECURITY_WEP
|
&& ((mAccessPointSecurity == AccessPoint.SECURITY_WEP
|
||||||
&& mPasswordView.length() == 0)
|
&& mPasswordView.length() == 0)
|
||||||
|| (mAccessPointSecurity == AccessPoint.SECURITY_PSK
|
|| (mAccessPointSecurity == AccessPoint.SECURITY_PSK
|
||||||
&& mPasswordView.length() < 8))) {
|
&& (mPasswordView.length() < 8 || mPasswordView.length() > 63)))) {
|
||||||
passwordInvalid = true;
|
passwordInvalid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((mSsidView != null && mSsidView.length() == 0)
|
if ((mSsidView != null && mSsidView.length() == 0)
|
||||||
|| ((mAccessPoint == null || !mAccessPoint.isSaved()) && passwordInvalid)) {
|
|| ((mAccessPoint == null || !mAccessPoint.isSaved()) && passwordInvalid
|
||||||
|
// If AccessPoint is saved (we're modifying it), allow zero length (unchanged) pw
|
||||||
|
|| mAccessPoint.isSaved() && passwordInvalid && mPasswordView.length() > 0)) {
|
||||||
enabled = false;
|
enabled = false;
|
||||||
} else {
|
} else {
|
||||||
enabled = ipAndProxyFieldsAreValid();
|
enabled = ipAndProxyFieldsAreValid();
|
||||||
|
Reference in New Issue
Block a user