Move shared Proxy method and constants to shared lib
The static validate() method an PROXY_* constants in Proxy are used by both module and Settings. After Proxy is moving into connectivity module, Setting will not able to access them. Thus, move them to ProxyUtils in net shared lib. Bug: 172183305 Test: atest FrameworksNetTests Test: atest CtsNetTestCases:ProxyInfoTest Change-Id: I02c88aeaeb53d62b87a42a2d8ead9b140b054650
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user