Skip to content

Commit

Permalink
constants: remove redundant code (fixes #316) (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
rcouture27 authored and dogi committed Jun 17, 2019
1 parent 64aa3ff commit ac884f3
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions app/src/main/java/io/treehouses/remote/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* Defines several constants used between {@link BluetoothChatService} and the UI.
*/
public class Constants {

static String value = "";
private static ArrayList<String> groups = new ArrayList<>();

Expand Down Expand Up @@ -77,31 +77,5 @@ public class Constants {
terminalList.add("Rename Hostname");
terminalList.add("Expand File System");
}

public static void setGroups() {
if (groups.size() > 0) {
groups = null;
groups = new ArrayList<>();
}
groups.add("Ethernet: Automatic");
groups.add("WiFi");
groups.add("Hotspot");
groups.add("Bridge");
groups.add("Reset");
groups.add("Reboot");
groups.add("Network Mode: ");
}
public static ArrayList<String> getGroups() {
return groups;
}

public static ArrayList<String> changeGroup(String readMessage) {
groups.remove(6);
Log.e("TAG", "Group size after remove: " + getGroups().size());
groups.add("Network Mode: " + readMessage);
Log.e("TAG", "Group size after add: " + getGroups().size());
return groups;
}

}

0 comments on commit ac884f3

Please sign in to comment.