OSDN Git Service

Remove the device from le backgrond connection whitelist when it's unpaired
authorZhihai Xu <zhihaixu@google.com>
Sat, 16 Nov 2013 01:55:46 +0000 (17:55 -0800)
committerZhihai Xu <zhihaixu@google.com>
Fri, 6 Dec 2013 01:34:04 +0000 (17:34 -0800)
commitbd68d683bce9e64bba6ac561e432da9d7bbab671
tree3678c820527e4a98a2a82a9f0a6f0444f6d7a147
parentd3f44782195519d97589f2362e5a8879ee7b62ff
Remove the device from le backgrond connection whitelist when it's unpaired

this is due to we didn't remove the device from the white list before unpair
Which cause a fake pair request from remote device triggered
right after the acl is disconnected.
The fix is to remove the BLE device from whitelist before unpair.
Also fix a problem return wrong device handle from bta_hh_le_add_device.

if bta_hh_le_add_device is called right after reboot, before we connect HID device.
This is normally true for a previous paired device, which we saved in the nvram.
The wrong device handle will cause the removing HID device from while list failed
after unpair the HID device.

bug:11676338
Change-Id: Id5b45b2829da9a990dfd1dbae0c15764b16c2bfb
bta/dm/bta_dm_act.c
bta/hh/bta_hh_le.c