Skip to content

Commit

Permalink
Don't crash if the app doesn't have Bluetooth permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Aug 21, 2018
1 parent 2a4999b commit c2791fc
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -366,7 +366,11 @@ protected void initializeBluetooth() {
}

protected void shutdownBluetooth() {
mContext.unregisterReceiver(mBluetoothBroadcast);
try {
mContext.unregisterReceiver(mBluetoothBroadcast);
} catch (Exception e) {
// We may not have registered, that's okay
}
}

// Chromebooks do not pass along ACTION_ACL_CONNECTED / ACTION_ACL_DISCONNECTED properly.
Expand Down

0 comments on commit c2791fc

Please sign in to comment.