Aaron Huang be9a6d2b6c Revert^2 "Refactor setCurrentProxyScriptUrl to a void method"
setCurrentProxyScriptUrl is used by ProxyTracker which is
included in connectivity service mainline module. To make
this method @SystemApi in follow-up patch, change this
from a boolean method to a void method. Moving the send or
not send broadcast logic to caller because it can know
whether it needs to send a broadcast or not.

The original change was reverted because it broke DeviceOwnerTest
and HostsideVpnTests. The new patch fixes no broadcast sent bug.
The logic was reversed when a PAC file URL is empty so the
broadcast did not send when proxy change.

Bug: 179225084
Bug: 177035719
Test: FrameworksNetTests
      CtsHostsideNetworkTests:HostsideVpnTests#testSetProxy
      CtsHostsideNetworkTests:HostsideVpnTests#testBindToNetworkWithProxy
      CtsHostsideNetworkTests:HostsideVpnTests#testNoProxy
      CtsDevicePolicyManagerTestCases:DeviceOwnerTest#testProxyPacProxyTest
      CtsDevicePolicyManagerTestCases:DeviceOwnerTest#testProxyStaticProxyTest

Change-Id: I029c33913264bfee336a559c4bd048ddd027322b
2021-03-10 23:19:12 +08:00
2020-12-14 18:34:39 +09:00
Description
android_packages_modules_Connectivity
189 MiB
Languages
Java 81.4%
Kotlin 7.7%
AIDL 4.5%
C++ 4.5%
C 1.7%
Other 0.1%