[Mac Randomization] Fix MAC randomization option does not work when
ephemeral newtork WifiConfiguration is only available when saved network. So ephemeral newtork could not have wifi config to config wifi setting. In this situation, making option be not selectable. Bug: 122919564 Test: atest WifiPrivacyPreferenceControllerTest Change-Id: I8a2a1c36ec6d41a6f912da29a8b17bc2e43d9a27
This commit is contained in:
@@ -93,4 +93,20 @@ public class WifiPrivacyPreferenceControllerTest {
|
||||
mPreferenceController.getRandomizationValue();
|
||||
mPreferenceController.onPreferenceChange(mDropDownPreference, "1");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdateState_isNotEphemeralNetwork_shouldBeSelectable() {
|
||||
mPreferenceController.setIsEphemeral(false);
|
||||
mPreferenceController.updateState(mDropDownPreference);
|
||||
|
||||
assertThat(mDropDownPreference.isSelectable()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdateState_isEphemeralNetwork_shouldNotSelectable() {
|
||||
mPreferenceController.setIsEphemeral(true);
|
||||
mPreferenceController.updateState(mDropDownPreference);
|
||||
|
||||
assertThat(mDropDownPreference.isSelectable()).isFalse();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user