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

Commit b8f16340 authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Fix ConnectivityManager permissions check.

bug: 2160462
parent 1b7ad876
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -572,6 +572,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {

    // javadoc from interface
    public int stopUsingNetworkFeature(int networkType, String feature) {
        enforceChangePermission();

        int pid = getCallingPid();
        int uid = getCallingUid();

@@ -611,7 +613,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
            Log.d(TAG, "stopUsingNetworkFeature for net " + networkType +
                    ": " + feature);
        }
        enforceChangePermission();

        if (!ConnectivityManager.isNetworkTypeValid(networkType)) {
            return -1;
        }