Recent commits on external-bluetooth-bluedroid (git) - Android-x86 - OSDN https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/ Android-x86 https://static-cdn.osdn.net/thumb/g/5/887/36x36_0.png /projects/android-x86/ bc2419: bluedroid: add new usb bluetooth device https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/bc2419a89f37e879720ff02cae82639297fd07ce André Vitor Commit: bc2419a89f37e879720ff02cae82639297fd07ce
bluedroid: add new usb bluetooth device
]]>
e8f115: usb: fix crashing if no Bluetooth adapter found The usb_... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/e8f1157bd5fef9615ef0214f186d16284b17058f Chih-Wei Huang Commit: e8f1157bd5fef9615ef0214f186d16284b17058f
usb: fix crashing if no Bluetooth adapter found

The usb_write works on a null usb.handle that
causes the crashing.
]]>
3014db: Android 4.4.4 Release 2 -----BEGIN PGP SIGNATURE----- ... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/3014db38dfd3ce589ce041d96771a7cae793edef Chih-Wei Huang Commit: 3014db38dfd3ce589ce041d96771a7cae793edef
 Android 4.4.4 Release 2
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iEYEABECAAYFAlO7IZwACgkQ6K0/gZqxDnhBQgCfZ+mK+Kgj/SMeF+s8sLmj8sTY
 1OoAmweuU2W0+Zzit9JbgtrwAPJ3dp/i
 =28vo
 -----END PGP SIGNATURE-----

Merge tag 'android-4.4.4_r2' into kitkat-x86

Android 4.4.4 Release 2
]]>
f4471c: DO NOT MERGE Allow simultaneous LE Observe and BTM Inquir... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/f4471c7e6ca7a0bd4846b2fe4fbe78d79ef37b81 Nitin Arora Commit: f4471c7e6ca7a0bd4846b2fe4fbe78d79ef37b81
DO NOT MERGE Allow simultaneous LE Observe and BTM Inquiry/Scan

This patch allows BTM inquiry and LE observe to be launched
and overlap each others' occurance by redirecting results
and handling states accordingly.

CRs-Fixed: 579505

Conflicts:
	stack/btm/btm_ble_gap.c
bug 12939764

Change-Id: Ifde73f17f8d40e9ebfff3b49e409591189574ee0
]]>
a4611a: DO NOT MERGE: cherrypick from master to fix b/13289050 L... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/a4611ac05f07360785adcff8640da01a3894e4c5 Andre Eisenbach Commit: a4611ac05f07360785adcff8640da01a3894e4c5
DO NOT MERGE: cherrypick from master to fix b/13289050

LE: Add status callback function for LE broadcasts

Change-Id: If4342050ce1141a9c2111286e7b3cccdc012a91e
]]>
07ea19: Merge "DO NOT MERGE use bluetooth HID remote device name ... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/07ea194ac2518e98961632c4d1909f0af0809ea9 Zhihai Xu Commit: 07ea194ac2518e98961632c4d1909f0af0809ea9
Merge "DO NOT MERGE use bluetooth HID remote device name as input device name." into klp-dev
]]>
ad73b9: DO NOT MERGE use bluetooth HID remote device name as inpu... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/ad73b9c59961a622a5ec09b22a23a93f4c7bda1b Zhihai Xu Commit: ad73b9c59961a622a5ec09b22a23a93f4c7bda1b
DO NOT MERGE use bluetooth HID remote device name as input device name.

bug:12003067
Change-Id: I74e4921047a27ee79fa1e3cd58056fde2958e60f
]]>
f677f8: Merge "DO NOT MERGE Bluetooth: Cleanup bt_config.xml duri... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/f677f81068640857f791276c472e34b08d08f3e6 Matthew Xie Commit: f677f81068640857f791276c472e34b08d08f3e6
Merge "DO NOT MERGE Bluetooth: Cleanup bt_config.xml during BLE Scan" into klp-dev
]]>
69218b: Merge changes I6673d478,I953b9ca6 into klp-dev * changes... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/69218b169bd0ff9fdf1c5de148b3807e70de85de Zhihai Xu Commit: 69218b169bd0ff9fdf1c5de148b3807e70de85de
Merge changes I6673d478,I953b9ca6 into klp-dev

