Merge "Disable submit button when PSK pass is invalid" into oc-dev

am: 35cc22fcf2

Change-Id: I85453268629231b8c3003b207e4edbf70c140ee2
This commit is contained in:
Glen Kuhne
2017-04-28 00:07:00 +00:00
committed by android-build-merger

View File

@@ -403,12 +403,13 @@ public class WifiConfigController implements TextWatcher,
&& ((mAccessPointSecurity == AccessPoint.SECURITY_WEP
&& mPasswordView.length() == 0)
|| (mAccessPointSecurity == AccessPoint.SECURITY_PSK
&& mPasswordView.length() < 8))) {
&& (mPasswordView.length() < 8 || mPasswordView.length() > 63)))) {
passwordInvalid = true;
}
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;
} else {
enabled = ipAndProxyFieldsAreValid();