Commit 03bb7f30 authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Added a configure intent

parent 149c9bb3
package com.frostnerd.dnschanger.threading; package com.frostnerd.dnschanger.threading;
import android.app.PendingIntent;
import android.content.Intent; import android.content.Intent;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.net.VpnService; import android.net.VpnService;
...@@ -13,6 +14,7 @@ import com.frostnerd.dnschanger.DNSChanger; ...@@ -13,6 +14,7 @@ import com.frostnerd.dnschanger.DNSChanger;
import com.frostnerd.dnschanger.LogFactory; import com.frostnerd.dnschanger.LogFactory;
import com.frostnerd.dnschanger.activities.BackgroundVpnConfigureActivity; import com.frostnerd.dnschanger.activities.BackgroundVpnConfigureActivity;
import com.frostnerd.dnschanger.activities.InvalidDNSDialogActivity; import com.frostnerd.dnschanger.activities.InvalidDNSDialogActivity;
import com.frostnerd.dnschanger.activities.MainActivity;
import com.frostnerd.dnschanger.database.entities.IPPortPair; import com.frostnerd.dnschanger.database.entities.IPPortPair;
import com.frostnerd.dnschanger.services.DNSVpnService; import com.frostnerd.dnschanger.services.DNSVpnService;
import com.frostnerd.dnschanger.util.PreferencesAccessor; import com.frostnerd.dnschanger.util.PreferencesAccessor;
...@@ -215,6 +217,7 @@ public class VPNRunnable implements Runnable { ...@@ -215,6 +217,7 @@ public class VPNRunnable implements Runnable {
builder.setMtu(1500); builder.setMtu(1500);
}else builder.setMtu(1280); }else builder.setMtu(1280);
LogFactory.writeMessage(service, new String[]{LOG_TAG, "[VPNTHREAD]", ID}, "Tunnel interface created, not yet connected"); LogFactory.writeMessage(service, new String[]{LOG_TAG, "[VPNTHREAD]", ID}, "Tunnel interface created, not yet connected");
builder.setConfigureIntent(PendingIntent.getActivity(service, 1, new Intent(service, MainActivity.class), PendingIntent.FLAG_CANCEL_CURRENT));
} }
private void addDNSServer(@NonNull String server, boolean addRoute, boolean ipv6){ private void addDNSServer(@NonNull String server, boolean addRoute, boolean ipv6){
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment