OSDN Git Service

android-x86/system-bt.git
6 years agoMerge "Removed unused or unnecessary defines" am: c047e451bb am: 690878ab20
Pavlin Radoslavov [Mon, 20 Nov 2017 17:21:49 +0000 (17:21 +0000)]
Merge "Removed unused or unnecessary defines" am: c047e451bb am: 690878ab20
am: 475aacf03d

Change-Id: I7245d9569f6e131af21b0389453894ed6310f247

6 years agoMerge "Removed unused or unnecessary defines" am: c047e451bb
Pavlin Radoslavov [Mon, 20 Nov 2017 17:19:16 +0000 (17:19 +0000)]
Merge "Removed unused or unnecessary defines" am: c047e451bb
am: 690878ab20

Change-Id: I32b61fd8f61acc5bb7d3a7711a625152f5d6490b

6 years agoMerge "Removed unused or unnecessary defines"
Pavlin Radoslavov [Mon, 20 Nov 2017 17:17:13 +0000 (17:17 +0000)]
Merge "Removed unused or unnecessary defines"
am: c047e451bb

Change-Id: I5da696c40966e4bbca0c81d472f882547f6302aa

6 years agoMerge "Removed unused or unnecessary defines"
Treehugger Robot [Mon, 20 Nov 2017 17:11:42 +0000 (17:11 +0000)]
Merge "Removed unused or unnecessary defines"

6 years agoFix broken PDK build, by disabling libbluetooth-binder during PDK build. am: 02c49bc9...
Daniel Cardenas [Sat, 18 Nov 2017 05:02:45 +0000 (05:02 +0000)]
Fix broken PDK build, by disabling libbluetooth-binder during PDK build. am: 02c49bc93f am: c37ff70b73
am: 4db6d8af4c

Change-Id: I9f5b0f50443e8a66b7563c1dc801a044da42f007

6 years agoFix broken PDK build, by disabling libbluetooth-binder during PDK build. am: 02c49bc93f
Daniel Cardenas [Sat, 18 Nov 2017 04:54:21 +0000 (04:54 +0000)]
Fix broken PDK build, by disabling libbluetooth-binder during PDK build. am: 02c49bc93f
am: c37ff70b73

Change-Id: Ic22f12ac9000e689a44b9ee329172671a36950f9

6 years agoFix broken PDK build, by disabling libbluetooth-binder during PDK build.
Daniel Cardenas [Sat, 18 Nov 2017 04:47:26 +0000 (04:47 +0000)]
Fix broken PDK build, by disabling libbluetooth-binder during PDK build.
am: 02c49bc93f

Change-Id: Iaabea7944dc56ff4faebb38a9e1ae9ea04854ead

6 years agoFix broken PDK build, by disabling libbluetooth-binder during PDK build.
Daniel Cardenas [Sat, 18 Nov 2017 02:18:28 +0000 (18:18 -0800)]
Fix broken PDK build, by disabling libbluetooth-binder during PDK build.

Fixes: 69479982
Test: Build

Change-Id: Ie05c67e2b22c3f549239be1d7d6e9c3c22543498

6 years agoRemoved unused or unnecessary defines
Pavlin Radoslavov [Sat, 18 Nov 2017 00:23:16 +0000 (16:23 -0800)]
Removed unused or unnecessary defines

Removed the following defines because they are unused or unnecessary:
 - AVDT_REPORTING
 - AVRC_METADATA_INCLUDED
 - BTA_INCLUDED
 - SBC_FOR_EMBEDDED_LINUX
 - BTA_AVRCP_FF_RW_SUPPORT
 - GATT_DB_BUF_SIZE
 - BTM_DEFAULT_SCO_MODE
 - BTM_BLE_ADV_TX_POWER
 - BTM_BLE_ADV_TX_POWER_*
 - ATT_INCLUDED
 - ATT_DEBUG
 - GAP_TRANSPORT_SUPPORTED
 - GATTP_TRANSPORT_SUPPORTED
 - PORT_CREDIT_RX_MAX
 - PORT_CREDIT_RX_LOW
 - AVDT_INCLUDED
 - AVDT_REPORTING
 - HID_DEV_SUBCLASS
 - A2D_INCLUDED

Also:
 - Changed tBTA_AV_SCB field p_cap from dynamically allocated to
   inlined storage, and renamed it to peer_cap.
 - Removed unused typedef tBTM_BLE_ADV_TX_POWER

Test: Manual: streaming to Headset.
Change-Id: I0db18cc7ae3b9e692c71b430436f3170e8e4d65e

6 years agoRemove unnecessery re-defininitions of BTA_AV constants am: e7510d9bf4 am: 5d1fba8537
Pavlin Radoslavov [Fri, 17 Nov 2017 19:35:45 +0000 (19:35 +0000)]
Remove unnecessery re-defininitions of BTA_AV constants am: e7510d9bf4 am: 5d1fba8537
am: de6b088014

Change-Id: I26708f8b983ae7138bcded54e67748a75d41dd5f

6 years agoRemove unnecessery re-defininitions of BTA_AV constants am: e7510d9bf4
Pavlin Radoslavov [Fri, 17 Nov 2017 19:17:53 +0000 (19:17 +0000)]
Remove unnecessery re-defininitions of BTA_AV constants am: e7510d9bf4
am: 5d1fba8537

