From 6b304391b52285c1b5cb2c8105c39bfe515f50ef Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 10 Mar 2020 08:41:29 -0600 Subject: global: java access control has important semantic meaning It's not right to blindly follow all of AndroidStudio's suggestions, especially for things in tunnel/ which comprise useful API. Signed-off-by: Jason A. Donenfeld --- tunnel/src/main/java/com/wireguard/android/util/ModuleLoader.java | 2 +- tunnel/src/main/java/com/wireguard/android/util/RootShell.java | 2 +- tunnel/src/main/java/com/wireguard/android/util/ToolsInstaller.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tunnel/src/main/java/com/wireguard/android') 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 06a3f61a..8f7749e1 100644 --- a/tunnel/src/main/java/com/wireguard/android/util/ModuleLoader.java +++ b/tunnel/src/main/java/com/wireguard/android/util/ModuleLoader.java @@ -128,7 +128,7 @@ public class ModuleLoader { } @Nullable - private static Map verifySignedHashes(final String signifyDigest) { + private Map verifySignedHashes(final String signifyDigest) { final byte[] publicKeyBytes = Base64.decode(MODULE_PUBLIC_KEY_BASE64, Base64.DEFAULT); if (publicKeyBytes == null || publicKeyBytes.length != 32 + 10 || publicKeyBytes[0] != 'E' || publicKeyBytes[1] != 'd') 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 c67aaaa7..160ba12f 100644 --- a/tunnel/src/main/java/com/wireguard/android/util/RootShell.java +++ b/tunnel/src/main/java/com/wireguard/android/util/RootShell.java @@ -177,7 +177,7 @@ public class RootShell { } } - private void stop() { + public void stop() { synchronized (lock) { if (process != null) { process.destroy(); 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 7c7be392..3fbdfb26 100644 --- a/tunnel/src/main/java/com/wireguard/android/util/ToolsInstaller.java +++ b/tunnel/src/main/java/com/wireguard/android/util/ToolsInstaller.java @@ -107,7 +107,7 @@ public final class ToolsInstaller { } } - private boolean extract() throws IOException { + public boolean extract() throws IOException { localBinaryDir.mkdirs(); final File[] files = new File[EXECUTABLES.length]; final File[] tempFiles = new File[EXECUTABLES.length]; -- cgit v1.2.3