Update Hotspot 2.0 SDK APIs
- Add / fix java docs - Add some setters in WifiPasspointCredential for update use Change-Id: Ifc287ab9d69ea9e02bf036f22171947fde9ee94a
This commit is contained in:
@@ -17099,11 +17099,9 @@ package android.net.wifi {
|
||||
}
|
||||
|
||||
public static final class WifiEnterpriseConfig.Eap {
|
||||
field public static final int AKA = 5; // 0x5
|
||||
field public static final int NONE = -1; // 0xffffffff
|
||||
field public static final int PEAP = 0; // 0x0
|
||||
field public static final int PWD = 3; // 0x3
|
||||
field public static final int SIM = 4; // 0x4
|
||||
field public static final int TLS = 1; // 0x1
|
||||
field public static final int TTLS = 2; // 0x2
|
||||
}
|
||||
@@ -17523,14 +17521,17 @@ package android.net.wifi.p2p.nsd {
|
||||
package android.net.wifi.passpoint {
|
||||
|
||||
public class WifiPasspointCredential implements android.os.Parcelable {
|
||||
ctor public WifiPasspointCredential(java.lang.String, android.net.wifi.WifiEnterpriseConfig);
|
||||
ctor public WifiPasspointCredential(java.lang.String, java.lang.String, android.net.wifi.WifiEnterpriseConfig);
|
||||
method public int describeContents();
|
||||
method public java.lang.String getCaRootCertPath();
|
||||
method public java.lang.String getClientCertPath();
|
||||
method public int getEapMethod();
|
||||
method public java.lang.String getFqdn();
|
||||
method public java.lang.String getImsi();
|
||||
method public java.lang.String getRealm();
|
||||
method public java.lang.String getUserName();
|
||||
method public void setCredential(android.net.wifi.WifiEnterpriseConfig);
|
||||
method public void setFqdn(java.lang.String);
|
||||
method public void setRealm(java.lang.String);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
}
|
||||
|
||||
|
||||
@@ -224,9 +224,9 @@ public class WifiEnterpriseConfig implements Parcelable {
|
||||
public static final int TTLS = 2;
|
||||
/** EAP-Password */
|
||||
public static final int PWD = 3;
|
||||
/** EAP-Subscriber Identity Module */
|
||||
/** EAP-Subscriber Identity Module {@hide} */
|
||||
public static final int SIM = 4;
|
||||
/** EAP-Authentication and Key Agreement */
|
||||
/** EAP-Authentication and Key Agreement {@hide} */
|
||||
public static final int AKA = 5;
|
||||
/** @hide */
|
||||
public static final String[] strings = { "PEAP", "TLS", "TTLS", "PWD", "SIM", "AKA" };
|
||||
|
||||
@@ -25,9 +25,13 @@ import java.util.Set;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* A class representing a Wi-Fi Passpoint credential.
|
||||
*/
|
||||
public class WifiPasspointCredential implements Parcelable {
|
||||
|
||||
private final static String TAG = "PasspointCredential";
|
||||
private String mWifiTreePath;
|
||||
private String mWifiSPFQDN;
|
||||
private String mCredentialName;
|
||||
private String mUpdateIdentifier;
|
||||
@@ -88,10 +92,11 @@ public class WifiPasspointCredential implements Parcelable {
|
||||
/**
|
||||
* Constructor
|
||||
* @param realm Realm of the passpoint credential
|
||||
* @param config Credential information, must be either EAP-TLS or EAP-TTLS.
|
||||
* @param fqdn Fully qualified domain name (FQDN) of the credential
|
||||
* @param config Credential information, must be either EAP-TLS or EAP-TTLS
|
||||
* @see WifiEnterpriseConfig
|
||||
*/
|
||||
public WifiPasspointCredential(String realm, WifiEnterpriseConfig config) {
|
||||
public WifiPasspointCredential(String realm, String fqdn, WifiEnterpriseConfig config) {
|
||||
mRealm = realm;
|
||||
switch (config.getEapMethod()) {
|
||||
case WifiEnterpriseConfig.Eap.TLS:
|
||||
@@ -325,10 +330,7 @@ public class WifiPasspointCredential implements Parcelable {
|
||||
return mPasswd;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the IMSI of this Passpoint credential, for EAP-SIM / EAP-AKA only.
|
||||
* @return IMSI
|
||||
*/
|
||||
/** @hide */
|
||||
public String getImsi() {
|
||||
return mImsi;
|
||||
}
|
||||
@@ -343,8 +345,11 @@ public class WifiPasspointCredential implements Parcelable {
|
||||
return mMnc;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getCaRootCert() {
|
||||
/**
|
||||
* Get the CA root certificate path of this Passpoint credential.
|
||||
* @return CA root certificate path
|
||||
*/
|
||||
public String getCaRootCertPath() {
|
||||
return mCaRootCert;
|
||||
}
|
||||
|
||||
@@ -357,13 +362,29 @@ public class WifiPasspointCredential implements Parcelable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the realm of this Passpoint credential, for all EAP methods.
|
||||
* Set credential information of this Passpoint credential.
|
||||
* @param config Credential information, must be either EAP-TLS or EAP-TTLS
|
||||
*/
|
||||
public void setCredential(WifiEnterpriseConfig config) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the realm of this Passpoint credential.
|
||||
* @return Realm
|
||||
*/
|
||||
public String getRealm() {
|
||||
return mRealm;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the ream of this Passpoint credential.
|
||||
* @param realm Realm
|
||||
*/
|
||||
public void setRealm(String realm) {
|
||||
mRealm = realm;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public int getPriority() {
|
||||
if (mUserPreferred) {
|
||||
@@ -374,14 +395,22 @@ public class WifiPasspointCredential implements Parcelable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the fully qualified domain name (FQDN) of this Passpoint credential,
|
||||
* for all EAP methods.
|
||||
* Get the fully qualified domain name (FQDN) of this Passpoint credential.
|
||||
* @return FQDN
|
||||
*/
|
||||
public String getFqdn() {
|
||||
return mHomeSpFqdn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the fully qualified domain name (FQDN) of this Passpoint credential.
|
||||
* @param fqdn FQDN
|
||||
*/
|
||||
public void setFqdn(String fqdn) {
|
||||
mHomeSpFqdn = fqdn;
|
||||
}
|
||||
|
||||
|
||||
/** @hide */
|
||||
public String getOtherhomepartners() {
|
||||
return mOtherhomepartnerFqdn;
|
||||
|
||||
@@ -443,10 +443,9 @@ public class WifiPasspointManager {
|
||||
return null;
|
||||
}
|
||||
|
||||
/* TODO: add credential APIs */
|
||||
|
||||
/**
|
||||
* Give a list of all saved Passpoint credentials.
|
||||
* Get a list of saved Passpoint credentials. Only those credentials owned
|
||||
* by the caller will be returned.
|
||||
*
|
||||
* @return The list of credentials
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user