hotspot2: update Passpoint intent definitions
Address API Councils comment on the newly added intent definitions for Passpoint events: - Use a Parcelable class to represent icon info - Document all extras that are included for an action - Document that the new intents will only be sent to registered receivers, and not manifest receivers - Rename extras to be more generic While there, removed the deprecated hidden Passpoint intent definitions. Bug: 35857805 Test: frameworks/base/wifi/tests/runtests.sh Change-Id: I22de2d52fce3ed1adc8d72bf1580d3337bc747c5 Merged-In: I22de2d52fce3ed1adc8d72bf1580d3337bc747c5
This commit is contained in:
@ -24816,6 +24816,16 @@ package android.net.sip {
|
||||
|
||||
package android.net.wifi {
|
||||
|
||||
public final class IconInfo implements android.os.Parcelable {
|
||||
ctor public IconInfo(java.lang.String, byte[]);
|
||||
ctor public IconInfo(android.net.wifi.IconInfo);
|
||||
method public int describeContents();
|
||||
method public byte[] getData();
|
||||
method public java.lang.String getFilename();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.net.wifi.IconInfo> CREATOR;
|
||||
}
|
||||
|
||||
public class ScanResult implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public boolean is80211mcResponder();
|
||||
@ -25059,26 +25069,21 @@ package android.net.wifi {
|
||||
field public static final java.lang.String ACTION_PICK_WIFI_NETWORK = "android.net.wifi.PICK_WIFI_NETWORK";
|
||||
field public static final java.lang.String ACTION_REQUEST_SCAN_ALWAYS_AVAILABLE = "android.net.wifi.action.REQUEST_SCAN_ALWAYS_AVAILABLE";
|
||||
field public static final int ERROR_AUTHENTICATING = 1; // 0x1
|
||||
field public static final java.lang.String EXTRA_ANQP_ELEMENT_DATA = "android.net.wifi.extra.ANQP_ELEMENT_DATA";
|
||||
field public static final java.lang.String EXTRA_BSSID = "bssid";
|
||||
field public static final java.lang.String EXTRA_BSSID_LONG = "android.net.wifi.extra.BSSID_LONG";
|
||||
field public static final java.lang.String EXTRA_DELAY = "android.net.wifi.extra.DELAY";
|
||||
field public static final java.lang.String EXTRA_ESS = "android.net.wifi.extra.ESS";
|
||||
field public static final java.lang.String EXTRA_ICON_INFO = "android.net.wifi.extra.ICON_INFO";
|
||||
field public static final java.lang.String EXTRA_NETWORK_INFO = "networkInfo";
|
||||
field public static final java.lang.String EXTRA_NEW_RSSI = "newRssi";
|
||||
field public static final java.lang.String EXTRA_NEW_STATE = "newState";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_DEAUTH_IMMINENT_BSSID = "android.net.wifi.extra.PASSPOINT_DEAUTH_IMMINENT_BSSID";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_DEAUTH_IMMINENT_ESS = "android.net.wifi.extra.PASSPOINT_DEAUTH_IMMINENT_ESS";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_DEAUTH_IMMINENT_REASON_URL = "android.net.wifi.extra.PASSPOINT_DEAUTH_IMMINENT_REASON_URL";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_DEAUTH_IMMINENT_REAUTH_DELAY = "android.net.wifi.extra.PASSPOINT_DEAUTH_IMMINENT_REAUTH_DELAY";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_ICON_BSSID = "android.net.wifi.extra.PASSPOINT_ICON_BSSID";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_ICON_DATA = "android.net.wifi.extra.PASSPOINT_ICON_DATA";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_ICON_FILENAME = "android.net.wifi.extra.PASSPOINT_ICON_FILENAME";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_OSU_PROVIDERS_LIST_BSSID = "android.net.wifi.extra.PASSPOINT_OSU_PROVIDERS_LIST_BSSID";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_OSU_PROVIDERS_LIST_DATA = "android.net.wifi.extra.PASSPOINT_OSU_PROVIDERS_LIST_DATA";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_SUBSCRIPTION_REMEDIATION_BSSID = "android.net.wifi.extra.PASSPOINT_SUBSCRIPTION_REMEDIATION_BSSID";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_SUBSCRIPTION_REMEDIATION_SERVER_METHOD = "android.net.wifi.extra.PASSPOINT_SUBSCRIPTION_REMEDIATION_SERVER_METHOD";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_SUBSCRIPTION_REMEDIATION_SERVER_URL = "android.net.wifi.extra.PASSPOINT_SUBSCRIPTION_REMEDIATION_SERVER_URL";
|
||||
field public static final java.lang.String EXTRA_PREVIOUS_WIFI_STATE = "previous_wifi_state";
|
||||
field public static final java.lang.String EXTRA_RESULTS_UPDATED = "resultsUpdated";
|
||||
field public static final java.lang.String EXTRA_SUBSCRIPTION_REMEDIATION_METHOD = "android.net.wifi.extra.SUBSCRIPTION_REMEDIATION_METHOD";
|
||||
field public static final java.lang.String EXTRA_SUPPLICANT_CONNECTED = "connected";
|
||||
field public static final java.lang.String EXTRA_SUPPLICANT_ERROR = "supplicantError";
|
||||
field public static final java.lang.String EXTRA_URL = "android.net.wifi.extra.URL";
|
||||
field public static final java.lang.String EXTRA_WIFI_INFO = "wifiInfo";
|
||||
field public static final java.lang.String EXTRA_WIFI_STATE = "wifi_state";
|
||||
field public static final java.lang.String NETWORK_IDS_CHANGED_ACTION = "android.net.wifi.NETWORK_IDS_CHANGED";
|
||||
|
@ -26968,6 +26968,16 @@ package android.net.wifi {
|
||||
field public boolean truncated;
|
||||
}
|
||||
|
||||
public final class IconInfo implements android.os.Parcelable {
|
||||
ctor public IconInfo(java.lang.String, byte[]);
|
||||
ctor public IconInfo(android.net.wifi.IconInfo);
|
||||
method public int describeContents();
|
||||
method public byte[] getData();
|
||||
method public java.lang.String getFilename();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.net.wifi.IconInfo> CREATOR;
|
||||
}
|
||||
|
||||
public class RttManager {
|
||||
method public void disableResponder(android.net.wifi.RttManager.ResponderCallback);
|
||||
method public void enableResponder(android.net.wifi.RttManager.ResponderCallback);
|
||||
@ -27456,29 +27466,24 @@ package android.net.wifi {
|
||||
field public static final int CHANGE_REASON_REMOVED = 1; // 0x1
|
||||
field public static final java.lang.String CONFIGURED_NETWORKS_CHANGED_ACTION = "android.net.wifi.CONFIGURED_NETWORKS_CHANGE";
|
||||
field public static final int ERROR_AUTHENTICATING = 1; // 0x1
|
||||
field public static final java.lang.String EXTRA_ANQP_ELEMENT_DATA = "android.net.wifi.extra.ANQP_ELEMENT_DATA";
|
||||
field public static final java.lang.String EXTRA_BSSID = "bssid";
|
||||
field public static final java.lang.String EXTRA_BSSID_LONG = "android.net.wifi.extra.BSSID_LONG";
|
||||
field public static final java.lang.String EXTRA_CHANGE_REASON = "changeReason";
|
||||
field public static final java.lang.String EXTRA_DELAY = "android.net.wifi.extra.DELAY";
|
||||
field public static final java.lang.String EXTRA_ESS = "android.net.wifi.extra.ESS";
|
||||
field public static final java.lang.String EXTRA_ICON_INFO = "android.net.wifi.extra.ICON_INFO";
|
||||
field public static final java.lang.String EXTRA_MULTIPLE_NETWORKS_CHANGED = "multipleChanges";
|
||||
field public static final java.lang.String EXTRA_NETWORK_INFO = "networkInfo";
|
||||
field public static final java.lang.String EXTRA_NEW_RSSI = "newRssi";
|
||||
field public static final java.lang.String EXTRA_NEW_STATE = "newState";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_DEAUTH_IMMINENT_BSSID = "android.net.wifi.extra.PASSPOINT_DEAUTH_IMMINENT_BSSID";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_DEAUTH_IMMINENT_ESS = "android.net.wifi.extra.PASSPOINT_DEAUTH_IMMINENT_ESS";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_DEAUTH_IMMINENT_REASON_URL = "android.net.wifi.extra.PASSPOINT_DEAUTH_IMMINENT_REASON_URL";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_DEAUTH_IMMINENT_REAUTH_DELAY = "android.net.wifi.extra.PASSPOINT_DEAUTH_IMMINENT_REAUTH_DELAY";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_ICON_BSSID = "android.net.wifi.extra.PASSPOINT_ICON_BSSID";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_ICON_DATA = "android.net.wifi.extra.PASSPOINT_ICON_DATA";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_ICON_FILENAME = "android.net.wifi.extra.PASSPOINT_ICON_FILENAME";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_OSU_PROVIDERS_LIST_BSSID = "android.net.wifi.extra.PASSPOINT_OSU_PROVIDERS_LIST_BSSID";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_OSU_PROVIDERS_LIST_DATA = "android.net.wifi.extra.PASSPOINT_OSU_PROVIDERS_LIST_DATA";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_SUBSCRIPTION_REMEDIATION_BSSID = "android.net.wifi.extra.PASSPOINT_SUBSCRIPTION_REMEDIATION_BSSID";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_SUBSCRIPTION_REMEDIATION_SERVER_METHOD = "android.net.wifi.extra.PASSPOINT_SUBSCRIPTION_REMEDIATION_SERVER_METHOD";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_SUBSCRIPTION_REMEDIATION_SERVER_URL = "android.net.wifi.extra.PASSPOINT_SUBSCRIPTION_REMEDIATION_SERVER_URL";
|
||||
field public static final java.lang.String EXTRA_PREVIOUS_WIFI_AP_STATE = "previous_wifi_state";
|
||||
field public static final java.lang.String EXTRA_PREVIOUS_WIFI_STATE = "previous_wifi_state";
|
||||
field public static final java.lang.String EXTRA_RESULTS_UPDATED = "resultsUpdated";
|
||||
field public static final java.lang.String EXTRA_SUBSCRIPTION_REMEDIATION_METHOD = "android.net.wifi.extra.SUBSCRIPTION_REMEDIATION_METHOD";
|
||||
field public static final java.lang.String EXTRA_SUPPLICANT_CONNECTED = "connected";
|
||||
field public static final java.lang.String EXTRA_SUPPLICANT_ERROR = "supplicantError";
|
||||
field public static final java.lang.String EXTRA_URL = "android.net.wifi.extra.URL";
|
||||
field public static final java.lang.String EXTRA_WIFI_AP_STATE = "wifi_state";
|
||||
field public static final java.lang.String EXTRA_WIFI_CONFIGURATION = "wifiConfiguration";
|
||||
field public static final java.lang.String EXTRA_WIFI_CREDENTIAL_EVENT_TYPE = "et";
|
||||
|
@ -24889,6 +24889,16 @@ package android.net.sip {
|
||||
|
||||
package android.net.wifi {
|
||||
|
||||
public final class IconInfo implements android.os.Parcelable {
|
||||
ctor public IconInfo(java.lang.String, byte[]);
|
||||
ctor public IconInfo(android.net.wifi.IconInfo);
|
||||
method public int describeContents();
|
||||
method public byte[] getData();
|
||||
method public java.lang.String getFilename();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.net.wifi.IconInfo> CREATOR;
|
||||
}
|
||||
|
||||
public class ScanResult implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public boolean is80211mcResponder();
|
||||
@ -25132,26 +25142,21 @@ package android.net.wifi {
|
||||
field public static final java.lang.String ACTION_PICK_WIFI_NETWORK = "android.net.wifi.PICK_WIFI_NETWORK";
|
||||
field public static final java.lang.String ACTION_REQUEST_SCAN_ALWAYS_AVAILABLE = "android.net.wifi.action.REQUEST_SCAN_ALWAYS_AVAILABLE";
|
||||
field public static final int ERROR_AUTHENTICATING = 1; // 0x1
|
||||
field public static final java.lang.String EXTRA_ANQP_ELEMENT_DATA = "android.net.wifi.extra.ANQP_ELEMENT_DATA";
|
||||
field public static final java.lang.String EXTRA_BSSID = "bssid";
|
||||
field public static final java.lang.String EXTRA_BSSID_LONG = "android.net.wifi.extra.BSSID_LONG";
|
||||
field public static final java.lang.String EXTRA_DELAY = "android.net.wifi.extra.DELAY";
|
||||
field public static final java.lang.String EXTRA_ESS = "android.net.wifi.extra.ESS";
|
||||
field public static final java.lang.String EXTRA_ICON_INFO = "android.net.wifi.extra.ICON_INFO";
|
||||
field public static final java.lang.String EXTRA_NETWORK_INFO = "networkInfo";
|
||||
field public static final java.lang.String EXTRA_NEW_RSSI = "newRssi";
|
||||
field public static final java.lang.String EXTRA_NEW_STATE = "newState";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_DEAUTH_IMMINENT_BSSID = "android.net.wifi.extra.PASSPOINT_DEAUTH_IMMINENT_BSSID";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_DEAUTH_IMMINENT_ESS = "android.net.wifi.extra.PASSPOINT_DEAUTH_IMMINENT_ESS";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_DEAUTH_IMMINENT_REASON_URL = "android.net.wifi.extra.PASSPOINT_DEAUTH_IMMINENT_REASON_URL";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_DEAUTH_IMMINENT_REAUTH_DELAY = "android.net.wifi.extra.PASSPOINT_DEAUTH_IMMINENT_REAUTH_DELAY";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_ICON_BSSID = "android.net.wifi.extra.PASSPOINT_ICON_BSSID";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_ICON_DATA = "android.net.wifi.extra.PASSPOINT_ICON_DATA";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_ICON_FILENAME = "android.net.wifi.extra.PASSPOINT_ICON_FILENAME";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_OSU_PROVIDERS_LIST_BSSID = "android.net.wifi.extra.PASSPOINT_OSU_PROVIDERS_LIST_BSSID";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_OSU_PROVIDERS_LIST_DATA = "android.net.wifi.extra.PASSPOINT_OSU_PROVIDERS_LIST_DATA";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_SUBSCRIPTION_REMEDIATION_BSSID = "android.net.wifi.extra.PASSPOINT_SUBSCRIPTION_REMEDIATION_BSSID";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_SUBSCRIPTION_REMEDIATION_SERVER_METHOD = "android.net.wifi.extra.PASSPOINT_SUBSCRIPTION_REMEDIATION_SERVER_METHOD";
|
||||
field public static final java.lang.String EXTRA_PASSPOINT_SUBSCRIPTION_REMEDIATION_SERVER_URL = "android.net.wifi.extra.PASSPOINT_SUBSCRIPTION_REMEDIATION_SERVER_URL";
|
||||
field public static final java.lang.String EXTRA_PREVIOUS_WIFI_STATE = "previous_wifi_state";
|
||||
field public static final java.lang.String EXTRA_RESULTS_UPDATED = "resultsUpdated";
|
||||
field public static final java.lang.String EXTRA_SUBSCRIPTION_REMEDIATION_METHOD = "android.net.wifi.extra.SUBSCRIPTION_REMEDIATION_METHOD";
|
||||
field public static final java.lang.String EXTRA_SUPPLICANT_CONNECTED = "connected";
|
||||
field public static final java.lang.String EXTRA_SUPPLICANT_ERROR = "supplicantError";
|
||||
field public static final java.lang.String EXTRA_URL = "android.net.wifi.extra.URL";
|
||||
field public static final java.lang.String EXTRA_WIFI_INFO = "wifiInfo";
|
||||
field public static final java.lang.String EXTRA_WIFI_STATE = "wifi_state";
|
||||
field public static final java.lang.String NETWORK_IDS_CHANGED_ACTION = "android.net.wifi.NETWORK_IDS_CHANGED";
|
||||
|
19
wifi/java/android/net/wifi/IconInfo.aidl
Normal file
19
wifi/java/android/net/wifi/IconInfo.aidl
Normal file
@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Copyright (c) 2017, The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.net.wifi;
|
||||
|
||||
parcelable IconInfo;
|
111
wifi/java/android/net/wifi/IconInfo.java
Normal file
111
wifi/java/android/net/wifi/IconInfo.java
Normal file
@ -0,0 +1,111 @@
|
||||
/*
|
||||
* Copyright (C) 2017 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.net.wifi;
|
||||
|
||||
import android.os.Parcelable;
|
||||
import android.text.TextUtils;
|
||||
import android.os.Parcel;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* A class representing icon information.
|
||||
*/
|
||||
public final class IconInfo implements Parcelable {
|
||||
/**
|
||||
* Name of the icon file.
|
||||
*/
|
||||
private final String mFilename;
|
||||
|
||||
/**
|
||||
* Raw binary data of the icon.
|
||||
*/
|
||||
private final byte[] mData;
|
||||
|
||||
public IconInfo(String filename, byte[] data) {
|
||||
mFilename = filename;
|
||||
mData = data;
|
||||
}
|
||||
|
||||
public IconInfo(IconInfo source) {
|
||||
if (source == null) {
|
||||
mFilename = null;
|
||||
mData = null;
|
||||
return;
|
||||
}
|
||||
|
||||
mFilename = source.mFilename;
|
||||
if (source.mData != null) {
|
||||
mData = Arrays.copyOf(source.mData, source.mData.length);
|
||||
} else {
|
||||
mData = null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getFilename() {
|
||||
return mFilename;
|
||||
}
|
||||
|
||||
public byte[] getData() {
|
||||
return mData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object thatObject) {
|
||||
if (this == thatObject) {
|
||||
return true;
|
||||
}
|
||||
if (!(thatObject instanceof IconInfo)) {
|
||||
return false;
|
||||
}
|
||||
IconInfo that = (IconInfo) thatObject;
|
||||
return TextUtils.equals(mFilename, that.mFilename)
|
||||
&& Arrays.equals(mData, that.mData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(mFilename, mData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeString(mFilename);
|
||||
dest.writeByteArray(mData);
|
||||
}
|
||||
|
||||
public static final Creator<IconInfo> CREATOR =
|
||||
new Creator<IconInfo>() {
|
||||
@Override
|
||||
public IconInfo createFromParcel(Parcel in) {
|
||||
String filename = in.readString();
|
||||
byte[] data = in.createByteArray();
|
||||
return new IconInfo(filename, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IconInfo[] newArray(int size) {
|
||||
return new IconInfo[size];
|
||||
}
|
||||
};
|
||||
}
|
@ -113,167 +113,119 @@ public class WifiManager {
|
||||
@SystemApi
|
||||
public static final int WIFI_CREDENTIAL_FORGOT = 1;
|
||||
|
||||
/**
|
||||
* Broadcast intent action indicating that the a Passpoint release 2 icon has been received.
|
||||
* @hide
|
||||
*/
|
||||
public static final String PASSPOINT_ICON_RECEIVED_ACTION =
|
||||
"android.net.wifi.PASSPOINT_ICON_RECEIVED";
|
||||
/** @hide */
|
||||
public static final String EXTRA_PASSPOINT_ICON_FILE = "file";
|
||||
|
||||
/**
|
||||
* Broadcast intent action indicating that the a Passpoint release
|
||||
* 2 WNM frame has been received.
|
||||
* @hide
|
||||
*/
|
||||
public static final String PASSPOINT_WNM_FRAME_RECEIVED_ACTION =
|
||||
"android.net.wifi.PASSPOINT_WNM_FRAME_RECEIVED";
|
||||
/**
|
||||
* Originating BSS
|
||||
* @hide */
|
||||
public static final String EXTRA_PASSPOINT_WNM_BSSID = "bssid";
|
||||
/**
|
||||
* SOAP-XML or OMA-DM
|
||||
* @hide */
|
||||
public static final String EXTRA_PASSPOINT_WNM_METHOD = "method";
|
||||
/**
|
||||
* Type of Passpoint match
|
||||
* @hide */
|
||||
public static final String EXTRA_PASSPOINT_WNM_PPOINT_MATCH = "match";
|
||||
/**
|
||||
* String
|
||||
* @hide */
|
||||
public static final String EXTRA_PASSPOINT_WNM_URL = "url";
|
||||
/**
|
||||
* Boolean true=ess, false=bss
|
||||
* @hide */
|
||||
public static final String EXTRA_PASSPOINT_WNM_ESS = "ess";
|
||||
/**
|
||||
* Delay in seconds
|
||||
* @hide */
|
||||
public static final String EXTRA_PASSPOINT_WNM_DELAY = "delay";
|
||||
|
||||
/**
|
||||
* Broadcast intent action indicating that a Passpoint provider icon has been received.
|
||||
*
|
||||
* Included extras:
|
||||
* {@link #EXTRA_BSSID_LONG}
|
||||
* {@link #EXTRA_ICON_INFO}
|
||||
*
|
||||
* Receiver Required Permission: android.Manifest.permission.ACCESS_WIFI_STATE
|
||||
*/
|
||||
public static final String ACTION_PASSPOINT_ICON =
|
||||
"android.net.wifi.action.PASSPOINT_ICON";
|
||||
/**
|
||||
* BSSID of the sender.
|
||||
*
|
||||
* Type: long
|
||||
* <p>Note: The broadcast is only delivered to registered receivers - no manifest registered
|
||||
* components will be launched.
|
||||
*/
|
||||
public static final String EXTRA_PASSPOINT_ICON_BSSID =
|
||||
"android.net.wifi.extra.PASSPOINT_ICON_BSSID";
|
||||
public static final String ACTION_PASSPOINT_ICON = "android.net.wifi.action.PASSPOINT_ICON";
|
||||
/**
|
||||
* Filename of the icon.
|
||||
* BSSID of an AP in long representation. The {@link #EXTRA_BSSID} contains BSSID in
|
||||
* String representation.
|
||||
*
|
||||
* Type: String
|
||||
* Retrieve with {@link android.content.Intent#getLongExtra(String, long)}.
|
||||
*/
|
||||
public static final String EXTRA_PASSPOINT_ICON_FILENAME =
|
||||
"android.net.wifi.extra.PASSPOINT_ICON_FILENAME";
|
||||
public static final String EXTRA_BSSID_LONG = "android.net.wifi.extra.BSSID_LONG";
|
||||
/**
|
||||
* Binary blob of the icon.
|
||||
* Icon information.
|
||||
*
|
||||
* Type: byte[]
|
||||
* Retrieve with {@link android.content.Intent#getParcelableExtra(String)} and cast into
|
||||
* {@link IconInfo}.
|
||||
*/
|
||||
public static final String EXTRA_PASSPOINT_ICON_DATA =
|
||||
"android.net.wifi.extra.PASSPOINT_ICON_DATA";
|
||||
public static final String EXTRA_ICON_INFO = "android.net.wifi.extra.ICON_INFO";
|
||||
|
||||
/**
|
||||
* Broadcast intent action indicating a Passpoint OSU Providers List element has been received.
|
||||
*
|
||||
* Included extras:
|
||||
* {@link #EXTRA_BSSID_LONG}
|
||||
* {@link #EXTRA_ANQP_ELEMENT_DATA}
|
||||
*
|
||||
* Receiver Required Permission: android.Manifest.permission.ACCESS_WIFI_STATE
|
||||
*
|
||||
* <p>Note: The broadcast is only delivered to registered receivers - no manifest registered
|
||||
* components will be launched.
|
||||
*
|
||||
*/
|
||||
public static final String ACTION_PASSPOINT_OSU_PROVIDERS_LIST =
|
||||
"android.net.wifi.action.PASSPOINT_OSU_PROVIDERS_LIST";
|
||||
/**
|
||||
* BSSID of the sender.
|
||||
* Raw binary data of an ANQP (Access Network Query Protocol) element.
|
||||
*
|
||||
* Type: long
|
||||
* Retrieve with {@link android.content.Intent#getByteArrayExtra(String)}.
|
||||
*/
|
||||
public static final String EXTRA_PASSPOINT_OSU_PROVIDERS_LIST_BSSID =
|
||||
"android.net.wifi.extra.PASSPOINT_OSU_PROVIDERS_LIST_BSSID";
|
||||
/**
|
||||
* Raw data of OSU Providers List ANQP element. Refer to Section 4.8 of Hotspot 2.0 Release 2
|
||||
* Technical Specification for the exact data format.
|
||||
*
|
||||
* Type: byte[]
|
||||
*/
|
||||
public static final String EXTRA_PASSPOINT_OSU_PROVIDERS_LIST_DATA =
|
||||
"android.net.wifi.extra.PASSPOINT_OSU_PROVIDERS_LIST_DATA";
|
||||
public static final String EXTRA_ANQP_ELEMENT_DATA =
|
||||
"android.net.wifi.extra.ANQP_ELEMENT_DATA";
|
||||
|
||||
/**
|
||||
* Broadcast intent action indicating that a Passpoint Deauth Imminent frame has been received.
|
||||
*
|
||||
* Included extras:
|
||||
* {@link #EXTRA_BSSID_LONG}
|
||||
* {@link #EXTRA_ESS}
|
||||
* {@link #EXTRA_DELAY}
|
||||
* {@link #EXTRA_URL}
|
||||
*
|
||||
* Receiver Required Permission: android.Manifest.permission.ACCESS_WIFI_STATE
|
||||
*
|
||||
* <p>Note: The broadcast is only delivered to registered receivers - no manifest registered
|
||||
* components will be launched.
|
||||
*
|
||||
*/
|
||||
public static final String ACTION_PASSPOINT_DEAUTH_IMMINENT =
|
||||
"android.net.wifi.action.PASSPOINT_DEAUTH_IMMINENT";
|
||||
/**
|
||||
* The BSSID of the sender.
|
||||
* Flag indicating BSS (Basic Service Set) or ESS (Extended Service Set). This will be set to
|
||||
* {@code true} for ESS.
|
||||
*
|
||||
* Type: long
|
||||
* Retrieve with {@link android.content.Intent#getBooleanExtra(String, boolean)}.
|
||||
*/
|
||||
public static final String EXTRA_PASSPOINT_DEAUTH_IMMINENT_BSSID =
|
||||
"android.net.wifi.extra.PASSPOINT_DEAUTH_IMMINENT_BSSID";
|
||||
public static final String EXTRA_ESS = "android.net.wifi.extra.ESS";
|
||||
/**
|
||||
* Flag indicating failure at BSS (Basic Service Set) or ESS (Extended Service Set) level.
|
||||
* Delay in seconds.
|
||||
*
|
||||
* Type: boolean
|
||||
* Retrieve with {@link android.content.Intent#getIntExtra(String, int)}.
|
||||
*/
|
||||
public static final String EXTRA_PASSPOINT_DEAUTH_IMMINENT_ESS =
|
||||
"android.net.wifi.extra.PASSPOINT_DEAUTH_IMMINENT_ESS";
|
||||
public static final String EXTRA_DELAY = "android.net.wifi.extra.DELAY";
|
||||
/**
|
||||
* Delay in seconds that a device shall wait before attempting re-association to the same BSS
|
||||
* or ESS (as indicated by {@link #EXTRA_PASSPOINT_DEAUTH_IMMINENT_ESS}.
|
||||
* String representation of an URL.
|
||||
*
|
||||
* Type: int
|
||||
* Retrieve with {@link android.content.Intent#getStringExtra(String)}.
|
||||
*/
|
||||
public static final String EXTRA_PASSPOINT_DEAUTH_IMMINENT_REAUTH_DELAY =
|
||||
"android.net.wifi.extra.PASSPOINT_DEAUTH_IMMINENT_REAUTH_DELAY";
|
||||
/**
|
||||
* URL that provides a webpage explaining the deauth reason.
|
||||
*
|
||||
* Type: String
|
||||
*/
|
||||
public static final String EXTRA_PASSPOINT_DEAUTH_IMMINENT_REASON_URL =
|
||||
"android.net.wifi.extra.PASSPOINT_DEAUTH_IMMINENT_REASON_URL";
|
||||
public static final String EXTRA_URL = "android.net.wifi.extra.URL";
|
||||
|
||||
/**
|
||||
* Broadcast intent action indicating a Passpoint subscription remediation frame has been
|
||||
* received.
|
||||
*
|
||||
* Included extras:
|
||||
* {@link #EXTRA_BSSID_LONG}
|
||||
* {@link #EXTRA_SUBSCRIPTION_REMEDIATION_METHOD}
|
||||
* {@link #EXTRA_URL}
|
||||
*
|
||||
* Receiver Required Permission: android.Manifest.permission.ACCESS_WIFI_STATE
|
||||
*
|
||||
** <p>Note: The broadcast is only delivered to registered receivers - no manifest registered
|
||||
* components will be launched.
|
||||
*/
|
||||
public static final String ACTION_PASSPOINT_SUBSCRIPTION_REMEDIATION =
|
||||
"android.net.wifi.action.PASSPOINT_SUBSCRIPTION_REMEDIATION";
|
||||
/**
|
||||
* The BSSID of the sender.
|
||||
*
|
||||
* Type: long
|
||||
*/
|
||||
public static final String EXTRA_PASSPOINT_SUBSCRIPTION_REMEDIATION_BSSID =
|
||||
"android.net.wifi.extra.PASSPOINT_SUBSCRIPTION_REMEDIATION_BSSID";
|
||||
/**
|
||||
* The protocol supported by the subscription remediation server. The possible values are:
|
||||
* 0 - OMA DM
|
||||
* 1 - SOAP XML SPP
|
||||
*
|
||||
* Type: int
|
||||
* Retrieve with {@link android.content.Intent#getIntExtra(String, int)}.
|
||||
*/
|
||||
public static final String EXTRA_PASSPOINT_SUBSCRIPTION_REMEDIATION_SERVER_METHOD =
|
||||
"android.net.wifi.extra.PASSPOINT_SUBSCRIPTION_REMEDIATION_SERVER_METHOD";
|
||||
/**
|
||||
* URL of the subscription remediation server.
|
||||
*
|
||||
* Type: String
|
||||
*/
|
||||
public static final String EXTRA_PASSPOINT_SUBSCRIPTION_REMEDIATION_SERVER_URL =
|
||||
"android.net.wifi.extra.PASSPOINT_SUBSCRIPTION_REMEDIATION_SERVER_URL";
|
||||
public static final String EXTRA_SUBSCRIPTION_REMEDIATION_METHOD =
|
||||
"android.net.wifi.extra.SUBSCRIPTION_REMEDIATION_METHOD";
|
||||
|
||||
/**
|
||||
* Broadcast intent action indicating that Wi-Fi has been enabled, disabled,
|
||||
|
122
wifi/tests/src/android/net/wifi/IconInfoTest.java
Normal file
122
wifi/tests/src/android/net/wifi/IconInfoTest.java
Normal file
@ -0,0 +1,122 @@
|
||||
/*
|
||||
* Copyright (C) 2017 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License
|
||||
*/
|
||||
|
||||
package android.net.wifi;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import android.net.wifi.IconInfo;
|
||||
import android.os.Parcel;
|
||||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link android.net.wifi.IconInfo}.
|
||||
*/
|
||||
@SmallTest
|
||||
public class IconInfoTest {
|
||||
private static final String TEST_FILENAME = "testIcon";
|
||||
private static final byte[] TEST_DATA = new byte[] {0x12, 0x23, 0x34, 0x45, 0x56, 0x67};
|
||||
|
||||
/**
|
||||
* Verify parcel write and read consistency for the given {@link IconInfo}
|
||||
*
|
||||
* @param writeIcon the {@link IconInfo} to write and verify
|
||||
* @throws Exception
|
||||
*/
|
||||
private static void verifyParcel(IconInfo writeIcon) throws Exception {
|
||||
Parcel parcel = Parcel.obtain();
|
||||
writeIcon.writeToParcel(parcel, 0);
|
||||
|
||||
parcel.setDataPosition(0); // Rewind data position back to the beginning for read.
|
||||
IconInfo readIcon = IconInfo.CREATOR.createFromParcel(parcel);
|
||||
assertEquals(writeIcon, readIcon);
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify parcel serialization for a {@link IconInfo} with null data.
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
@Test
|
||||
public void verifyParcelWithNullData() throws Exception {
|
||||
verifyParcel(new IconInfo(TEST_FILENAME, (byte[]) null));
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify parcel serialization for a {@link IconInfo} with zero length data.
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
@Test
|
||||
public void verifyParcelWithZeroLengthData() throws Exception {
|
||||
verifyParcel(new IconInfo(TEST_FILENAME, new byte[0]));
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify parcel serialization for a {@link IconInfo} with non-zero length data.
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
@Test
|
||||
public void verifyParcelWithNonZeroLengthData() throws Exception {
|
||||
verifyParcel(new IconInfo(TEST_FILENAME, TEST_DATA));
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify parcel serialization for a {@link IconInfo} with a null filename.
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
@Test
|
||||
public void verifyParcelWithNullFilename() throws Exception {
|
||||
verifyParcel(new IconInfo(null, TEST_DATA));
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify the copy constructor with non-null filename and data.
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
@Test
|
||||
public void verifyCopyConstructor() throws Exception {
|
||||
IconInfo source = new IconInfo(TEST_FILENAME, TEST_DATA);
|
||||
assertEquals(source, new IconInfo(source));
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify the copy constructor with null data.
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
@Test
|
||||
public void verifyCopyConstructorWithNullData() throws Exception {
|
||||
IconInfo source = new IconInfo(TEST_FILENAME, (byte[]) null);
|
||||
assertEquals(source, new IconInfo(source));
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify the copy constructor with null file name.
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
@Test
|
||||
public void verifyCopyConstructorWithNullFilename() throws Exception {
|
||||
IconInfo source = new IconInfo(null, TEST_DATA);
|
||||
assertEquals(source, new IconInfo(source));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user