diff options
Diffstat (limited to 'services/java/com/android/server/ConnectivityService.java')
-rw-r--r-- | services/java/com/android/server/ConnectivityService.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java index 6d817a1..5e4855b 100644 --- a/services/java/com/android/server/ConnectivityService.java +++ b/services/java/com/android/server/ConnectivityService.java @@ -1823,6 +1823,7 @@ public class ConnectivityService extends IConnectivityManager.Stub { } public void sendConnectedBroadcast(NetworkInfo info) { + enforceConnectivityInternalPermission(); sendGeneralBroadcast(info, CONNECTIVITY_ACTION_IMMEDIATE); sendGeneralBroadcast(info, CONNECTIVITY_ACTION); } @@ -2107,6 +2108,7 @@ public class ConnectivityService extends IConnectivityManager.Stub { /** @hide */ public void captivePortalCheckComplete(NetworkInfo info) { + enforceConnectivityInternalPermission(); mNetTrackers[info.getType()].captivePortalCheckComplete(); } @@ -2365,7 +2367,7 @@ public class ConnectivityService extends IConnectivityManager.Stub { * net.tcp.buffersize.[default|wifi|umts|edge|gprs] and set them for system * wide use */ - public void updateNetworkSettings(NetworkStateTracker nt) { + private void updateNetworkSettings(NetworkStateTracker nt) { String key = nt.getTcpBufferSizesPropName(); String bufferSizes = key == null ? null : SystemProperties.get(key); @@ -2844,7 +2846,7 @@ public class ConnectivityService extends IConnectivityManager.Stub { } public int setUsbTethering(boolean enable) { - enforceTetherAccessPermission(); + enforceTetherChangePermission(); if (isTetheringSupported()) { return mTethering.setUsbTethering(enable); } else { @@ -2997,6 +2999,10 @@ public class ConnectivityService extends IConnectivityManager.Stub { } public ProxyProperties getProxy() { + // this information is already available as a world read/writable jvm property + // so this API change wouldn't have a benifit. It also breaks the passing + // of proxy info to all the JVMs. + // enforceAccessPermission(); synchronized (mDefaultProxyLock) { return mDefaultProxyDisabled ? null : mDefaultProxy; } @@ -3048,6 +3054,10 @@ public class ConnectivityService extends IConnectivityManager.Stub { } public ProxyProperties getGlobalProxy() { + // this information is already available as a world read/writable jvm property + // so this API change wouldn't have a benifit. It also breaks the passing + // of proxy info to all the JVMs. + // enforceAccessPermission(); synchronized (mGlobalProxyLock) { return mGlobalProxy; } |