소스 검색

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>
master
Jason A. Donenfeld 4 년 전
부모
커밋
314a0d124d
2개의 변경된 파일2개의 추가작업 그리고 10개의 파일을 삭제
  1. +1
    -5
      app/src/main/java/com/wireguard/android/Application.java
  2. +1
    -5
      app/src/main/java/com/wireguard/android/backend/GoBackend.java

+ 1
- 5
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);
});


+ 1
- 5
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);



불러오는 중...
취소
저장