Package com.android.identity
Class ConnectionMethodWifiAware
- java.lang.Object
-
- com.android.identity.ConnectionMethod
-
- com.android.identity.ConnectionMethodWifiAware
-
public class ConnectionMethodWifiAware extends ConnectionMethod
Connection method for Wifi Aware.
-
-
Constructor Summary
Constructors Constructor Description ConnectionMethodWifiAware(java.lang.String passphraseInfoPassphrase, java.util.OptionalLong channelInfoChannelNumber, java.util.OptionalLong channelInfoOperatingClass, byte[] bandInfoSupportedBands)
Creates a new connection method for Wifi Aware.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataTransport
createDataTransport(android.content.Context context, int role, DataTransportOptions options)
Creates a newDataTransport
-derived instance for the given type ofConnectionMethod
.byte[]
getBandInfoSupportedBands()
java.util.OptionalLong
getChannelInfoChannelNumber()
Gets the channel number, if set.java.util.OptionalLong
getChannelInfoOperatingClass()
Gets the operating class, if set.java.lang.String
getPassphraseInfoPassphrase()
java.lang.String
toString()
-
Methods inherited from class com.android.identity.ConnectionMethod
combine, disambiguate
-
-
-
-
Constructor Detail
-
ConnectionMethodWifiAware
public ConnectionMethodWifiAware(@Nullable java.lang.String passphraseInfoPassphrase, java.util.OptionalLong channelInfoChannelNumber, java.util.OptionalLong channelInfoOperatingClass, @Nullable byte[] bandInfoSupportedBands)
Creates a new connection method for Wifi Aware.- Parameters:
passphraseInfoPassphrase
- the passphrase ornull
.channelInfoChannelNumber
- the channel number or unset.channelInfoOperatingClass
- the operating class or unset.bandInfoSupportedBands
- the supported bands ornull
.
-
-
Method Detail
-
getPassphraseInfoPassphrase
@Nullable public java.lang.String getPassphraseInfoPassphrase()
- Returns:
- the value or
null
.
-
getChannelInfoChannelNumber
public java.util.OptionalLong getChannelInfoChannelNumber()
Gets the channel number, if set.- Returns:
- the value, if any.
-
getChannelInfoOperatingClass
public java.util.OptionalLong getChannelInfoOperatingClass()
Gets the operating class, if set.- Returns:
- the value, if any.
-
getBandInfoSupportedBands
@Nullable public byte[] getBandInfoSupportedBands()
- Returns:
- the value or
null
.
-
createDataTransport
@NonNull public DataTransport createDataTransport(@NonNull android.content.Context context, int role, @NonNull DataTransportOptions options)
Description copied from class:ConnectionMethod
Creates a newDataTransport
-derived instance for the given type ofConnectionMethod
.- Specified by:
createDataTransport
in classConnectionMethod
- Parameters:
context
- application context.role
- whether the transport will be used by the mdoc or mdoc reader.options
- options for configuring the created instance.- Returns:
- A
DataTransport
-derived instance configured with the given options.
-
toString
@NonNull public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-