Example usage for android.net ProxyInfo getExclusionListAsString

List of usage examples for android.net ProxyInfo getExclusionListAsString

Introduction

In this page you can find the example usage for android.net ProxyInfo getExclusionListAsString.

Prototype

public String getExclusionListAsString() 

Source Link

Document

comma separated

Usage

From source file:android.net.ProxyInfo.java

/**
 * @hide/*from   ww  w.ja  v  a 2  s  . c  o  m*/
 */
public ProxyInfo(ProxyInfo source) {
    if (source != null) {
        mHost = source.getHost();
        mPort = source.getPort();
        mPacFileUrl = source.mPacFileUrl;
        mExclusionList = source.getExclusionListAsString();
        mParsedExclusionList = source.mParsedExclusionList;
    } else {
        mPacFileUrl = Uri.EMPTY;
    }
}

From source file:android.net.ProxyInfo.java

@Override
public boolean equals(Object o) {
    if (!(o instanceof ProxyInfo))
        return false;
    ProxyInfo p = (ProxyInfo) o;
    // If PAC URL is present in either then they must be equal.
    // Other parameters will only be for fall back.
    if (!Uri.EMPTY.equals(mPacFileUrl)) {
        return mPacFileUrl.equals(p.getPacFileUrl()) && mPort == p.mPort;
    }/*  w w  w  .  j  ava 2s. c  om*/
    if (!Uri.EMPTY.equals(p.mPacFileUrl)) {
        return false;
    }
    if (mExclusionList != null && !mExclusionList.equals(p.getExclusionListAsString())) {
        return false;
    }
    if (mHost != null && p.getHost() != null && mHost.equals(p.getHost()) == false) {
        return false;
    }
    if (mHost != null && p.mHost == null)
        return false;
    if (mHost == null && p.mHost != null)
        return false;
    if (mPort != p.mPort)
        return false;
    return true;
}