diff options
Diffstat (limited to 'app/java/src/DNSProxyService.java')
-rw-r--r-- | app/java/src/DNSProxyService.java | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/app/java/src/DNSProxyService.java b/app/java/src/DNSProxyService.java index 2b2147f..5a3d70f 100644 --- a/app/java/src/DNSProxyService.java +++ b/app/java/src/DNSProxyService.java @@ -23,10 +23,10 @@ import java.net.InetAddress; public class DNSProxyService extends VpnService { public static String LOG_TAG = "org.pihole.dnsproxy.log"; - public static String NOTIFICATION = "org.pihole.dnsproxy.service"; - public static String NOTIFICATION_CHANNEL_ID = "PiholeDNSProxy"; - public static String ACTION_START = "org.pihole.dnsproxy.service.START"; - public static String ACTION_STOP = "org.pihole.dnsproxy.service.STOP"; + public static String NOTIFICATION_NOTIFY = "org.pihole.dnsproxy.service.dnsproxy.notification.NOTIFY"; + public static String NOTIFICATION_CHANNEL_ID = "org.pihole.dnsproxy.service.dnsproxy.NOTIFICATION"; + public static String ACTION_START = "org.pihole.dnsproxy.service.dnsproxy.START"; + public static String ACTION_STOP = "org.pihole.dnsproxy.service.dnsproxy.STOP"; public static String PIHOLE_ADDRESS = ""; @@ -52,10 +52,16 @@ public class DNSProxyService extends VpnService { super.onDestroy(); } + /** + * Builder has to be created by service + */ public VpnService.Builder newBuilder() { return new VpnService.Builder(); } + /** + * Whether the proxy is setup running + */ public static boolean isRunning() { return DNSProxyService.connection != null; @@ -87,7 +93,7 @@ public class DNSProxyService extends VpnService { this.startForeground(); // send notification when started - Intent notification = new Intent(DNSProxyService.NOTIFICATION); + Intent notification = new Intent(DNSProxyService.NOTIFICATION_NOTIFY); sendBroadcast(notification); } @@ -101,7 +107,7 @@ public class DNSProxyService extends VpnService { stopForeground(true); // send notification when stopped - Intent notification = new Intent(DNSProxyService.NOTIFICATION); + Intent notification = new Intent(DNSProxyService.NOTIFICATION_NOTIFY); sendBroadcast(notification); } |