diff options
author | Irfan Sheriff <isheriff@google.com> | 2010-03-22 12:23:30 -0700 |
---|---|---|
committer | Irfan Sheriff <isheriff@google.com> | 2010-03-22 15:33:44 -0700 |
commit | 9775dc9515e3e4bc2626544395041c3346d1fdc9 (patch) | |
tree | d4f23267f79866d76b22d5a891423ad1e78a98d7 | |
parent | 3e5cfe8f0ac32b932fe3b93cc784cd9b849dc118 (diff) | |
download | packages_apps_settings-9775dc9515e3e4bc2626544395041c3346d1fdc9.zip packages_apps_settings-9775dc9515e3e4bc2626544395041c3346d1fdc9.tar.gz packages_apps_settings-9775dc9515e3e4bc2626544395041c3346d1fdc9.tar.bz2 |
Add password hint and fix settings crash
Bug: 2534348
Bug: 2533980
Change-Id: I2f220ac9c710869d3f93a56557afb33478c3b323
-rw-r--r-- | res/layout/wifi_ap_dialog.xml | 7 | ||||
-rw-r--r-- | src/com/android/settings/wifi/WifiApSettings.java | 28 |
2 files changed, 22 insertions, 13 deletions
diff --git a/res/layout/wifi_ap_dialog.xml b/res/layout/wifi_ap_dialog.xml index f9c35b1..6d9691b 100644 --- a/res/layout/wifi_ap_dialog.xml +++ b/res/layout/wifi_ap_dialog.xml @@ -81,6 +81,13 @@ android:singleLine="true" android:password="true" /> + <TextView android:id="@+id/hint" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="12sp" + android:text="@string/credentials_password_too_short" + android:layout_marginBottom="10sp"/> + <CheckBox android:id="@+id/show_password" style="?android:attr/textAppearanceSmallInverse" android:layout_width="match_parent" diff --git a/src/com/android/settings/wifi/WifiApSettings.java b/src/com/android/settings/wifi/WifiApSettings.java index ec1016e..bca4835 100644 --- a/src/com/android/settings/wifi/WifiApSettings.java +++ b/src/com/android/settings/wifi/WifiApSettings.java @@ -114,19 +114,21 @@ public class WifiApSettings extends PreferenceActivity public void onClick(DialogInterface dialogInterface, int button) { - mWifiConfig = mDialog.getConfig(); - - if (button == DialogInterface.BUTTON_POSITIVE && mWifiConfig != null) { - mWifiManager.setWifiApEnabled(mWifiConfig, true); - mCreateNetwork.setSummary(String.format(getString(CONFIG_SUBTEXT), - mWifiConfig.SSID, - mWifiConfig.allowedKeyManagement.get(KeyMgmt.WPA_PSK) ? - mSecurityType[WPA_INDEX] : mSecurityType[OPEN_INDEX])); - /** - * There is no tether notification on changing AP - * configuration. Update status with new config. - */ - mWifiApEnabler.updateConfigSummary(mWifiConfig); + if (button == DialogInterface.BUTTON_POSITIVE) { + mWifiConfig = mDialog.getConfig(); + if(mWifiConfig != null) { + mWifiManager.setWifiApEnabled(mWifiConfig, true); + mCreateNetwork.setSummary(String.format(getString(CONFIG_SUBTEXT), + mWifiConfig.SSID, + mWifiConfig.allowedKeyManagement.get(KeyMgmt.WPA_PSK) ? + mSecurityType[WPA_INDEX] : mSecurityType[OPEN_INDEX])); + /** + * There is no tether notification on changing AP + * configuration. Update status with new config. + */ + mWifiApEnabler.updateConfigSummary(mWifiConfig); + + } } } } |