* changes:
  DO NOT MERGE BLE stack doesn't handle multiple l2cap_conn_update requests
  DO NOT MERGE sometime the BLE connection parameter isnot updated for the first time
]]>
27420a: Merge "DO NOT MERGE BLE HID device connection failure due... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/27420a0327c04ce9407d2fe9138dde7f6dfe94e0 Zhihai Xu Commit: 27420a0327c04ce9407d2fe9138dde7f6dfe94e0
Merge "DO NOT MERGE BLE HID device connection failure due to security error." into klp-dev
]]>
14b75b: Merge "DO NOT MERGE Remove the device from le backgrond c... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/14b75b785b730f95ddccfc7a31b048ed0277c96b Zhihai Xu Commit: 14b75b785b730f95ddccfc7a31b048ed0277c96b
Merge "DO NOT MERGE Remove the device from le backgrond connection whitelist when it's unpaired" into klp-dev
]]>
87f26b: Merge "DO NOT MERGE BLE Secuity manager state machine gen... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/87f26bcdd92ea462266caf539edb4174834cac17 Zhihai Xu Commit: 87f26bcdd92ea462266caf539edb4174834cac17
Merge "DO NOT MERGE BLE Secuity manager state machine generate wrong pairing success event." into klp-dev
]]>
ea8acc: Merge "DO NOT MERGE fix a potential native crash during b... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/ea8acc971f7c01427fd239e54344b43ac1a31e1c Zhihai Xu Commit: ea8acc971f7c01427fd239e54344b43ac1a31e1c
Merge "DO NOT MERGE fix a potential native crash during bluetooth sutdown" into klp-dev
]]>
1e0849: Merge "DO NOT MERGE the HID device state is out of sync a... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/1e0849e99bdd716b7e172269cdad1d78b60a7ded Zhihai Xu Commit: 1e0849e99bdd716b7e172269cdad1d78b60a7ded
Merge "DO NOT MERGE the HID device state is out of sync after upair." into klp-dev
]]>
30466d: Merge "DO NOT MERGE Can only support two HID report insta... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/30466dfd399b787ab0fca166b842c280d28feebf Zhihai Xu Commit: 30466dfd399b787ab0fca166b842c280d28feebf
Merge "DO NOT MERGE Can only support two HID report instance for BLE HID." into klp-dev
]]>
7a528b: Merge "DO NOT MERGE read report array out of boundary for... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/7a528bc860c349b9d6ae6f8d6c86d54f9448cb0e Zhihai Xu Commit: 7a528bc860c349b9d6ae6f8d6c86d54f9448cb0e
Merge "DO NOT MERGE read report array out of boundary for BLE HID device." into klp-dev
]]>
7a6fad: Merge "DO NOT MERGE need to increase maximum number HID r... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/7a6fad896244a387901572f70b1ce3471712ae34 Zhihai Xu Commit: 7a6fad896244a387901572f70b1ce3471712ae34
Merge "DO NOT MERGE need to increase maximum number HID report for HOGP" into klp-dev
]]>
91f012: DO NOT MERGE trouble syncing with fitbit and can't turn o... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/91f012208070d71e6e9e0f38aa36e78e99f2ff4e Zhihai Xu Commit: 91f012208070d71e6e9e0f38aa36e78e99f2ff4e
DO NOT MERGE trouble syncing with fitbit and can't turn off bluetooth.

this is to work around broadcom firmware problem to handle
unsolicited command complete event for HCI_LE_Create_Connection_Cancel
and LE connection complete event with status error code (0x2)
unknown connection identifier from bluetooth controller
the workaround is to release the HCI connection to avoid out of sync
with bluetooth controller, which cause BT can't be turned off.

bug:11614046
Change-Id: Ia5c5ad0c6c9b1a4f03253cac8a7caaf21341c88c
]]>
6e8d78: DO NOT MERGE BLE stack doesn't handle multiple l2cap_conn... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/6e8d78906338d2d961d7e4356ce4978fd58e5e63 Zhihai Xu Commit: 6e8d78906338d2d961d7e4356ce4978fd58e5e63
DO NOT MERGE BLE stack doesn't handle multiple l2cap_conn_update requests

we can define 4 bits as flags:
1. L2C_BLE_CONN_UPDATE_DISABLE:
if set it means disable update connection parameter. otherwise enable
2.L2C_BLE_NEW_CONN_PARAM:
if set, it means we have new connection parameter which is needed to be configured
if possible(after update done or enable).
3.L2C_BLE_UPDATE_PENDING:
if set, it means waiting for connection parameter update finished.
this flag will be cleared in btu_ble_ll_conn_param_upd_evt.
will be set when we call btsnd_hcic_ble_upd_ll_conn_params
4.L2C_BLE_NOT_DEFAULT_PARAM:
if set, it means we don't use the default connection parameter.
so when we disable update,
we need to configure default connection parameter.
with these 4 flags, we can replace all these states:
UPD_ENABLED, UPD_DISABLED, UPD_PENDING and UPD_UPDATED.
so we can cover all the corner cases which aren't handled
by original code.

