Revert "Refactor setCurrentProxyScriptUrl to a void method"

This reverts commit a42805cd7e.

Reason for revert: Broke HostsideVpnTests

Fix: 177943140
Change-Id: I23924181e46fd1f16a60ec420426d1ed39705050
This commit is contained in:
Lorenzo Colitti
2021-02-03 07:24:28 +00:00
parent a42805cd7e
commit bb4c3ac73f

View File

@@ -226,9 +226,9 @@ public class ProxyTracker {
final ProxyInfo defaultProxy = getDefaultProxy(); final ProxyInfo defaultProxy = getDefaultProxy();
final ProxyInfo proxyInfo = null != defaultProxy ? final ProxyInfo proxyInfo = null != defaultProxy ?
defaultProxy : ProxyInfo.buildDirectProxy("", 0, Collections.emptyList()); defaultProxy : ProxyInfo.buildDirectProxy("", 0, Collections.emptyList());
mPacProxyInstaller.setCurrentProxyScriptUrl(proxyInfo);
if (!shouldSendBroadcast(proxyInfo)) { if (mPacProxyInstaller.setCurrentProxyScriptUrl(proxyInfo)
== PacProxyInstaller.DONT_SEND_BROADCAST) {
return; return;
} }
if (DBG) Log.d(TAG, "sending Proxy Broadcast for " + proxyInfo); 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. * Sets the global proxy in memory. Also writes the values to the global settings of the device.
* *