Loading core/java/android/net/ConnectivityManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -1136,7 +1136,7 @@ public class ConnectivityManager { * HTTP proxy. A {@code null} value will clear the global HTTP proxy. * * <p>This method requires the call to hold the permission * {@link android.Manifest.permission#CHANGE_NETWORK_STATE}. * {@link android.Manifest.permission#CONNECTIVITY_INTERNAL}. * {@hide} */ public void setGlobalProxy(ProxyProperties p) { Loading services/java/com/android/server/ConnectivityService.java +10 −5 Original line number Diff line number Diff line Loading @@ -3045,7 +3045,7 @@ public class ConnectivityService extends IConnectivityManager.Stub { } public void setGlobalProxy(ProxyProperties proxyProperties) { enforceChangePermission(); enforceConnectivityInternalPermission(); synchronized (mProxyLock) { if (proxyProperties == mGlobalProxy) return; if (proxyProperties != null && proxyProperties.equals(mGlobalProxy)) return; Loading @@ -3063,10 +3063,15 @@ public class ConnectivityService extends IConnectivityManager.Stub { mGlobalProxy = null; } ContentResolver res = mContext.getContentResolver(); final long token = Binder.clearCallingIdentity(); try { Settings.Global.putString(res, Settings.Global.GLOBAL_HTTP_PROXY_HOST, host); Settings.Global.putInt(res, Settings.Global.GLOBAL_HTTP_PROXY_PORT, port); Settings.Global.putString(res, Settings.Global.GLOBAL_HTTP_PROXY_EXCLUSION_LIST, exclList); } finally { Binder.restoreCallingIdentity(token); } } if (mGlobalProxy == null) { Loading Loading
core/java/android/net/ConnectivityManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -1136,7 +1136,7 @@ public class ConnectivityManager { * HTTP proxy. A {@code null} value will clear the global HTTP proxy. * * <p>This method requires the call to hold the permission * {@link android.Manifest.permission#CHANGE_NETWORK_STATE}. * {@link android.Manifest.permission#CONNECTIVITY_INTERNAL}. * {@hide} */ public void setGlobalProxy(ProxyProperties p) { Loading
services/java/com/android/server/ConnectivityService.java +10 −5 Original line number Diff line number Diff line Loading @@ -3045,7 +3045,7 @@ public class ConnectivityService extends IConnectivityManager.Stub { } public void setGlobalProxy(ProxyProperties proxyProperties) { enforceChangePermission(); enforceConnectivityInternalPermission(); synchronized (mProxyLock) { if (proxyProperties == mGlobalProxy) return; if (proxyProperties != null && proxyProperties.equals(mGlobalProxy)) return; Loading @@ -3063,10 +3063,15 @@ public class ConnectivityService extends IConnectivityManager.Stub { mGlobalProxy = null; } ContentResolver res = mContext.getContentResolver(); final long token = Binder.clearCallingIdentity(); try { Settings.Global.putString(res, Settings.Global.GLOBAL_HTTP_PROXY_HOST, host); Settings.Global.putInt(res, Settings.Global.GLOBAL_HTTP_PROXY_PORT, port); Settings.Global.putString(res, Settings.Global.GLOBAL_HTTP_PROXY_EXCLUSION_LIST, exclList); } finally { Binder.restoreCallingIdentity(token); } } if (mGlobalProxy == null) { Loading