summaryrefslogtreecommitdiff
path: root/trackers/src/main/java
diff options
context:
space:
mode:
authorGuillaume Jacquart <guillaume.jacquart@hoodbrains.com>2023-05-03 15:40:15 +0000
committerGuillaume Jacquart <guillaume.jacquart@hoodbrains.com>2023-05-03 15:40:15 +0000
commit4b11d2dc78912104c2696123b2bd466d41465d4e (patch)
treeae9d49ffcb909e685e5a21141a1facb6b45e6208 /trackers/src/main/java
parenta0ee04ea9dbc0802c828afdf660eb37dc6fa350f (diff)
parent837fa2c6b4e61653bd4d14a94af8c48d859a7944 (diff)
Merge branch '1139-fix_bg_crashes' into 'main'
1139: FIX crash in background See merge request e/os/advanced-privacy!126
Diffstat (limited to 'trackers/src/main/java')
-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() {