summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorYuhao Zheng <yuhaozheng@google.com>2014-05-21 16:49:28 -0700
committerYuhao Zheng <yuhaozheng@google.com>2014-05-22 22:41:13 -0700
commit7c28c3663470ce5eb818cfa2ce4a993e4bae8f33 (patch)
tree1f9890f9c8a6f0a7ffe237da4910efba3798c2d0 /wifi
parent46038ae0207ba6f6a8e04bce7267da7af8767f29 (diff)
downloadframeworks_base-7c28c3663470ce5eb818cfa2ce4a993e4bae8f33.zip
frameworks_base-7c28c3663470ce5eb818cfa2ce4a993e4bae8f33.tar.gz
frameworks_base-7c28c3663470ce5eb818cfa2ce4a993e4bae8f33.tar.bz2
Update Hotspot 2.0 SDK APIs
- Add / fix java docs - Add some setters in WifiPasspointCredential for update use Change-Id: Ifc287ab9d69ea9e02bf036f22171947fde9ee94a
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/WifiEnterpriseConfig.java4
-rw-r--r--wifi/java/android/net/wifi/passpoint/WifiPasspointCredential.java51
-rw-r--r--wifi/java/android/net/wifi/passpoint/WifiPasspointManager.java5
3 files changed, 44 insertions, 16 deletions
diff --git a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
index 1484d49..7debb93 100644
--- a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
+++ b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
@@ -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" };
diff --git a/wifi/java/android/net/wifi/passpoint/WifiPasspointCredential.java b/wifi/java/android/net/wifi/passpoint/WifiPasspointCredential.java
index 08b430f..9a633b4 100644
--- a/wifi/java/android/net/wifi/passpoint/WifiPasspointCredential.java
+++ b/wifi/java/android/net/wifi/passpoint/WifiPasspointCredential.java
@@ -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;
diff --git a/wifi/java/android/net/wifi/passpoint/WifiPasspointManager.java b/wifi/java/android/net/wifi/passpoint/WifiPasspointManager.java
index ee4dc5a..ebaa8c9 100644
--- a/wifi/java/android/net/wifi/passpoint/WifiPasspointManager.java
+++ b/wifi/java/android/net/wifi/passpoint/WifiPasspointManager.java
@@ -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
*/