Settings: remove usage of WifiConfig helper methods
These methods can be replaced with methods on IpConfiguration itself. There is no need to expose these as a @SystemApi, and they are being removed. Bug: 146046526 Test: make RunSettingsRoboTests -j40 Change-Id: I592f277f5e23bf58e76b8c48a0f0370d53cc6b81
This commit is contained in:
@@ -24,6 +24,7 @@ import static org.mockito.Mockito.when;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.net.IpConfiguration;
|
||||
import android.net.wifi.WifiConfiguration;
|
||||
import android.net.wifi.WifiEnterpriseConfig;
|
||||
import android.net.wifi.WifiEnterpriseConfig.Eap;
|
||||
@@ -389,6 +390,7 @@ public class WifiConfigControllerTest {
|
||||
private void checkSavedMacRandomizedValue(int macRandomizedValue) {
|
||||
when(mAccessPoint.isSaved()).thenReturn(true);
|
||||
final WifiConfiguration mockWifiConfig = mock(WifiConfiguration.class);
|
||||
when(mockWifiConfig.getIpConfiguration()).thenReturn(mock(IpConfiguration.class));
|
||||
when(mAccessPoint.getConfig()).thenReturn(mockWifiConfig);
|
||||
mockWifiConfig.macRandomizationSetting = macRandomizedValue;
|
||||
mController = new TestWifiConfigController(mConfigUiBase, mView, mAccessPoint,
|
||||
@@ -503,6 +505,7 @@ public class WifiConfigControllerTest {
|
||||
when(mAccessPoint.isSaved()).thenReturn(true);
|
||||
when(mAccessPoint.getSecurity()).thenReturn(AccessPoint.SECURITY_EAP);
|
||||
final WifiConfiguration mockWifiConfig = mock(WifiConfiguration.class);
|
||||
when(mockWifiConfig.getIpConfiguration()).thenReturn(mock(IpConfiguration.class));
|
||||
final WifiEnterpriseConfig mockWifiEnterpriseConfig = mock(WifiEnterpriseConfig.class);
|
||||
when(mockWifiEnterpriseConfig.getEapMethod()).thenReturn(Eap.PEAP);
|
||||
mockWifiConfig.enterpriseConfig = mockWifiEnterpriseConfig ;
|
||||
|
Reference in New Issue
Block a user