package org.pihole.dnsproxy; import android.app.AlertDialog; import android.app.Service; import android.content.Intent; import android.net.VpnService; public class DNSService extends VpnService { private static boolean isRunning = false; @Override public int onStartCommand(Intent intent, int flags, int startId) { //VpnService.prepare(); DNSService.isRunning = true; return Service.START_STICKY; } @Override public void onDestroy() { DNSService.isRunning = false; super.onDestroy(); } public static boolean isRunning() { return DNSService.isRunning; } }