Change-Id: I7e6e2e8309340152cba4944448c2c8b8798e7a76

6 years agoRemove unnecessery re-defininitions of BTA_AV constants
Pavlin Radoslavov [Fri, 17 Nov 2017 19:07:54 +0000 (19:07 +0000)]
Remove unnecessery re-defininitions of BTA_AV constants
am: e7510d9bf4

Change-Id: I285dbb79740cd434e2a899539c0ff5752105d159

6 years agoRemove unnecessery re-defininitions of BTA_AV constants
Pavlin Radoslavov [Fri, 17 Nov 2017 10:31:30 +0000 (02:31 -0800)]
Remove unnecessery re-defininitions of BTA_AV constants

* Remove unused BTA_AV_* re-defenitions
* Replace remaining BTA_AV_* constants with the corresponding
  AVRC_* sonstant

Test: Code compilation
Change-Id: I4c7a04738bf41e661da15f3a86ea36974c391adf

6 years agoMerge "Protect all SSR code with macro BTM_SSR_INCLUDED" am: 58a79cc41a am: d2c6280989
liuchao [Wed, 15 Nov 2017 18:50:54 +0000 (18:50 +0000)]
Merge "Protect all SSR code with macro BTM_SSR_INCLUDED" am: 58a79cc41a am: d2c6280989
am: 3ad9f9a805

Change-Id: Ic46bfcb65de1fa686803e3d1258e9c38f147efc0

6 years agoMerge "Change the connecting state to FALSE for BLE devices while releasing LCB"...
Albin Joy [Wed, 15 Nov 2017 18:50:18 +0000 (18:50 +0000)]
Merge "Change the connecting state to FALSE for BLE devices while releasing LCB" am: 4f1080146e am: 3b57129ade
am: c6825d2b83

Change-Id: I727f905ee54f42d5c4b7ac4fd926eb02ca427d85

6 years agoMerge "Protect all SSR code with macro BTM_SSR_INCLUDED" am: 58a79cc41a
liuchao [Wed, 15 Nov 2017 18:42:57 +0000 (18:42 +0000)]
Merge "Protect all SSR code with macro BTM_SSR_INCLUDED" am: 58a79cc41a
am: d2c6280989

Change-Id: I095bfe1c52750dd0e9e89882fed314fd501c5141

6 years agoMerge "Change the connecting state to FALSE for BLE devices while releasing LCB"...
Albin Joy [Wed, 15 Nov 2017 18:42:23 +0000 (18:42 +0000)]
Merge "Change the connecting state to FALSE for BLE devices while releasing LCB" am: 4f1080146e
am: 3b57129ade

Change-Id: I4a58c1f7d39de2be64c60376b60812b3a5ce461c

6 years agoMerge "Protect all SSR code with macro BTM_SSR_INCLUDED"
liuchao [Wed, 15 Nov 2017 18:18:49 +0000 (18:18 +0000)]
Merge "Protect all SSR code with macro BTM_SSR_INCLUDED"
am: 58a79cc41a

Change-Id: I3fdb666a7f1d6e44126a105fa321c4d40de8089b

6 years agoMerge "Change the connecting state to FALSE for BLE devices while releasing LCB"
Albin Joy [Wed, 15 Nov 2017 18:18:25 +0000 (18:18 +0000)]
Merge "Change the connecting state to FALSE for BLE devices while releasing LCB"
am: 4f1080146e

Change-Id: I06203a3c1611ac2e16c44a2d90fbbba7bd704f04

6 years agoMerge "Protect all SSR code with macro BTM_SSR_INCLUDED"
Treehugger Robot [Wed, 15 Nov 2017 14:18:04 +0000 (14:18 +0000)]
Merge "Protect all SSR code with macro BTM_SSR_INCLUDED"

6 years agoMerge "Change the connecting state to FALSE for BLE devices while releasing LCB"
Treehugger Robot [Wed, 15 Nov 2017 14:14:40 +0000 (14:14 +0000)]
Merge "Change the connecting state to FALSE for BLE devices while releasing LCB"

6 years agoMerge "Update the codec-related JNI calls to contain the remote Device address" am...
Pavlin Radoslavov [Wed, 15 Nov 2017 03:24:55 +0000 (03:24 +0000)]
Merge "Update the codec-related JNI calls to contain the remote Device address" am: d755fd7c3e am: eaf0bb38b0
am: 2e6a997000

Change-Id: I2794f7f2f98f2d5060f0a82c8b7aa49e0488776d

6 years agoMerge "Update the codec-related JNI calls to contain the remote Device address" am...
Pavlin Radoslavov [Wed, 15 Nov 2017 03:21:34 +0000 (03:21 +0000)]
Merge "Update the codec-related JNI calls to contain the remote Device address" am: d755fd7c3e
am: eaf0bb38b0

Change-Id: I2db55efcf3787df9dee913e91074ae1591a82693

6 years agoMerge "Update the codec-related JNI calls to contain the remote Device address"
Pavlin Radoslavov [Wed, 15 Nov 2017 03:19:33 +0000 (03:19 +0000)]
Merge "Update the codec-related JNI calls to contain the remote Device address"
am: d755fd7c3e

Change-Id: Ib51cd514015384128533545b3e69ec4ddefdd214

