am 2a1fb433: am 4c514f2a: am 594eeb08: Merge "Fix for the invalid Global Proxy Setting" into klp-dev

* commit '2a1fb433e5':
  Fix for the invalid Global Proxy Setting
This commit is contained in:
Robert Greenwalt 2013-11-13 18:47:57 -08:00 • committed by Android Git Automerger
commit 8fa42e3cfb

View file

@ -139,6 +139,17 @@ public class ProxyProperties implements Parcelable {
return false;
}
public boolean isValid() {
if (!TextUtils.isEmpty(mPacFileUrl)) return true;
try {
Proxy.validate(mHost == null ? "" : mHost, mPort == 0 ? "" : Integer.toString(mPort),
mExclusionList == null ? "" : mExclusionList);
} catch (IllegalArgumentException e) {
return false;
}
return true;
}
public java.net.Proxy makeProxy() {
java.net.Proxy proxy = java.net.Proxy.NO_PROXY;
if (mHost != null) {