Loading api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -30417,8 +30417,11 @@ package android.net.wifi.aware { method public int getMaxMatchFilterLength(); method public int getMaxServiceNameLength(); method public int getMaxServiceSpecificInfoLength(); method public int getSupportedCipherSuites(); method public void writeToParcel(android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.aware.Characteristics> CREATOR; field public static final int WIFI_AWARE_CIPHER_SUITE_NCS_SK_128 = 1; // 0x1 field public static final int WIFI_AWARE_CIPHER_SUITE_NCS_SK_256 = 2; // 0x2 } public class DiscoverySession implements java.lang.AutoCloseable { wifi/java/android/net/wifi/aware/Characteristics.java +36 −1 Original line number Diff line number Diff line Loading @@ -16,10 +16,14 @@ package android.net.wifi.aware; import android.annotation.IntDef; import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** * The characteristics of the Wi-Fi Aware implementation. */ Loading @@ -31,6 +35,8 @@ public final class Characteristics implements Parcelable { "key_max_service_specific_info_length"; /** @hide */ public static final String KEY_MAX_MATCH_FILTER_LENGTH = "key_max_match_filter_length"; /** @hide */ public static final String KEY_SUPPORTED_CIPHER_SUITES = "key_supported_cipher_suites"; private Bundle mCharacteristics = new Bundle(); Loading Loading @@ -71,12 +77,41 @@ public final class Characteristics implements Parcelable { * {@link PublishConfig.Builder#setMatchFilter(java.util.List)} and * {@link SubscribeConfig.Builder#setMatchFilter(java.util.List)}. * * @return A positive integer, maximum legngth of byte array for Aware discovery match filter. * @return A positive integer, maximum length of byte array for Aware discovery match filter. */ public int getMaxMatchFilterLength() { return mCharacteristics.getInt(KEY_MAX_MATCH_FILTER_LENGTH); } /** @hide */ @IntDef(flag = true, prefix = { "WIFI_AWARE_CIPHER_SUITE_" }, value = { WIFI_AWARE_CIPHER_SUITE_NCS_SK_128, WIFI_AWARE_CIPHER_SUITE_NCS_SK_256, }) @Retention(RetentionPolicy.SOURCE) public @interface WifiAwareCipherSuites {} /** * Wi-Fi Aware supported ciphier suite representing NCS SK 128: 128 bit shared-key. */ public static final int WIFI_AWARE_CIPHER_SUITE_NCS_SK_128 = 1 << 0; /** * Wi-Fi Aware supported ciphier suite representing NCS SK 256: 256 bit shared-key. */ public static final int WIFI_AWARE_CIPHER_SUITE_NCS_SK_256 = 1 << 1; /** * Returns the set of cipher suites supported by the device for use in Wi-Fi Aware data-paths. * The device automatically picks the strongest cipher suite when initiating a data-path setup. * * @return A set of flags from {@link #WIFI_AWARE_CIPHER_SUITE_NCS_SK_128}, or * {@link #WIFI_AWARE_CIPHER_SUITE_NCS_SK_256}. */ public @WifiAwareCipherSuites int getSupportedCipherSuites() { return mCharacteristics.getInt(KEY_SUPPORTED_CIPHER_SUITES); } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeBundle(mCharacteristics); Loading Loading
api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -30417,8 +30417,11 @@ package android.net.wifi.aware { method public int getMaxMatchFilterLength(); method public int getMaxServiceNameLength(); method public int getMaxServiceSpecificInfoLength(); method public int getSupportedCipherSuites(); method public void writeToParcel(android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.aware.Characteristics> CREATOR; field public static final int WIFI_AWARE_CIPHER_SUITE_NCS_SK_128 = 1; // 0x1 field public static final int WIFI_AWARE_CIPHER_SUITE_NCS_SK_256 = 2; // 0x2 } public class DiscoverySession implements java.lang.AutoCloseable {
wifi/java/android/net/wifi/aware/Characteristics.java +36 −1 Original line number Diff line number Diff line Loading @@ -16,10 +16,14 @@ package android.net.wifi.aware; import android.annotation.IntDef; import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** * The characteristics of the Wi-Fi Aware implementation. */ Loading @@ -31,6 +35,8 @@ public final class Characteristics implements Parcelable { "key_max_service_specific_info_length"; /** @hide */ public static final String KEY_MAX_MATCH_FILTER_LENGTH = "key_max_match_filter_length"; /** @hide */ public static final String KEY_SUPPORTED_CIPHER_SUITES = "key_supported_cipher_suites"; private Bundle mCharacteristics = new Bundle(); Loading Loading @@ -71,12 +77,41 @@ public final class Characteristics implements Parcelable { * {@link PublishConfig.Builder#setMatchFilter(java.util.List)} and * {@link SubscribeConfig.Builder#setMatchFilter(java.util.List)}. * * @return A positive integer, maximum legngth of byte array for Aware discovery match filter. * @return A positive integer, maximum length of byte array for Aware discovery match filter. */ public int getMaxMatchFilterLength() { return mCharacteristics.getInt(KEY_MAX_MATCH_FILTER_LENGTH); } /** @hide */ @IntDef(flag = true, prefix = { "WIFI_AWARE_CIPHER_SUITE_" }, value = { WIFI_AWARE_CIPHER_SUITE_NCS_SK_128, WIFI_AWARE_CIPHER_SUITE_NCS_SK_256, }) @Retention(RetentionPolicy.SOURCE) public @interface WifiAwareCipherSuites {} /** * Wi-Fi Aware supported ciphier suite representing NCS SK 128: 128 bit shared-key. */ public static final int WIFI_AWARE_CIPHER_SUITE_NCS_SK_128 = 1 << 0; /** * Wi-Fi Aware supported ciphier suite representing NCS SK 256: 256 bit shared-key. */ public static final int WIFI_AWARE_CIPHER_SUITE_NCS_SK_256 = 1 << 1; /** * Returns the set of cipher suites supported by the device for use in Wi-Fi Aware data-paths. * The device automatically picks the strongest cipher suite when initiating a data-path setup. * * @return A set of flags from {@link #WIFI_AWARE_CIPHER_SUITE_NCS_SK_128}, or * {@link #WIFI_AWARE_CIPHER_SUITE_NCS_SK_256}. */ public @WifiAwareCipherSuites int getSupportedCipherSuites() { return mCharacteristics.getInt(KEY_SUPPORTED_CIPHER_SUITES); } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeBundle(mCharacteristics); Loading