Fix MUT cannot connect to AP by WPS after rotating MUT
While MUT is connecting to AP, rotate MUT, then MUT can not connect to AP by WPS. To ensure MUT can connect to AP by WPS, invoke startWps() to re-connect after rotating MUT. Bug: 37557898 Change-Id: Icbaff96895ad52f5c1bc6df5d180f69989527667
This commit is contained in:
committed by
Shunta Sato
parent
31ec85a913
commit
f5761e7b79
@@ -150,6 +150,9 @@ public class WpsDialog extends AlertDialog {
|
||||
DialogState dialogState = mDialogState.valueOf(savedInstanceState.getString(DIALOG_STATE));
|
||||
String msg = savedInstanceState.getString(DIALOG_MSG_STRING);
|
||||
updateDialog(dialogState, msg);
|
||||
if (dialogState == DialogState.WPS_START) {
|
||||
startWps();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,9 +183,7 @@ public class WpsDialog extends AlertDialog {
|
||||
|
||||
setView(mView);
|
||||
if (savedInstanceState == null) {
|
||||
WpsInfo wpsConfig = new WpsInfo();
|
||||
wpsConfig.setup = mWpsSetup;
|
||||
mWifiManager.startWps(wpsConfig, mWpsListener);
|
||||
startWps();
|
||||
}
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
@@ -276,4 +277,9 @@ public class WpsDialog extends AlertDialog {
|
||||
}
|
||||
}
|
||||
|
||||
private void startWps() {
|
||||
WpsInfo wpsConfig = new WpsInfo();
|
||||
wpsConfig.setup = mWpsSetup;
|
||||
mWifiManager.startWps(wpsConfig, mWpsListener);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user