Procházet zdrojové kódy

fix type diff bool => Boolean, fix param name ValidSSIDs

David před 9 roky
rodič
revize
9e3a608013

+ 3 - 6
app/src/main/java/com/example/david/libretasker/State/Network.java

@@ -42,13 +42,10 @@ public class Network {
     }
 
     public Network(HashMap<String, Object> data) {
-        if (data.get("type") == null)
-            throw new AssertionError("Type can't be null");
-
-        active = (data.get("active") != null && (boolean)data.get("active"));
+        active = (Boolean)data.get("active");
         state = (NetworkInfo.State)data.get("state");
-        type = (int) data.get("type");
-        ValidSSIDs =(List<String>)data.get("SSIDs");
+        type = (Integer)data.get("type");
+        ValidSSIDs =(List<String>)data.get("ValidSSIDs");
     }
 
     @Override