summaryrefslogtreecommitdiffstats
path: root/services/java
diff options
context:
space:
mode:
authorRobert Greenwalt <robdroid@android.com>2010-08-20 10:01:55 -0700
committerRobert Greenwalt <robdroid@android.com>2010-08-20 10:01:55 -0700
commit8afddad7e7ce7275e26dc1ebfb359fbdd1d5920b (patch)
treefefab4d60bf5654a4d638db7cf5de5dea351d4a0 /services/java
parentbccfcd95d3cc4029c1ed8514d31436a857283873 (diff)
downloadframeworks_base-8afddad7e7ce7275e26dc1ebfb359fbdd1d5920b.zip
frameworks_base-8afddad7e7ce7275e26dc1ebfb359fbdd1d5920b.tar.gz
frameworks_base-8afddad7e7ce7275e26dc1ebfb359fbdd1d5920b.tar.bz2
DO NOT MERGE Fixing Connectivity
Passing Gateway addr info from telephony into ConnectivityService so it can add/remove the default route as needed. Fixed differently on master. bug:2927822 Change-Id: I9a3ee7cd23c4717e7c60098f0595aa3f77c44b15
Diffstat (limited to 'services/java')
-rw-r--r--services/java/com/android/server/TelephonyRegistry.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/services/java/com/android/server/TelephonyRegistry.java b/services/java/com/android/server/TelephonyRegistry.java
index 664dfa5..7e23422 100644
--- a/services/java/com/android/server/TelephonyRegistry.java
+++ b/services/java/com/android/server/TelephonyRegistry.java
@@ -19,6 +19,7 @@ package com.android.server;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
+import android.net.NetworkUtils;
import android.os.Binder;
import android.os.Bundle;
import android.os.IBinder;
@@ -348,7 +349,8 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
}
public void notifyDataConnection(int state, boolean isDataConnectivityPossible,
- String reason, String apn, String[] apnTypes, String interfaceName, int networkType) {
+ String reason, String apn, String[] apnTypes, String interfaceName, int networkType,
+ String gateway) {
if (!checkNotifyPermission("notifyDataConnection()" )) {
return;
}
@@ -372,7 +374,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
}
}
broadcastDataConnectionStateChanged(state, isDataConnectivityPossible, reason, apn,
- apnTypes, interfaceName);
+ apnTypes, interfaceName, gateway);
}
public void notifyDataConnectionFailed(String reason) {
@@ -535,7 +537,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
private void broadcastDataConnectionStateChanged(int state,
boolean isDataConnectivityPossible,
- String reason, String apn, String[] apnTypes, String interfaceName) {
+ String reason, String apn, String[] apnTypes, String interfaceName, String gateway) {
// Note: not reporting to the battery stats service here, because the
// status bar takes care of that after taking into account all of the
// required info.
@@ -558,6 +560,12 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
}
intent.putExtra(Phone.DATA_APN_TYPES_KEY, types);
intent.putExtra(Phone.DATA_IFACE_NAME_KEY, interfaceName);
+ int gatewayAddr = 0;
+ if (gateway != null) {
+ gatewayAddr = NetworkUtils.v4StringToInt(gateway);
+ }
+ intent.putExtra(Phone.DATA_GATEWAY_KEY, gatewayAddr);
+
mContext.sendStickyBroadcast(intent);
}