Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 062951ee authored by William Escande's avatar William Escande Committed by Gerrit Code Review
Browse files

Merge "BondStateMachine: Fix BluetoothClass being null" into main

parents 50d371f3 d67ce9f8
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -273,8 +273,9 @@ final class BondStateMachine extends StateMachine {
                    }

                    BluetoothClass btClass = dev.getBluetoothClass();
                    int btDeviceClass = btClass.getDeviceClass();
                    if (btDeviceClass == BluetoothClass.Device.PERIPHERAL_KEYBOARD || btDeviceClass
                    int btDeviceClass = btClass == null ? 0 : btClass.getDeviceClass();
                    if (btDeviceClass == BluetoothClass.Device.PERIPHERAL_KEYBOARD
                            || btDeviceClass
                                    == BluetoothClass.Device.PERIPHERAL_KEYBOARD_POINTING) {
                        // Its a keyboard. Follow the HID spec recommendation of creating the
                        // passkey and displaying it to the user. If the keyboard doesn't follow