6 years agoMerge "Update the codec-related JNI calls to contain the remote Device address"
Treehugger Robot [Wed, 15 Nov 2017 03:14:28 +0000 (03:14 +0000)]
Merge "Update the codec-related JNI calls to contain the remote Device address"

6 years agoBLE: Continue after list_remove in btm_consolidate_dev am: f64e88ffb0 am: b241446195
Hemant Gupta [Wed, 15 Nov 2017 01:58:50 +0000 (01:58 +0000)]
BLE: Continue after list_remove in btm_consolidate_dev am: f64e88ffb0 am: b241446195
am: d34ff021da

Change-Id: Idafe959547a11bb2aae80a45ffbe9d74d642710b

6 years agoAVRCP: Use avrc_send_continue_frag for continuations am: f5d1aea3ea am: 8c0c1c0c10
Myles Watson [Wed, 15 Nov 2017 01:58:19 +0000 (01:58 +0000)]
AVRCP: Use avrc_send_continue_frag for continuations am: f5d1aea3ea am: 8c0c1c0c10
am: a84b98e477

Change-Id: I16f97c35fe21995bd17a623f76072e46309a6877

6 years agoBLE: Continue after list_remove in btm_consolidate_dev am: f64e88ffb0
Hemant Gupta [Wed, 15 Nov 2017 01:50:49 +0000 (01:50 +0000)]
BLE: Continue after list_remove in btm_consolidate_dev am: f64e88ffb0
am: b241446195

Change-Id: I98b520255f5baf84a0b653e64d050a0d716482bd

6 years agoBLE: Continue after list_remove in btm_consolidate_dev
Hemant Gupta [Wed, 15 Nov 2017 01:49:13 +0000 (01:49 +0000)]
BLE: Continue after list_remove in btm_consolidate_dev
am: f64e88ffb0

Change-Id: Iafefef1219378b6ee5de78464fd2e2d3a62655d3

6 years agoAVRCP: Use avrc_send_continue_frag for continuations am: f5d1aea3ea
Myles Watson [Wed, 15 Nov 2017 01:48:21 +0000 (01:48 +0000)]
AVRCP: Use avrc_send_continue_frag for continuations am: f5d1aea3ea
am: 8c0c1c0c10

Change-Id: I3cd34d7de8cc36926020a387b0df355a914bb36d

6 years agoMerge remote-tracking branch 'goog/stage-aosp-master' into HEAD
Xin Li [Wed, 15 Nov 2017 01:47:23 +0000 (01:47 +0000)]
Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD
am: 83f01b69a6

Change-Id: If67eaf4c7574ed764e80b13adf7d94c3231ef48a

6 years agoAVRCP: Use avrc_send_continue_frag for continuations
Myles Watson [Wed, 15 Nov 2017 01:36:03 +0000 (01:36 +0000)]
AVRCP: Use avrc_send_continue_frag for continuations
am: f5d1aea3ea

Change-Id: I484d7ffaae3822376c740390f5c717845e7c5ced

6 years agoUpdate the codec-related JNI calls to contain the remote Device address
Pavlin Radoslavov [Fri, 10 Nov 2017 03:30:58 +0000 (19:30 -0800)]
Update the codec-related JNI calls to contain the remote Device address

Also, normalize the order of the A2DP-related JNI callbacks to
list the remote device address first.

Bug: 68993365
Test: Manual - A2DP streaming to headset
Change-Id: I17fc9b0c23d6a1c26c99259bf391ba0a94988dd6

6 years agoMerge remote-tracking branch 'goog/stage-aosp-master' into HEAD
Xin Li [Wed, 15 Nov 2017 00:38:30 +0000 (16:38 -0800)]
Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD

Change-Id: I2ec761ede3888eb3cc2f89566b11aea0e721edbc

6 years agoChange the connecting state to FALSE for BLE devices while releasing LCB
Albin Joy [Mon, 7 Aug 2017 11:14:30 +0000 (19:14 +0800)]
Change the connecting state to FALSE for BLE devices while releasing LCB

To reconnect a paired BLE device, the connecting stage should change to
FALSE when LCB is releasing. BLE device should be in connectable state to
connect the device next time.

BUG: 64432592
Test: reconnecting a paired BLE mouse failed randomly
Change-Id: I2c9016a267c9f5cd10d1eb05751eceb6046fbdb5

6 years agoBLE: Continue after list_remove in btm_consolidate_dev
Hemant Gupta [Thu, 9 Nov 2017 06:59:10 +0000 (12:29 +0530)]
BLE: Continue after list_remove in btm_consolidate_dev

Since p_dev_rec gets freed in list_remove, it should not be
accessed again in the same iteration.

Test: Code Review

Bug: 69237299
Change-Id: If7b12cb02fed8f03079c77cf9ea7e773c80cb340

6 years agoProtect all SSR code with macro BTM_SSR_INCLUDED
liuchao [Mon, 9 Oct 2017 03:15:26 +0000 (11:15 +0800)]
Protect all SSR code with macro BTM_SSR_INCLUDED

All the source code for Sniff Subrating should be protected
with macro BTM_SSR_INCLUDED to avoid compilation issues.

BUG: 64428859
Test: Compilation
Change-Id: Ic774c8fcab1b6fc08428bc4573314e8895ca1a7d

