Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0be1e984 authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

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
parent 3be80f2e
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -698,9 +698,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
        }
        NetworkStateTracker network = mNetTrackers[usedNetworkType];
        if (network != null) {
            if (usedNetworkType != networkType) {
            Integer currentPid = new Integer(getCallingPid());

            if (usedNetworkType != networkType) {
                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;
            }
        }