am bac93970: Merge "Unhide WifiPasspointManager for ANQP APIs - DO NOT MERGE" into lmp-dev
* commit 'bac9397083b220fd9d6ae3c24beafebf790f3f18': Unhide WifiPasspointManager for ANQP APIs - DO NOT MERGE
This commit is contained in:
208
api/current.txt
208
api/current.txt
@@ -18290,6 +18290,7 @@ package android.net.wifi {
|
||||
field public java.lang.String capabilities;
|
||||
field public int frequency;
|
||||
field public int level;
|
||||
field public android.net.wifi.passpoint.WifiPasspointInfo passpoint;
|
||||
field public long timestamp;
|
||||
}
|
||||
|
||||
@@ -18768,6 +18769,213 @@ package android.net.wifi.p2p.nsd {
|
||||
|
||||
}
|
||||
|
||||
package android.net.wifi.passpoint {
|
||||
|
||||
public abstract interface IWifiPasspointManager implements android.os.IInterface {
|
||||
method public abstract boolean addCredential(android.net.wifi.passpoint.WifiPasspointCredential) throws android.os.RemoteException;
|
||||
method public abstract java.util.List<android.net.wifi.passpoint.WifiPasspointCredential> getCredentials() throws android.os.RemoteException;
|
||||
method public abstract android.os.Messenger getMessenger() throws android.os.RemoteException;
|
||||
method public abstract int getPasspointState() throws android.os.RemoteException;
|
||||
method public abstract boolean removeCredential(android.net.wifi.passpoint.WifiPasspointCredential) throws android.os.RemoteException;
|
||||
method public abstract java.util.List<android.net.wifi.passpoint.WifiPasspointPolicy> requestCredentialMatch(java.util.List<android.net.wifi.ScanResult>) throws android.os.RemoteException;
|
||||
method public abstract boolean updateCredential(android.net.wifi.passpoint.WifiPasspointCredential) throws android.os.RemoteException;
|
||||
}
|
||||
|
||||
public class WifiPasspointCredential implements android.os.Parcelable {
|
||||
ctor public WifiPasspointCredential(java.lang.String, java.lang.String, android.net.wifi.WifiEnterpriseConfig);
|
||||
method public int describeContents();
|
||||
method public android.net.wifi.WifiEnterpriseConfig getEnterpriseConfig();
|
||||
method public java.lang.String getHomeSpFqdn();
|
||||
method public java.lang.String getRealm();
|
||||
method public void setEnterpriseConfig(android.net.wifi.WifiEnterpriseConfig);
|
||||
method public void setHomeFqdn(java.lang.String);
|
||||
method public void setRealm(java.lang.String);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
}
|
||||
|
||||
public class WifiPasspointInfo implements android.os.Parcelable {
|
||||
ctor public WifiPasspointInfo();
|
||||
method public int describeContents();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final int ANQP_CAPABILITY = 1; // 0x1
|
||||
field public static final int CELLULAR_NETWORK = 64; // 0x40
|
||||
field public static final int CONNECTION_CAPABILITY = 2048; // 0x800
|
||||
field public static final int DOMAIN_NAME = 128; // 0x80
|
||||
field public static final int HOTSPOT_CAPABILITY = 256; // 0x100
|
||||
field public static final int IP_ADDR_TYPE_AVAILABILITY = 16; // 0x10
|
||||
field public static final int NAI_REALM = 32; // 0x20
|
||||
field public static final int NETWORK_AUTH_TYPE = 4; // 0x4
|
||||
field public static final int OPERATOR_FRIENDLY_NAME = 512; // 0x200
|
||||
field public static final int OSU_PROVIDER = 4096; // 0x1000
|
||||
field public static final int PRESET_ALL = 8191; // 0x1fff
|
||||
field public static final int PRESET_CRED_MATCH = 481; // 0x1e1
|
||||
field public static final int ROAMING_CONSORTIUM = 8; // 0x8
|
||||
field public static final int VENUE_NAME = 2; // 0x2
|
||||
field public static final int WAN_METRICS = 1024; // 0x400
|
||||
field public java.lang.String bssid;
|
||||
field public java.util.List cellularNetworkList;
|
||||
field public java.util.List connectionCapabilityList;
|
||||
field public java.util.List domainNameList;
|
||||
field public android.net.wifi.passpoint.WifiPasspointInfo.IpAddressType ipAddrTypeAvailability;
|
||||
field public java.util.List naiRealmList;
|
||||
field public java.util.List networkAuthTypeList;
|
||||
field public java.lang.String operatorFriendlyName;
|
||||
field public java.util.List osuProviderList;
|
||||
field public java.util.List roamingConsortiumList;
|
||||
field public java.lang.String venueName;
|
||||
field public android.net.wifi.passpoint.WifiPasspointInfo.WanMetrics wanMetrics;
|
||||
}
|
||||
|
||||
public static class WifiPasspointInfo.CellularNetwork {
|
||||
ctor public WifiPasspointInfo.CellularNetwork();
|
||||
field public java.lang.String mcc;
|
||||
field public java.lang.String mnc;
|
||||
}
|
||||
|
||||
public static class WifiPasspointInfo.IpAddressType {
|
||||
ctor public WifiPasspointInfo.IpAddressType();
|
||||
method public int getIpv4Availability();
|
||||
method public int getIpv6Availability();
|
||||
field public static final int IPV4_DOUBLE_NAT = 4; // 0x4
|
||||
field public static final int IPV4_NOT_AVAILABLE = 0; // 0x0
|
||||
field public static final int IPV4_PORT_RESTRICTED = 2; // 0x2
|
||||
field public static final int IPV4_PORT_RESTRICTED_DOUBLE_NAT = 6; // 0x6
|
||||
field public static final int IPV4_PORT_RESTRICTED_SINGLE_NAT = 5; // 0x5
|
||||
field public static final int IPV4_PORT_UNKNOWN = 7; // 0x7
|
||||
field public static final int IPV4_PUBLIC = 1; // 0x1
|
||||
field public static final int IPV4_SINGLE_NAT = 3; // 0x3
|
||||
field public static final int IPV6_AVAILABLE = 1; // 0x1
|
||||
field public static final int IPV6_NOT_AVAILABLE = 0; // 0x0
|
||||
field public static final int IPV6_UNKNOWN = 2; // 0x2
|
||||
field public int availability;
|
||||
}
|
||||
|
||||
public static class WifiPasspointInfo.IpProtoPort {
|
||||
ctor public WifiPasspointInfo.IpProtoPort();
|
||||
field public static final int STATUS_CLOSED = 0; // 0x0
|
||||
field public static final int STATUS_OPEN = 1; // 0x1
|
||||
field public static final int STATUS_UNKNOWN = 2; // 0x2
|
||||
field public int port;
|
||||
field public int proto;
|
||||
field public int status;
|
||||
}
|
||||
|
||||
public static class WifiPasspointInfo.NaiRealm {
|
||||
ctor public WifiPasspointInfo.NaiRealm();
|
||||
field public static final int ENCODING_RFC4282 = 0; // 0x0
|
||||
field public static final int ENCODING_UTF8 = 1; // 0x1
|
||||
field public int encoding;
|
||||
field public java.lang.String realm;
|
||||
}
|
||||
|
||||
public static class WifiPasspointInfo.NetworkAuthType {
|
||||
ctor public WifiPasspointInfo.NetworkAuthType();
|
||||
field public static final int TYPE_DNS_REDIRECTION = 3; // 0x3
|
||||
field public static final int TYPE_HTTP_REDIRECTION = 2; // 0x2
|
||||
field public static final int TYPE_ONLINE_ENROLLMENT = 1; // 0x1
|
||||
field public static final int TYPE_TERMS_AND_CONDITION = 0; // 0x0
|
||||
field public java.lang.String redirectUrl;
|
||||
field public int type;
|
||||
}
|
||||
|
||||
public static class WifiPasspointInfo.WanMetrics {
|
||||
ctor public WifiPasspointInfo.WanMetrics();
|
||||
method public boolean getAtCapacity();
|
||||
method public int getLinkStatus();
|
||||
method public boolean getSymmetricLink();
|
||||
field public static final int STATUS_DOWN = 2; // 0x2
|
||||
field public static final int STATUS_RESERVED = 0; // 0x0
|
||||
field public static final int STATUS_TEST = 3; // 0x3
|
||||
field public static final int STATUS_UP = 1; // 0x1
|
||||
field public int downlinkLoad;
|
||||
field public long downlinkSpeed;
|
||||
field public int lmd;
|
||||
field public int uplinkLoad;
|
||||
field public long uplinkSpeed;
|
||||
field public int wanInfo;
|
||||
}
|
||||
|
||||
public class WifiPasspointManager {
|
||||
ctor public WifiPasspointManager(android.content.Context, android.net.wifi.passpoint.IWifiPasspointManager);
|
||||
method public android.os.Messenger getMessenger();
|
||||
method public android.net.wifi.passpoint.WifiPasspointManager.Channel initialize(android.content.Context, android.os.Looper, android.net.wifi.passpoint.WifiPasspointManager.ChannelListener);
|
||||
method public void requestAnqpInfo(android.net.wifi.passpoint.WifiPasspointManager.Channel, java.util.List<android.net.wifi.ScanResult>, int, android.net.wifi.passpoint.WifiPasspointManager.ActionListener);
|
||||
field public static final java.lang.String PASSPOINT_CRED_CHANGED_ACTION = "android.net.wifi.passpoint.CRED_CHANGE";
|
||||
field public static final java.lang.String PASSPOINT_OSU_AVAILABLE_ACTION = "android.net.wifi.passpoint.OSU_AVAILABLE";
|
||||
field public static final int PASSPOINT_STATE_ACCESS = 3; // 0x3
|
||||
field public static final java.lang.String PASSPOINT_STATE_CHANGED_ACTION = "android.net.wifi.passpoint.STATE_CHANGE";
|
||||
field public static final int PASSPOINT_STATE_DISABLED = 1; // 0x1
|
||||
field public static final int PASSPOINT_STATE_DISCOVERY = 2; // 0x2
|
||||
field public static final int PASSPOINT_STATE_PROVISION = 4; // 0x4
|
||||
field public static final int PASSPOINT_STATE_UNKNOWN = 0; // 0x0
|
||||
field public static final java.lang.String PASSPOINT_USER_REM_REQ_ACTION = "android.net.wifi.passpoint.USER_REM_REQ";
|
||||
field public static final java.lang.String PROTOCOL_DM = "OMA-DM-ClientInitiated";
|
||||
field public static final java.lang.String PROTOCOL_SOAP = "SPP-ClientInitiated";
|
||||
field public static final int REASON_BUSY = 2; // 0x2
|
||||
field public static final int REASON_ERROR = 0; // 0x0
|
||||
field public static final int REASON_INVALID_PARAMETER = 3; // 0x3
|
||||
field public static final int REASON_NOT_TRUSTED = 4; // 0x4
|
||||
field public static final int REASON_WIFI_DISABLED = 1; // 0x1
|
||||
field public static final int REQUEST_ANQP_INFO = 163841; // 0x28001
|
||||
field public static final int REQUEST_ANQP_INFO_FAILED = 163842; // 0x28002
|
||||
field public static final int REQUEST_ANQP_INFO_SUCCEEDED = 163843; // 0x28003
|
||||
field public static final int REQUEST_OSU_ICON = 163844; // 0x28004
|
||||
field public static final int REQUEST_OSU_ICON_FAILED = 163845; // 0x28005
|
||||
field public static final int REQUEST_OSU_ICON_SUCCEEDED = 163846; // 0x28006
|
||||
field public static final int START_OSU = 163847; // 0x28007
|
||||
field public static final int START_OSU_BROWSER = 163848; // 0x28008
|
||||
field public static final int START_OSU_FAILED = 163849; // 0x28009
|
||||
field public static final int START_OSU_SUCCEEDED = 163850; // 0x2800a
|
||||
}
|
||||
|
||||
public static abstract interface WifiPasspointManager.ActionListener {
|
||||
method public abstract void onFailure(int);
|
||||
method public abstract void onSuccess();
|
||||
}
|
||||
|
||||
public static class WifiPasspointManager.Channel {
|
||||
}
|
||||
|
||||
public static abstract interface WifiPasspointManager.ChannelListener {
|
||||
method public abstract void onChannelDisconnected();
|
||||
}
|
||||
|
||||
public static class WifiPasspointManager.ParcelableString implements android.os.Parcelable {
|
||||
ctor public WifiPasspointManager.ParcelableString();
|
||||
method public int describeContents();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator CREATOR;
|
||||
field public java.lang.String string;
|
||||
}
|
||||
|
||||
public class WifiPasspointOsuProvider implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator CREATOR;
|
||||
field public java.lang.String friendlyName;
|
||||
field public java.lang.Object icon;
|
||||
field public java.lang.String iconFileName;
|
||||
field public int iconHeight;
|
||||
field public java.lang.String iconType;
|
||||
field public int iconWidth;
|
||||
field public java.lang.String osuNai;
|
||||
field public java.lang.String osuService;
|
||||
field public java.lang.String ssid;
|
||||
}
|
||||
|
||||
public class WifiPasspointPolicy implements android.os.Parcelable {
|
||||
method public android.net.wifi.WifiConfiguration createWifiConfiguration();
|
||||
method public int describeContents();
|
||||
method public java.lang.String getBssid();
|
||||
method public android.net.wifi.passpoint.WifiPasspointCredential getCredential();
|
||||
method public int getCredentialPriority();
|
||||
method public int getRoamingPriority();
|
||||
method public java.lang.String getSsid();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
package android.nfc {
|
||||
|
||||
public class FormatException extends java.lang.Exception {
|
||||
|
||||
@@ -141,7 +141,6 @@ public class ScanResult implements Parcelable {
|
||||
/**
|
||||
* Passpoint ANQP information. This is not fetched automatically.
|
||||
* Use {@link WifiPasspointManager#requestAnqpInfo} to request ANQP info.
|
||||
* {@hide}
|
||||
*/
|
||||
public WifiPasspointInfo passpoint;
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ import android.os.Parcelable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/** @hide */
|
||||
public class WifiPasspointInfo implements Parcelable {
|
||||
|
||||
/** TODO doc */
|
||||
|
||||
@@ -37,7 +37,6 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* Provides APIs for managing Wifi Passpoint credentials.
|
||||
* @hide
|
||||
*/
|
||||
public class WifiPasspointManager {
|
||||
|
||||
@@ -140,40 +139,11 @@ public class WifiPasspointManager {
|
||||
* The operation failed
|
||||
*
|
||||
* @param reason The reason for failure could be one of
|
||||
* {@link #WIFI_DISABLED}, {@link #ERROR} or {@link #BUSY}
|
||||
* {@link #REASON_WIFI_DISABLED}, {@link #REASON_ERROR} or {@link #REASON_BUSY}
|
||||
*/
|
||||
public void onFailure(int reason);
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface for callback invocation when doing OSU or user remediation
|
||||
*/
|
||||
public interface OsuRemListener {
|
||||
/** The operation succeeded */
|
||||
public void onSuccess();
|
||||
|
||||
/**
|
||||
* The operation failed
|
||||
*
|
||||
* @param reason The reason for failure could be one of
|
||||
* {@link #WIFI_DISABLED}, {@link #ERROR} or {@link #BUSY}
|
||||
*/
|
||||
public void onFailure(int reason);
|
||||
|
||||
/**
|
||||
* Browser launch is requried for user interaction. When this callback
|
||||
* is called, app should launch browser / webview to the given URI.
|
||||
*
|
||||
* @param uri URI for browser launch
|
||||
*/
|
||||
public void onBrowserLaunch(String uri);
|
||||
|
||||
/**
|
||||
* When this is called, app should dismiss the previously lanched browser.
|
||||
*/
|
||||
public void onBrowserDismiss();
|
||||
}
|
||||
|
||||
/**
|
||||
* A channel that connects the application to the wifi passpoint framework.
|
||||
* Most passpoint operations require a Channel as an argument.
|
||||
@@ -317,31 +287,6 @@ public class WifiPasspointManager {
|
||||
}
|
||||
break;
|
||||
|
||||
case START_OSU_SUCCEEDED:
|
||||
listener = getListener(message.arg2, true);
|
||||
if (listener != null) {
|
||||
((OsuRemListener) listener).onSuccess();
|
||||
}
|
||||
break;
|
||||
|
||||
case START_OSU_FAILED:
|
||||
listener = getListener(message.arg2, true);
|
||||
if (listener != null) {
|
||||
((OsuRemListener) listener).onFailure(message.arg1);
|
||||
}
|
||||
break;
|
||||
|
||||
case START_OSU_BROWSER:
|
||||
listener = peekListener(message.arg2);
|
||||
if (listener != null) {
|
||||
ParcelableString str = (ParcelableString) message.obj;
|
||||
if (str == null || str.string == null)
|
||||
((OsuRemListener) listener).onBrowserDismiss();
|
||||
else
|
||||
((OsuRemListener) listener).onBrowserLaunch(str.string);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
Log.d(TAG, "Ignored " + message);
|
||||
break;
|
||||
@@ -443,14 +388,6 @@ public class WifiPasspointManager {
|
||||
}
|
||||
}
|
||||
|
||||
public int getPasspointState() {
|
||||
try {
|
||||
return mService.getPasspointState();
|
||||
} catch (RemoteException e) {
|
||||
return PASSPOINT_STATE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
public void requestAnqpInfo(Channel c, List<ScanResult> requested, int mask,
|
||||
ActionListener listener) {
|
||||
Log.d(TAG, "requestAnqpInfo start");
|
||||
@@ -477,90 +414,6 @@ public class WifiPasspointManager {
|
||||
Log.d(TAG, "requestAnqpInfo end");
|
||||
}
|
||||
|
||||
public void requestOsuIcons(Channel c, List<WifiPasspointOsuProvider> requested,
|
||||
int resolution, ActionListener listener) {
|
||||
}
|
||||
|
||||
public List<WifiPasspointPolicy> requestCredentialMatch(List<ScanResult> requested) {
|
||||
try {
|
||||
return mService.requestCredentialMatch(requested);
|
||||
} catch (RemoteException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a list of saved Passpoint credentials. Only those credentials owned
|
||||
* by the caller will be returned.
|
||||
*
|
||||
* @return The list of credentials
|
||||
*/
|
||||
public List<WifiPasspointCredential> getCredentials() {
|
||||
try {
|
||||
return mService.getCredentials();
|
||||
} catch (RemoteException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new Passpoint credential.
|
||||
*
|
||||
* @param cred The credential to be added
|
||||
* @return {@code true} if the operation succeeds, {@code false} otherwise
|
||||
*/
|
||||
public boolean addCredential(WifiPasspointCredential cred) {
|
||||
try {
|
||||
return mService.addCredential(cred);
|
||||
} catch (RemoteException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing Passpoint credential. Only system or the owner of this
|
||||
* credential has the permission to do this.
|
||||
*
|
||||
* @param cred The credential to be updated
|
||||
* @return {@code true} if the operation succeeds, {@code false} otherwise
|
||||
*/
|
||||
public boolean updateCredential(WifiPasspointCredential cred) {
|
||||
try {
|
||||
return mService.updateCredential(cred);
|
||||
} catch (RemoteException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove an existing Passpoint credential. Only system or the owner of this
|
||||
* credential has the permission to do this.
|
||||
*
|
||||
* @param cred The credential to be removed
|
||||
* @return {@code true} if the operation succeeds, {@code false} otherwise
|
||||
*/
|
||||
public boolean removeCredential(WifiPasspointCredential cred) {
|
||||
try {
|
||||
return mService.removeCredential(cred);
|
||||
} catch (RemoteException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void startOsu(Channel c, WifiPasspointOsuProvider osu, OsuRemListener listener) {
|
||||
Log.d(TAG, "startOsu start");
|
||||
checkChannel(c);
|
||||
int key = c.putListener(listener);
|
||||
c.mAsyncChannel.sendMessage(START_OSU, 0, key, osu);
|
||||
Log.d(TAG, "startOsu end");
|
||||
}
|
||||
|
||||
public void startRemediation(Channel c, OsuRemListener listener) {
|
||||
}
|
||||
|
||||
public void connect(WifiPasspointPolicy policy) {
|
||||
}
|
||||
|
||||
private static void checkChannel(Channel c) {
|
||||
if (c == null) throw new IllegalArgumentException("Channel needs to be initialized");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user