6 years agoAVRCP: Use avrc_send_continue_frag for continuations
Myles Watson [Mon, 13 Nov 2017 22:21:00 +0000 (14:21 -0800)]
AVRCP: Use avrc_send_continue_frag for continuations

Bug: 36067328
Test: Manual test with Android Auto and long songs
Change-Id: I62059e421046ed94eedc1f2d942a337fb413d6d8

6 years agoMove connectSocket into IBluetoothSocketManager (1/3) am: 57715db8b2 am: e7d8dfb4f1
Jakub Pawlowski [Tue, 14 Nov 2017 11:14:38 +0000 (11:14 +0000)]
Move connectSocket into IBluetoothSocketManager (1/3) am: 57715db8b2 am: e7d8dfb4f1
am: 88b4be3e36  -s ours

Change-Id: Ibb4bbff92c8efac59e17dbbe1a714c3adc646443

6 years agoMove connectSocket into IBluetoothSocketManager (1/3) am: 57715db8b2
Jakub Pawlowski [Tue, 14 Nov 2017 01:23:28 +0000 (01:23 +0000)]
Move connectSocket into IBluetoothSocketManager (1/3) am: 57715db8b2
am: e7d8dfb4f1

Change-Id: I35bc407d3a5955b8d0096020e8b99ff0f77907f5

6 years agoMerge commit '5f8a48ef54edca3d6b920bffda508fbaa1cad942' into HEAD
Xin Li [Mon, 13 Nov 2017 22:36:02 +0000 (14:36 -0800)]
Merge commit '5f8a48ef54edca3d6b920bffda508fbaa1cad942' into HEAD

Change-Id: I0bf0223510820ebbc28bbc42c2d6f2431fe708dc

6 years agoMove connectSocket into IBluetoothSocketManager (1/3)
Jakub Pawlowski [Sat, 11 Nov 2017 00:22:38 +0000 (00:22 +0000)]
Move connectSocket into IBluetoothSocketManager (1/3)
am: 57715db8b2

Change-Id: I5de79f9fdf74f38393b772af4ff951c6b3da7dc5

6 years agoMove connectSocket into IBluetoothSocketManager (1/3)
Jakub Pawlowski [Mon, 6 Nov 2017 18:04:53 +0000 (10:04 -0800)]
Move connectSocket into IBluetoothSocketManager (1/3)

Bug: 68359837
Test: none
Change-Id: Ia2825e43036dcd50408987118e41c794f7b38d34
Merged-In: Ia2825e43036dcd50408987118e41c794f7b38d34

6 years agoMove connectSocket into IBluetoothSocketManager (1/3)
Jakub Pawlowski [Mon, 6 Nov 2017 18:04:53 +0000 (10:04 -0800)]
Move connectSocket into IBluetoothSocketManager (1/3)

Bug: 68359837
Test: none
Change-Id: Ia2825e43036dcd50408987118e41c794f7b38d34

6 years agoMove createSocketChannel into IBluetoothSocketManager (1/3) am: 8b1d805ea9 am: e187f139d9
Jakub Pawlowski [Fri, 10 Nov 2017 08:37:58 +0000 (08:37 +0000)]
Move createSocketChannel into IBluetoothSocketManager (1/3) am: 8b1d805ea9 am: e187f139d9
am: 024b5fd487

Change-Id: If8ecaa5c7f7c340ad60cb9a2ee2f5ce7a595d764

6 years agoMove createSocketChannel into IBluetoothSocketManager (1/3) am: 8b1d805ea9
Jakub Pawlowski [Fri, 10 Nov 2017 08:28:14 +0000 (08:28 +0000)]
Move createSocketChannel into IBluetoothSocketManager (1/3) am: 8b1d805ea9
am: e187f139d9

Change-Id: Iadb83e5eb9e37f7a5686a740ca8716e6c14ce84d

6 years agoMove createSocketChannel into IBluetoothSocketManager (1/3)
Jakub Pawlowski [Fri, 10 Nov 2017 08:22:16 +0000 (08:22 +0000)]
Move createSocketChannel into IBluetoothSocketManager (1/3)
am: 8b1d805ea9

Change-Id: I47bafdf91d82479df77459982c4c439192c41a74

6 years agoMove createSocketChannel into IBluetoothSocketManager (1/3)
Jakub Pawlowski [Sat, 4 Nov 2017 02:29:12 +0000 (19:29 -0700)]
Move createSocketChannel into IBluetoothSocketManager (1/3)

Bug: 68359837
Test: none
Change-Id: Id01e194a265633f26b76fcc542223f7caacfc255

6 years agoMerge changes from topics "parcel_uuid_and_fd_native", "bluetooth_socket_manager_nati...
Jakub Pawlowski [Thu, 9 Nov 2017 23:35:50 +0000 (23:35 +0000)]
Merge changes from topics "parcel_uuid_and_fd_native", "bluetooth_socket_manager_native" am: ba0ad409f9 am: c82ac8affe
am: cb259f6ce1

Change-Id: I8d9d3d27e2c34919600a4a1a365826ebc3386f42

6 years agoBT: Use static lock to avoid race while cleanup am: f5047f42c4 am: 5eb507852e
Gurpreet Ghai [Thu, 9 Nov 2017 23:35:22 +0000 (23:35 +0000)]
BT: Use static lock to avoid race while cleanup am: f5047f42c4 am: 5eb507852e
am: 4a86d62883

