From 303b98b7c21c9ec7ccc294d16cc6f76b1b4a0162 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Tue, 12 Dec 2017 11:16:40 -0800 Subject: [PATCH] Register and unregister receiver with same context Fixes #7267 --- .../securesms/webrtc/audio/BluetoothStateManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/thoughtcrime/securesms/webrtc/audio/BluetoothStateManager.java b/src/org/thoughtcrime/securesms/webrtc/audio/BluetoothStateManager.java index 33947f68a1..a27d9d266e 100644 --- a/src/org/thoughtcrime/securesms/webrtc/audio/BluetoothStateManager.java +++ b/src/org/thoughtcrime/securesms/webrtc/audio/BluetoothStateManager.java @@ -54,9 +54,9 @@ public class BluetoothStateManager { requestHeadsetProxyProfile(); - context.registerReceiver(bluetoothConnectionReceiver, new IntentFilter(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED)); + this.context.registerReceiver(bluetoothConnectionReceiver, new IntentFilter(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED)); - Intent sticky = context.registerReceiver(bluetoothScoReceiver, new IntentFilter(getScoChangeIntent())); + Intent sticky = this.context.registerReceiver(bluetoothScoReceiver, new IntentFilter(getScoChangeIntent())); if (sticky != null) { bluetoothScoReceiver.onReceive(context, sticky);