Fix ConnectivityManager permissions check.

bug: 2160462
This commit is contained in:
Robert Greenwalt
2009-10-06 17:52:40 -07:00
parent a25fd71875
commit 28f430176a

View File

@@ -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;
}