am 91f36086: am c24c0e9b: Merge change Ib8f16340 into eclair-mr2

Merge commit '91f360869e3cf845043ccef31f9a6ab8f57b2896'

* commit '91f360869e3cf845043ccef31f9a6ab8f57b2896':
  Fix ConnectivityManager permissions check.
This commit is contained in:
Robert Greenwalt
2009-10-12 12:31:46 -07:00
committed by Android Git Automerger

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