Merge "Force MAC randomization to enabled on ACTION_WIFI_ADD_NETWORKS" into udc-dev am: a7e606e406
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22156122 Change-Id: Ie9bd6fbc6da5cd69e86e6a91ed42450c941d8846 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -655,6 +655,10 @@ public class AddAppNetworksFragment extends InstrumentedFragment implements
|
||||
try {
|
||||
mWifiManager.addOrUpdatePasspointConfiguration(passpointConfig);
|
||||
mAnyNetworkSavedSuccess = true;
|
||||
|
||||
// (force) enable MAC randomization on new credentials
|
||||
mWifiManager.setMacRandomizationSettingPasspointEnabled(
|
||||
passpointConfig.getHomeSp().getFqdn(), true);
|
||||
} catch (IllegalArgumentException e) {
|
||||
mResultCodeArrayList.set(mUiToRequestedList.get(index).mIndex,
|
||||
RESULT_NETWORK_ADD_ERROR);
|
||||
@@ -669,6 +673,10 @@ public class AddAppNetworksFragment extends InstrumentedFragment implements
|
||||
final WifiConfiguration wifiConfiguration =
|
||||
mUiToRequestedList.get(index).mWifiNetworkSuggestion.getWifiConfiguration();
|
||||
wifiConfiguration.SSID = addQuotationIfNeeded(wifiConfiguration.SSID);
|
||||
|
||||
// (force) enable MAC randomization on new credentials
|
||||
wifiConfiguration.setMacRandomizationSetting(
|
||||
WifiConfiguration.RANDOMIZATION_PERSISTENT);
|
||||
mWifiManager.save(wifiConfiguration, mSaveListener);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user