Change-Id: Ie2711d8f830f7bf618852166af154defe13bb053

6 years agoFix BTM callbacks so callee and caller types match am: 325abcfa4a am: d102e89ab6
Vishwath Mohan [Thu, 9 Nov 2017 23:34:55 +0000 (23:34 +0000)]
Fix BTM callbacks so callee and caller types match am: 325abcfa4a am: d102e89ab6
am: a519a03917

Change-Id: I13efd13553fb6ec86228df1ca06b59df62358a71

6 years agoMerge changes from topics "parcel_uuid_and_fd_native", "bluetooth_socket_manager_nati...
Jakub Pawlowski [Thu, 9 Nov 2017 22:57:56 +0000 (22:57 +0000)]
Merge changes from topics "parcel_uuid_and_fd_native", "bluetooth_socket_manager_native" am: ba0ad409f9
am: c82ac8affe

Change-Id: I28e463a68a19d6a39ee105807913320b294c1b31

6 years agoBT: Use static lock to avoid race while cleanup am: f5047f42c4
Gurpreet Ghai [Thu, 9 Nov 2017 22:33:28 +0000 (22:33 +0000)]
BT: Use static lock to avoid race while cleanup am: f5047f42c4
am: 5eb507852e

Change-Id: I2d71eb7edd3d42a78226ebbdb69fc0b76cac267c

6 years agoMerge changes from topics "parcel_uuid_and_fd_native", "bluetooth_socket_manager_native"
Jakub Pawlowski [Thu, 9 Nov 2017 22:20:55 +0000 (22:20 +0000)]
Merge changes from topics "parcel_uuid_and_fd_native", "bluetooth_socket_manager_native"
am: ba0ad409f9

Change-Id: Icdae1e38689fb8f685a441083074386303a06e7a

6 years agoBT: Use static lock to avoid race while cleanup
Gurpreet Ghai [Thu, 9 Nov 2017 22:18:28 +0000 (22:18 +0000)]
BT: Use static lock to avoid race while cleanup
am: f5047f42c4

Change-Id: I2df125f8bdf3105ef17b317fab881a4777ef9421

6 years agoMerge changes from topics "parcel_uuid_and_fd_native", "bluetooth_socket_manager_native"
Jakub Pawlowski [Thu, 9 Nov 2017 22:11:38 +0000 (22:11 +0000)]
Merge changes from topics "parcel_uuid_and_fd_native", "bluetooth_socket_manager_native"

* changes:
  Make ParcelUuid and ParcelFileDescriptor accesible to native Binder (1/2)
  Add IBluetoothSocketManager (1/3)

6 years agoBT: Use static lock to avoid race while cleanup
Gurpreet Ghai [Sun, 20 Aug 2017 08:52:27 +0000 (14:22 +0530)]
BT: Use static lock to avoid race while cleanup

Problem:
The functions protected by mutex lock are called after cleanup
during shutdown. During this race condition, the structure set does not
exist and cause crash.

Steps:
Bluetooth on/off automation

Failure:
Bluetooth process crashes

RootCause:
Mutex is accessed after it is destroyed because of other thread calling
the function.

Fix:
Changed mutex lock to static type so that it exist and protect
the set structure even after cleanup.

Test: manual

Bug: 66921327

Change-Id: I8d1f5d5d607100ab73aec722a27688dae45cc323

6 years agoMake ParcelUuid and ParcelFileDescriptor accesible to native Binder (1/2)
Jakub Pawlowski [Wed, 1 Nov 2017 21:31:03 +0000 (14:31 -0700)]
Make ParcelUuid and ParcelFileDescriptor accesible to native Binder (1/2)

Bug: 68359837
Test: compile
Change-Id: I9d5fc0684b0e8aefd3f3c1abe865d0d36cb712fb

6 years agoAdd IBluetoothSocketManager (1/3)
Jakub Pawlowski [Wed, 1 Nov 2017 17:02:28 +0000 (10:02 -0700)]
Add IBluetoothSocketManager (1/3)

Add IBluetoothSocketManager native Binder implementation. Thanks to it
we'll skip jni to native calls, and need to re-serialize data manually.

Bug: 68359837
Test: none
Change-Id: If0270ddc71df724e0ee25d6fb66d89b72aa3b160

6 years agoFix BTM callbacks so callee and caller types match am: 325abcfa4a
Vishwath Mohan [Thu, 9 Nov 2017 19:42:47 +0000 (19:42 +0000)]
Fix BTM callbacks so callee and caller types match am: 325abcfa4a
am: d102e89ab6

Change-Id: I58935856357b334f716b109ee4b933d62e5193ba

6 years agoFix BTM callbacks so callee and caller types match
Vishwath Mohan [Thu, 9 Nov 2017 18:58:22 +0000 (18:58 +0000)]
Fix BTM callbacks so callee and caller types match
am: 325abcfa4a

Change-Id: I9991e0c6b972f43271a6db681844a90e9decbd28

6 years agoFix BTM callbacks so callee and caller types match
Vishwath Mohan [Thu, 9 Nov 2017 06:45:47 +0000 (22:45 -0800)]
Fix BTM callbacks so callee and caller types match

This CL fixes inconsistencies between the actual type of a callback
function, and the type assumed at the call site. This respects the
intended function signature.

