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:
commit
8fa42e3cfb
1 changed files with 25 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue