Merge "Move shared Proxy method and constants to shared lib"

This commit is contained in:
Chiachang Wang 2021-02-08 10:27:05 +00:00 • committed by Gerrit Code Review
commit bf911c0f3c

View file

@ -23,6 +23,8 @@ import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import com.android.net.module.util.ProxyUtils;
import java.net.InetSocketAddress;
import java.net.URLConnection;
import java.util.List;
@ -233,7 +235,7 @@ public class ProxyInfo implements Parcelable {
*/
public boolean isValid() {
if (!Uri.EMPTY.equals(mPacFileUrl)) return true;
return Proxy.PROXY_VALID == Proxy.validate(mHost == null ? "" : mHost,
return ProxyUtils.PROXY_VALID == ProxyUtils.validate(mHost == null ? "" : mHost,
mPort == 0 ? "" : Integer.toString(mPort),
mExclusionList == null ? "" : mExclusionList);
}