summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi NGUYEN VAN <reminv@google.com>2021-03-18 00:43:00 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-03-18 00:43:00 +0000
commite914d845a233dc8a6a06c98a37ab39d7ff8392fd (patch)
treeb160721d03b5b41210a8c53821b0c0161cd60a83
parent3e04ea42c40c0bc5511786ec27b9d60170ad8b40 (diff)
parentcd06f06a463acfabc931dfa8371a48f0d36138db (diff)
downloadframeworks_opt_net_wifi-e914d845a233dc8a6a06c98a37ab39d7ff8392fd.tar.gz
frameworks_opt_net_wifi-e914d845a233dc8a6a06c98a37ab39d7ff8392fd.tar.bz2
frameworks_opt_net_wifi-e914d845a233dc8a6a06c98a37ab39d7ff8392fd.zip
Remove WifiEntry usage of hidden connectivity API am: cd06f06a46
Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/net/wifi/+/1639979 Change-Id: Ic0e535ebd46eef3710a22e71ca5b0854d6e50c54
-rw-r--r--libs/WifiTrackerLib/src/com/android/wifitrackerlib/WifiEntry.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/WifiEntry.java b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/WifiEntry.java
index 09a2a3ffe..982ef888a 100644
--- a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/WifiEntry.java
+++ b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/WifiEntry.java
@@ -703,7 +703,8 @@ public abstract class WifiEntry implements Comparable<WifiEntry> {
// Find IPv4 default gateway.
for (RouteInfo routeInfo : linkProperties.getRoutes()) {
- if (routeInfo.isIPv4Default() && routeInfo.hasGateway()) {
+ if (routeInfo.isDefaultRoute() && routeInfo.getDestination().getAddress()
+ instanceof Inet4Address && routeInfo.hasGateway()) {
mConnectedInfo.gateway = routeInfo.getGateway().getHostAddress();
break;
}