summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/ConnectivityService.java
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2010-12-15 13:26:33 -0800
committerRobert Greenwalt <rgreenwalt@google.com>2010-12-15 15:22:50 -0800
commit0be1e9844a16d7d7708fdb446b330533cd1d3260 (patch)
tree4b46db9afe67974919974e51334073f53fb45078 /services/java/com/android/server/ConnectivityService.java
parent3be80f2e6cf763fdfeb058d5a4ac8257cdc91135 (diff)
Correct an error code to pass CTS.
We used to report an unmatch stopUsingNetworkFeature call with an "ok, stopped" response, but we need to report it as an error. bug:3281837 Change-Id: I35728159e62a021cb10de4396b3f60a92df0570f
Diffstat (limited to 'services/java/com/android/server/ConnectivityService.java')
-rw-r--r--services/java/com/android/server/ConnectivityService.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index 9d11d87e4dc2..f82a243a6bcc 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -698,9 +698,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
NetworkStateTracker network = mNetTrackers[usedNetworkType];
if (network != null) {
+ Integer currentPid = new Integer(getCallingPid());
if (usedNetworkType != networkType) {
- Integer currentPid = new Integer(getCallingPid());
-
NetworkStateTracker radio = mNetTrackers[networkType];
NetworkInfo ni = network.getNetworkInfo();
@@ -739,6 +738,14 @@ public class ConnectivityService extends IConnectivityManager.Stub {
network.reconnect();
return Phone.APN_REQUEST_STARTED;
} else {
+ // need to remember this unsupported request so we respond appropriately on stop
+ synchronized(this) {
+ mFeatureUsers.add(f);
+ if (!mNetRequestersPids[usedNetworkType].contains(currentPid)) {
+ // this gets used for per-pid dns when connected
+ mNetRequestersPids[usedNetworkType].add(currentPid);
+ }
+ }
return -1;
}
}