Merge "Data Usage, materialized!" into lmp-dev
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
index 7de1652..4b69114 100644
--- a/res/values/arrays.xml
+++ b/res/values/arrays.xml
@@ -310,7 +310,6 @@
<!-- Note that adding/removing/moving the items will need wifi settings code change. -->
<string-array name="wifi_ap_security">
<item>@string/wifi_security_none</item>
- <item>@string/wifi_security_wpa</item>
<item>@string/wifi_security_wpa2</item>
</string-array>
diff --git a/src/com/android/settings/wifi/WifiApDialog.java b/src/com/android/settings/wifi/WifiApDialog.java
index 211e85d..fb8026a 100644
--- a/src/com/android/settings/wifi/WifiApDialog.java
+++ b/src/com/android/settings/wifi/WifiApDialog.java
@@ -47,8 +47,7 @@
private final DialogInterface.OnClickListener mListener;
public static final int OPEN_INDEX = 0;
- public static final int WPA_INDEX = 1;
- public static final int WPA2_INDEX = 2;
+ public static final int WPA2_INDEX = 1;
private View mView;
private TextView mSsid;
@@ -68,9 +67,7 @@
}
public static int getSecurityTypeIndex(WifiConfiguration wifiConfig) {
- if (wifiConfig.allowedKeyManagement.get(KeyMgmt.WPA_PSK)) {
- return WPA_INDEX;
- } else if (wifiConfig.allowedKeyManagement.get(KeyMgmt.WPA2_PSK)) {
+ if (wifiConfig.allowedKeyManagement.get(KeyMgmt.WPA2_PSK)) {
return WPA2_INDEX;
}
return OPEN_INDEX;
@@ -93,15 +90,6 @@
config.allowedKeyManagement.set(KeyMgmt.NONE);
return config;
- case WPA_INDEX:
- config.allowedKeyManagement.set(KeyMgmt.WPA_PSK);
- config.allowedAuthAlgorithms.set(AuthAlgorithm.OPEN);
- if (mPassword.length() != 0) {
- String password = mPassword.getText().toString();
- config.preSharedKey = password;
- }
- return config;
-
case WPA2_INDEX:
config.allowedKeyManagement.set(KeyMgmt.WPA2_PSK);
config.allowedAuthAlgorithms.set(AuthAlgorithm.OPEN);
@@ -137,8 +125,7 @@
if (mWifiConfig != null) {
mSsid.setText(mWifiConfig.SSID);
mSecurity.setSelection(mSecurityTypeIndex);
- if (mSecurityTypeIndex == WPA_INDEX ||
- mSecurityTypeIndex == WPA2_INDEX) {
+ if (mSecurityTypeIndex == WPA2_INDEX) {
mPassword.setText(mWifiConfig.preSharedKey);
}
}
@@ -156,7 +143,7 @@
private void validate() {
if ((mSsid != null && mSsid.length() == 0) ||
- (((mSecurityTypeIndex == WPA_INDEX) || (mSecurityTypeIndex == WPA2_INDEX))&&
+ ((mSecurityTypeIndex == WPA2_INDEX)&&
mPassword.length() < 8)) {
getButton(BUTTON_SUBMIT).setEnabled(false);
} else {