OSDN Git Service

android-x86/system-bt.git
6 years agoMerge "Add bounds check to l2cble_process_sig_cmd L2CAP_CMD_DISC_REQ" into oc-dev...
Ajay Panicker [Mon, 14 May 2018 18:27:46 +0000 (11:27 -0700)]
Merge "Add bounds check to l2cble_process_sig_cmd L2CAP_CMD_DISC_REQ" into oc-dev am: 89c77dff32 am: 992d901683 am: 3c6d9aef37
am: 0b97de9ce3

Change-Id: If3524205f1dd794ff3856c694b4c23bcc1db2ecc

6 years agoMerge "Add bounds check to l2cble_process_sig_cmd L2CAP_CMD_DISC_REQ" into oc-dev...
Ajay Panicker [Mon, 14 May 2018 18:19:40 +0000 (11:19 -0700)]
Merge "Add bounds check to l2cble_process_sig_cmd L2CAP_CMD_DISC_REQ" into oc-dev am: 89c77dff32 am: 992d901683
am: 3c6d9aef37

Change-Id: I83ccedc2c4a6e36e66c0b398db8e2578e3c379a6

6 years agoMerge "Add bounds check to l2cble_process_sig_cmd L2CAP_CMD_DISC_REQ" into oc-dev...
Ajay Panicker [Mon, 14 May 2018 18:15:08 +0000 (11:15 -0700)]
Merge "Add bounds check to l2cble_process_sig_cmd L2CAP_CMD_DISC_REQ" into oc-dev am: 89c77dff32
am: 992d901683

Change-Id: I4822314170228bc6df8d3b60f7ee04ea4fa7c5c2

6 years agoMerge "Add bounds check to l2cble_process_sig_cmd L2CAP_CMD_DISC_REQ" into oc-dev
Ajay Panicker [Mon, 14 May 2018 18:11:06 +0000 (11:11 -0700)]
Merge "Add bounds check to l2cble_process_sig_cmd L2CAP_CMD_DISC_REQ" into oc-dev
am: 89c77dff32

Change-Id: I50263727a1020e77133f92938f6ecf0770eef14f

6 years agoMerge "Add bounds check to l2cble_process_sig_cmd L2CAP_CMD_DISC_REQ" into oc-dev
Ajay Panicker [Mon, 14 May 2018 18:01:38 +0000 (18:01 +0000)]
Merge "Add bounds check to l2cble_process_sig_cmd L2CAP_CMD_DISC_REQ" into oc-dev

6 years agoMerge "Add bound check for AVRC_EVT_APP_SETTING_CHANGE" into pi-dev
Hansong Zhang [Fri, 11 May 2018 23:50:39 +0000 (16:50 -0700)]
Merge "Add bound check for AVRC_EVT_APP_SETTING_CHANGE" into pi-dev
am: 0519b056fa

Change-Id: Ief02232be4c8c8992395a21a931284ebdc30fd07

6 years agoMerge "Add bound check for AVRC_EVT_APP_SETTING_CHANGE" into pi-dev
TreeHugger Robot [Fri, 11 May 2018 23:30:55 +0000 (23:30 +0000)]
Merge "Add bound check for AVRC_EVT_APP_SETTING_CHANGE" into pi-dev

6 years ago[automerger skipped] Merge "Explicitly restart audio processing when switching active...
Pavlin Radoslavov [Fri, 11 May 2018 23:28:38 +0000 (16:28 -0700)]
[automerger skipped] Merge "Explicitly restart audio processing when switching active device" into pi-dev
am: 2a8c2b2cd9  -s ours

Change-Id: If2c8879b3e41abcba0e9a0619ef24ba73b106658

6 years agoMerge "Explicitly restart audio processing when switching active device" into pi-dev
TreeHugger Robot [Fri, 11 May 2018 23:16:03 +0000 (23:16 +0000)]
Merge "Explicitly restart audio processing when switching active device" into pi-dev

6 years ago[automerger skipped] Merge "DO NOT MERGE: Check number of attributes before writing...
Ajay Panicker [Fri, 11 May 2018 23:15:42 +0000 (16:15 -0700)]
[automerger skipped] Merge "DO NOT MERGE: Check number of attributes before writing to a buffer" into oc-dev am: 2f9f6adfed am: aded757078 am: 4a6c4b0c64  -s ours
am: bb23eb3daf

Change-Id: I1d3a9f2c40c9df267b7adf2f47e8fb5ddc4ce3c7

6 years ago[automerger skipped] Merge "DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTI...
Hansong Zhang [Fri, 11 May 2018 23:13:58 +0000 (16:13 -0700)]
[automerger skipped] Merge "DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE" into oc-dev am: cf48e73715 am: 1fc8fe3b9f am: 3e207131ab  -s ours
am: b95cde5279

Change-Id: I35f1a284e7634d67fc974baf810972bf37f7a78d

