summaryrefslogtreecommitdiff
path: root/trackers/src
diff options
context:
space:
mode:
Diffstat (limited to 'trackers/src')
-rw-r--r--trackers/src/main/java/foundation/e/privacymodules/trackers/DNSBlockerService.kt12
1 files changed, 6 insertions, 6 deletions
diff --git a/trackers/src/main/java/foundation/e/privacymodules/trackers/DNSBlockerService.kt b/trackers/src/main/java/foundation/e/privacymodules/trackers/DNSBlockerService.kt
index 97a0fda..c2ad16b 100644
--- a/trackers/src/main/java/foundation/e/privacymodules/trackers/DNSBlockerService.kt
+++ b/trackers/src/main/java/foundation/e/privacymodules/trackers/DNSBlockerService.kt
@@ -40,15 +40,15 @@ class DNSBlockerService : Service() {
throw UnsupportedOperationException("Not yet implemented")
}
- override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int {
- if (intent.getBooleanExtra(EXTRA_ENABLE_NOTIFICATION, true)) {
- ForegroundStarter.startForeground(this)
- }
- if (ACTION_START == intent.action) {
+ override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
+ if (ACTION_START == intent?.action) {
+ if (intent.getBooleanExtra(EXTRA_ENABLE_NOTIFICATION, true)) {
+ ForegroundStarter.startForeground(this)
+ }
stop()
start()
}
- return START_STICKY
+ return START_REDELIVER_INTENT
}
private fun start() {