diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2010-08-23 13:54:04 -0700 |
---|---|---|
committer | Android Code Review <code-review@android.com> | 2010-08-23 13:54:04 -0700 |
commit | b998f3111df82149567935138945500f33451b1a (patch) | |
tree | b91bcc397d4c44c615a06b58502597153c6cf80f /core/java/android/net/MobileDataStateTracker.java | |
parent | 1ffd753ee0cc373965dcc0fe6ef9affdd15035a1 (diff) | |
parent | 9bc709d46e1165ca0c9a02bd970767c401b990e5 (diff) | |
download | frameworks_base-b998f3111df82149567935138945500f33451b1a.zip frameworks_base-b998f3111df82149567935138945500f33451b1a.tar.gz frameworks_base-b998f3111df82149567935138945500f33451b1a.tar.bz2 |
Merge "Add an API to request route to an IPv6 host."
Diffstat (limited to 'core/java/android/net/MobileDataStateTracker.java')
-rw-r--r-- | core/java/android/net/MobileDataStateTracker.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/java/android/net/MobileDataStateTracker.java b/core/java/android/net/MobileDataStateTracker.java index 214510d..d790fc1 100644 --- a/core/java/android/net/MobileDataStateTracker.java +++ b/core/java/android/net/MobileDataStateTracker.java @@ -16,6 +16,8 @@ package android.net; +import java.net.InetAddress; + import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; @@ -23,7 +25,6 @@ import android.content.IntentFilter; import android.os.RemoteException; import android.os.Handler; import android.os.ServiceManager; -import android.os.SystemProperties; import com.android.internal.telephony.ITelephony; import com.android.internal.telephony.Phone; import com.android.internal.telephony.TelephonyIntents; @@ -460,17 +461,16 @@ public class MobileDataStateTracker extends NetworkStateTracker { * Ensure that a network route exists to deliver traffic to the specified * host via the mobile data network. * @param hostAddress the IP address of the host to which the route is desired, - * in network byte order. * @return {@code true} on success, {@code false} on failure */ @Override - public boolean requestRouteToHost(int hostAddress) { + public boolean requestRouteToHost(InetAddress hostAddress) { if (DBG) { - Log.d(TAG, "Requested host route to " + Integer.toHexString(hostAddress) + + Log.d(TAG, "Requested host route to " + hostAddress.getHostAddress() + " for " + mApnType + "(" + mInterfaceName + ")"); } - if (mInterfaceName != null && hostAddress != -1) { - return NetworkUtils.addHostRoute(mInterfaceName, hostAddress) == 0; + if (mInterfaceName != null) { + return NetworkUtils.addHostRoute(mInterfaceName, hostAddress, null); } else { return false; } |