For P, we plan to enable control-flow integrity (CFI) across multiple
platform components, including BT. This mismatch will break CFI and
cause runtime errors when enabled - so this is also a preemptive
measure to get BT compatible in preparation.

Bug: 30227045
Test: Builds and runs without errors when CFI is enabled.
Change-Id: I8970e6866d8b37a9adf5e040db993d30f1b5103a

6 years agoPrevent deadlock between the Tx and Rx threads in HCI layer am: eb993d97b7 am: e1c05e56a6
Luke Zhang [Tue, 7 Nov 2017 20:24:39 +0000 (20:24 +0000)]
Prevent deadlock between the Tx and Rx threads in HCI layer am: eb993d97b7 am: e1c05e56a6
am: 2068b41611

Change-Id: I813836577f6d53621922e9250c01637349ee57fd

6 years agoPrevent deadlock between the Tx and Rx threads in HCI layer am: eb993d97b7
Luke Zhang [Tue, 7 Nov 2017 20:22:44 +0000 (20:22 +0000)]
Prevent deadlock between the Tx and Rx threads in HCI layer am: eb993d97b7
am: e1c05e56a6

Change-Id: I00bcb3a6b41e59fd79ad71e1c17ded313dcb2ce5

6 years agoPrevent deadlock between the Tx and Rx threads in HCI layer
Luke Zhang [Tue, 7 Nov 2017 20:19:46 +0000 (20:19 +0000)]
Prevent deadlock between the Tx and Rx threads in HCI layer
am: eb993d97b7

Change-Id: I1e0bd0b9a6d29baf4ec3367dd1a77a4f047d6a56

6 years agoPrevent deadlock between the Tx and Rx threads in HCI layer
Luke Zhang [Wed, 27 Sep 2017 18:40:22 +0000 (11:40 -0700)]
Prevent deadlock between the Tx and Rx threads in HCI layer

Problem: Deadlock between HCI layer's Tx and Rx threads.

Cause: In HCI layer, both Tx and Rx tried to acquire
commands_pending_response_mutex simultaneously.
Since there may be a handshake between Tx and Rx
in the BT Transport layer, so it caused a deadlock between
HCI layer's Tx and Rx threads.

Fix: Fixed it by decreasing the scope of this mutex in Tx thread

Test: Simulated the deadlock sitaution and ensured RX thread is returned when TX is busy in binder.

Bug: 68305277
Change-Id: I0a2434ec24918b039a6993d57e68ac7495e31cbe

6 years agoRemove executable file mode bit from source code files am: e19e9128f3 am: d14737ee86
Pavlin Radoslavov [Mon, 6 Nov 2017 21:25:42 +0000 (21:25 +0000)]
Remove executable file mode bit from source code files am: e19e9128f3 am: d14737ee86
am: 4e705d6211

Change-Id: I0dc23229513a8d7501f1a2c5d1d965c0baa2f102

6 years agoRemove executable file mode bit from source code files am: e19e9128f3
Pavlin Radoslavov [Mon, 6 Nov 2017 21:22:14 +0000 (21:22 +0000)]
Remove executable file mode bit from source code files am: e19e9128f3
am: d14737ee86

Change-Id: I73c291278b12963d78eae7dd8017a79c5148b06c

6 years agoRemove executable file mode bit from source code files
Pavlin Radoslavov [Mon, 6 Nov 2017 21:20:19 +0000 (21:20 +0000)]
Remove executable file mode bit from source code files
am: e19e9128f3

Change-Id: I35e3892413d103062c0b58be899feb690497e861

6 years agoRemove executable file mode bit from source code files
Pavlin Radoslavov [Mon, 6 Nov 2017 19:23:05 +0000 (11:23 -0800)]
Remove executable file mode bit from source code files

Test: Code compilation
Change-Id: I0933efbccfb066913eda05daa414a67b4fe3efba

6 years agoAdd libbluetooth-for-tests static library am: 4aecb8934b am: 9c6fe69d17
Pavlin Radoslavov [Fri, 3 Nov 2017 02:23:34 +0000 (02:23 +0000)]
Add libbluetooth-for-tests static library am: 4aecb8934b am: 9c6fe69d17
am: 396bb2d960

Change-Id: I87aa038c5cf5d9f03a35abf867c2717d30ee965d

6 years agoRevert "btif: Simplify dependencies for btif_storage_test" am: ee17583892 am: 1cc3aa19f9
Myles Watson [Fri, 3 Nov 2017 02:23:24 +0000 (02:23 +0000)]
Revert "btif: Simplify dependencies for btif_storage_test" am: ee17583892 am: 1cc3aa19f9
am: 0a83af61a2

Change-Id: If4c4f727c1419f749ddcd9aa764cc2e517f5ba93

6 years agoAdd libbluetooth-for-tests static library am: 4aecb8934b
Pavlin Radoslavov [Fri, 3 Nov 2017 02:09:46 +0000 (02:09 +0000)]
Add libbluetooth-for-tests static library am: 4aecb8934b
am: 9c6fe69d17

Change-Id: I8a0dcde8b52c95ce7ade4dc6c250496edcf25626

6 years agoRevert "btif: Simplify dependencies for btif_storage_test" am: ee17583892
Myles Watson [Fri, 3 Nov 2017 02:09:39 +0000 (02:09 +0000)]
Revert "btif: Simplify dependencies for btif_storage_test" am: ee17583892
am: 1cc3aa19f9

