Auto-format the source directories

Blame Jason for writing Java in vim.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Samuel Holland
2018-11-11 21:50:23 -06:00
parent 4e134772d7
commit a264f7ab36
42 changed files with 850 additions and 841 deletions
@@ -40,18 +40,6 @@ public final class WgQuickBackend implements Backend {
localTemporaryDir = new File(context.getCacheDir(), "tmp");
}
@Override
public String getVersion() throws Exception {
final List<String> output = new ArrayList<>();
if (Application.getRootShell()
.run(output, "cat /sys/module/wireguard/version") != 0 || output.isEmpty())
throw new Exception("Unable to determine kernel module version");
return output.get(0);
}
@Override
public String getTypeName() { return "Kernel module"; }
@Override
public Config applyConfig(final Tunnel tunnel, final Config config) throws Exception {
if (tunnel.getState() == State.UP) {
@@ -94,6 +82,20 @@ public final class WgQuickBackend implements Backend {
return new Statistics();
}
@Override
public String getTypeName() {
return "Kernel module";
}
@Override
public String getVersion() throws Exception {
final List<String> output = new ArrayList<>();
if (Application.getRootShell()
.run(output, "cat /sys/module/wireguard/version") != 0 || output.isEmpty())
throw new Exception("Unable to determine kernel module version");
return output.get(0);
}
@Override
public State setState(final Tunnel tunnel, State state) throws Exception {
final State originalState = getState(tunnel);