diff options
author | Vinit Deshapnde <vinitd@google.com> | 2013-09-12 20:28:57 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-09-12 20:28:57 +0000 |
commit | b481dae2f5238252d81dafeecf13d5f387824689 (patch) | |
tree | 35f2ff737e4f3ffcfa912c61d5a609147c70535f /wifi | |
parent | ef2088a26a42621329c6b9fecb323566e19490e4 (diff) | |
parent | 10652a95b16909acf26f31cdafc0c6aa09212f26 (diff) | |
download | frameworks_base-b481dae2f5238252d81dafeecf13d5f387824689.zip frameworks_base-b481dae2f5238252d81dafeecf13d5f387824689.tar.gz frameworks_base-b481dae2f5238252d81dafeecf13d5f387824689.tar.bz2 |
Merge "Fix invalid Wifi Network system crash" into klp-dev
Diffstat (limited to 'wifi')
-rw-r--r-- | wifi/java/android/net/wifi/WifiConfiguration.java | 14 | ||||
-rw-r--r-- | wifi/java/android/net/wifi/WifiManager.java | 7 |
2 files changed, 21 insertions, 0 deletions
diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java index de377ee..2ce584b 100644 --- a/wifi/java/android/net/wifi/WifiConfiguration.java +++ b/wifi/java/android/net/wifi/WifiConfiguration.java @@ -348,6 +348,20 @@ public class WifiConfiguration implements Parcelable { linkProperties = new LinkProperties(); } + /** + * indicates whether the configuration is valid + * @return true if valid, false otherwise + * @hide + */ + public boolean isValid() { + if (allowedKeyManagement.cardinality() > 1) { + return false; + } + + // TODO: Add more checks + return true; + } + @Override public String toString() { StringBuilder sbuf = new StringBuilder(); diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index c3bf9c1..3223cb3 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -1370,6 +1370,13 @@ public class WifiManager { /** WPS timed out {@hide} */ public static final int WPS_TIMED_OUT = 7; + /** + * Passed with {@link ActionListener#onFailure}. + * Indicates that the operation failed due to invalid inputs + * @hide + */ + public static final int INVALID_ARGS = 8; + /** Interface for callback invocation on an application action {@hide} */ public interface ActionListener { /** The operation succeeded */ |