From 314a0d124dabd11353a120e66bc872f2843bcdb1 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 8 Mar 2020 19:52:57 -0600 Subject: GoBackend: setConfigureIntent does nothing It's only used from the ManageDialog in VpnDialogs, which in turn is only instantiated in the legacy VPN path. Signed-off-by: Jason A. Donenfeld --- app/src/main/java/com/wireguard/android/Application.java | 6 +----- app/src/main/java/com/wireguard/android/backend/GoBackend.java | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'app') diff --git a/app/src/main/java/com/wireguard/android/Application.java b/app/src/main/java/com/wireguard/android/Application.java index 0fd00874..2a07df18 100644 --- a/app/src/main/java/com/wireguard/android/Application.java +++ b/app/src/main/java/com/wireguard/android/Application.java @@ -93,11 +93,7 @@ public class Application extends android.app.Application { } } if (backend == null) { - final Context context = app.getApplicationContext(); - final Intent configureIntent = new Intent(context, MainActivity.class); - configureIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - final PendingIntent pendingConfigureIntent = PendingIntent.getActivity(context, 0, configureIntent, 0); - backend = new GoBackend(context, pendingConfigureIntent); + backend = new GoBackend(app.getApplicationContext()); GoBackend.setAlwaysOnCallback(() -> { get().tunnelManager.restoreState(true).whenComplete(ExceptionLoggers.D); }); diff --git a/app/src/main/java/com/wireguard/android/backend/GoBackend.java b/app/src/main/java/com/wireguard/android/backend/GoBackend.java index 00c1d217..77e40e53 100644 --- a/app/src/main/java/com/wireguard/android/backend/GoBackend.java +++ b/app/src/main/java/com/wireguard/android/backend/GoBackend.java @@ -44,17 +44,15 @@ public final class GoBackend implements Backend { } private final Context context; - private final PendingIntent configurationIntent; @Nullable private Tunnel currentTunnel; @Nullable private Config currentConfig; private int currentTunnelHandle = -1; private final Set notifiers = new HashSet<>(); - public GoBackend(final Context context, final PendingIntent configurationIntent) { + public GoBackend(final Context context) { SharedLibraryLoader.loadSharedLibrary(context, "wg-go"); this.context = context; - this.configurationIntent = configurationIntent; } private static native String wgGetConfig(int handle); @@ -194,8 +192,6 @@ public final class GoBackend implements Backend { final VpnService.Builder builder = service.getBuilder(); builder.setSession(tunnel.getName()); - builder.setConfigureIntent(configurationIntent); - for (final String excludedApplication : config.getInterface().getExcludedApplications()) builder.addDisallowedApplication(excludedApplication); -- cgit v1.2.3