diff options
author | Irfan Sheriff <isheriff@google.com> | 2013-04-19 17:56:34 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-04-19 17:56:34 +0000 |
commit | 63e550f2026e749e7be5ab03655f0a5105457b9e (patch) | |
tree | 224a63f02b0394412ec5ebb4ffabbc1651789d73 /wifi | |
parent | 2623a24ffa4d75206757684b12b06318167f8788 (diff) | |
parent | 40843589c46164c90fde29ad1c58291f17d4d9e6 (diff) | |
download | frameworks_base-63e550f2026e749e7be5ab03655f0a5105457b9e.zip frameworks_base-63e550f2026e749e7be5ab03655f0a5105457b9e.tar.gz frameworks_base-63e550f2026e749e7be5ab03655f0a5105457b9e.tar.bz2 |
Merge "Add getters and private constructor" into jb-mr2-dev
Diffstat (limited to 'wifi')
-rw-r--r-- | wifi/java/android/net/wifi/WifiEnterpriseConfig.java | 34 |
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 4e7497c..e2512a4 100644 --- a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java +++ b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java @@ -223,6 +223,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 */ @@ -239,6 +242,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 */ @@ -363,6 +369,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 @@ -404,6 +420,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 @@ -463,6 +488,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; |