bug:11450715
Change-Id: I6673d4783a8063bf9e8a213c6669800f86e67945
]]>
61973b: DO NOT MERGE sometime the BLE connection parameter isnot ... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/61973be637027a4e91b99ca3e19fe964481936b2 pairing_bda, FALSE); in smp_send_pair_req ,We change the state to UPD_DISABLED. When we receive the new BLE connection parameter from remote device, we will update the state to UPD_PENDING, which will update the new connection parameter when enable the connection parameter update. when we start BLE service discovery we call L2CA_EnableUpdateBleConnParams(p_srcb->server_bda, FALSE); in bta_gattc_set_discover_st, We will update the state back to UPD_DISABLED, which will cause we miss updating the new connection parameter when enable the connection parameter update. The fix is don't change the state to UPD_DISABLED when the state is UPD_PENDING for disabling. bug:11727252 Change-Id: I953b9ca669e3460e18b340e7779cc54e03d6305b ]]> Zhihai Xu Commit: 61973be637027a4e91b99ca3e19fe964481936b2
DO NOT MERGE sometime the BLE connection parameter isnot updated for the first time

When we receive the BLE connection parameter update
from remote device after smp_send_pair_req before
start BLE service discovery(bta_gattc_set_discover_st).
We will miss update this BLE connection parameter.
The reason is we call
L2CA_EnableUpdateBleConnParams(p_cb->pairing_bda, FALSE);
in smp_send_pair_req ,We change the state to UPD_DISABLED.

When we receive the new BLE connection parameter from
remote device, we will update the state to UPD_PENDING,
which will update the new connection parameter
when enable the connection parameter update.

when we start BLE service discovery
we call L2CA_EnableUpdateBleConnParams(p_srcb->server_bda, FALSE);
in bta_gattc_set_discover_st, We will update the state back to
 UPD_DISABLED, which will cause we miss updating
the new connection parameter when enable the connection parameter update.

The fix is don't change the state to UPD_DISABLED
when the state is UPD_PENDING for disabling.

bug:11727252
Change-Id: I953b9ca669e3460e18b340e7779cc54e03d6305b
]]>
b99127: DO NOT MERGE BLE HID device connection failure due to sec... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/b9912730d082c7bca7d94bb9ddac4447cfad362f Zhihai Xu Commit: b9912730d082c7bca7d94bb9ddac4447cfad362f
DO NOT MERGE BLE HID device connection failure due to security error.

When HID BLE device start encryption, if some other GATT application
already start encryption(but not finished yet) by calling
gatt_security_check_start. The HID BLE device will be failed to start
encryption, which will cause it to disconnect the BLE HID connection.
The solution is to check whether we already started the encryption
, If the encryption is already started, wait until the encryption
finished, then continue to start security check for BLE HID device.
add encrytion complete event to notify all GATT client encryption done.
filter the event just for BTA HH LE GATT client.

bug:11636246
Change-Id: If58e57c623cc8cfa05208587b010bec68c71306c
]]>
ae6028: DO NOT MERGE Remove the device from le backgrond connecti... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/ae6028ad26ef92f14dccaf3ea03fe07837ce50fd Zhihai Xu Commit: ae6028ad26ef92f14dccaf3ea03fe07837ce50fd
DO NOT MERGE 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
]]>
1918cd: DO NOT MERGE BLE Secuity manager state machine generate w... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/1918cdd2b8d741a4556f5d5b20835fb2561c65b3 Zhihai Xu Commit: 1918cdd2b8d741a4556f5d5b20835fb2561c65b3
DO NOT MERGE BLE Secuity manager state machine generate wrong pairing success event.

 we call smp_proc_release_delay to setup a timer.
We will send a pair failure message to uplayer after the time expired.
Right before the time expire, the l2cap connection is disconnected
from remote device, we receive L2C_DISC, which will call smp_delay_terminate,
 smp_delay_terminate will send a pair success message to uplayer.
The fix is not to change the status if the remote device disconnect the link

bug:11716967
Change-Id: I8ca63599a170ec86913785aafea552301cec37df
]]>
5a79e0: DO NOT MERGE fix a potential native crash during bluetoot... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/5a79e080ef667e7c623ef46da6086915087c7488 cleanup();), which is before userial thread exit. Then we may trigger this native crash. bug:11793775 Change-Id: Ic8ced12848d25f918a28f4d5ba29b803d6ac5bd7 ]]> Zhihai Xu Commit: 5a79e080ef667e7c623ef46da6086915087c7488
DO NOT MERGE fix a potential native crash during bluetooth sutdown

