diff options
author | Eric Kuck <eric@bluelinelabs.com> | 2018-07-12 19:10:35 -0500 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-13 03:46:23 +0200 |
commit | 67ea8b2936343526ff0b3f476c515f0e11dbb272 (patch) | |
tree | 84f904d66f6111a7d8f897164eb236bc62199cae /app/src/main/java/com/wireguard/android/util/RootShell.java | |
parent | fbaa4d9ab1b59ba4610fe273743872f35e7e9091 (diff) |
global: Add nullity annotations
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
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 | 11 |
1 files changed, 6 insertions, 5 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 9293dff9..18e04102 100644 --- a/app/src/main/java/com/wireguard/android/util/RootShell.java +++ b/app/src/main/java/com/wireguard/android/util/RootShell.java @@ -7,6 +7,7 @@ package com.wireguard.android.util; import android.content.Context; +import android.support.annotation.Nullable; import android.util.Log; import com.wireguard.android.R; @@ -34,10 +35,10 @@ public class RootShell { private final File localTemporaryDir; private final Object lock = new Object(); private final String preamble; - private Process process; - private BufferedReader stderr; - private OutputStreamWriter stdin; - private BufferedReader stdout; + @Nullable private Process process; + @Nullable private BufferedReader stderr; + @Nullable private OutputStreamWriter stdin; + @Nullable private BufferedReader stdout; public RootShell(final Context context) { deviceNotRootedMessage = context.getString(R.string.error_root); @@ -80,7 +81,7 @@ public class RootShell { * @param command Command to run as root. * @return The exit value of the command. */ - public int run(final Collection<String> output, final String command) + public int run(@Nullable final Collection<String> output, final String command) throws IOException, NoRootException { synchronized (lock) { /* Start inside synchronized block to prevent a concurrent call to stop(). */ |