From ffb76492e029e6da5b57d8fb5a3d5b123044d5e3 Mon Sep 17 00:00:00 2001 From: Aaron Huang Date: Fri, 18 Oct 2019 18:42:19 +0800 Subject: [PATCH] Remove ProxyInfo(String) and update callers to use ProxyInfo(Uri) Update all callers to use ProxyInfo(Uri) and remove ProxyInfo(String). Bug: 160557668 Test: build pass atest FrameworksNetTests Change-Id: I4c980764c8839c48acf03208bb68cd53eb910121 --- core/java/android/net/ProxyInfo.java | 12 ------------ .../android/server/connectivity/ProxyTracker.java | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/core/java/android/net/ProxyInfo.java b/core/java/android/net/ProxyInfo.java index ffe9ae9521..a32b41f6be 100644 --- a/core/java/android/net/ProxyInfo.java +++ b/core/java/android/net/ProxyInfo.java @@ -126,18 +126,6 @@ public class ProxyInfo implements Parcelable { mPacFileUrl = pacFileUrl; } - /** - * Create a ProxyProperties that points at a PAC URL. - * @hide - */ - public ProxyInfo(String pacFileUrl) { - mHost = LOCAL_HOST; - mPort = LOCAL_PORT; - mExclusionList = LOCAL_EXCL_LIST; - mParsedExclusionList = parseExclusionList(mExclusionList); - mPacFileUrl = Uri.parse(pacFileUrl); - } - /** * Only used in PacManager after Local Proxy is bound. * @hide diff --git a/services/core/java/com/android/server/connectivity/ProxyTracker.java b/services/core/java/com/android/server/connectivity/ProxyTracker.java index e715890fb2..e92679d6c3 100644 --- a/services/core/java/com/android/server/connectivity/ProxyTracker.java +++ b/services/core/java/com/android/server/connectivity/ProxyTracker.java @@ -157,7 +157,7 @@ public class ProxyTracker { if (!TextUtils.isEmpty(host) || !TextUtils.isEmpty(pacFileUrl)) { ProxyInfo proxyProperties; if (!TextUtils.isEmpty(pacFileUrl)) { - proxyProperties = new ProxyInfo(pacFileUrl); + proxyProperties = new ProxyInfo(Uri.parse(pacFileUrl)); } else { proxyProperties = new ProxyInfo(host, port, exclList); }