Change-Id: I8a07d72b1253aa50248b58bec4c0bb5e1950702d

6 years agoAdd libbluetooth-for-tests static library
Pavlin Radoslavov [Fri, 3 Nov 2017 02:01:49 +0000 (02:01 +0000)]
Add libbluetooth-for-tests static library
am: 4aecb8934b

Change-Id: Icdcfa0503b9c17ef594e404c2993b896f18fd5ab

6 years agoRevert "btif: Simplify dependencies for btif_storage_test"
Myles Watson [Fri, 3 Nov 2017 02:01:39 +0000 (02:01 +0000)]
Revert "btif: Simplify dependencies for btif_storage_test"
am: ee17583892

Change-Id: If5983e534e12d27e5b32acc7d0999217b6210d77

6 years agoAdd libbluetooth-for-tests static library
Pavlin Radoslavov [Thu, 2 Nov 2017 21:27:09 +0000 (14:27 -0700)]
Add libbluetooth-for-tests static library

Add the most common dependencies to a static library
for building tests.

Bug: 68350333
Test: lunch gce_x86_pasan;
      SANITIZE_TARGET="address coverage" mma

Change-Id: I78e65a686873565d292ea0ad89047927ca6efb87

6 years agoRevert "btif: Simplify dependencies for btif_storage_test"
Myles Watson [Thu, 2 Nov 2017 21:47:20 +0000 (21:47 +0000)]
Revert "btif: Simplify dependencies for btif_storage_test"

This reverts commit c9026a03f4bf225ade0cb79e51385acb1201ba07.

Change-Id: Ie7527e8042d13cabd692a6929d902bc1efe009b6

6 years agoDon't notify legacy advertiser in master role. am: 874ef327d4 am: f77eb777c2
Jakub Pawlowski [Wed, 1 Nov 2017 23:47:17 +0000 (23:47 +0000)]
Don't notify legacy advertiser in master role. am: 874ef327d4 am: f77eb777c2
am: e957d42018

Change-Id: Ica6488c9cdf8aafb17148a6ed4983e2f8e24b647

6 years agoDon't notify legacy advertiser in master role. am: 874ef327d4
Jakub Pawlowski [Wed, 1 Nov 2017 23:40:58 +0000 (23:40 +0000)]
Don't notify legacy advertiser in master role. am: 874ef327d4
am: f77eb777c2

Change-Id: I09f32feb56da2ff94d1140bfbb2829a58e2dba5e

6 years agoDon't notify legacy advertiser in master role.
Jakub Pawlowski [Wed, 1 Nov 2017 23:35:56 +0000 (23:35 +0000)]
Don't notify legacy advertiser in master role.
am: 874ef327d4

Change-Id: I7aaa97fb72abd91d332418e07ac21e56529143bc

6 years agoDon't notify legacy advertiser in master role.
Jakub Pawlowski [Wed, 1 Nov 2017 21:03:39 +0000 (14:03 -0700)]
Don't notify legacy advertiser in master role.

Legacy advertiser should be notified about connection success only
if we're the slave of connection.

Bug: 68712406
Test: bonding with device while using legacy advertising
Change-Id: I4790fb9c8a4f58ea76f6b28fd5384479f2fee0d8

6 years agoMerge "btif: Simplify dependencies for btif_storage_test" am: a413084c84 am: e72d963d2b
Myles Watson [Wed, 1 Nov 2017 01:58:30 +0000 (01:58 +0000)]
Merge "btif: Simplify dependencies for btif_storage_test" am: a413084c84 am: e72d963d2b
am: 7fe62a658f

Change-Id: Ic6c90fcde56624446c1624ae1382de32bcd03e6a

6 years agoMerge changes I7a3e9ee7,I29702219 am: 4929fa2ecb am: f9270f960e
Jakub Pawlowski [Wed, 1 Nov 2017 01:57:54 +0000 (01:57 +0000)]
Merge changes I7a3e9ee7,I29702219 am: 4929fa2ecb am: f9270f960e
am: 2ca59c402a

Change-Id: I0878a82e684e3fa820682a9888ea7da04d856a95

6 years agoMerge "btif: Simplify dependencies for btif_storage_test" am: a413084c84
Myles Watson [Tue, 31 Oct 2017 23:19:26 +0000 (23:19 +0000)]
Merge "btif: Simplify dependencies for btif_storage_test" am: a413084c84
am: e72d963d2b

Change-Id: I09925d538168c487c13e94609a5e3f3b59966d75

6 years agoMerge changes I7a3e9ee7,I29702219 am: 4929fa2ecb
Jakub Pawlowski [Tue, 31 Oct 2017 23:18:58 +0000 (23:18 +0000)]
Merge changes I7a3e9ee7,I29702219 am: 4929fa2ecb
am: f9270f960e

Change-Id: Ie4108e9cfe117f47f1625ff9d83a96649de9a169

6 years agoMerge "btif: Simplify dependencies for btif_storage_test"
Myles Watson [Tue, 31 Oct 2017 22:37:44 +0000 (22:37 +0000)]
Merge "btif: Simplify dependencies for btif_storage_test"
am: a413084c84

Change-Id: I93c662dc789b7dac6f404d0653a902db8fbd8013