When bluetooth is initialized which call gki_buffer_init,
the buffer pool is allocated by GKI_os_malloc which is
to call libc malloc function.
When bluetooth is cleanup which call GKI_shutdown,
the buffer pool will be  freed by GKI_os_free
which is to call libc free function.
So if we access the buffer, after the whole buffer pool is freed,
we will get this native crash.
if we call cleanup during bluetooth disabling:
the state is still BTIF_CORE_STATE_DISABLING,
then GKI_shutdown will call before bte_main_disable
( bt_hc_if->cleanup();), which is  before userial thread exit.
Then we may trigger this native crash.

bug:11793775
Change-Id: Ic8ced12848d25f918a28f4d5ba29b803d6ac5bd7
]]>
35f6b7: DO NOT MERGE the HID device state is out of sync after up... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/35f6b7f3f8b483065e9d97c18542286818e02544 Zhihai Xu Commit: 35f6b7f3f8b483065e9d97c18542286818e02544
DO NOT MERGE the HID device state is out of sync after upair.

the HID device state is out of sync between java layer and bluedroid stack after upair.
This will cause the HID device can't be connected after repair.
YOu can find the following error message
E/HidService( 1452): Hid Device not disconnected: 00:15:9E:20:29:41

bug:11718702
Change-Id: I271bb77a2cc205c5a0ef396db86b87902d29966b
]]>
fb10ec: DO NOT MERGE Can only support two HID report instance for... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/fb10ec3af9a0c690d2fbfe50c31821a7e242a26e Zhihai Xu Commit: fb10ec3af9a0c690d2fbfe50c31821a7e242a26e
DO NOT MERGE Can only support two HID report instance for BLE HID.

The follwoing code cause this problem:
BTA_HH_LE_RPT_INST_ID_MAP(s,c)=(UINT8)(((s)<<4)||(c))
The code use || instead of |, this cause we can only generate
two instance HID report 0 and 1(false and true).

bug:12213520
Change-Id: If6b7cfd9633255401aef12aafd918ee147f256b6
]]>
fb1552: DO NOT MERGE read report array out of boundary for BLE HI... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/fb1552a28f067ff4af23d24a79949cb8ff309bc0 Zhihai Xu Commit: fb1552a28f067ff4af23d24a79949cb8ff309bc0
DO NOT MERGE read report array out of boundary for BLE HID device.

report array out of boundary when read HID report reference
descriptor for BLE HID device.

bug:12208657
Change-Id: Ic60fd7555045f367b4fcd606510f52f60e36995e
]]>
bb3849: DO NOT MERGE need to increase maximum number HID report f... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/bb384975d68a2a00e4a212bd905ece9996cfe587 Zhihai Xu Commit: bb384975d68a2a00e4a212bd905ece9996cfe587
DO NOT MERGE need to increase maximum number HID report for HOGP

The Mat mouse have more than 10 report (11),
which exceed our limitation

bug:12214036
Change-Id: Id578bf7959f73dc3bd57664eccf49ab5580ec76b
]]>
aefcb1: DO NOT MERGE Bluetooth: Cleanup bt_config.xml during BLE ... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/aefcb184639ff24bf294dfa4f91bd22202d1f93e Sunny Kapdi Commit: aefcb184639ff24bf294dfa4f91bd22202d1f93e
DO NOT MERGE Bluetooth: Cleanup bt_config.xml during BLE Scan

BLE Scan needs to clean up the bt_config.xml periodically so that
new entries could be added to bt_config.xml. Also, there is no
need to add BLE Random bd_addr to the bt_config.xml

Change-Id: I00ba2e50dd39a021099052cb569786f6cb2cc8b9

b/12912008
(cherry picked from commit 377cb1407ee6ee1ff91b15bfa7052abed1023d18)

Change-Id: I3fa0286c96782822a8fdac14b05bbb6f98636e50
]]>
b74fe9: DO NOT MERGE LE: Add service UUIDs and data to advertisin... https://zh-tw.osdn.net/projects/android-x86/scm/git/external-bluetooth-bluedroid/commits/b74fe9e2c9fc0939f5c18282c985622f20b78d2a Andre Eisenbach Commit: b74fe9e2c9fc0939f5c18282c985622f20b78d2a
DO NOT MERGE LE: Add service UUIDs and data to advertising data

Add support for UUIDs and custom service data in the advertising and
scan response records.

Cherry picking ble advertising changes from master to KLP MR2.
b/13137996

Change-Id: I6470427ad194871488cc90f3ab384b9ecf326b15
]]>