[cleanup] pa_bluetooth_device.device_info_valid is a bit broken
@tanuk
Submitted by Tanu Kaskinen Assigned to pul..@..op.org
Description
The pa_bluetooth_device.device_info_valid is supposed to tell whether we have received the device properties properly from bluetoothd. Currently "properly" means that the device name and address have been received. I think the definition of "properly" should be more strict: we should fail if not all interesting properties have been received. It is a bug in bluetoothd if it doesn't send all non-optional properties, so it would be appropriate to fail in case we detect bugs instead of pretending that everything is ok. For example, if the UUID list of a device is not sent, pulseaudio acts as if the list is empty, while in reality it's unknown. Pulseaudio should complain loudly if it doesn't receive the UUID list, because it makes the device unusable.
What should the set of "interesting" properties be? I'd say any properties that pulseaudio uses. This should be the same set of properties that pulseaudio parses, but currently pulseaudio parses more properties than it uses (at least the alias property is not being used for anything).
So, the necessary changes are to check that every non-optional interesting property is received, and to remove the parsing of properties that aren't actually used.