WifiConfigController2 passes in WifiConfiguration.MacRandomizationSetting to methods that expect WifiEntry.Privacy enums, resulting in the wrong values being saved and displayed for the edit dialog. Fix this by making sure the correct WifiEntry values are used. Note that the Network Details Page uses WifiPrivacyPreferenceController2, which uses the correct values. Flag: EXEMPT bugfix Bug: 284230986 Test: atest WifiPrivacyPreferenceController2Test, atest WifiConfigController2Test, manually verify adding a new network saves the config with RANDOMIZATION_AUTO by default and changing the value works correctly. Change-Id: I84dc7cc50d04360aca611ca80ee400a97b693722
Running Settings Robolectric tests
The full suite
$ croot
$ atest SettingsRoboTests
Running a single test class
With a filter
$ croot
$ atest SettingsRoboTests:com.android.settings.display.AdaptiveSleepPreferenceControllerTest
You can also run any single test class with atest (it will try to find the correct path)
$ atest AdaptiveSleepPreferenceControllerTest