summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-03-10 08:41:29 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2020-03-10 08:44:38 -0600
commitd75bb97aef271b3ecc8da4dacd62a0116132696c (patch)
treec320c2b79343b6f30f8b2bd43fb7213ef134ea43
parent7c4025936368f379f075be23b13f7ea19d416fc8 (diff)
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.
-rw-r--r--tunnel/src/main/java/com/wireguard/android/util/ModuleLoader.java2
-rw-r--r--tunnel/src/main/java/com/wireguard/android/util/RootShell.java2
-rw-r--r--tunnel/src/main/java/com/wireguard/android/util/ToolsInstaller.java2
-rw-r--r--ui/src/main/java/com/wireguard/android/model/TunnelManager.java2
4 files changed, 4 insertions, 4 deletions
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<String, Sha256Digest> verifySignedHashes(final String signifyDigest) {
+ private Map<String, Sha256Digest> 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];
diff --git a/ui/src/main/java/com/wireguard/android/model/TunnelManager.java b/ui/src/main/java/com/wireguard/android/model/TunnelManager.java
index 28dcd18e..e370f8de 100644
--- a/ui/src/main/java/com/wireguard/android/model/TunnelManager.java
+++ b/ui/src/main/java/com/wireguard/android/model/TunnelManager.java
@@ -161,7 +161,7 @@ public final class TunnelManager extends BaseObservable {
completableTunnels.complete(tunnels);
}
- private void refreshTunnelStates() {
+ public void refreshTunnelStates() {
Application.getAsyncWorker().supplyAsync(() -> Application.getBackend().getRunningTunnelNames())
.thenAccept(running -> {
for (final ObservableTunnel tunnel : tunnels)