Fix generation of pin for WPS on screen rotation.

Bug: 21170548
Change-Id: Ib670214fec2776d48739c42a41b854c50be2740d
This commit is contained in:
Sanket Padawe
2015-05-18 15:33:27 -07:00
parent 7186a47ef3
commit 12291cec6e

View File

@@ -179,6 +179,11 @@ public class WpsDialog extends AlertDialog {
mWifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
setView(mView);
if (savedInstanceState == null) {
WpsInfo wpsConfig = new WpsInfo();
wpsConfig.setup = mWpsSetup;
mWifiManager.startWps(wpsConfig, mWpsListener);
}
super.onCreate(savedInstanceState);
}
@@ -203,9 +208,6 @@ public class WpsDialog extends AlertDialog {
mContext.registerReceiver(mReceiver, mFilter);
WpsInfo wpsConfig = new WpsInfo();
wpsConfig.setup = mWpsSetup;
mWifiManager.startWps(wpsConfig, mWpsListener);
}
@Override