Add default route constants to RouteInfo. am: b00860f1ad

Original change: undetermined

Change-Id: I2f5cc5d4935074e6c059af84625f6f5e50a0a04f
This commit is contained in:
Lorenzo Colitti
2021-05-31 05:55:57 +00:00
committed by Automerger Merge Worker

View File

@@ -45,6 +45,18 @@ public class RouteInfo implements Parcelable {
private final boolean mIsDefault;
private final boolean mIsHost;
/**
* The IPv4 default route.
*/
public static final RouteInfo IPV4_DEFAULT = new RouteInfo(
new LinkAddress(Inet4Address.ANY, 0));
/**
* The IPv6 default route.
*/
public static final RouteInfo IPV6_DEFAULT = new RouteInfo(
new LinkAddress(Inet6Address.ANY, 0));
public RouteInfo(LinkAddress destination, InetAddress gateway) {
if (destination == null) {
if (gateway != null) {