Disable configuring EAP-TLS/TTLS/PEAP without CA certificates.

Bug: 15162357
Change-Id: I9b1be9837b104670adc1cc7ed47a5095ff38d335
This commit is contained in:
Sanket Padawe
2015-08-14 15:49:02 -07:00
parent 774a37b952
commit a1423547cf

View File

@@ -364,6 +364,11 @@ public class WifiConfigController implements TextWatcher,
enabled = false;
}
}
if (mEapCaCertSpinner != null &&
mView.findViewById(R.id.l_ca_cert).getVisibility() != View.GONE &&
((String)mEapCaCertSpinner.getSelectedItem()).equals(unspecifiedCert)) {
enabled = false;
}
submit.setEnabled(enabled);
}
@@ -656,6 +661,7 @@ public class WifiConfigController implements TextWatcher,
}
mPhase2Spinner = (Spinner) mView.findViewById(R.id.phase2);
mEapCaCertSpinner = (Spinner) mView.findViewById(R.id.ca_cert);
mEapCaCertSpinner.setOnItemSelectedListener(this);
mEapUserCertSpinner = (Spinner) mView.findViewById(R.id.user_cert);
mEapIdentityView = (TextView) mView.findViewById(R.id.identity);
mEapAnonymousView = (TextView) mView.findViewById(R.id.anonymous);