6 years agoMerge "btif: Simplify dependencies for btif_storage_test"
Treehugger Robot [Tue, 31 Oct 2017 22:12:05 +0000 (22:12 +0000)]
Merge "btif: Simplify dependencies for btif_storage_test"

6 years agoMerge changes I7a3e9ee7,I29702219
Jakub Pawlowski [Tue, 31 Oct 2017 22:00:22 +0000 (22:00 +0000)]
Merge changes I7a3e9ee7,I29702219
am: 4929fa2ecb

Change-Id: I3dae9559ce9434bdc266d45c2dda702fe15499ca

6 years agoMerge changes I7a3e9ee7,I29702219
Jakub Pawlowski [Tue, 31 Oct 2017 21:01:11 +0000 (21:01 +0000)]
Merge changes I7a3e9ee7,I29702219

* changes:
  Remove dead code - dump_bin
  Assert on null callback in BTA_JvL2capConnect and BTA_JvL2capConnectLE

6 years agobtif: Simplify dependencies for btif_storage_test
Myles Watson [Mon, 30 Oct 2017 23:00:56 +0000 (16:00 -0700)]
btif: Simplify dependencies for btif_storage_test

Bug: 68350333
Test: lunch gce_x86_pasan;
      SANITIZE_TARGET="address coverage" m net_test_btif

Change-Id: Ia87a4e3d224fcd7ddfa55bdcca391f9b262d50e5

6 years agoMerge "Add a workaround to play A2DP SBC Mono" am: 9e2b73f574 am: f0ffbd3df9
Pavlin Radoslavov [Tue, 31 Oct 2017 19:38:54 +0000 (19:38 +0000)]
Merge "Add a workaround to play A2DP SBC Mono" am: 9e2b73f574 am: f0ffbd3df9
am: c941226205

Change-Id: Ie8aa39286e470046f8be0c3c9a92f2788972c79d

6 years agoMerge "Add a workaround to play A2DP SBC Mono" am: 9e2b73f574
Pavlin Radoslavov [Tue, 31 Oct 2017 19:33:29 +0000 (19:33 +0000)]
Merge "Add a workaround to play A2DP SBC Mono" am: 9e2b73f574
am: f0ffbd3df9

Change-Id: I70af738a24906145c7a1857f17d5eef834a1d949

6 years agoMerge "Add a workaround to play A2DP SBC Mono"
Pavlin Radoslavov [Tue, 31 Oct 2017 19:31:28 +0000 (19:31 +0000)]
Merge "Add a workaround to play A2DP SBC Mono"
am: 9e2b73f574

Change-Id: I2c0f6656e6e10dcfe6f97201f8744236951b0789

6 years agoMerge "Add a workaround to play A2DP SBC Mono"
Treehugger Robot [Tue, 31 Oct 2017 19:25:40 +0000 (19:25 +0000)]
Merge "Add a workaround to play A2DP SBC Mono"

6 years agoAdd a workaround to play A2DP SBC Mono
Pavlin Radoslavov [Sun, 29 Oct 2017 18:35:22 +0000 (11:35 -0700)]
Add a workaround to play A2DP SBC Mono

The PCM audio is pulled as STEREO and mixed into MONO by the
Audio A2DP HAL.

Test: Playing SBC mono with Headset
Bug: 67763743
Change-Id: I2710a6633dd81c6917362ed6dd4af75a8d517b0a

6 years agoFix Bluetooth crash when pairing with 8th HOGP device am: 2e3c3d7829 am: f455d41d2d
Ruina Liu [Tue, 31 Oct 2017 16:12:15 +0000 (16:12 +0000)]
Fix Bluetooth crash when pairing with 8th HOGP device am: 2e3c3d7829 am: f455d41d2d
am: ac91b4ba55

Change-Id: I6eb950cf89357d7b540d25df2f63a14c9ca24b68

6 years agoFix Bluetooth crash when pairing with 8th HOGP device am: 2e3c3d7829
Ruina Liu [Tue, 31 Oct 2017 16:10:13 +0000 (16:10 +0000)]
Fix Bluetooth crash when pairing with 8th HOGP device am: 2e3c3d7829
am: f455d41d2d

Change-Id: I9e3e0d09a9e266e5a21acf3ea8ce891416d1237c

6 years agoFix Bluetooth crash when pairing with 8th HOGP device
Ruina Liu [Tue, 31 Oct 2017 16:05:46 +0000 (16:05 +0000)]
Fix Bluetooth crash when pairing with 8th HOGP device
am: 2e3c3d7829

Change-Id: I15f10e1135f54425643f0f3dc5606d61d342d157

6 years agoFix Bluetooth crash when pairing with 8th HOGP device
Ruina Liu [Mon, 11 Sep 2017 08:28:21 +0000 (16:28 +0800)]
Fix Bluetooth crash when pairing with 8th HOGP device

In function bta_hh_hdl_event, when handling with
the event of BTA_HH_API_GET_DSCP_EVT after bonded
with 8th HOGP device, no correct p_cb will be found,
due to mapping error between the device handle and
dev cb for HOGP. Then NPE happen.
Change to map le_cb_index into the device handle for
HOGP, so that HOGP and HID can be separately maintained
maximum to 14 device

Test: Pair with 14 HOGP devices
Change-Id: I8556f1ffea160862c2e52f874ef334f68c17050e