NetworkRequestDialog: Exit the dialog on connect failure
Connection failure (similar to connection success) is the end of the processng of a request. We should dismiss the dialog on connection failure. Bug: 158844146 Test: Manual tests - Simulate connection failure and ensure that the dialog vanishes with a toast. Change-Id: I625ca76298ed549dbed76d398aea0c957c9102fc
This commit is contained in:
@@ -217,13 +217,12 @@ public class NetworkRequestDialogActivity extends FragmentActivity implements
|
||||
|
||||
@Override
|
||||
public void onUserSelectionConnectFailure(WifiConfiguration wificonfiguration) {
|
||||
if (mIsSpecifiedSsid) {
|
||||
showSingleSsidRequestDialog(
|
||||
WifiInfo.sanitizeSsid(mMatchedConfig.SSID), true /* isTryAgain */);
|
||||
return;
|
||||
if (!isFinishing()) {
|
||||
Toast.makeText(this, R.string.network_connection_connect_failure, Toast.LENGTH_SHORT)
|
||||
.show();
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
}
|
||||
|
||||
mDialogFragment.onUserSelectionConnectFailure(wificonfiguration);
|
||||
}
|
||||
|
||||
// Called when user click "Connect" button. Called by
|
||||
|
Reference in New Issue
Block a user