summaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/com/wireguard/android/Application.java6
-rw-r--r--app/src/main/java/com/wireguard/android/backend/GoBackend.java6
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);