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:
@@ -83,6 +83,7 @@ import com.android.wifitrackerlib.WifiEntry.ConnectedInfo;
|
||||
import java.net.Inet4Address;
|
||||
import java.net.InetAddress;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
@@ -860,7 +861,8 @@ public class WifiConfigController2 implements TextWatcher,
|
||||
result = R.string.proxy_error_invalid_port;
|
||||
}
|
||||
if (result == 0) {
|
||||
mHttpProxy = new ProxyInfo(host, port, exclusionList);
|
||||
mHttpProxy = ProxyInfo.buildDirectProxy(
|
||||
host, port, Arrays.asList(exclusionList.split(",")));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@@ -874,7 +876,7 @@ public class WifiConfigController2 implements TextWatcher,
|
||||
if (uri == null) {
|
||||
return false;
|
||||
}
|
||||
mHttpProxy = new ProxyInfo(uri);
|
||||
mHttpProxy = ProxyInfo.buildPacProxy(uri);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user