Replace the hidden ProxyInfo methods usage

The hidden ProxyInfo methods usage should be replaced because
ProxyInfo is moving to connectivity mainline module. Setting
will not be able to access it. Replace the usage with
corresponding APIs.

Bug: 172183305
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
      com.android.settings.wifi.WifiConfigControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
      com.android.settings.wifi.WifiConfigController2Test
Test: manually update proxy from setting and check the result
Change-Id: I59192d0d5d38c833eb83cc930e358a738ebe3d13
This commit is contained in:
Chiachang Wang
2021-03-17 20:37:48 +08:00
parent b16da1a9ca
commit eb16ebd14a
4 changed files with 14 additions and 6 deletions

View File

@@ -592,7 +592,7 @@ class ConfigDialog extends AlertDialog implements TextWatcher,
// 0 is a last resort default, but the interface validates that the proxy port is
// present and non-zero.
int port = proxyPort.isEmpty() ? 0 : Integer.parseInt(proxyPort);
profile.proxy = new ProxyInfo(proxyHost, port, null);
profile.proxy = ProxyInfo.buildDirectProxy(proxyHost, port);
} else {
profile.proxy = null;
}