Builder
class Builder
kotlin.Any | |
↳ | android.net.wifi.rtt.PasnConfig.Builder |
Builder for PasnConfig
Summary
Public constructors | |
---|---|
Builder |
Public methods | |
---|---|
PasnConfig |
build() Builds a |
PasnConfig.Builder |
setPasnComebackCookie(pasnComebackCookie: ByteArray) Set PASN comeback cookie. |
PasnConfig.Builder |
setPassword(password: String) Sets the password if needed by the base AKM of the PASN. |
PasnConfig.Builder |
setWifiSsid(wifiSsid: WifiSsid) Sets the Wi-Fi Service Set Identifier (SSID). |
Public constructors
Builder
Builder(
baseAkms: Int,
ciphers: Int)
Builder
Public methods
build
fun build(): PasnConfig
Builds a PasnConfig
object.
Return | |
---|---|
PasnConfig |
This value cannot be null . |
setPasnComebackCookie
fun setPasnComebackCookie(pasnComebackCookie: ByteArray): PasnConfig.Builder
Set PASN comeback cookie. PASN authentication allows the station to provide comeback cookie which was indicated in the RangingResult
by the AP with a deferral time.
When an AP receives a large volume of initial PASN Authentication frames, it can use the comeback after field in the PASN Parameters element to indicate a deferral time and optionally provide a comeback cookie which is an opaque sequence of octets. Upon receiving this response, the ranging initiator (STA) must wait for the specified time before retrying secure authentication, presenting the received cookie to the AP. See RangingResult.getPasnComebackCookie()
and RangingResult.getPasnComebackAfterMillis()
.
Parameters | |
---|---|
pasnComebackCookie |
ByteArray: an opaque sequence of octets This value cannot be null . |
Return | |
---|---|
PasnConfig.Builder |
a reference to this Builder This value cannot be null . |
setPassword
fun setPassword(password: String): PasnConfig.Builder
Sets the password if needed by the base AKM of the PASN. If not set, password is retrieved from the saved profile identified by the SSID. See setWifiSsid(android.net.wifi.WifiSsid)
. Note: If password and SSID is not set, secure ranging will use unauthenticated PASN.
Parameters | |
---|---|
password |
String: password string This value cannot be null . |
Return | |
---|---|
PasnConfig.Builder |
a reference to this Builder This value cannot be null . |
setWifiSsid
fun setWifiSsid(wifiSsid: WifiSsid): PasnConfig.Builder
Sets the Wi-Fi Service Set Identifier (SSID). This is used to get the saved profile to retrieve password if password is not set using setPassword(java.lang.String)
. Note: If password and SSID is not set, secure ranging will use unauthenticated PASN.
Parameters | |
---|---|
wifiSsid |
WifiSsid: Wi-Fi Service Set Identifier (SSID) This value cannot be null . |
Return | |
---|---|
PasnConfig.Builder |
a reference to this Builder This value cannot be null . |