diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-10 09:00:44 -0600 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2020-03-10 22:12:16 +0530 |
commit | d4875afe31430566587bbdf1cc4ea5705173c081 (patch) | |
tree | 90866645d0fecbd7de81fcf15ef85cf6b040e90c /tunnel/src/main/java | |
parent | de0e431d005244eb331706d1553171bc147b013c (diff) |
tunnel: make use of @RestrictTo
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tunnel/src/main/java')
-rw-r--r-- | tunnel/src/main/java/com/wireguard/android/util/SharedLibraryLoader.java | 4 | ||||
-rw-r--r-- | tunnel/src/main/java/com/wireguard/android/util/ToolsInstaller.java | 3 |
2 files changed, 7 insertions, 0 deletions
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 536d76b3..1bb3659f 100644 --- a/tunnel/src/main/java/com/wireguard/android/util/SharedLibraryLoader.java +++ b/tunnel/src/main/java/com/wireguard/android/util/SharedLibraryLoader.java @@ -21,7 +21,11 @@ import java.util.HashSet; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; +import androidx.annotation.RestrictTo; +import androidx.annotation.RestrictTo.Scope; + @NonNullForAll +@RestrictTo(Scope.LIBRARY_GROUP) public final class SharedLibraryLoader { private static final String TAG = "WireGuard/" + SharedLibraryLoader.class.getSimpleName(); 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 3fbdfb26..86792cb7 100644 --- a/tunnel/src/main/java/com/wireguard/android/util/ToolsInstaller.java +++ b/tunnel/src/main/java/com/wireguard/android/util/ToolsInstaller.java @@ -19,6 +19,8 @@ import java.util.Arrays; import java.util.List; import androidx.annotation.Nullable; +import androidx.annotation.RestrictTo; +import androidx.annotation.RestrictTo.Scope; /** * Helper to install WireGuard tools to the system partition. @@ -130,6 +132,7 @@ public final class ToolsInstaller { return true; } + @RestrictTo(Scope.LIBRARY_GROUP) public int install() throws RootShellException, IOException { if (!context.getPackageName().startsWith("com.wireguard.")) throw new SecurityException("The tools may only be installed system-wide from the main WireGuard app."); |