summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2013-04-19 09:29:34 -0700
committerIrfan Sheriff <isheriff@google.com>2013-04-19 10:02:49 -0700
commit40843589c46164c90fde29ad1c58291f17d4d9e6 (patch)
treee150b767423ec6d96d32f2e74ee339c4fc4770c9 /wifi
parentf2d60e4657cd4a764147e2ac826b7f06f7da036a (diff)
downloadframeworks_base-40843589c46164c90fde29ad1c58291f17d4d9e6.zip
frameworks_base-40843589c46164c90fde29ad1c58291f17d4d9e6.tar.gz
frameworks_base-40843589c46164c90fde29ad1c58291f17d4d9e6.tar.bz2
Add getters and private constructor
Address API feedback Bug: 8656930 Change-Id: Idc3dd8d8a7e633449329864e41cab58a6b193b5a
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/WifiEnterpriseConfig.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
index f73a13c..f8a8196 100644
--- a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
+++ b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
@@ -228,6 +228,9 @@ public class WifiEnterpriseConfig implements Parcelable {
public static final int PWD = 3;
/** @hide */
public static final String[] strings = { "PEAP", "TLS", "TTLS", "PWD" };
+
+ /** Prevent initialization */
+ private Eap() {}
}
/** The inner authentication method used */
@@ -244,6 +247,9 @@ public class WifiEnterpriseConfig implements Parcelable {
private static final String PREFIX = "auth=";
/** @hide */
public static final String[] strings = {EMPTY_VALUE, "PAP", "MSCHAP", "MSCHAPV2", "GTC" };
+
+ /** Prevent initialization */
+ private Phase2() {}
}
/** Internal use only */
@@ -368,6 +374,16 @@ public class WifiEnterpriseConfig implements Parcelable {
}
/**
+ * Get the password.
+ *
+ * Returns locally set password value. For networks fetched from
+ * framework, returns "*".
+ */
+ public String getPassword() {
+ return getFieldValue(PASSWORD_KEY, "");
+ }
+
+ /**
* Set CA certificate alias.
*
* <p> See the {@link android.security.KeyChain} for details on installing or choosing
@@ -409,6 +425,15 @@ public class WifiEnterpriseConfig implements Parcelable {
}
/**
+ * Get CA certificate
+ *
+ * @return X.509 CA certificate
+ */
+ public X509Certificate getCaCertificate() {
+ return mCaCert;
+ }
+
+ /**
* Set Client certificate alias.
*
* <p> See the {@link android.security.KeyChain} for details on installing or choosing
@@ -468,6 +493,15 @@ public class WifiEnterpriseConfig implements Parcelable {
mClientCertificate = clientCertificate;
}
+ /**
+ * Get client certificate
+ *
+ * @return X.509 client certificate
+ */
+ public X509Certificate getClientCertificate() {
+ return mClientCertificate;
+ }
+
boolean needsKeyStore() {
// Has no keys to be installed
if (mClientCertificate == null && mCaCert == null) return false;