Add password hint and fix settings crash

Bug: 2534348
Bug: 2533980
Change-Id: I2f220ac9c710869d3f93a56557afb33478c3b323
This commit is contained in:
Irfan Sheriff
2010-03-22 12:23:30 -07:00
parent 3e5cfe8f0a
commit 9775dc9515
2 changed files with 21 additions and 12 deletions

View File

@@ -81,6 +81,13 @@
android:singleLine="true" android:singleLine="true"
android:password="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" <CheckBox android:id="@+id/show_password"
style="?android:attr/textAppearanceSmallInverse" style="?android:attr/textAppearanceSmallInverse"
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@@ -114,19 +114,21 @@ public class WifiApSettings extends PreferenceActivity
public void onClick(DialogInterface dialogInterface, int button) { public void onClick(DialogInterface dialogInterface, int button) {
mWifiConfig = mDialog.getConfig(); 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);
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);
} }
} }
} }