Merge "hotspot2: add/update javadoc for Passpoint APIs" into oc-dev

This commit is contained in:
TreeHugger Robot
2017-05-31 22:28:59 +00:00
committed by Android (Google) Code Review
4 changed files with 220 additions and 16 deletions

View File

@@ -1080,11 +1080,9 @@ public class WifiManager {
* Name). In the case when there is an existing configuration with the same * Name). In the case when there is an existing configuration with the same
* FQDN, the new configuration will replace the existing configuration. * FQDN, the new configuration will replace the existing configuration.
* *
* An {@link IllegalArgumentException} will be thrown on failure.
* An {@link UnsupportedOperationException} will be thrown if Passpoint is not enabled
* on the device.
*
* @param config The Passpoint configuration to be added * @param config The Passpoint configuration to be added
* @throws IllegalArgumentException if configuration is invalid
* @throws UnsupportedOperationException if Passpoint is not enabled on the device.
*/ */
public void addOrUpdatePasspointConfiguration(PasspointConfiguration config) { public void addOrUpdatePasspointConfiguration(PasspointConfiguration config) {
try { try {
@@ -1099,11 +1097,9 @@ public class WifiManager {
/** /**
* Remove the Passpoint configuration identified by its FQDN (Fully Qualified Domain Name). * Remove the Passpoint configuration identified by its FQDN (Fully Qualified Domain Name).
* *
* An {@link IllegalArgumentException} will be thrown on failure.
* An {@link UnsupportedOperationException} will be thrown if Passpoint is not enabled
* on the device.
*
* @param fqdn The FQDN of the Passpoint configuration to be removed * @param fqdn The FQDN of the Passpoint configuration to be removed
* @throws IllegalArgumentException if no configuration is associated with the given FQDN.
* @throws UnsupportedOperationException if Passpoint is not enabled on the device.
*/ */
public void removePasspointConfiguration(String fqdn) { public void removePasspointConfiguration(String fqdn) {
try { try {
@@ -1120,10 +1116,8 @@ public class WifiManager {
* *
* An empty list will be returned when no configurations are installed. * An empty list will be returned when no configurations are installed.
* *
* An {@link UnsupportedOperationException} will be thrown if Passpoint is not enabled
* on the device.
*
* @return A list of {@link PasspointConfiguration} * @return A list of {@link PasspointConfiguration}
* @throws UnsupportedOperationException if Passpoint is not enabled on the device.
*/ */
public List<PasspointConfiguration> getPasspointConfigurations() { public List<PasspointConfiguration> getPasspointConfigurations() {
try { try {
@@ -1139,12 +1133,10 @@ public class WifiManager {
* {@link #EXTRA_ICON} will indicate the result of the request. * {@link #EXTRA_ICON} will indicate the result of the request.
* A missing intent extra {@link #EXTRA_ICON} will indicate a failure. * A missing intent extra {@link #EXTRA_ICON} will indicate a failure.
* *
* An {@link UnsupportedOperationException} will be thrown if Passpoint is not enabled
* on the device.
*
* @param bssid The BSSID of the AP * @param bssid The BSSID of the AP
* @param fileName Name of the icon file (remote file) to query from the AP * @param fileName Name of the icon file (remote file) to query from the AP
* *
* @throws UnsupportedOperationException if Passpoint is not enabled on the device.
* @hide * @hide
*/ */
public void queryPasspointIcon(long bssid, String fileName) { public void queryPasspointIcon(long bssid, String fileName) {

View File

@@ -62,16 +62,36 @@ public final class PasspointConfiguration implements Parcelable {
* Configurations under HomeSp subtree. * Configurations under HomeSp subtree.
*/ */
private HomeSp mHomeSp = null; private HomeSp mHomeSp = null;
/**
* Set the Home SP (Service Provider) information.
*
* @param homeSp The Home SP information to set to
*/
public void setHomeSp(HomeSp homeSp) { mHomeSp = homeSp; } public void setHomeSp(HomeSp homeSp) { mHomeSp = homeSp; }
/**
* Get the Home SP (Service Provider) information.
*
* @return Home SP information
*/
public HomeSp getHomeSp() { return mHomeSp; } public HomeSp getHomeSp() { return mHomeSp; }
/** /**
* Configurations under Credential subtree. * Configurations under Credential subtree.
*/ */
private Credential mCredential = null; private Credential mCredential = null;
/**
* Set the credential information.
*
* @param credential The credential information to set to
*/
public void setCredential(Credential credential) { public void setCredential(Credential credential) {
mCredential = credential; mCredential = credential;
} }
/**
* Get the credential information.
*
* @return credential information
*/
public Credential getCredential() { public Credential getCredential() {
return mCredential; return mCredential;
} }

View File

@@ -97,9 +97,19 @@ public final class Credential implements Parcelable {
* comparing the realm specified in that hotspot's ANQP element. * comparing the realm specified in that hotspot's ANQP element.
*/ */
private String mRealm = null; private String mRealm = null;
/**
* Set the realm associated with this credential.
*
* @param realm The realm to set to
*/
public void setRealm(String realm) { public void setRealm(String realm) {
mRealm = realm; mRealm = realm;
} }
/**
* Get the realm associated with this credential.
*
* @return the realm associated with this credential
*/
public String getRealm() { public String getRealm() {
return mRealm; return mRealm;
} }
@@ -162,9 +172,19 @@ public final class Credential implements Parcelable {
* Username of the credential. * Username of the credential.
*/ */
private String mUsername = null; private String mUsername = null;
/**
* Set the username associated with this user credential.
*
* @param username The username to set to
*/
public void setUsername(String username) { public void setUsername(String username) {
mUsername = username; mUsername = username;
} }
/**
* Get the username associated with this user credential.
*
* @return the username associated with this user credential
*/
public String getUsername() { public String getUsername() {
return mUsername; return mUsername;
} }
@@ -173,9 +193,19 @@ public final class Credential implements Parcelable {
* Base64-encoded password. * Base64-encoded password.
*/ */
private String mPassword = null; private String mPassword = null;
/**
* Set the Base64-encoded password associated with this user credential.
*
* @param password The password to set to
*/
public void setPassword(String password) { public void setPassword(String password) {
mPassword = password; mPassword = password;
} }
/**
* Get the Base64-encoded password associated with this user credential.
*
* @return the Base64-encoded password associated with this user credential
*/
public String getPassword() { public String getPassword() {
return mPassword; return mPassword;
} }
@@ -233,14 +263,30 @@ public final class Credential implements Parcelable {
/** /**
* EAP (Extensible Authentication Protocol) method type. * EAP (Extensible Authentication Protocol) method type.
* Refer to http://www.iana.org/assignments/eap-numbers/eap-numbers.xml#eap-numbers-4 * Refer to
* for valid values. * <a href="http://www.iana.org/assignments/eap-numbers/eap-numbers.xml#eap-numbers-4">
* EAP Numbers</a> for valid values.
* Using Integer.MIN_VALUE to indicate unset value. * Using Integer.MIN_VALUE to indicate unset value.
*/ */
private int mEapType = Integer.MIN_VALUE; private int mEapType = Integer.MIN_VALUE;
/**
* Set the EAP (Extensible Authentication Protocol) method type associated with this
* user credential.
* Refer to
* <a href="http://www.iana.org/assignments/eap-numbers/eap-numbers.xml#eap-numbers-4">
* EAP Numbers</a> for valid values.
*
* @param eapType The EAP method type associated with this user credential
*/
public void setEapType(int eapType) { public void setEapType(int eapType) {
mEapType = eapType; mEapType = eapType;
} }
/**
* Get the EAP (Extensible Authentication Protocol) method type associated with this
* user credential.
*
* @return EAP method type
*/
public int getEapType() { public int getEapType() {
return mEapType; return mEapType;
} }
@@ -249,9 +295,19 @@ public final class Credential implements Parcelable {
* Non-EAP inner authentication method. * Non-EAP inner authentication method.
*/ */
private String mNonEapInnerMethod = null; private String mNonEapInnerMethod = null;
/**
* Set the inner non-EAP method associated with this user credential.
*
* @param nonEapInnerMethod The non-EAP inner method to set to
*/
public void setNonEapInnerMethod(String nonEapInnerMethod) { public void setNonEapInnerMethod(String nonEapInnerMethod) {
mNonEapInnerMethod = nonEapInnerMethod; mNonEapInnerMethod = nonEapInnerMethod;
} }
/**
* Get the inner non-EAP method associated with this user credential.
*
* @return Non-EAP inner method associated with this user credential
*/
public String getNonEapInnerMethod() { public String getNonEapInnerMethod() {
return mNonEapInnerMethod; return mNonEapInnerMethod;
} }
@@ -394,9 +450,19 @@ public final class Credential implements Parcelable {
}; };
} }
private UserCredential mUserCredential = null; private UserCredential mUserCredential = null;
/**
* Set the user credential information.
*
* @param userCredential The user credential to set to
*/
public void setUserCredential(UserCredential userCredential) { public void setUserCredential(UserCredential userCredential) {
mUserCredential = userCredential; mUserCredential = userCredential;
} }
/**
* Get the user credential information.
*
* @return user credential information
*/
public UserCredential getUserCredential() { public UserCredential getUserCredential() {
return mUserCredential; return mUserCredential;
} }
@@ -421,9 +487,19 @@ public final class Credential implements Parcelable {
* Certificate type. * Certificate type.
*/ */
private String mCertType = null; private String mCertType = null;
/**
* Set the certificate type associated with this certificate credential.
*
* @param certType The certificate type to set to
*/
public void setCertType(String certType) { public void setCertType(String certType) {
mCertType = certType; mCertType = certType;
} }
/**
* Get the certificate type associated with this certificate credential.
*
* @return certificate type
*/
public String getCertType() { public String getCertType() {
return mCertType; return mCertType;
} }
@@ -432,9 +508,19 @@ public final class Credential implements Parcelable {
* The SHA-256 fingerprint of the certificate. * The SHA-256 fingerprint of the certificate.
*/ */
private byte[] mCertSha256Fingerprint = null; private byte[] mCertSha256Fingerprint = null;
/**
* Set the certificate SHA-256 fingerprint associated with this certificate credential.
*
* @param certSha256Fingerprint The certificate fingerprint to set to
*/
public void setCertSha256Fingerprint(byte[] certSha256Fingerprint) { public void setCertSha256Fingerprint(byte[] certSha256Fingerprint) {
mCertSha256Fingerprint = certSha256Fingerprint; mCertSha256Fingerprint = certSha256Fingerprint;
} }
/**
* Get the certificate SHA-256 fingerprint associated with this certificate credential.
*
* @return certificate SHA-256 fingerprint
*/
public byte[] getCertSha256Fingerprint() { public byte[] getCertSha256Fingerprint() {
return mCertSha256Fingerprint; return mCertSha256Fingerprint;
} }
@@ -530,9 +616,19 @@ public final class Credential implements Parcelable {
}; };
} }
private CertificateCredential mCertCredential = null; private CertificateCredential mCertCredential = null;
/**
* Set the certificate credential information.
*
* @param certCredential The certificate credential to set to
*/
public void setCertCredential(CertificateCredential certCredential) { public void setCertCredential(CertificateCredential certCredential) {
mCertCredential = certCredential; mCertCredential = certCredential;
} }
/**
* Get the certificate credential information.
*
* @return certificate credential information
*/
public CertificateCredential getCertCredential() { public CertificateCredential getCertCredential() {
return mCertCredential; return mCertCredential;
} }
@@ -553,9 +649,21 @@ public final class Credential implements Parcelable {
* cellular networks * cellular networks
*/ */
private String mImsi = null; private String mImsi = null;
/**
* Set the IMSI (International Mobile Subscriber Identity) associated with this SIM
* credential.
*
* @param imsi The IMSI to set to
*/
public void setImsi(String imsi) { public void setImsi(String imsi) {
mImsi = imsi; mImsi = imsi;
} }
/**
* Get the IMSI (International Mobile Subscriber Identity) associated with this SIM
* credential.
*
* @return IMSI associated with this SIM credential
*/
public String getImsi() { public String getImsi() {
return mImsi; return mImsi;
} }
@@ -567,9 +675,21 @@ public final class Credential implements Parcelable {
* Using Integer.MIN_VALUE to indicate unset value. * Using Integer.MIN_VALUE to indicate unset value.
*/ */
private int mEapType = Integer.MIN_VALUE; private int mEapType = Integer.MIN_VALUE;
/**
* Set the EAP (Extensible Authentication Protocol) method type associated with this
* SIM credential.
*
* @param eapType The EAP method type to set to
*/
public void setEapType(int eapType) { public void setEapType(int eapType) {
mEapType = eapType; mEapType = eapType;
} }
/**
* Get the EAP (Extensible Authentication Protocol) method type associated with this
* SIM credential.
*
* @return EAP method type associated with this SIM credential
*/
public int getEapType() { public int getEapType() {
return mEapType; return mEapType;
} }
@@ -704,9 +824,19 @@ public final class Credential implements Parcelable {
} }
} }
private SimCredential mSimCredential = null; private SimCredential mSimCredential = null;
/**
* Set the SIM credential information.
*
* @param simCredential The SIM credential to set to
*/
public void setSimCredential(SimCredential simCredential) { public void setSimCredential(SimCredential simCredential) {
mSimCredential = simCredential; mSimCredential = simCredential;
} }
/**
* Get the SIM credential information.
*
* @return SIM credential information
*/
public SimCredential getSimCredential() { public SimCredential getSimCredential() {
return mSimCredential; return mSimCredential;
} }
@@ -715,9 +845,19 @@ public final class Credential implements Parcelable {
* CA (Certificate Authority) X509 certificate. * CA (Certificate Authority) X509 certificate.
*/ */
private X509Certificate mCaCertificate = null; private X509Certificate mCaCertificate = null;
/**
* Set the CA (Certification Authority) certificate associated with this credential.
*
* @param caCertificate The CA certificate to set to
*/
public void setCaCertificate(X509Certificate caCertificate) { public void setCaCertificate(X509Certificate caCertificate) {
mCaCertificate = caCertificate; mCaCertificate = caCertificate;
} }
/**
* Get the CA (Certification Authority) certificate associated with this credential.
*
* @return CA certificate associated with this credential
*/
public X509Certificate getCaCertificate() { public X509Certificate getCaCertificate() {
return mCaCertificate; return mCaCertificate;
} }
@@ -726,9 +866,19 @@ public final class Credential implements Parcelable {
* Client side X509 certificate chain. * Client side X509 certificate chain.
*/ */
private X509Certificate[] mClientCertificateChain = null; private X509Certificate[] mClientCertificateChain = null;
/**
* Set the client certificate chain associated with this credential.
*
* @param certificateChain The client certificate chain to set to
*/
public void setClientCertificateChain(X509Certificate[] certificateChain) { public void setClientCertificateChain(X509Certificate[] certificateChain) {
mClientCertificateChain = certificateChain; mClientCertificateChain = certificateChain;
} }
/**
* Get the client certificate chain associated with this credential.
*
* @return client certificate chain associated with this credential
*/
public X509Certificate[] getClientCertificateChain() { public X509Certificate[] getClientCertificateChain() {
return mClientCertificateChain; return mClientCertificateChain;
} }
@@ -737,9 +887,19 @@ public final class Credential implements Parcelable {
* Client side private key. * Client side private key.
*/ */
private PrivateKey mClientPrivateKey = null; private PrivateKey mClientPrivateKey = null;
/**
* Set the client private key associated with this credential.
*
* @param clientPrivateKey the client private key to set to
*/
public void setClientPrivateKey(PrivateKey clientPrivateKey) { public void setClientPrivateKey(PrivateKey clientPrivateKey) {
mClientPrivateKey = clientPrivateKey; mClientPrivateKey = clientPrivateKey;
} }
/**
* Get the client private key associated with this credential.
*
* @return client private key associated with this credential.
*/
public PrivateKey getClientPrivateKey() { public PrivateKey getClientPrivateKey() {
return mClientPrivateKey; return mClientPrivateKey;
} }

View File

@@ -52,9 +52,19 @@ public final class HomeSp implements Parcelable {
* FQDN (Fully Qualified Domain Name) of this home service provider. * FQDN (Fully Qualified Domain Name) of this home service provider.
*/ */
private String mFqdn = null; private String mFqdn = null;
/**
* Set the FQDN (Fully Qualified Domain Name) associated with this home service provider.
*
* @param fqdn The FQDN to set to
*/
public void setFqdn(String fqdn) { public void setFqdn(String fqdn) {
mFqdn = fqdn; mFqdn = fqdn;
} }
/**
* Get the FQDN (Fully Qualified Domain Name) associated with this home service provider.
*
* @return the FQDN associated with this home service provider
*/
public String getFqdn() { public String getFqdn() {
return mFqdn; return mFqdn;
} }
@@ -63,9 +73,19 @@ public final class HomeSp implements Parcelable {
* Friendly name of this home service provider. * Friendly name of this home service provider.
*/ */
private String mFriendlyName = null; private String mFriendlyName = null;
/**
* Set the friendly name associated with this home service provider.
*
* @param friendlyName The friendly name to set to
*/
public void setFriendlyName(String friendlyName) { public void setFriendlyName(String friendlyName) {
mFriendlyName = friendlyName; mFriendlyName = friendlyName;
} }
/**
* Get the friendly name associated with this home service provider.
*
* @return the friendly name associated with this home service provider
*/
public String getFriendlyName() { public String getFriendlyName() {
return mFriendlyName; return mFriendlyName;
} }
@@ -184,9 +204,21 @@ public final class HomeSp implements Parcelable {
* which this provider is a member. * which this provider is a member.
*/ */
private long[] mRoamingConsortiumOis = null; private long[] mRoamingConsortiumOis = null;
/**
* Set the Organization Identifiers (OIs) identifying a roaming consortium of which this
* provider is a member.
*
* @param roamingConsortiumOis Array of roaming consortium OIs
*/
public void setRoamingConsortiumOis(long[] roamingConsortiumOis) { public void setRoamingConsortiumOis(long[] roamingConsortiumOis) {
mRoamingConsortiumOis = roamingConsortiumOis; mRoamingConsortiumOis = roamingConsortiumOis;
} }
/**
* Get the Organization Identifiers (OIs) identifying a roaming consortium of which this
* provider is a member.
*
* @return array of roaming consortium OIs
*/
public long[] getRoamingConsortiumOis() { public long[] getRoamingConsortiumOis() {
return mRoamingConsortiumOis; return mRoamingConsortiumOis;
} }