Merge "Revert "Refactor setCurrentProxyScriptUrl to a void method"" am: acdddac422 am: b13883951f am: 1a8680eb59

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1571900

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I409cdb32c181fbd2397fbe2e2a1ff9437b755f40
This commit is contained in:
Lorenzo Colitti
2021-02-03 15:03:37 +00:00
committed by Automerger Merge Worker

View File

@@ -226,9 +226,9 @@ public class ProxyTracker {
final ProxyInfo defaultProxy = getDefaultProxy();
final ProxyInfo proxyInfo = null != defaultProxy ?
defaultProxy : ProxyInfo.buildDirectProxy("", 0, Collections.emptyList());
mPacProxyInstaller.setCurrentProxyScriptUrl(proxyInfo);
if (!shouldSendBroadcast(proxyInfo)) {
if (mPacProxyInstaller.setCurrentProxyScriptUrl(proxyInfo)
== PacProxyInstaller.DONT_SEND_BROADCAST) {
return;
}
if (DBG) Log.d(TAG, "sending Proxy Broadcast for " + proxyInfo);
@@ -244,13 +244,6 @@ public class ProxyTracker {
}
}
private boolean shouldSendBroadcast(ProxyInfo proxy) {
if (Uri.EMPTY.equals(proxy.getPacFileUrl())) return false;
if (proxy.getPacFileUrl().equals(proxy.getPacFileUrl())
&& (proxy.getPort() > 0)) return true;
return true;
}
/**
* Sets the global proxy in memory. Also writes the values to the global settings of the device.
*