Remove hidden connectivity methods access
This commit resolves the hidden methods accesses for LinkProperties, IpConfiguration and RouteInfo with atlernative way for the connectivity mainline module preparation. Bug: 172183305 Test: make RunSettingsRoboTests ROBOTEST_FILTER=\ com.android.settings.wifi.details2.WifiDetailPreferenceController2Test Test: make RunSettingsRoboTests ROBOTEST_FILTER=\ com.android.settings.wifi.details.WifiDetailPreferenceControllerTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=\ com.android.settings.UtilsTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=\ com.android.settings.wifi.WifiConfigController2Test Test: make RunSettingsRoboTests ROBOTEST_FILTER=\ com.android.settings.wifi.WifiConfigController2Test Change-Id: Iec4dab5d9fa12dedcf69a1cfe2a8be0956bc0d79
This commit is contained in:
@@ -812,9 +812,12 @@ public class WifiConfigController implements TextWatcher,
|
||||
.get(mEapSimSpinner.getSelectedItemPosition()).getCarrierId();
|
||||
}
|
||||
|
||||
config.setIpConfiguration(
|
||||
new IpConfiguration(mIpAssignment, mProxySettings,
|
||||
mStaticIpConfiguration, mHttpProxy));
|
||||
final IpConfiguration ipConfig = new IpConfiguration();
|
||||
ipConfig.setIpAssignment(mIpAssignment);
|
||||
ipConfig.setProxySettings(mProxySettings);
|
||||
ipConfig.setStaticIpConfiguration(mStaticIpConfiguration);
|
||||
ipConfig.setHttpProxy(mHttpProxy);
|
||||
config.setIpConfiguration(ipConfig);
|
||||
if (mMeteredSettingsSpinner != null) {
|
||||
config.meteredOverride = mMeteredSettingsSpinner.getSelectedItemPosition();
|
||||
}
|
||||
@@ -1382,18 +1385,18 @@ public class WifiConfigController implements TextWatcher,
|
||||
StaticIpConfiguration staticConfig = config.getIpConfiguration()
|
||||
.getStaticIpConfiguration();
|
||||
if (staticConfig != null) {
|
||||
if (staticConfig.ipAddress != null) {
|
||||
if (staticConfig.getIpAddress() != null) {
|
||||
mIpAddressView.setText(
|
||||
staticConfig.ipAddress.getAddress().getHostAddress());
|
||||
mNetworkPrefixLengthView.setText(Integer.toString(staticConfig.ipAddress
|
||||
.getPrefixLength()));
|
||||
staticConfig.getIpAddress().getAddress().getHostAddress());
|
||||
mNetworkPrefixLengthView.setText(Integer.toString(
|
||||
staticConfig.getIpAddress().getPrefixLength()));
|
||||
}
|
||||
|
||||
if (staticConfig.gateway != null) {
|
||||
mGatewayView.setText(staticConfig.gateway.getHostAddress());
|
||||
if (staticConfig.getGateway() != null) {
|
||||
mGatewayView.setText(staticConfig.getGateway().getHostAddress());
|
||||
}
|
||||
|
||||
Iterator<InetAddress> dnsIterator = staticConfig.dnsServers.iterator();
|
||||
Iterator<InetAddress> dnsIterator = staticConfig.getDnsServers().iterator();
|
||||
if (dnsIterator.hasNext()) {
|
||||
mDns1View.setText(dnsIterator.next().getHostAddress());
|
||||
}
|
||||
|
Reference in New Issue
Block a user