diff options
Diffstat (limited to 'tunnel/src/main/java/com/wireguard/android')
8 files changed, 17 insertions, 24 deletions
diff --git a/tunnel/src/main/java/com/wireguard/android/backend/Backend.java b/tunnel/src/main/java/com/wireguard/android/backend/Backend.java index 853802d2..4c18d98b 100644 --- a/tunnel/src/main/java/com/wireguard/android/backend/Backend.java +++ b/tunnel/src/main/java/com/wireguard/android/backend/Backend.java @@ -5,11 +5,9 @@ package com.wireguard.android.backend; -import com.wireguard.util.NonNullForAll; - import com.wireguard.config.Config; +import com.wireguard.util.NonNullForAll; -import java.util.Collection; import java.util.Set; import androidx.annotation.Nullable; diff --git a/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java b/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java index bf434cf5..54dc913a 100644 --- a/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java +++ b/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java @@ -5,14 +5,10 @@ package com.wireguard.android.backend; -import com.wireguard.util.NonNullForAll; - import android.content.Context; import android.content.Intent; import android.os.Build; import android.os.ParcelFileDescriptor; -import androidx.annotation.Nullable; -import androidx.collection.ArraySet; import android.util.Log; import com.wireguard.android.backend.BackendException.Reason; @@ -23,6 +19,7 @@ import com.wireguard.config.InetNetwork; import com.wireguard.config.Peer; import com.wireguard.crypto.Key; import com.wireguard.crypto.KeyFormatException; +import com.wireguard.util.NonNullForAll; import java.net.InetAddress; import java.util.Collections; @@ -30,6 +27,8 @@ import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import androidx.annotation.Nullable; +import androidx.collection.ArraySet; import java9.util.concurrent.CompletableFuture; @NonNullForAll diff --git a/tunnel/src/main/java/com/wireguard/android/backend/Statistics.java b/tunnel/src/main/java/com/wireguard/android/backend/Statistics.java index f878a1f0..54bbe912 100644 --- a/tunnel/src/main/java/com/wireguard/android/backend/Statistics.java +++ b/tunnel/src/main/java/com/wireguard/android/backend/Statistics.java @@ -5,12 +5,11 @@ package com.wireguard.android.backend; -import com.wireguard.util.NonNullForAll; - import android.os.SystemClock; import android.util.Pair; import com.wireguard.crypto.Key; +import com.wireguard.util.NonNullForAll; import java.util.HashMap; import java.util.Map; diff --git a/tunnel/src/main/java/com/wireguard/android/backend/WgQuickBackend.java b/tunnel/src/main/java/com/wireguard/android/backend/WgQuickBackend.java index c4434e4d..d57a92f9 100644 --- a/tunnel/src/main/java/com/wireguard/android/backend/WgQuickBackend.java +++ b/tunnel/src/main/java/com/wireguard/android/backend/WgQuickBackend.java @@ -5,10 +5,6 @@ package com.wireguard.android.backend; -import com.wireguard.util.NonNullForAll; - -import androidx.annotation.Nullable; - import android.content.Context; import android.util.Log; import android.util.Pair; @@ -19,6 +15,7 @@ import com.wireguard.android.util.RootShell; import com.wireguard.android.util.ToolsInstaller; import com.wireguard.config.Config; import com.wireguard.crypto.Key; +import com.wireguard.util.NonNullForAll; import java.io.File; import java.io.FileOutputStream; @@ -26,14 +23,15 @@ import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; +import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Objects; import java.util.Set; -import java.util.HashMap; +import androidx.annotation.Nullable; import java9.util.stream.Collectors; import java9.util.stream.Stream; diff --git a/tunnel/src/main/java/com/wireguard/android/util/ModuleLoader.java b/tunnel/src/main/java/com/wireguard/android/util/ModuleLoader.java index 40645a43..519ad5cf 100644 --- a/tunnel/src/main/java/com/wireguard/android/util/ModuleLoader.java +++ b/tunnel/src/main/java/com/wireguard/android/util/ModuleLoader.java @@ -5,13 +5,12 @@ package com.wireguard.android.util; -import com.wireguard.util.NonNullForAll; - import android.content.Context; import android.system.OsConstants; import android.util.Base64; import com.wireguard.android.util.RootShell.RootShellException; +import com.wireguard.util.NonNullForAll; import net.i2p.crypto.eddsa.EdDSAEngine; import net.i2p.crypto.eddsa.EdDSAPublicKey; diff --git a/tunnel/src/main/java/com/wireguard/android/util/RootShell.java b/tunnel/src/main/java/com/wireguard/android/util/RootShell.java index eccc61cb..9f941815 100644 --- a/tunnel/src/main/java/com/wireguard/android/util/RootShell.java +++ b/tunnel/src/main/java/com/wireguard/android/util/RootShell.java @@ -5,13 +5,11 @@ package com.wireguard.android.util; -import com.wireguard.util.NonNullForAll; - import android.content.Context; -import androidx.annotation.Nullable; import android.util.Log; import com.wireguard.android.util.RootShell.RootShellException.Reason; +import com.wireguard.util.NonNullForAll; import java.io.BufferedReader; import java.io.File; @@ -22,6 +20,8 @@ import java.nio.charset.StandardCharsets; import java.util.Collection; import java.util.UUID; +import androidx.annotation.Nullable; + /** * Helper class for running commands as root. */ diff --git a/tunnel/src/main/java/com/wireguard/android/util/SharedLibraryLoader.java b/tunnel/src/main/java/com/wireguard/android/util/SharedLibraryLoader.java index 3c2448fe..f4670b14 100644 --- a/tunnel/src/main/java/com/wireguard/android/util/SharedLibraryLoader.java +++ b/tunnel/src/main/java/com/wireguard/android/util/SharedLibraryLoader.java @@ -5,12 +5,12 @@ package com.wireguard.android.util; -import com.wireguard.util.NonNullForAll; - import android.content.Context; import android.os.Build; import android.util.Log; +import com.wireguard.util.NonNullForAll; + import java.io.File; import java.io.FileOutputStream; import java.io.IOException; diff --git a/tunnel/src/main/java/com/wireguard/android/util/ToolsInstaller.java b/tunnel/src/main/java/com/wireguard/android/util/ToolsInstaller.java index 1ce3fe80..f12e755f 100644 --- a/tunnel/src/main/java/com/wireguard/android/util/ToolsInstaller.java +++ b/tunnel/src/main/java/com/wireguard/android/util/ToolsInstaller.java @@ -5,14 +5,12 @@ package com.wireguard.android.util; -import com.wireguard.util.NonNullForAll; - import android.content.Context; -import androidx.annotation.Nullable; import android.system.OsConstants; import android.util.Log; import com.wireguard.android.util.RootShell.RootShellException; +import com.wireguard.util.NonNullForAll; import java.io.File; import java.io.FileNotFoundException; @@ -20,6 +18,8 @@ import java.io.IOException; import java.util.Arrays; import java.util.List; +import androidx.annotation.Nullable; + /** * Helper to install WireGuard tools to the system partition. */ |