Register and unregister receiver with same context

Fixes #7267
fork-5.53.8
Moxie Marlinspike 2017-12-12 11:16:40 -08:00
rodzic 13434d620c
commit 303b98b7c2
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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);