Set paired to false on device removal
Set paired property to false on device removal
This is in regards to issue in Gnome-Shell. Removing Bluetooth devices using GNOME Settings doesn't remove them from the quick settings menu until the Bluetooth quick settings tile is toggled off and on. gnome-shell#7100 (closed)
After digging deeper my findings where
- When device is removed from Gnome control center(GCC), the client stills reports "paired" property as "true" for the removed device.
- Scenario 1. When device is "Connected" and user click "Remove Device" on GCC, It takes around 2-3 seconds for this client to report "paired" property as false.
- Scenario 2. When device is "Disconnected" and user click "Remove Device" on GCC, It takes 15+ seconds for this client to report "paired" property as false.
When device-removed
is emitted from this client, gnome-shell calls function _removeDevice(path) which removes the item, but re-adds it in sync() since remove device paired property is still reported as true and will not be removed until, the paired property is reported false and the next _onActiveChanged() function is called in gnome-shell.
Correct solution would be the client set the device paired property to false before emitting signal 'device-removed', although if I am not sure if this needs to be done here in GnomeBluetooth or Bluez.