diff options
author | Vinit Deshapnde <vinitd@google.com> | 2013-09-12 16:44:41 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-09-12 16:44:41 -0700 |
commit | 8f8c563e6fd9132c16885b89a81f07ed9770889a (patch) | |
tree | de358fd3c43bf90501043e5ff673d46c79f7d3e1 /wifi | |
parent | 6d803dede7b51b87eee0b877f8cb310c05b1172e (diff) | |
parent | b2c06ba5711ffa3781b9bfe1c11051cc274be9e3 (diff) | |
download | frameworks_base-8f8c563e6fd9132c16885b89a81f07ed9770889a.zip frameworks_base-8f8c563e6fd9132c16885b89a81f07ed9770889a.tar.gz frameworks_base-8f8c563e6fd9132c16885b89a81f07ed9770889a.tar.bz2 |
am b2c06ba5: am b481dae2: Merge "Fix invalid Wifi Network system crash" into klp-dev
* commit 'b2c06ba5711ffa3781b9bfe1c11051cc274be9e3':
Fix invalid Wifi Network system crash
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 */ |