Fix NPE crash when no bluetooth is available

Fixes #6355
Closes #6366
This commit is contained in:
mcloo 2017-03-12 02:23:40 +01:00 committed by Moxie Marlinspike
parent 97c3e8fa3f
commit 9d13b9437c

View File

@ -49,6 +49,9 @@ public class BluetoothStateManager {
this.bluetoothConnectionReceiver = new BluetoothConnectionReceiver();
this.listener = listener;
if (this.bluetoothAdapter == null)
return;
requestHeadsetProxyProfile();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {