summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/settings/wifi/WifiApSettings.java28
1 files changed, 15 insertions, 13 deletions
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);
+
+ }
}
}
}