summaryrefslogtreecommitdiff
path: root/app/java/src/DNSService.java
blob: 4f760a5e3bd1292f3b310faf0983e05f96113b50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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;
    }
}