mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-11 18:29:05 +01:00
Use app context to unregister receiver.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user