Merge "Fix parsing of global:http_proxy value." am: 36b169250b

Original change: undetermined

Change-Id: I09b7aa410c9d05d3b2688f08a5e4041d7e5a3c7c
This commit is contained in:
Andreas Huber
2021-05-31 06:17:20 +00:00
committed by Automerger Merge Worker

View File

@@ -3134,6 +3134,10 @@ public class ConnectivityService extends IConnectivityManager.Stub {
Settings.Global.HTTP_PROXY);
if (!TextUtils.isEmpty(proxy)) {
String data[] = proxy.split(":");
if (data.length == 0) {
return;
}
String proxyHost = data[0];
int proxyPort = 8080;
if (data.length > 1) {
@@ -3145,6 +3149,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
ProxyProperties p = new ProxyProperties(data[0], proxyPort, "");
setGlobalProxy(p);
} else {
setGlobalProxy(null);
}
}