Use validation instead of two-way binding

This is insane, but it appears to be working. We essentially store
things in a separate class for editing, and then commit it back at a
given time.

This business with onViewStateRestored in both TunnelEditorFragment and
in TunnelDetailFragment is buggy and likely wrong.

In general TunnelEditorFragment should probably be rewritten. The
relationship with the changed name is not clear.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld
2018-04-28 04:51:43 +02:00
parent 693228985d
commit 63071f57b7
11 changed files with 382 additions and 147 deletions
@@ -54,6 +54,8 @@ enum Attribute {
}
public static String[] stringToList(final String string) {
if (string == null)
return new String[0];
return string.trim().split("\\s*,\\s*");
}