{ "methods": { "addDefaultNetworkActiveListener(android.net.ConnectivityManager.OnNetworkActiveListener)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "l" ], "returnType": "void", "exceptions": [], "minSdk": 21, "name": "addDefaultNetworkActiveListener(android.net.ConnectivityManager.OnNetworkActiveListener)" }, "addNetwork(android.net.Network,android.net.NetworkInfo)": { "isImplementation": false, "modifiers": [ "public" ], "params": [ "network", "networkInfo" ], "returnType": "void", "exceptions": [], "name": "addNetwork(android.net.Network,android.net.NetworkInfo)", "documentation": "Adds new {@code network} to the list of all {@link android.net.Network}s.\n\n@param network The network.\n@param networkInfo The network info paired with the {@link android.net.Network}.\n" }, "bindProcessToNetwork(android.net.Network)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "network" ], "returnType": "boolean", "exceptions": [], "minSdk": 23, "name": "bindProcessToNetwork(android.net.Network)" }, "clearAllNetworks()": { "isImplementation": false, "modifiers": [ "public" ], "params": [], "returnType": "void", "exceptions": [], "name": "clearAllNetworks()", "documentation": "Clears the list of all {@link android.net.Network}s.\n" }, "getActiveNetwork()": { "isImplementation": true, "modifiers": [ "protected" ], "params": [], "returnType": "android.net.Network", "exceptions": [], "minSdk": 23, "name": "getActiveNetwork()", "documentation": "@see #setActiveNetworkInfo(NetworkInfo)\n@see #setNetworkInfo(int, NetworkInfo)\n" }, "getActiveNetworkInfo()": { "isImplementation": true, "modifiers": [ "protected" ], "params": [], "returnType": "android.net.NetworkInfo", "exceptions": [], "name": "getActiveNetworkInfo()" }, "getAllNetworkInfo()": { "isImplementation": true, "modifiers": [ "protected" ], "params": [], "returnType": "android.net.NetworkInfo[]", "exceptions": [], "name": "getAllNetworkInfo()", "documentation": "@see #setActiveNetworkInfo(NetworkInfo)\n@see #setNetworkInfo(int, NetworkInfo)\n" }, "getAllNetworks()": { "isImplementation": true, "modifiers": [ "protected" ], "params": [], "returnType": "android.net.Network[]", "exceptions": [], "minSdk": 21, "name": "getAllNetworks()" }, "getBackgroundDataSetting()": { "isImplementation": true, "modifiers": [ "protected" ], "params": [], "returnType": "boolean", "exceptions": [], "name": "getBackgroundDataSetting()" }, "getBoundNetworkForProcess()": { "isImplementation": true, "modifiers": [ "protected" ], "params": [], "returnType": "android.net.Network", "exceptions": [], "minSdk": 23, "name": "getBoundNetworkForProcess()" }, "getCaptivePortalServerUrl()": { "isImplementation": true, "modifiers": [ "protected" ], "params": [], "returnType": "java.lang.String", "exceptions": [], "minSdk": 24, "name": "getCaptivePortalServerUrl()", "documentation": "Returns the captive portal URL previously set with {@link #setCaptivePortalServerUrl}.\n" }, "getLinkProperties(android.net.Network)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "network" ], "returnType": "android.net.LinkProperties", "exceptions": [], "minSdk": 21, "name": "getLinkProperties(android.net.Network)", "documentation": "@see #setLinkProperties(Network, LinkProperties) " }, "getNetworkCallbacks()": { "isImplementation": false, "modifiers": [ "public" ], "params": [], "returnType": "java.util.Set\u003candroid.net.ConnectivityManager.NetworkCallback\u003e", "exceptions": [], "name": "getNetworkCallbacks()" }, "getNetworkCapabilities(android.net.Network)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "network" ], "returnType": "android.net.NetworkCapabilities", "exceptions": [], "minSdk": 21, "name": "getNetworkCapabilities(android.net.Network)", "documentation": "Gets the network capabilities of a given {@link Network}.\n\n@param network The {@link Network} object identifying the network in question.\n@return The {@link android.net.NetworkCapabilities} for the network.\n@see #setNetworkCapabilities(Network, NetworkCapabilities)\n" }, "getNetworkInfo(android.net.Network)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "network" ], "returnType": "android.net.NetworkInfo", "exceptions": [], "minSdk": 21, "name": "getNetworkInfo(android.net.Network)" }, "getNetworkInfo(int)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "networkType" ], "returnType": "android.net.NetworkInfo", "exceptions": [], "name": "getNetworkInfo(int)" }, "getNetworkPreference()": { "isImplementation": true, "modifiers": [ "protected" ], "params": [], "returnType": "int", "exceptions": [], "name": "getNetworkPreference()" }, "getReportedNetworkConnectivity()": { "isImplementation": false, "modifiers": [ "public" ], "params": [], "returnType": "java.util.Map\u003candroid.net.Network,java.lang.Boolean\u003e", "exceptions": [], "name": "getReportedNetworkConnectivity()", "documentation": "@return networks and their connectivity status which was reported with {@link\n #reportNetworkConnectivity}.\n" }, "isActiveNetworkMetered()": { "isImplementation": true, "modifiers": [ "protected" ], "params": [], "returnType": "boolean", "exceptions": [], "name": "isActiveNetworkMetered()", "documentation": "Counts {@link ConnectivityManager#TYPE_MOBILE} networks as metered. Other types will be\nconsidered unmetered.\n\n@return `true` if the active network is metered, otherwise `false`.\n@see #setActiveNetworkInfo(NetworkInfo)\n@see #setDefaultNetworkActive(boolean)\n" }, "isDefaultNetworkActive()": { "isImplementation": true, "modifiers": [ "protected" ], "params": [], "returnType": "boolean", "exceptions": [], "minSdk": 21, "name": "isDefaultNetworkActive()", "documentation": "@return `true` by default, or the value specifed via {@link #setDefaultNetworkActive(boolean)}\n@see #setDefaultNetworkActive(boolean)\n" }, "registerNetworkCallback(android.net.NetworkRequest,android.net.ConnectivityManager.NetworkCallback)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "request", "networkCallback" ], "returnType": "void", "exceptions": [], "minSdk": 21, "name": "registerNetworkCallback(android.net.NetworkRequest,android.net.ConnectivityManager.NetworkCallback)" }, "registerNetworkCallback(android.net.NetworkRequest,android.net.ConnectivityManager.NetworkCallback,android.os.Handler)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "request", "networkCallback", "handler" ], "returnType": "void", "exceptions": [], "minSdk": 26, "name": "registerNetworkCallback(android.net.NetworkRequest,android.net.ConnectivityManager.NetworkCallback,android.os.Handler)" }, "removeDefaultNetworkActiveListener(android.net.ConnectivityManager.OnNetworkActiveListener)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "l" ], "returnType": "void", "exceptions": [], "minSdk": 21, "name": "removeDefaultNetworkActiveListener(android.net.ConnectivityManager.OnNetworkActiveListener)" }, "removeNetwork(android.net.Network)": { "isImplementation": false, "modifiers": [ "public" ], "params": [ "network" ], "returnType": "void", "exceptions": [], "name": "removeNetwork(android.net.Network)", "documentation": "Removes the {@code network} from the list of all {@link android.net.Network}s.\n@param network The network.\n" }, "reportNetworkConnectivity(android.net.Network,boolean)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "network", "hasConnectivity" ], "returnType": "void", "exceptions": [], "minSdk": 23, "name": "reportNetworkConnectivity(android.net.Network,boolean)" }, "requestNetwork(android.net.NetworkRequest,android.net.ConnectivityManager.NetworkCallback)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "request", "networkCallback" ], "returnType": "void", "exceptions": [], "minSdk": 21, "name": "requestNetwork(android.net.NetworkRequest,android.net.ConnectivityManager.NetworkCallback)" }, "setActiveNetworkInfo(android.net.NetworkInfo)": { "isImplementation": false, "modifiers": [ "public" ], "params": [ "info" ], "returnType": "void", "exceptions": [], "name": "setActiveNetworkInfo(android.net.NetworkInfo)" }, "setAirplaneMode(boolean)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "enable" ], "returnType": "void", "exceptions": [], "minSdk": 19, "name": "setAirplaneMode(boolean)", "documentation": "Sets the value for enabling/disabling airplane mode\n\n@param enable new status for airplane mode\n" }, "setBackgroundDataSetting(boolean)": { "isImplementation": true, "modifiers": [ "public" ], "params": [ "b" ], "returnType": "void", "exceptions": [], "name": "setBackgroundDataSetting(boolean)" }, "setCaptivePortalServerUrl(java.lang.String)": { "isImplementation": false, "modifiers": [ "public" ], "params": [ "captivePortalServerUrl" ], "returnType": "void", "exceptions": [], "name": "setCaptivePortalServerUrl(java.lang.String)", "documentation": "Sets the captive portal URL, which will be returned in {@link #getCaptivePortalServerUrl}.\n\n@param captivePortalServerUrl the url of captive portal.\n" }, "setDefaultNetworkActive(boolean)": { "isImplementation": false, "modifiers": [ "public" ], "params": [ "isActive" ], "returnType": "void", "exceptions": [], "name": "setDefaultNetworkActive(boolean)", "documentation": "Sets the active state of the default network.\n\nBy default this is true and affects the result of {@link\nConnectivityManager#isActiveNetworkMetered()}, {@link\nConnectivityManager#isDefaultNetworkActive()}, {@link ConnectivityManager#getActiveNetwork()}\nand {@link ConnectivityManager#getAllNetworkInfo()}.\n\nCalling this method with {@code true} after any listeners have been registered with {@link\nConnectivityManager#addDefaultNetworkActiveListener(OnNetworkActiveListener)} will result in\nthose listeners being fired.\n\n@param isActive The active state of the default network.\n" }, "setLinkProperties(android.net.Network,android.net.LinkProperties)": { "isImplementation": false, "modifiers": [ "public" ], "params": [ "network", "linkProperties" ], "returnType": "void", "exceptions": [], "name": "setLinkProperties(android.net.Network,android.net.LinkProperties)", "documentation": "Sets the LinkProperties for the given Network.\n\n\u003cp\u003eA LinkProperties can be constructed by\n`org.robolectric.util.ReflectionHelpers.callConstructor` in tests.\n" }, "setNetworkCapabilities(android.net.Network,android.net.NetworkCapabilities)": { "isImplementation": false, "modifiers": [ "public" ], "params": [ "network", "networkCapabilities" ], "returnType": "void", "exceptions": [], "name": "setNetworkCapabilities(android.net.Network,android.net.NetworkCapabilities)", "documentation": "Sets network capability and affects the result of {@link\nConnectivityManager#getNetworkCapabilities(Network)}\n\n@param network The {@link Network} object identifying the network in question.\n@param networkCapabilities The {@link android.net.NetworkCapabilities} for the network.\n" }, "setNetworkInfo(int,android.net.NetworkInfo)": { "isImplementation": false, "modifiers": [ "public" ], "params": [ "networkType", "networkInfo" ], "returnType": "void", "exceptions": [], "name": "setNetworkInfo(int,android.net.NetworkInfo)" }, "setNetworkPreference(int)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "preference" ], "returnType": "void", "exceptions": [], "name": "setNetworkPreference(int)" }, "unregisterNetworkCallback(android.net.ConnectivityManager.NetworkCallback)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "networkCallback" ], "returnType": "void", "exceptions": [], "minSdk": 21, "name": "unregisterNetworkCallback(android.net.ConnectivityManager.NetworkCallback)" } }, "imports": [ "android.os.Build.VERSION_CODES.KITKAT", "android.os.Build.VERSION_CODES.LOLLIPOP", "android.os.Build.VERSION_CODES.M", "android.os.Build.VERSION_CODES.N", "android.os.Build.VERSION_CODES.O", "org.robolectric.RuntimeEnvironment.getApiLevel", "android.net.ConnectivityManager", "android.net.ConnectivityManager.OnNetworkActiveListener", "android.net.LinkProperties", "android.net.Network", "android.net.NetworkCapabilities", "android.net.NetworkInfo", "android.net.NetworkRequest", "android.os.Handler", "java.util.HashMap", "java.util.HashSet", "java.util.Map", "java.util.Set", "org.robolectric.annotation.HiddenApi", "org.robolectric.annotation.Implementation", "org.robolectric.annotation.Implements", "org.robolectric.shadow.api.Shadow" ], "name": "org.robolectric.shadows.ShadowConnectivityManager" }