Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7038d268 authored by Glen Kuhne's avatar Glen Kuhne Committed by android-build-merger
Browse files

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

am: 35cc22fc

Change-Id: I85453268629231b8c3003b207e4edbf70c140ee2
parents 42126366 35cc22fc
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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();