diff --git a/briar-android/src/main/java/org/briarproject/briar/android/BriarService.java b/briar-android/src/main/java/org/briarproject/briar/android/BriarService.java index 888664785..6fe6df44c 100644 --- a/briar-android/src/main/java/org/briarproject/briar/android/BriarService.java +++ b/briar-android/src/main/java/org/briarproject/briar/android/BriarService.java @@ -222,7 +222,9 @@ public class BriarService extends Service { super.onDestroy(); LOG.info("Destroyed"); stopForeground(true); - if (receiver != null) unregisterReceiver(receiver); + if (receiver != null) { + getApplicationContext().unregisterReceiver(receiver); + } // Stop the services in a background thread wakeLockManager.executeWakefully(() -> { if (started) lifecycleManager.stopServices();