Implement getConfig() method to get WifiConfiguration
Make a duplicated function of WifiConfigController.getConfig(). This function could get a new WifiConfiguration from input AccessPoint or ScanResult. Should be removed if there is standard one in framework. Bug: 120827021 Test: RunSettingsRoboTests Change-Id: Ia5981e8d41f434c097b464a2bfe18e1356f7b087
This commit is contained in:
@@ -129,8 +129,16 @@ public class NetworkRequestDialogFragment extends InstrumentedDialogFragment imp
|
||||
}
|
||||
|
||||
if (which < accessPointList.size()) {
|
||||
WifiConfiguration wifiConfig = accessPointList.get(which).getConfig();
|
||||
mUserSelectionCallback.select(wifiConfig);
|
||||
final AccessPoint selectedAccessPoint = accessPointList.get(which);
|
||||
WifiConfiguration wifiConfig = selectedAccessPoint.getConfig();
|
||||
if (wifiConfig == null) {
|
||||
wifiConfig = WifiUtils.getWifiConfig(selectedAccessPoint, /* scanResult */
|
||||
null, /* password */ null);
|
||||
}
|
||||
|
||||
if (wifiConfig != null) {
|
||||
mUserSelectionCallback.select(wifiConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user