WifiSsidPolicy
class WifiSsidPolicy : Parcelable
kotlin.Any | |
↳ | android.app.admin.WifiSsidPolicy |
Used to indicate the Wi-Fi SSID restriction policy the network must satisfy in order to be eligible for a connection. If the policy type is a denylist, the device may not connect to networks on the denylist. If the policy type is an allowlist, the device may only connect to networks on the allowlist. Admin configured networks are not exempt from this restriction. This policy only prohibits connecting to a restricted network and does not affect adding a restricted network. If the current network is present in the denylist or not present in the allowlist, it will be disconnected.
Summary
Constants | |
---|---|
static Int |
SSID policy type indicator for |
static Int |
SSID policy type indicator for |
Inherited constants | |
---|---|
Public constructors | |
---|---|
WifiSsidPolicy(policyType: Int, ssids: MutableSet<WifiSsid!>) Create the Wi-Fi SSID Policy. |
Public methods | |
---|---|
Int | |
Boolean |
Two instances of WifiSsidPolicy are considered equal if they have the same WifiSsidPolicyType and the same set of WifiSsids |
Int |
Returns the policy type. |
MutableSet<WifiSsid!> |
getSsids() Returns the set of |
Int |
hashCode() Returns the hash code value of WifiSsidPolicyType and WifiSsid set |
Unit |
writeToParcel(dest: Parcel, flags: Int) Flatten this object in to a Parcel. |
Properties | |
---|---|
static Parcelable.Creator<WifiSsidPolicy!> |
Constants
WIFI_SSID_POLICY_TYPE_ALLOWLIST
static val WIFI_SSID_POLICY_TYPE_ALLOWLIST: Int
SSID policy type indicator for WifiSsidPolicy
.
When returned from WifiSsidPolicy.getPolicyType()
, the constant indicates that the SSID policy type is an allowlist.
Value: 0
See Also
WIFI_SSID_POLICY_TYPE_DENYLIST
static val WIFI_SSID_POLICY_TYPE_DENYLIST: Int
SSID policy type indicator for WifiSsidPolicy
.
When returned from WifiSsidPolicy.getPolicyType()
, the constant indicates that the SSID policy type is a denylist.
Value: 1
See Also
Public constructors
WifiSsidPolicy
WifiSsidPolicy(
policyType: Int,
ssids: MutableSet<WifiSsid!>)
Create the Wi-Fi SSID Policy.
Parameters | |
---|---|
policyType |
Int: indicate whether the policy is an allowlist or a denylist Value is android.app.admin.WifiSsidPolicy#WIFI_SSID_POLICY_TYPE_ALLOWLIST , or android.app.admin.WifiSsidPolicy#WIFI_SSID_POLICY_TYPE_DENYLIST |
ssids |
MutableSet<WifiSsid!>: set of WifiSsid This value cannot be null . |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
if the input ssids set is empty or the policyType is invalid |
Public methods
describeContents
fun describeContents(): Int
Return | |
---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
equals
fun equals(other: Any?): Boolean
Two instances of WifiSsidPolicy are considered equal if they have the same WifiSsidPolicyType and the same set of WifiSsids
Parameters | |
---|---|
obj |
the reference object with which to compare. |
Return | |
---|---|
Boolean |
true if this object is the same as the obj argument; false otherwise. |
getPolicyType
fun getPolicyType(): Int
Returns the policy type.
Return | |
---|---|
Int |
Value is android.app.admin.WifiSsidPolicy#WIFI_SSID_POLICY_TYPE_ALLOWLIST , or android.app.admin.WifiSsidPolicy#WIFI_SSID_POLICY_TYPE_DENYLIST |
getSsids
fun getSsids(): MutableSet<WifiSsid!>
Returns the set of WifiSsid
Return | |
---|---|
MutableSet<WifiSsid!> |
This value cannot be null . |
hashCode
fun hashCode(): Int
Returns the hash code value of WifiSsidPolicyType and WifiSsid set
Return | |
---|---|
Int |
a hash code value for this object. |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
Parameters | |
---|---|
dest |
Parcel: This value cannot be null . |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE . Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |