diff options
author | Irfan Sheriff <isheriff@android.com> | 2012-03-01 23:57:12 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-03-01 23:57:12 -0800 |
commit | 6c9c305b28a33a7272ded543650223638ea5836d (patch) | |
tree | ea761e6d122f7860fd2209e768f41a3ae226ee5c /src/com/android/settings/wifi | |
parent | bb826f26cb36261b06e218a0c76e3bc6d518314f (diff) | |
parent | f91e52c986f4e7f8094a794c471813ac05d5d59c (diff) | |
download | packages_apps_Settings-6c9c305b28a33a7272ded543650223638ea5836d.tar.gz packages_apps_Settings-6c9c305b28a33a7272ded543650223638ea5836d.tar.bz2 packages_apps_Settings-6c9c305b28a33a7272ded543650223638ea5836d.zip |
am f91e52c9: am c4bf8cd9: am 2f76aaaf: Merge "Enable EAP-pwd configuration in WiFi Settings."
* commit 'f91e52c986f4e7f8094a794c471813ac05d5d59c':
Enable EAP-pwd configuration in WiFi Settings.
Diffstat (limited to 'src/com/android/settings/wifi')
-rw-r--r-- | src/com/android/settings/wifi/WifiConfigController.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/com/android/settings/wifi/WifiConfigController.java b/src/com/android/settings/wifi/WifiConfigController.java index afa2a1144..76a9a453d 100644 --- a/src/com/android/settings/wifi/WifiConfigController.java +++ b/src/com/android/settings/wifi/WifiConfigController.java @@ -98,6 +98,12 @@ public class WifiConfigController implements TextWatcher, public static final int PROXY_NONE = 0; public static final int PROXY_STATIC = 1; + /* These values from from "wifi_eap_method" resource array */ + public static final int WIFI_EAP_METHOD_PEAP = 0; + public static final int WIFI_EAP_METHOD_TLS = 1; + public static final int WIFI_EAP_METHOD_TTLS = 2; + public static final int WIFI_EAP_METHOD_PWD = 3; + private static final String TAG = "WifiConfigController"; private Spinner mNetworkSetupSpinner; @@ -539,6 +545,7 @@ public class WifiConfigController implements TextWatcher, if (mEapMethodSpinner == null) { mEapMethodSpinner = (Spinner) mView.findViewById(R.id.method); + mEapMethodSpinner.setOnItemSelectedListener(this); mPhase2Spinner = (Spinner) mView.findViewById(R.id.phase2); mEapCaCertSpinner = (Spinner) mView.findViewById(R.id.ca_cert); mEapUserCertSpinner = (Spinner) mView.findViewById(R.id.user_cert); @@ -560,6 +567,21 @@ public class WifiConfigController implements TextWatcher, mEapAnonymousView.setText(config.anonymous_identity.value()); } } + + mView.findViewById(R.id.l_method).setVisibility(View.VISIBLE); + mView.findViewById(R.id.l_identity).setVisibility(View.VISIBLE); + + if (mEapMethodSpinner.getSelectedItemPosition() == WIFI_EAP_METHOD_PWD){ + mView.findViewById(R.id.l_phase2).setVisibility(View.GONE); + mView.findViewById(R.id.l_ca_cert).setVisibility(View.GONE); + mView.findViewById(R.id.l_user_cert).setVisibility(View.GONE); + mView.findViewById(R.id.l_anonymous).setVisibility(View.GONE); + } else { + mView.findViewById(R.id.l_phase2).setVisibility(View.VISIBLE); + mView.findViewById(R.id.l_ca_cert).setVisibility(View.VISIBLE); + mView.findViewById(R.id.l_user_cert).setVisibility(View.VISIBLE); + mView.findViewById(R.id.l_anonymous).setVisibility(View.VISIBLE); + } } private void showNetworkSetupFields() { @@ -761,6 +783,8 @@ public class WifiConfigController implements TextWatcher, if (parent == mSecuritySpinner) { mAccessPointSecurity = position; showSecurityFields(); + } else if (parent == mEapMethodSpinner) { + showSecurityFields(); } else if (parent == mNetworkSetupSpinner) { showNetworkSetupFields(); } else if (parent == mProxySettingsSpinner) { |