diff options
| author | 2013-03-07 10:04:15 -0800 | |
|---|---|---|
| committer | 2013-03-07 11:08:08 -0800 | |
| commit | 642eb63a65b58fb31635f264fc8ffe44fdf075c5 (patch) | |
| tree | 79255dc411fe18744e5e17cab9db016c90b7637b | |
| parent | cc947fdc2decb83a70484bd0f831c58cc0346657 (diff) | |
Add default route constants to RouteInfo.
Bug: 8276725
Change-Id: I9c3ad7393430de9275f5b1c0189a94e5a27975fc
| -rw-r--r-- | core/java/android/net/RouteInfo.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/java/android/net/RouteInfo.java b/core/java/android/net/RouteInfo.java index 112e14397e7a..0c84f78ef6d2 100644 --- a/core/java/android/net/RouteInfo.java +++ b/core/java/android/net/RouteInfo.java @@ -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) { |