FileDocCategorySizeDatePackage
NetworkMisc.javaAPI DocAndroid 5.1 API2905Thu Mar 12 22:22:10 GMT 2015android.net

NetworkMisc

public class NetworkMisc extends Object implements android.os.Parcelable
A grab-bag of information (metadata, policies, properties, etc) about a {@link Network}. Since this contains PII, it should not be sent outside the system.
hide

Fields Summary
public boolean
allowBypass
If the {@link Network} is a VPN, whether apps are allowed to bypass the VPN. This is set by a {@link VpnService} and used by {@link ConnectivityManager} when creating a VPN.
public boolean
explicitlySelected
Set if the network was manually/explicitly connected to by the user either from settings or a 3rd party app. For example, turning on cell data is not explicit but tapping on a wifi ap in the wifi settings to trigger a connection is explicit. A 3rd party app asking to connect to a particular access point is also explicit, though this may change in the future as we want apps to use the multinetwork apis.
public String
subscriberId
For mobile networks, this is the subscriber ID (such as IMSI).
public static final Creator
CREATOR
Constructors Summary
public NetworkMisc()

    
public NetworkMisc(NetworkMisc nm)

        if (nm != null) {
            allowBypass = nm.allowBypass;
            explicitlySelected = nm.explicitlySelected;
            subscriberId = nm.subscriberId;
        }
    
Methods Summary
public intdescribeContents()

        return 0;
    
public voidwriteToParcel(android.os.Parcel out, int flags)

        out.writeInt(allowBypass ? 1 : 0);
        out.writeInt(explicitlySelected ? 1 : 0);
        out.writeString(subscriberId);