Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bluetooth: Fix failure when enabling Bluez 5.x adapter
Root cause: When ConnMan tries to enable bluetooth technology, first it will send RFkill unblock event to kernel, then call dbus method to enable bluetooth device. When bluez receives the RFkill event, it will power on the device immediately, and sends PropertyChanged message to ConnMan. In ConnMan, the device powered state is updated in device enable dbus reply callback function, but ConnMan receives PropertyChanged message before device enable dbus reply. In current ConnMan Bluez 5.x bluetooth plugin, when handling PropertyChanged message, it finds the adapter state(enabled) is different with the device state ConnMan stores(disabled), it will disable the bluetooth device. Solution: In ConnMan bluetooth plugin for Bluez 5.x, when ConnMan finds the adapter state is different with the device state ConnMan stores, update device state in ConnMan to the adapter state.
- Loading branch information