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
This commit is contained in:
@@ -698,9 +698,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
}
|
}
|
||||||
NetworkStateTracker network = mNetTrackers[usedNetworkType];
|
NetworkStateTracker network = mNetTrackers[usedNetworkType];
|
||||||
if (network != null) {
|
if (network != null) {
|
||||||
|
Integer currentPid = new Integer(getCallingPid());
|
||||||
if (usedNetworkType != networkType) {
|
if (usedNetworkType != networkType) {
|
||||||
Integer currentPid = new Integer(getCallingPid());
|
|
||||||
|
|
||||||
NetworkStateTracker radio = mNetTrackers[networkType];
|
NetworkStateTracker radio = mNetTrackers[networkType];
|
||||||
NetworkInfo ni = network.getNetworkInfo();
|
NetworkInfo ni = network.getNetworkInfo();
|
||||||
|
|
||||||
@@ -739,6 +738,14 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
network.reconnect();
|
network.reconnect();
|
||||||
return Phone.APN_REQUEST_STARTED;
|
return Phone.APN_REQUEST_STARTED;
|
||||||
} else {
|
} 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;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user