diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-08 19:52:57 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-08 19:52:57 -0600 |
commit | 314a0d124dabd11353a120e66bc872f2843bcdb1 (patch) | |
tree | c13b58753daf4d74e9b49965554b88c739a30f9f | |
parent | 6f1e86e8a7aad3545321ecae2e552431c597b43e (diff) |
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 <Jason@zx2c4.com>
-rw-r--r-- | app/src/main/java/com/wireguard/android/Application.java | 6 | ||||
-rw-r--r-- | app/src/main/java/com/wireguard/android/backend/GoBackend.java | 6 |
2 files changed, 2 insertions, 10 deletions
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<TunnelStateChangeNotificationReceiver> 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); |