6 years ago[automerger skipped] [automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP...
Hansong Zhang [Fri, 11 May 2018 23:11:56 +0000 (16:11 -0700)]
[automerger skipped] [automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am: 9ca8320100 am: e621790539 am: 26881fbd81 am: 90f604c087 skipped: 5ab83c7a00 am: e719eb2c4f am: f7ecdd2915 am: 9b5b26bc63  -s ours
am: 8f9b688f61

Change-Id: I11af46cc0496ea6bf8342d7e93e1f29cca219806

6 years ago[automerger skipped] Merge "DO NOT MERGE: Check number of attributes before writing...
Ajay Panicker [Fri, 11 May 2018 22:45:35 +0000 (15:45 -0700)]
[automerger skipped] Merge "DO NOT MERGE: Check number of attributes before writing to a buffer" into oc-dev am: 2f9f6adfed am: aded757078
am: 4a6c4b0c64  -s ours

Change-Id: I979219abffdf2fa7e851dcc326931c1c25d219fa

6 years ago[automerger skipped] Merge "DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTI...
Hansong Zhang [Fri, 11 May 2018 22:45:23 +0000 (15:45 -0700)]
[automerger skipped] Merge "DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE" into oc-dev am: cf48e73715 am: 1fc8fe3b9f
am: 3e207131ab  -s ours

Change-Id: Iea5616f8aa43080304bdc30dd1543f2c2930401b

6 years ago[automerger skipped] [automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP...
Hansong Zhang [Fri, 11 May 2018 22:45:05 +0000 (15:45 -0700)]
[automerger skipped] [automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am: 9ca8320100 am: e621790539 am: 26881fbd81 am: 90f604c087 skipped: 5ab83c7a00 am: e719eb2c4f am: f7ecdd2915
am: 9b5b26bc63  -s ours

Change-Id: Ie3d309838be405e0c800a235861a7862d99cf230

6 years agoMerge "DO NOT MERGE: Check number of attributes before writing to a buffer" into...
Ajay Panicker [Fri, 11 May 2018 22:41:24 +0000 (15:41 -0700)]
Merge "DO NOT MERGE: Check number of attributes before writing to a buffer" into oc-dev am: 2f9f6adfed
am: aded757078

Change-Id: I4ec111d45f8e76aef0095dbf2051b4c3e1f43c5a

6 years agoMerge "DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE" into oc...
Hansong Zhang [Fri, 11 May 2018 22:41:03 +0000 (15:41 -0700)]
Merge "DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE" into oc-dev am: cf48e73715
am: 1fc8fe3b9f

Change-Id: I4ed11e20c3815108510e9d84a6afeda583254613

6 years ago[automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am...
Hansong Zhang [Fri, 11 May 2018 22:40:42 +0000 (15:40 -0700)]
[automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am: 9ca8320100 am: e621790539 am: 26881fbd81 am: 90f604c087 skipped: 5ab83c7a00 am: e719eb2c4f
am: f7ecdd2915

Change-Id: Iaf1eada64bbf87ce545d4d0a975041b51bfb911e

6 years agoMerge "DO NOT MERGE: Check number of attributes before writing to a buffer" into...
Ajay Panicker [Fri, 11 May 2018 22:37:23 +0000 (15:37 -0700)]
Merge "DO NOT MERGE: Check number of attributes before writing to a buffer" into oc-dev
am: 2f9f6adfed

Change-Id: Ic6cfdf0368ff5b55a0cc0a4a41b006947d520cd4

6 years agoMerge "DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE" into oc-dev
Hansong Zhang [Fri, 11 May 2018 22:37:00 +0000 (15:37 -0700)]
Merge "DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE" into oc-dev
am: cf48e73715

Change-Id: Ie3b83f993975a6ac532072c774a3ca6c0d0b5272

6 years ago[automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am...
Hansong Zhang [Fri, 11 May 2018 22:36:38 +0000 (15:36 -0700)]
[automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am: 9ca8320100 am: e621790539 am: 26881fbd81 am: 90f604c087 skipped: 5ab83c7a00
am: e719eb2c4f

Change-Id: I4626e6077542b983e7b6c8ba40d58f462fc215bb

6 years agoMerge "DO NOT MERGE: Check number of attributes before writing to a buffer" into...
TreeHugger Robot [Fri, 11 May 2018 22:26:01 +0000 (22:26 +0000)]
Merge "DO NOT MERGE: Check number of attributes before writing to a buffer" into oc-dev

6 years agoMerge "DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE" into oc-dev
TreeHugger Robot [Fri, 11 May 2018 22:24:23 +0000 (22:24 +0000)]
Merge "DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE" into oc-dev

6 years agoMerge "HFP: Workaround for car kits that do not send AT+BAC command" am: 7b958f6ea7
Jack He [Fri, 11 May 2018 22:10:35 +0000 (15:10 -0700)]
Merge "HFP: Workaround for car kits that do not send AT+BAC command" am: 7b958f6ea7
am: 191a9f5e42

Change-Id: I855dcc28472cc7922340c8f9a084c85ab1687e03

6 years agoMerge "HFP: Workaround for car kits that do not send AT+BAC command"
Jack He [Fri, 11 May 2018 22:07:00 +0000 (15:07 -0700)]
Merge "HFP: Workaround for car kits that do not send AT+BAC command"
am: 7b958f6ea7

Change-Id: Ibb8634a3c9b01911825bb7a07a29fb02e95bf5ed

6 years agoMerge "HFP: Workaround for car kits that do not send AT+BAC command" into pi-dev
Jack He [Fri, 11 May 2018 21:57:07 +0000 (14:57 -0700)]
Merge "HFP: Workaround for car kits that do not send AT+BAC command" into pi-dev
am: 1cce9baf77

Change-Id: I11baf8fdb6ad2e35e178e0f22488d4d44875cd98

6 years agoMerge "Hearing Aid: Add dumpsys log for audio packet" into pi-dev
Hansong Zhang [Fri, 11 May 2018 21:56:45 +0000 (14:56 -0700)]
Merge "Hearing Aid: Add dumpsys log for audio packet" into pi-dev
am: be96a9ed5d

Change-Id: I1dfdd4c70959056e41126bdad24aa4bfe06892d8

6 years agoMerge "bta: Only call get_acl_data_size_ble for LE" into pi-dev
Myles Watson [Fri, 11 May 2018 21:56:19 +0000 (14:56 -0700)]
Merge "bta: Only call get_acl_data_size_ble for LE" into pi-dev
am: efb1f12e8d

Change-Id: Ieec5d20bc3b86e8a02e6e1f558970cbb8e31f617

6 years agoMerge "BTM_BleClearBgConnDev: Return if there is no BLE" into pi-dev
Myles Watson [Fri, 11 May 2018 21:55:43 +0000 (14:55 -0700)]
Merge "BTM_BleClearBgConnDev: Return if there is no BLE" into pi-dev
am: 0cf31d8e1c

Change-Id: Iccc74f66822cc4778c225b8cb0c6ea993deb2610

6 years agoMerge "Return early if vendor-specific command fails" into pi-dev
Myles Watson [Fri, 11 May 2018 21:54:41 +0000 (14:54 -0700)]
Merge "Return early if vendor-specific command fails" into pi-dev
am: 377a95993b

Change-Id: I53e95f39f6021048a383b286785f00edc9d9b40b

6 years agoMerge "HFP: Workaround for car kits that do not send AT+BAC command"
Treehugger Robot [Fri, 11 May 2018 21:53:02 +0000 (21:53 +0000)]
Merge "HFP: Workaround for car kits that do not send AT+BAC command"

6 years agoMerge "HFP: Workaround for car kits that do not send AT+BAC command" into pi-dev
TreeHugger Robot [Fri, 11 May 2018 21:52:53 +0000 (21:52 +0000)]
Merge "HFP: Workaround for car kits that do not send AT+BAC command" into pi-dev

6 years agoMerge "Hearing Aid: Add dumpsys log for audio packet" into pi-dev
TreeHugger Robot [Fri, 11 May 2018 21:47:23 +0000 (21:47 +0000)]
Merge "Hearing Aid: Add dumpsys log for audio packet" into pi-dev

6 years agoMerge "bta: Only call get_acl_data_size_ble for LE" into pi-dev
TreeHugger Robot [Fri, 11 May 2018 21:46:26 +0000 (21:46 +0000)]
Merge "bta: Only call get_acl_data_size_ble for LE" into pi-dev

6 years agoMerge "BTM_BleClearBgConnDev: Return if there is no BLE" into pi-dev
TreeHugger Robot [Fri, 11 May 2018 21:46:23 +0000 (21:46 +0000)]
Merge "BTM_BleClearBgConnDev: Return if there is no BLE" into pi-dev

6 years agoMerge "Return early if vendor-specific command fails" into pi-dev
TreeHugger Robot [Fri, 11 May 2018 21:46:20 +0000 (21:46 +0000)]
Merge "Return early if vendor-specific command fails" into pi-dev

6 years agoExplicitly restart audio processing when switching active device
Pavlin Radoslavov [Thu, 10 May 2018 16:52:58 +0000 (09:52 -0700)]
Explicitly restart audio processing when switching active device

* Add internal APIs to restart A2DP session and use them
  when switching the A2DP active device:
  btif_a2dp_source_restart_session() and btif_a2dp_sink_restart_session() .
* Removed internal A2DP Source APIs that shouldn't be APIs
* Call immediately btif_a2dp_on_stopped() when processing
  BTIF_AV_STOP_STREAM_REQ_EVT event to stop sooner the audio
  datapath processing and report back to the Audio HAL call.
  This eliminates the need for waiting for the BTA_AV_STOP_EVT
  upcall event from the remote device.
* Added extra log information when processing events in the BtifAv
  state machine.

Bug: 78360113
Test: Manual: streaming A2DP, change active device, change codec setup.
Change-Id: Icb356587af9cfaee7aea9f3f9bc95a0fe000fc52
Merged-In: Icb356587af9cfaee7aea9f3f9bc95a0fe000fc52
(cherry picked from commit c7a5e6038a1c01de1a2219659f999e91003af598)

6 years agoMerge "Explicitly restart audio processing when switching active device" am: 2ffc9901cb
Pavlin Radoslavov [Fri, 11 May 2018 21:18:17 +0000 (14:18 -0700)]
Merge "Explicitly restart audio processing when switching active device" am: 2ffc9901cb
am: acbde8a6a2

Change-Id: I32b7d91a2f7c65895d4823e95ae91e93c24fc1e5

6 years agoMerge "Explicitly restart audio processing when switching active device"
Pavlin Radoslavov [Fri, 11 May 2018 21:14:42 +0000 (14:14 -0700)]
Merge "Explicitly restart audio processing when switching active device"
am: 2ffc9901cb

Change-Id: I41623252ea3f20c8afae1cf34612a3fb0ac32e2b

6 years agoMerge "Explicitly restart audio processing when switching active device"
Treehugger Robot [Fri, 11 May 2018 21:06:43 +0000 (21:06 +0000)]
Merge "Explicitly restart audio processing when switching active device"

6 years agoAdd bound check for AVRC_EVT_APP_SETTING_CHANGE
Hansong Zhang [Fri, 11 May 2018 18:36:29 +0000 (11:36 -0700)]
Add bound check for AVRC_EVT_APP_SETTING_CHANGE

Test: manual
Bug: 73782082
Change-Id: I4e384a2f8c0d8c4af03bd5865b2e907321419c86

6 years agoExplicitly restart audio processing when switching active device
Pavlin Radoslavov [Thu, 10 May 2018 16:52:58 +0000 (09:52 -0700)]
Explicitly restart audio processing when switching active device

* Add internal APIs to restart A2DP session and use them
  when switching the A2DP active device:
  btif_a2dp_source_restart_session() and btif_a2dp_sink_restart_session() .
* Removed internal A2DP Source APIs that shouldn't be APIs
* Call immediately btif_a2dp_on_stopped() when processing
  BTIF_AV_STOP_STREAM_REQ_EVT event to stop sooner the audio
  datapath processing and report back to the Audio HAL call.
  This eliminates the need for waiting for the BTA_AV_STOP_EVT
  upcall event from the remote device.
* Added extra log information when processing events in the BtifAv
  state machine.

Bug: 78360113
Test: Manual: streaming A2DP, change active device, change codec setup.
Change-Id: Icb356587af9cfaee7aea9f3f9bc95a0fe000fc52

6 years agoDO NOT MERGE: Check number of attributes before writing to a buffer
Ajay Panicker [Fri, 11 May 2018 19:03:07 +0000 (12:03 -0700)]
DO NOT MERGE: Check number of attributes before writing to a buffer

Bug: 73824150
Test: Compile
Change-Id: I2a28a503cd74758e707d1e591b55c278d2299f45

6 years agoDO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE
Hansong Zhang [Fri, 11 May 2018 18:36:29 +0000 (11:36 -0700)]
DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE

Test: manual
Bug: 73782082
Change-Id: I4e384a2f8c0d8c4af03bd5865b2e907321419c86

6 years ago[automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am...
Android Build Merger (Role) [Fri, 11 May 2018 18:41:13 +0000 (18:41 +0000)]
[automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am: 9ca8320100 am: e621790539 am: 26881fbd81 am: 90f604c087 skipped: 5ab83c7a00

Change-Id: Ibcd75cd9298d3b3d03da14813514f662a141c66e

6 years ago[automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am...
Android Build Merger (Role) [Fri, 11 May 2018 18:41:11 +0000 (18:41 +0000)]
[automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am: 9ca8320100 am: e621790539 am: 26881fbd81 am: 90f604c087

Change-Id: I45890811e5ea93ef7b2e42380b68064831a58097

6 years ago[automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am...
Android Build Merger (Role) [Fri, 11 May 2018 18:41:10 +0000 (18:41 +0000)]
[automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am: 9ca8320100 am: e621790539 am: 26881fbd81

Change-Id: I3b58713fffba346fb96b93632755a41cf9f5a88e

6 years ago[automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am...
Android Build Merger (Role) [Fri, 11 May 2018 18:41:08 +0000 (18:41 +0000)]
[automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am: 9ca8320100 am: e621790539

Change-Id: I0f8c4399029939d01cdf9be1827e0957df8fcde6

6 years ago[automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am...
Android Build Merger (Role) [Fri, 11 May 2018 18:41:06 +0000 (18:41 +0000)]
[automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am: 9ca8320100

Change-Id: Ic53f90a5ce4767355afaeb0852053120f28df135

6 years agoDO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE
Hansong Zhang [Fri, 11 May 2018 18:40:44 +0000 (11:40 -0700)]
DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE

Test: manual
Bug: 73782082
Change-Id: I4e384a2f8c0d8c4af03bd5865b2e907321419c86

6 years agoHFP: Workaround for car kits that do not send AT+BAC command
Jack He [Tue, 1 May 2018 06:59:40 +0000 (23:59 -0700)]
HFP: Workaround for car kits that do not send AT+BAC command

* Some misbehaving HF devices (e.g. some Hyundai car kits) indicate
  their support on Wide Band Speech and Codec Negotiation, but do not
  send the required AT+BAC command during Service Level Connection
  setup. However, such car kits still expect Fluoride to do codec
  negotiation during SCO setup.
* This CL adds a workaround so that when HF indicates support for WBS
  and codec negotiation, Fluoride will attempt codec negotiation even
  though AT+BAC is never received.
* Store the SDP feature locally. If WBS is supported and no AT+BAC is
  received, use the SDP features to set the suported codec.

Bug: 77883405
Test: make, connect SCO to and from Hyundai car kits
Change-Id: I2be6007022183cac5b9006f37089a587b4a67372
(cherry picked from commit e42cf153f8cc9f2b80153aa3eb7c0be04f3c326f)

6 years agoHFP: Workaround for car kits that do not send AT+BAC command
Jack He [Tue, 1 May 2018 06:59:40 +0000 (23:59 -0700)]
HFP: Workaround for car kits that do not send AT+BAC command

* Some misbehaving HF devices (e.g. some Hyundai car kits) indicate
  their support on Wide Band Speech and Codec Negotiation, but do not
  send the required AT+BAC command during Service Level Connection
  setup. However, such car kits still expect Fluoride to do codec
  negotiation during SCO setup.
* This CL adds a workaround so that when HF indicates support for WBS
  and codec negotiation, Fluoride will attempt codec negotiation even
  though AT+BAC is never received.
* Store the SDP feature locally. If WBS is supported and no AT+BAC is
  received, use the SDP features to set the suported codec.

Bug: 77883405
Test: make, connect SCO to and from Hyundai car kits
Change-Id: I2be6007022183cac5b9006f37089a587b4a67372

6 years agobta: Only call get_acl_data_size_ble for LE
Myles Watson [Thu, 3 May 2018 18:13:55 +0000 (11:13 -0700)]
bta: Only call get_acl_data_size_ble for LE

Pass 0xFFFF (max uint16_t) to GAP_ConnOpen, which will call
get_acl_data_size_ble() to correct the value, but only when the
connection type is LE.

Bug: 77495521
Bug: 76192234
Test: Start Bluetooth with a BT 3.0 chip (or a simulated one)
Change-Id: If46ea249081fc058faf09bcb5149f21d8baf7aa7
(cherry picked from commit a11bb2dcc23304a2d211f8b5237a5f5bff325880)

6 years agoBTM_BleClearBgConnDev: Return if there is no BLE
Myles Watson [Fri, 4 May 2018 17:15:46 +0000 (10:15 -0700)]
BTM_BleClearBgConnDev: Return if there is no BLE

Bug: 77495521
Bug: 76192234
Test: Start Bluetooth with a BT 3.0 chip (or a simulated one)
Change-Id: I718b7532bbba6100dd51c0677a44d41a2db0ce26
(cherry picked from commit 17fe6e4e06f38e5d997d81f8dfccfa744fe384a6)

6 years agoReturn early if vendor-specific command fails
Myles Watson [Thu, 3 May 2018 18:15:50 +0000 (11:15 -0700)]
Return early if vendor-specific command fails

Add CHECK() statements to crash if the callback is passed the incorrect
opcode or if there are no parameters.

Bug: 76192234
Bug: 77495521
Test: Start Bluetooth with a BT 3.0 chip (or a simulated one)
Change-Id: Iddd9a8503b2cfd52b16fb1c59f40e108b478e7b6
(cherry picked from commit aa10181425bc2fa3141d98f954abdb2b5aa641c9)

6 years agoMerge "Add helper classes to auto indent newlines for ostreams" am: e3c041c4a4
Ajay Panicker [Thu, 10 May 2018 22:54:54 +0000 (15:54 -0700)]
Merge "Add helper classes to auto indent newlines for ostreams" am: e3c041c4a4
am: a0376df4af

Change-Id: Ie5591642f7266881961463f3db957e0749698be6

6 years agoMerge "Add helper classes to auto indent newlines for ostreams"
Ajay Panicker [Thu, 10 May 2018 22:51:31 +0000 (15:51 -0700)]
Merge "Add helper classes to auto indent newlines for ostreams"
am: e3c041c4a4

Change-Id: Ifbcafaa32c70a3400b609772e0ec55bf1136abef

6 years agoMerge "A2DP: Add logging when A2DP fails to open" into pi-dev
Jack He [Thu, 10 May 2018 22:47:13 +0000 (15:47 -0700)]
Merge "A2DP: Add logging when A2DP fails to open" into pi-dev
am: 547b1b0a21

Change-Id: Ifaa334e3e445fbf38238a4823c56640f5aa41ac1

6 years agoMerge "A2DP: Add logging when A2DP fails to open" into pi-dev
TreeHugger Robot [Thu, 10 May 2018 22:38:39 +0000 (22:38 +0000)]
Merge "A2DP: Add logging when A2DP fails to open" into pi-dev

6 years agoMerge "Add helper classes to auto indent newlines for ostreams"
Treehugger Robot [Thu, 10 May 2018 22:35:02 +0000 (22:35 +0000)]
Merge "Add helper classes to auto indent newlines for ostreams"

6 years agoMerge "HearingAid RemoveDevice - don't crash when profile not enabled" into pi-dev
Jakub Pawlowski [Thu, 10 May 2018 22:20:38 +0000 (15:20 -0700)]
Merge "HearingAid RemoveDevice - don't crash when profile not enabled" into pi-dev
am: 217f0ee249

Change-Id: I4b78406a2ef6d91d5826d71fc5910bc87b83e077

6 years agoMerge "HearingAid RemoveDevice - don't crash when profile not enabled" into pi-dev
TreeHugger Robot [Thu, 10 May 2018 22:10:49 +0000 (22:10 +0000)]
Merge "HearingAid RemoveDevice - don't crash when profile not enabled" into pi-dev

6 years agoMerge "Hearing Aid: Add dumpsys log for audio packet" am: 5ac698c04e
Hansong Zhang [Thu, 10 May 2018 22:10:42 +0000 (15:10 -0700)]
Merge "Hearing Aid: Add dumpsys log for audio packet" am: 5ac698c04e
am: 1fcee73890

Change-Id: I2ce1e0e9c63895813a7abad9093cf31906f3ec0b

6 years agoMerge "Hearing Aid: Add dumpsys log for audio packet"
Hansong Zhang [Thu, 10 May 2018 22:01:45 +0000 (15:01 -0700)]
Merge "Hearing Aid: Add dumpsys log for audio packet"
am: 5ac698c04e

Change-Id: Id4a1078b2197eb60b321dcffbe76095ad0aee4b7

6 years agoUse weak pointers for device.cc callbacks to prevent use after delete
Ajay Panicker [Thu, 10 May 2018 21:56:40 +0000 (14:56 -0700)]
Use weak pointers for device.cc callbacks to prevent use after delete
am: 497e2833c9

Change-Id: Ib4db15ff876c75c247b814a7a1d0c9edeb40ba1c

6 years agoHearing Aid: Add dumpsys log for audio packet
Hansong Zhang [Wed, 9 May 2018 21:39:56 +0000 (14:39 -0700)]
Hearing Aid: Add dumpsys log for audio packet

Add log for audio drops from audio HAL and buffer overflow
Add log for device capabilities and HiSyncId

Sample output:

Hearing Aid Manager:
  <device1> connected
    binaural right 0x...
    Packet counts (enqueued/flushed)                        : 73557 / 773
    Frame counts (enqueued/flushed)                         : 73557 / 773
  <device2> connected
    binaural left 0x...
    Packet counts (enqueued/flushed)                        : 74172 / 886
    Frame counts (enqueued/flushed)                         : 74172 / 886
  Hearing Aid Audio HAL:
    Counts (underflow)                                      : 0
    Bytes (underflow)                                       : 0
    Last update time ago in ms (underflow)                  : 0

Test: manual
Bug: 69623109
Change-Id: I5021b9214828b1846506638000f29af7343a3354
(cherry picked from commit b596bb17140c7fc82c73c7db62308aa057cf9aee)

6 years agoMerge "Hearing Aid: Add dumpsys log for audio packet"
Treehugger Robot [Thu, 10 May 2018 21:23:46 +0000 (21:23 +0000)]
Merge "Hearing Aid: Add dumpsys log for audio packet"

6 years agoHearingAid RemoveDevice - don't crash when profile not enabled am: f7c7cd2120
Jakub Pawlowski [Thu, 10 May 2018 20:27:05 +0000 (13:27 -0700)]
HearingAid RemoveDevice - don't crash when profile not enabled am: f7c7cd2120
am: c805b9c5ae

Change-Id: Iaf257691d9247c5eff0b17e813e21efcf0cbc204

6 years agoHearingAid RemoveDevice - don't crash when profile not enabled
Jakub Pawlowski [Thu, 10 May 2018 20:20:25 +0000 (13:20 -0700)]
HearingAid RemoveDevice - don't crash when profile not enabled
am: f7c7cd2120

Change-Id: If3b9cbe1c96ac890c40726c034e71a4314138036

6 years agoHearingAid RemoveDevice - don't crash when profile not enabled
Jakub Pawlowski [Thu, 10 May 2018 13:42:43 +0000 (06:42 -0700)]
HearingAid RemoveDevice - don't crash when profile not enabled

Bug: 79468820
Test: Unbond non-hearing aid device when profile not enabled
Change-Id: I2a87f8725447045e7bc5b2a33facf1ce14b47c54
(cherry picked from commit f7c7cd2120f9d407aab849fb553e57427bf3233e)

6 years agoUse weak pointers for device.cc callbacks to prevent use after delete
Ajay Panicker [Thu, 10 May 2018 19:39:32 +0000 (12:39 -0700)]
Use weak pointers for device.cc callbacks to prevent use after delete

Bug: 79400706
Test: Turn bluetooth off then on while connected to a device and playing
music

Change-Id: I2132bb01796a724fba6a36f4eca4f4795b919864

6 years agoHearingAid RemoveDevice - don't crash when profile not enabled
Jakub Pawlowski [Thu, 10 May 2018 13:42:43 +0000 (06:42 -0700)]
HearingAid RemoveDevice - don't crash when profile not enabled

Bug: 79468820
Test: Unbond non-hearing aid device when profile not enabled
Change-Id: I2a87f8725447045e7bc5b2a33facf1ce14b47c54

6 years agoHearing Aid: Add dumpsys log for audio packet
Hansong Zhang [Wed, 9 May 2018 21:39:56 +0000 (14:39 -0700)]
Hearing Aid: Add dumpsys log for audio packet

Add log for audio drops from audio HAL and buffer overflow
Add log for device capabilities and HiSyncId

Sample output:

Hearing Aid Manager:
  <device1> connected
    binaural right 0x...
    Packet counts (enqueued/flushed)                        : 73557 / 773
    Frame counts (enqueued/flushed)                         : 73557 / 773
  <device2> connected
    binaural left 0x...
    Packet counts (enqueued/flushed)                        : 74172 / 886
    Frame counts (enqueued/flushed)                         : 74172 / 886
  Hearing Aid Audio HAL:
    Counts (underflow)                                      : 0
    Bytes (underflow)                                       : 0
    Last update time ago in ms (underflow)                  : 0

Test: manual
Bug: 69623109
Change-Id: I5021b9214828b1846506638000f29af7343a3354

6 years agoMerge "A2DP: Add logging when A2DP fails to open" am: 9f5ab2434e
Jack He [Thu, 10 May 2018 01:13:23 +0000 (18:13 -0700)]
Merge "A2DP: Add logging when A2DP fails to open" am: 9f5ab2434e
am: 4a10ff8265

Change-Id: Ib6caac62411e5b6ea83dabbc4e3d3090cd35e2ff

6 years agoMerge "A2DP: Add logging when A2DP fails to open"
Jack He [Thu, 10 May 2018 01:08:49 +0000 (18:08 -0700)]
Merge "A2DP: Add logging when A2DP fails to open"
am: 9f5ab2434e

Change-Id: I825570e840f65192e4746eef762e1f8c36f6c135

6 years agoMerge "A2DP: Add logging when A2DP fails to open"
Treehugger Robot [Thu, 10 May 2018 00:58:48 +0000 (00:58 +0000)]
Merge "A2DP: Add logging when A2DP fails to open"

6 years agoMerge "Fix LE cancel open when physical connection is established but not ready"...
Vinit Deshpande [Thu, 10 May 2018 00:27:43 +0000 (17:27 -0700)]
Merge "Fix LE cancel open when physical connection is established but not ready" am: cd40bfb8d7
am: 7823085053

Change-Id: I84f51dba9fa344da4422e0265243b25d41b5e7f7

6 years agoMerge "Fix LE cancel open when physical connection is established but not ready"
Vinit Deshpande [Thu, 10 May 2018 00:18:59 +0000 (17:18 -0700)]
Merge "Fix LE cancel open when physical connection is established but not ready"
am: cd40bfb8d7

Change-Id: I3e27ee66923fbc5eb6bd0357c6913ea82b904857

6 years agoMerge "Fix LE cancel open when physical connection is established but not ready"
Vinit Deshpande [Wed, 9 May 2018 23:58:48 +0000 (23:58 +0000)]
Merge "Fix LE cancel open when physical connection is established but not ready"

6 years agoMerge "Fix PTS: TC_GATT_SR_UNS_BI_01_C sends unsupported opcode" into pi-dev
Stanley Tng [Wed, 9 May 2018 23:42:55 +0000 (16:42 -0700)]
Merge "Fix PTS: TC_GATT_SR_UNS_BI_01_C sends unsupported opcode" into pi-dev
am: 78101d70ba

Change-Id: I2a7e9a2c212e8a1f83a3112bc177561a9440160f

6 years agoMerge "Fix PTS: TC_GATT_SR_UNS_BI_01_C sends unsupported opcode" into pi-dev
TreeHugger Robot [Wed, 9 May 2018 23:29:36 +0000 (23:29 +0000)]
Merge "Fix PTS: TC_GATT_SR_UNS_BI_01_C sends unsupported opcode" into pi-dev

6 years agoA2DP: Add logging when A2DP fails to open
Jack He [Wed, 9 May 2018 22:44:09 +0000 (15:44 -0700)]
A2DP: Add logging when A2DP fails to open

* Make sure we output a log line whenever A2DP start request returns a
  failure state, namingly:
  - A2DP_CTRL_ACK_FAILURE
  - A2DP_CTRL_ACK_INCALL_FAILURE
  - A2DP_CTRL_ACK_DISCONNECT_IN_PROGRESS

Bug: 74988740
Test: make, logging only change
Change-Id: I63280d6280bf9c3d3ee6c578c1be332f8a9a3be0
(cherry picked from commit b67d5fc97c0a0db33173792b6781a0345ee75cf2)

6 years agoA2DP: Add logging when A2DP fails to open
Jack He [Wed, 9 May 2018 22:44:09 +0000 (15:44 -0700)]
A2DP: Add logging when A2DP fails to open

* Make sure we output a log line whenever A2DP start request returns a
  failure state, namingly:
  - A2DP_CTRL_ACK_FAILURE
  - A2DP_CTRL_ACK_INCALL_FAILURE
  - A2DP_CTRL_ACK_DISCONNECT_IN_PROGRESS

Bug: 74988740
Test: make, logging only change
Change-Id: I63280d6280bf9c3d3ee6c578c1be332f8a9a3be0

6 years agoAdd bounds check to l2cble_process_sig_cmd L2CAP_CMD_DISC_REQ
Ajay Panicker [Fri, 13 Apr 2018 00:03:09 +0000 (17:03 -0700)]
Add bounds check to l2cble_process_sig_cmd L2CAP_CMD_DISC_REQ

Bug: 74121659
Test: Compiles
Change-Id: Idf58e7b25b41ae1bd43cdd51de424b18e03cc7e8

6 years agoFix LE cancel open when physical connection is established but not ready
WENTAO WANG [Mon, 20 Nov 2017 21:10:07 +0000 (13:10 -0800)]
Fix LE cancel open when physical connection is established but not ready

Issue:
Cancel open does not work when the physical connection is established
but negotiation is not finished.

Fix:
Close the physical connection and release resources when fitting in this
situation.

Bug: 64230040
Test: test_cancel_open_ble_process
Change-Id: Ia23b5f3aab427b333d9d484b97e4cd4ff49f5319

6 years agoMerge "Fix PTS: TC_GATT_SR_UNS_BI_01_C sends unsupported opcode" am: 11e1274a05
Stanley Tng [Wed, 9 May 2018 20:33:17 +0000 (13:33 -0700)]
Merge "Fix PTS: TC_GATT_SR_UNS_BI_01_C sends unsupported opcode" am: 11e1274a05
am: a4f3348864

Change-Id: Ic4ef782c6550411bc4f6f6b892936188fb3a93a4

6 years agoMerge "Fix PTS: TC_GATT_SR_UNS_BI_01_C sends unsupported opcode"
Stanley Tng [Wed, 9 May 2018 20:29:13 +0000 (13:29 -0700)]
Merge "Fix PTS: TC_GATT_SR_UNS_BI_01_C sends unsupported opcode"
am: 11e1274a05

Change-Id: I7e48817c7b29522b2912d48ef1282282e7e833a9

6 years agoMerge "Fix PTS: TC_GATT_SR_UNS_BI_01_C sends unsupported opcode"
Treehugger Robot [Wed, 9 May 2018 20:23:34 +0000 (20:23 +0000)]
Merge "Fix PTS: TC_GATT_SR_UNS_BI_01_C sends unsupported opcode"

6 years agoAdd helper classes to auto indent newlines for ostreams
Ajay Panicker [Thu, 3 May 2018 19:58:53 +0000 (12:58 -0700)]
Add helper classes to auto indent newlines for ostreams

Bug: 79167906
Test: adb shell dumpsys bluetooth_manager
Change-Id: I54484181abc438e90ade771fca6943c2b303e4db

6 years agoFix PTS: TC_GATT_SR_UNS_BI_01_C sends unsupported opcode
Stanley Tng [Wed, 9 May 2018 17:39:37 +0000 (10:39 -0700)]
Fix PTS: TC_GATT_SR_UNS_BI_01_C sends unsupported opcode

In this PTS test, add code to send back an unsupported error response
when an unsupported OpCode is received.

Bug: 79347869
Test: Rerun and pass PTS test
Change-Id: Ibf95dbc18dabbe201850da675c7a1b2739624de9
(cherry picked from commit 12fbcb60c60540a7fb968466ccb90e9cdf08861f)

6 years agoFix PTS: TC_GATT_SR_UNS_BI_01_C sends unsupported opcode
Stanley Tng [Wed, 9 May 2018 17:39:37 +0000 (10:39 -0700)]
Fix PTS: TC_GATT_SR_UNS_BI_01_C sends unsupported opcode

In this PTS test, add code to send back an unsupported error response
when an unsupported OpCode is received.

Bug: 79347869
Test: Rerun and pass PTS test
Change-Id: Ibf95dbc18dabbe201850da675c7a1b2739624de9

6 years ago[automerger skipped] Fetch the presentation position only if the audio state is STARTED
Pavlin Radoslavov [Wed, 9 May 2018 17:36:06 +0000 (10:36 -0700)]
[automerger skipped] Fetch the presentation position only if the audio state is STARTED
am: 81d5b69913  -s ours

Change-Id: I6e56fc41058133cd7a671d1fd33c9c02cc55fea8

6 years agoFetch the presentation position only if the audio state is STARTED
Pavlin Radoslavov [Wed, 9 May 2018 01:00:24 +0000 (18:00 -0700)]
Fetch the presentation position only if the audio state is STARTED

The audio HAL will fetch the audio presentation position (for the
purpose of delay reporting if the Headset supports it) only if the
audio state is STARTED.
Otherwise, it will use the default value (e.g., the one used
when the Headset does not support delay reporting).

This avoids unnecessary transient re-opening of the HAL control path
between the Audio framework and Bluetooth native stack (e.g., during
shutdown).

Bug: 78360113
Test: Manual - A2DP streaming with Headsets that support delay reporting
Change-Id: I56f7e9373ba27606913c74fa818da40305df85d4
Merged-In: I56f7e9373ba27606913c74fa818da40305df85d4
(cherry picked from commit 61d1e86c5b4beb3bf4dabba3de0490cad637afb3)

6 years agoMerge "Handle unbonding in Hearing Aid profile" am: ab22148a79
Jakub Pawlowski [Wed, 9 May 2018 08:17:23 +0000 (01:17 -0700)]
Merge "Handle unbonding in Hearing Aid profile" am: ab22148a79
am: 65750f6d60

Change-Id: I52bf6d5e02eb372f815a8e34295be36eab148fa7

6 years agoMerge "Handle unbonding in Hearing Aid profile"
Jakub Pawlowski [Wed, 9 May 2018 08:12:24 +0000 (01:12 -0700)]
Merge "Handle unbonding in Hearing Aid profile"
am: ab22148a79

Change-Id: Icaee7201a4e47b471c60dcbc54eb2984d0cfa19f

6 years agoMerge "Handle unbonding in Hearing Aid profile"
Jakub Pawlowski [Wed, 9 May 2018 08:06:15 +0000 (08:06 +0000)]
Merge "Handle unbonding in Hearing Aid profile"

6 years agoMerge "Remove unused `tags` property from Android.bp files" am: 2b737b856d
Dan Willemsen [Wed, 9 May 2018 06:14:49 +0000 (23:14 -0700)]
Merge "Remove unused `tags` property from Android.bp files" am: 2b737b856d
am: b74153a2b4

Change-Id: I4a2c519333cbe0e4b5c9a039f82ed0d0e787e8a2

6 years agoMerge "Remove unused `tags` property from Android.bp files"
Dan Willemsen [Wed, 9 May 2018 06:06:07 +0000 (23:06 -0700)]
Merge "Remove unused `tags` property from Android.bp files"
am: 2b737b856d

Change-Id: Ie67b2d049583b8c9b25d4b0e8d1c26a25f700309

6 years agoMerge "Remove unused `tags` property from Android.bp files"
Dan Willemsen [Wed, 9 May 2018 05:59:03 +0000 (05:59 +0000)]
Merge "Remove unused `tags` property from Android.bp files"

6 years agoFetch the presentation position only if the audio state is STARTED am: 61d1e86c5b
Pavlin Radoslavov [Wed, 9 May 2018 03:37:37 +0000 (20:37 -0700)]
Fetch the presentation position only if the audio state is STARTED am: 61d1e86c5b
am: 0812131e47

Change-Id: Ife27d044bf78bf87b440b0d4331e129705149ee5