Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33fdb4a4 authored by Aaron Huang's avatar Aaron Huang Committed by Automerger Merge Worker
Browse files

Merge changes I5ed1bc8b,Ie9e6af0e am: 83402619

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645290

Change-Id: I9fe40b60f31f0897f8cb62a39787536cd5524157
parents f92723b0 83402619
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import android.net.IpConfiguration.IpAssignment;
import android.net.IpConfiguration.ProxySettings;
import android.net.LinkAddress;
import android.net.ProxyInfo;
import android.net.RouteInfo;
import android.net.StaticIpConfiguration;
import android.net.Uri;
import android.util.ArrayMap;
@@ -322,11 +321,14 @@ public class IpConfigStore {
                                if (in.readInt() == 1) {
                                    gateway = InetAddresses.parseNumericAddress(in.readUTF());
                                }
                                RouteInfo route = new RouteInfo(dest, gateway);
                                if (route.isIPv4Default() && gatewayAddress == null) {
                                // If the destination is a default IPv4 route, use the gateway
                                // address unless already set.
                                if (dest.getAddress() instanceof Inet4Address
                                        && dest.getPrefixLength() == 0 && gatewayAddress == null) {
                                    gatewayAddress = gateway;
                                } else {
                                    loge("Non-IPv4 default or duplicate route: " + route);
                                    loge("Non-IPv4 default or duplicate route: "
                                            + dest.getAddress());
                                }
                            }
                        } else if (key.equals(DNS_KEY)) {