TunnelManager: new intents

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld
2018-06-04 07:06:28 +02:00
parent 10ca2c8681
commit a2ccbf003c
5 changed files with 53 additions and 14 deletions
@@ -6,12 +6,9 @@
package com.wireguard.android.backend;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import com.wireguard.android.Application;
import com.wireguard.android.model.Tunnel;
import com.wireguard.android.model.Tunnel.State;
import com.wireguard.android.model.Tunnel.Statistics;
@@ -119,12 +116,4 @@ public final class WgQuickBackend implements Backend {
if (result != 0)
throw new Exception("Unable to configure tunnel (wg-quick returned " + result + ')');
}
public static final class WgQuickChangeReceiver extends BroadcastReceiver {
@Override
public void onReceive(final Context context, final Intent intent) {
Log.d(TAG, "Refreshing tunnel states");
Application.getComponent().getTunnelManager().refreshTunnelStates();
}
}
}