diff options
author | Samuel Holland <samuel@sholland.org> | 2018-01-08 20:42:58 -0600 |
---|---|---|
committer | Samuel Holland <samuel@sholland.org> | 2018-01-08 23:39:26 -0600 |
commit | 4f02817ef0a7f0383468805f8e9a976a85d43e3e (patch) | |
tree | fb26bd712c81c6730d92e61ccec574c002ed4ab1 /app/src/main/java/com/wireguard/android/util/RootShell.java | |
parent | project: Remove currently-unused library (diff) | |
download | wireguard-android-4f02817ef0a7f0383468805f8e9a976a85d43e3e.tar.xz wireguard-android-4f02817ef0a7f0383468805f8e9a976a85d43e3e.zip |
global: Fix or suppress most lints/warnings
Signed-off-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'app/src/main/java/com/wireguard/android/util/RootShell.java')
-rw-r--r-- | app/src/main/java/com/wireguard/android/util/RootShell.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/app/src/main/java/com/wireguard/android/util/RootShell.java b/app/src/main/java/com/wireguard/android/util/RootShell.java index 2c498131..6dda2d8f 100644 --- a/app/src/main/java/com/wireguard/android/util/RootShell.java +++ b/app/src/main/java/com/wireguard/android/util/RootShell.java @@ -9,14 +9,14 @@ import com.wireguard.android.Application.ApplicationContext; import com.wireguard.android.Application.ApplicationScope; import com.wireguard.android.R; -import java.io.BufferedWriter; import java.io.BufferedReader; -import java.io.OutputStreamWriter; -import java.io.InputStreamReader; +import java.io.BufferedWriter; import java.io.File; import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; import java.nio.charset.StandardCharsets; -import java.util.List; +import java.util.Collection; import java.util.UUID; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -38,11 +38,10 @@ public class RootShell { private final String exceptionMessage; private final String preamble; - + private Process process; + private BufferedReader stderr; private BufferedWriter stdin; private BufferedReader stdout; - private BufferedReader stderr; - private Process process; @Inject public RootShell(@ApplicationContext final Context context) { @@ -141,7 +140,7 @@ public class RootShell { * @param command Command to run as root. * @return The exit value of the last command run, or -1 if there was an internal error. */ - public int run(final List<String> output, final String command) + public int run(final Collection<String> output, final String command) throws ErrnoException, IOException, NoRootException { ensureRoot(); |