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: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"

View File

@@ -114,9 +114,9 @@ public class WifiApSettings extends PreferenceActivity
public void onClick(DialogInterface dialogInterface, int button) {
if (button == DialogInterface.BUTTON_POSITIVE) {
mWifiConfig = mDialog.getConfig();
if (button == DialogInterface.BUTTON_POSITIVE && mWifiConfig != null) {
if(mWifiConfig != null) {
mWifiManager.setWifiApEnabled(mWifiConfig, true);
mCreateNetwork.setSummary(String.format(getString(CONFIG_SUBTEXT),
mWifiConfig.SSID,
@@ -127,6 +127,8 @@ public class WifiApSettings extends PreferenceActivity
* configuration. Update status with new config.
*/
mWifiApEnabler.updateConfigSummary(mWifiConfig);
}
}
}
}