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:
@@ -844,7 +844,8 @@ public class WifiDetailPreferenceController2 extends AbstractPreferenceControlle
|
||||
// Find IPv4 default gateway.
|
||||
String gateway = null;
|
||||
for (RouteInfo routeInfo : mLinkProperties.getRoutes()) {
|
||||
if (routeInfo.isIPv4Default() && routeInfo.hasGateway()) {
|
||||
if (routeInfo.hasGateway() && routeInfo.isDefaultRoute()
|
||||
&& routeInfo.getDestination().getAddress() instanceof Inet4Address) {
|
||||
gateway = routeInfo.getGateway().getHostAddress();
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user