From 34e5a0c30881463c10dad399850b78aef775a3a4 Mon Sep 17 00:00:00 2001 From: Maurice Lam Date: Thu, 22 Oct 2015 11:39:26 -0700 Subject: [PATCH] [WifiDialog] Allow adding unspecified AP In WifiDialogActivity, handle the case where the given accessPointState is null, and show the Wi-Fi dialog allowing users to enter the SSID and other credentials. This will be used by setup wizard when user selected "Add new network" item. Bug: 23392285 Change-Id: Ica2650d9e829d73281bc9c504c3005d9c5750d31 --- src/com/android/settings/wifi/WifiDialogActivity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/wifi/WifiDialogActivity.java b/src/com/android/settings/wifi/WifiDialogActivity.java index 6f9e3d3cb1a..9eea98a553c 100644 --- a/src/com/android/settings/wifi/WifiDialogActivity.java +++ b/src/com/android/settings/wifi/WifiDialogActivity.java @@ -43,7 +43,10 @@ public class WifiDialogActivity extends Activity implements WifiDialog.WifiDialo final Intent intent = getIntent(); final Bundle accessPointState = intent.getBundleExtra(KEY_ACCESS_POINT_STATE); - final AccessPoint accessPoint = new AccessPoint(this, accessPointState); + AccessPoint accessPoint = null; + if (accessPointState != null) { + accessPoint = new AccessPoint(this, accessPointState); + } WifiDialog dialog = new WifiDialog(this, this, accessPoint, WifiConfigUiBase.MODE_CONNECT); dialog.show();