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;
|
||||
@@ -391,6 +392,7 @@ public class WifiConfigController2Test {
|
||||
private void checkSavedMacRandomizedValue(int macRandomizedValue) {
|
||||
when(mWifiEntry.isSaved()).thenReturn(true);
|
||||
final WifiConfiguration mockWifiConfig = mock(WifiConfiguration.class);
|
||||
when(mockWifiConfig.getIpConfiguration()).thenReturn(mock(IpConfiguration.class));
|
||||
when(mWifiEntry.getWifiConfiguration()).thenReturn(mockWifiConfig);
|
||||
mockWifiConfig.macRandomizationSetting = macRandomizedValue;
|
||||
mController = new TestWifiConfigController2(mConfigUiBase, mView, mWifiEntry,
|
||||
@@ -505,6 +507,7 @@ public class WifiConfigController2Test {
|
||||
when(mWifiEntry.isSaved()).thenReturn(true);
|
||||
when(mWifiEntry.getSecurity()).thenReturn(WifiEntry.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