summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/WifiConfiguration.java14
-rw-r--r--wifi/java/android/net/wifi/WifiManager.java7
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 5f5d54f..d6d0b8c 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -1366,6 +1366,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 */