FileDocCategorySizeDatePackage
NetworkConfig.javaAPI DocAndroid 5.1 API2237Thu Mar 12 22:22:10 GMT 2015android.net

NetworkConfig

public class NetworkConfig extends Object
Describes the buildtime configuration of a network. Holds settings read from resources.
hide

Fields Summary
public String
name
Human readable string
public int
type
Type from ConnectivityManager
public int
radio
the radio number from radio attributes config
public int
priority
higher number == higher priority when turning off connections
public boolean
dependencyMet
indicates the boot time dependencyMet setting
public int
restoreTime
indicates the default restoral timer in seconds if the network is used as a special network feature -1 indicates no restoration of default
Constructors Summary
public NetworkConfig(String init)
input string from config.xml resource. Uses the form: [Connection name],[ConnectivityManager connection type], [associated radio-type],[priority],[dependencyMet]

        String fragments[] = init.split(",");
        name = fragments[0].trim().toLowerCase(Locale.ROOT);
        type = Integer.parseInt(fragments[1]);
        radio = Integer.parseInt(fragments[2]);
        priority = Integer.parseInt(fragments[3]);
        restoreTime = Integer.parseInt(fragments[4]);
        dependencyMet = Boolean.parseBoolean(fragments[5]);
    
Methods Summary
public booleanisDefault()
Indicates if this network is supposed to be default-routable

        return (type == radio);