Loading packages/Connectivity/framework/src/android/net/ConnectivityManager.java +16 −7 Original line number Diff line number Diff line Loading @@ -3140,18 +3140,27 @@ public class ConnectivityManager { } /** * Set a network-independent global http proxy. This is not normally what you want * for typical HTTP proxies - they are general network dependent. However if you're * doing something unusual like general internal filtering this may be useful. On * a private network where the proxy is not accessible, you may break HTTP using this. * Set a network-independent global HTTP proxy. * * @param p A {@link ProxyInfo} object defining the new global * HTTP proxy. A {@code null} value will clear the global HTTP proxy. * This sets an HTTP proxy that applies to all networks and overrides any network-specific * proxy. If set, HTTP libraries that are proxy-aware will use this global proxy when * accessing any network, regardless of what the settings for that network are. * * Note that HTTP proxies are by nature typically network-dependent, and setting a global * proxy is likely to break networking on multiple networks. This method is only meant * for device policy clients looking to do general internal filtering or similar use cases. * * {@see #getGlobalProxy} * {@see LinkProperties#getHttpProxy} * * @param p A {@link ProxyInfo} object defining the new global HTTP proxy. Calling this * method with a {@code null} value will clear the global HTTP proxy. * @hide */ // Used by Device Policy Manager to set the global proxy. @SystemApi(client = MODULE_LIBRARIES) @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void setGlobalProxy(@Nullable ProxyInfo p) { public void setGlobalProxy(@Nullable final ProxyInfo p) { try { mService.setGlobalProxy(p); } catch (RemoteException e) { Loading services/core/java/com/android/server/ConnectivityService.java +1 −1 Original line number Diff line number Diff line Loading @@ -4966,7 +4966,7 @@ public class ConnectivityService extends IConnectivityManager.Stub } @Override public void setGlobalProxy(final ProxyInfo proxyProperties) { public void setGlobalProxy(@Nullable final ProxyInfo proxyProperties) { PermissionUtils.enforceNetworkStackPermission(mContext); mProxyTracker.setGlobalProxy(proxyProperties); } Loading Loading
packages/Connectivity/framework/src/android/net/ConnectivityManager.java +16 −7 Original line number Diff line number Diff line Loading @@ -3140,18 +3140,27 @@ public class ConnectivityManager { } /** * Set a network-independent global http proxy. This is not normally what you want * for typical HTTP proxies - they are general network dependent. However if you're * doing something unusual like general internal filtering this may be useful. On * a private network where the proxy is not accessible, you may break HTTP using this. * Set a network-independent global HTTP proxy. * * @param p A {@link ProxyInfo} object defining the new global * HTTP proxy. A {@code null} value will clear the global HTTP proxy. * This sets an HTTP proxy that applies to all networks and overrides any network-specific * proxy. If set, HTTP libraries that are proxy-aware will use this global proxy when * accessing any network, regardless of what the settings for that network are. * * Note that HTTP proxies are by nature typically network-dependent, and setting a global * proxy is likely to break networking on multiple networks. This method is only meant * for device policy clients looking to do general internal filtering or similar use cases. * * {@see #getGlobalProxy} * {@see LinkProperties#getHttpProxy} * * @param p A {@link ProxyInfo} object defining the new global HTTP proxy. Calling this * method with a {@code null} value will clear the global HTTP proxy. * @hide */ // Used by Device Policy Manager to set the global proxy. @SystemApi(client = MODULE_LIBRARIES) @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void setGlobalProxy(@Nullable ProxyInfo p) { public void setGlobalProxy(@Nullable final ProxyInfo p) { try { mService.setGlobalProxy(p); } catch (RemoteException e) { Loading
services/core/java/com/android/server/ConnectivityService.java +1 −1 Original line number Diff line number Diff line Loading @@ -4966,7 +4966,7 @@ public class ConnectivityService extends IConnectivityManager.Stub } @Override public void setGlobalProxy(final ProxyInfo proxyProperties) { public void setGlobalProxy(@Nullable final ProxyInfo proxyProperties) { PermissionUtils.enforceNetworkStackPermission(mContext); mProxyTracker.setGlobalProxy(proxyProperties); } Loading