OSDN Git Service

android/bluetooth: Fix handling of BREDR, LE and dual mode devices
authorSzymon Janc <szymon.janc@tieto.com>
Sun, 23 Mar 2014 21:40:54 +0000 (22:40 +0100)
committerSzymon Janc <szymon.janc@tieto.com>
Mon, 24 Mar 2014 13:23:44 +0000 (14:23 +0100)
commit3843e1822bed763de6d542352226b6faa423dde6
tree6ddf5cd98c938a843f4a7f29652fdb1f9d56b3c1
parent919a803bf84bcec9de97e6d2fd215d03b1c9ad2e
android/bluetooth: Fix handling of BREDR, LE and dual mode devices

This includes fix for storage format so that dual mode devices are
handled correctly. Unfortunatelly this change is not backward
compatible so wiping out /data/misc/bluetooth/ is recommended.

Also correct device type is passed to bonding commands. For create_bond
we fallback to BDEDR if device is not known. This can happen eg. with
OOB. For cancel_bond and remove_bond we require device to be known.
For dual mode device currently only BREDR type is used.

Storage change details:
Instead of storing bdaddr type of device as "Type", now two variables
are used. Boolean "BREDR" if device supports BREDR. Address type is
stored in "AddressType" only if device supports LE and is either
LE random or LE public type.
android/bluetooth.c