Don't crash if the app doesn't have Bluetooth permissions
This commit is contained in:
parent
50719c8609
commit
ea0f29374b
1 changed files with 5 additions and 1 deletions
|
@ -366,7 +366,11 @@ public class HIDDeviceManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void shutdownBluetooth() {
|
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.
|
// Chromebooks do not pass along ACTION_ACL_CONNECTED / ACTION_ACL_DISCONNECTED properly.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue