OSDN Git Service

android-x86/system-bt.git
5 years agoMerge "Add binder interfaces for metadata APIs" am: 5ac84e7897 am: 827d9efad2
Ugo Yu [Wed, 23 Jan 2019 08:24:27 +0000 (00:24 -0800)]
Merge "Add binder interfaces for metadata APIs" am: 5ac84e7897 am: 827d9efad2
am: 210a9a5b49

Change-Id: I8b33a0617d2219de972b8aae0b1c5b5ed02ffe67

5 years agoMerge "Add binder interfaces for metadata APIs" am: 5ac84e7897
Ugo Yu [Wed, 23 Jan 2019 08:13:05 +0000 (00:13 -0800)]
Merge "Add binder interfaces for metadata APIs" am: 5ac84e7897
am: 827d9efad2

Change-Id: I26f5457dcf999492b2090705b0efe6450a7d8a8a

5 years agoMerge "Add binder interfaces for metadata APIs"
Ugo Yu [Wed, 23 Jan 2019 07:50:47 +0000 (23:50 -0800)]
Merge "Add binder interfaces for metadata APIs"
am: 5ac84e7897

Change-Id: Ifaf958504f373f611788235d8b2aa470a99c9d4b

5 years agoMerge "Add binder interfaces for metadata APIs"
Treehugger Robot [Wed, 23 Jan 2019 07:38:06 +0000 (07:38 +0000)]
Merge "Add binder interfaces for metadata APIs"

5 years ago[automerger skipped] Fix the LE CoC SL4A Test failure due to length check am: 07ff967...
Stanley Tng [Wed, 23 Jan 2019 03:34:30 +0000 (19:34 -0800)]
[automerger skipped] Fix the LE CoC SL4A Test failure due to length check am: 07ff96727c am: 091035cd2a -s ours
am: e6b5fdfc93 -s ours
am skip reason: change_id I9bbcd58460a02394010f74a18e9ebdbcd546d43d with SHA1 fcb1994de1 is in history

Change-Id: I13ae803112b66d9d55ca2fc7002a09b7c47fdfce

5 years ago[automerger skipped] Fix the LE CoC SL4A Test failure due to length check am: 07ff96727c
Stanley Tng [Wed, 23 Jan 2019 02:16:58 +0000 (18:16 -0800)]
[automerger skipped] Fix the LE CoC SL4A Test failure due to length check am: 07ff96727c
am: 091035cd2a -s ours
am skip reason: SHA1 091035cd2a skipped by user stng

Change-Id: I79dd3dff38117cdbcbdc13a4b09b9835c93b4946

5 years agoFix the LE CoC SL4A Test failure due to length check
Stanley Tng [Wed, 23 Jan 2019 01:07:35 +0000 (17:07 -0800)]
Fix the LE CoC SL4A Test failure due to length check
am: 07ff96727c

Change-Id: I06461df508cd8f0246b2673db2c1810aab3c9322

5 years agoAdd binder interfaces for metadata APIs
Ugo Yu [Sat, 12 Jan 2019 00:13:16 +0000 (08:13 +0800)]
Add binder interfaces for metadata APIs

Bug: 121051445
Test: build pass

Change-Id: Icd51b7cc0a4dec5a2bffec4ded67caffeedb126b

5 years ago[automerger skipped] Add libprocessgroup dependency and fix sched_policy include...
Suren Baghdasaryan [Tue, 22 Jan 2019 22:27:21 +0000 (14:27 -0800)]
[automerger skipped] Add libprocessgroup dependency and fix sched_policy include am: 8ef9dc6f3f am: a5b1ff8f52
am: 8bf8a42e3c -s ours
am skip reason: change_id I4d0dcfad22b30ac249a7874b42a7121e2ffedadb with SHA1 08bea747aa is in history

Change-Id: I9dd2d493d5af2f9d084791f77cea78cbe44b2529

5 years agoFix the LE CoC SL4A Test failure due to length check
Stanley Tng [Tue, 11 Dec 2018 22:45:13 +0000 (14:45 -0800)]
Fix the LE CoC SL4A Test failure due to length check

Fix a regression from the previous CL that checks the buffer length
before doing a memcpy. The previous check is too strict causing valid
sized buffers to be rejected. The length check is incorrect and off by the header size.

Bug: 117306992
Bug: 112321180
Test: Run the LE CoC SL4A Tests
Change-Id: I9bbcd58460a02394010f74a18e9ebdbcd546d43d
Merged-In: I9bbcd58460a02394010f74a18e9ebdbcd546d43d
(cherry picked from commit fcb1994de1f6ee34b8dc6804a2b32e20bf138073)

5 years agoAdd libprocessgroup dependency and fix sched_policy include am: 8ef9dc6f3f
Suren Baghdasaryan [Tue, 22 Jan 2019 21:58:08 +0000 (13:58 -0800)]
Add libprocessgroup dependency and fix sched_policy include am: 8ef9dc6f3f
am: a5b1ff8f52

Change-Id: I332a3251035d209f454fc5ccd5eca6b6810e03f2

5 years agoAdd libprocessgroup dependency and fix sched_policy include
Suren Baghdasaryan [Tue, 22 Jan 2019 21:24:03 +0000 (13:24 -0800)]
Add libprocessgroup dependency and fix sched_policy include
am: 8ef9dc6f3f

Change-Id: If5ec34928a56d7d0f6daeb16b91a693ca0646a03

5 years agoMerge "initialize setconfig in bta_av_config_ind"
TreeHugger Robot [Tue, 22 Jan 2019 18:22:45 +0000 (18:22 +0000)]
Merge "initialize setconfig in bta_av_config_ind"

5 years agoMerge "Fix OOB in avrc_pars_vendor_cmd"
TreeHugger Robot [Tue, 22 Jan 2019 18:20:31 +0000 (18:20 +0000)]
Merge "Fix OOB in avrc_pars_vendor_cmd"

5 years agoMerge "Add Filtering for snoop logs based on L2CAP and RFCOMM Channels (1/4)"
Ajay Panicker [Tue, 22 Jan 2019 00:00:18 +0000 (00:00 +0000)]
Merge "Add Filtering for snoop logs based on L2CAP and RFCOMM Channels (1/4)"

5 years agoAdd libprocessgroup dependency and fix sched_policy include
Suren Baghdasaryan [Thu, 20 Dec 2018 01:36:37 +0000 (17:36 -0800)]
Add libprocessgroup dependency and fix sched_policy include

libbt-utils uses set_sched_policy which is now implemented inside
libprocessgroup. Add required dependency and header file include.

Exempt-From-Owner-Approval: janitorial

Bug: 111307099
Test: builds, boots

Merged-In: I4d0dcfad22b30ac249a7874b42a7121e2ffedadb
Change-Id: I4d0dcfad22b30ac249a7874b42a7121e2ffedadb
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
5 years agoFix OOB in avrc_pars_vendor_cmd
Chienyuan [Sat, 19 Jan 2019 09:54:34 +0000 (17:54 +0800)]
Fix OOB in avrc_pars_vendor_cmd

Bug: 111895000
Test: manual
Change-Id: I0c108de262f2e757b567f274f81483028ce8bb05

5 years agoinitialize setconfig in bta_av_config_ind
Chienyuan [Sat, 19 Jan 2019 09:19:00 +0000 (17:19 +0800)]
initialize setconfig in bta_av_config_ind

Bug: 112917952
Test: manual
Change-Id: Ic1cd2001e8e8367ff9114d43f57ad3ca1a73c74c

5 years agoMerge "Add libprocessgroup dependency and fix sched_policy include"
Suren Baghdasaryan [Sat, 19 Jan 2019 00:39:13 +0000 (00:39 +0000)]
Merge "Add libprocessgroup dependency and fix sched_policy include"

5 years agoMerge "advertise_data_parser: fix a potential OOB"
TreeHugger Robot [Fri, 18 Jan 2019 22:31:30 +0000 (22:31 +0000)]
Merge "advertise_data_parser: fix a potential OOB"

5 years agoAdd libprocessgroup dependency and fix sched_policy include
Suren Baghdasaryan [Thu, 20 Dec 2018 01:36:37 +0000 (17:36 -0800)]
Add libprocessgroup dependency and fix sched_policy include

libbt-utils uses set_sched_policy which is now implemented inside
libprocessgroup. Add required dependency and header file include.

Exempt-From-Owner-Approval: janitorial

Bug: 111307099
Test: builds, boots

Change-Id: I4d0dcfad22b30ac249a7874b42a7121e2ffedadb
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
5 years agoadvertise_data_parser: fix a potential OOB
Hansong Zhang [Sat, 12 Jan 2019 00:56:02 +0000 (16:56 -0800)]
advertise_data_parser: fix a potential OOB

Bug: 121036603
Test: POC
Change-Id: I56a5c5bdadec9dded5684caff20bd9cb001dca6c

5 years agoMerge "Metric: Add logging for link layer connection events" am: e6b80778a8 am: 7b576...
Jack He [Thu, 17 Jan 2019 23:47:30 +0000 (15:47 -0800)]
Merge "Metric: Add logging for link layer connection events" am: e6b80778a8 am: 7b5765948e
am: 80a07e4834

Change-Id: Iad4205c2b372852a8f872cf902b9bdbd7b91ff1b

5 years ago[automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.190105...
Xin Li [Thu, 17 Jan 2019 23:38:17 +0000 (15:38 -0800)]
[automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.190105.001) into master" am: f15c1197f5 -s ours am: 98aa467973 -s ours
am: 4ab9327b59 -s ours
am skip reason: subject contains skip directive

Change-Id: I7449ed8f2d258ed3979f33565c42b84c9e58e605

5 years agoMerge "Metric: Add logging for link layer connection events" am: e6b80778a8
Jack He [Thu, 17 Jan 2019 23:21:47 +0000 (15:21 -0800)]
Merge "Metric: Add logging for link layer connection events" am: e6b80778a8
am: 7b5765948e

Change-Id: I15b379d16e089c64e3de54ac96ae8d8c5099df06

5 years ago[automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.190105...
Xin Li [Thu, 17 Jan 2019 23:01:56 +0000 (15:01 -0800)]
[automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.190105.001) into master" am: f15c1197f5 -s ours
am: 98aa467973 -s ours
am skip reason: subject contains skip directive

Change-Id: Ifbf5bab360131698dc9d2384c4bee332cbb8d464

5 years agoMerge "Metric: Add logging for link layer connection events"
Jack He [Thu, 17 Jan 2019 22:57:39 +0000 (14:57 -0800)]
Merge "Metric: Add logging for link layer connection events"
am: e6b80778a8

Change-Id: Icaf506c40c16b12b63cac0c5327f8c68f9033c9e

5 years ago[automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.190105...
Xin Li [Thu, 17 Jan 2019 22:44:52 +0000 (14:44 -0800)]
[automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.190105.001) into master"
am: f15c1197f5 -s ours
am skip reason: subject contains skip directive

Change-Id: Ib82454185f6d69fa695354c1ce488ad42ad990aa

5 years agoMerge "Metric: Add logging for link layer connection events"
Treehugger Robot [Thu, 17 Jan 2019 22:30:43 +0000 (22:30 +0000)]
Merge "Metric: Add logging for link layer connection events"

5 years ago[automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.190105.001)...
Xin Li [Thu, 17 Jan 2019 22:18:43 +0000 (14:18 -0800)]
[automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.190105.001) into master am: dfdcf1f0e0 -s ours am: c4bb52b4f3 -s ours
am: 13316004a4 -s ours
am skip reason: subject contains skip directive

Change-Id: I22ae60dcf3e1a8bb79571c21700e65599a9fff5f

5 years ago[automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.190105.001)...
Xin Li [Thu, 17 Jan 2019 22:05:38 +0000 (14:05 -0800)]
[automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.190105.001) into master am: dfdcf1f0e0 -s ours
am: c4bb52b4f3 -s ours
am skip reason: subject contains skip directive

Change-Id: Ib69a65276a618024f463874256c4e2275dc3a5b7

5 years ago[automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.190105.001)...
Xin Li [Thu, 17 Jan 2019 21:53:32 +0000 (13:53 -0800)]
[automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.190105.001) into master
am: dfdcf1f0e0 -s ours
am skip reason: subject contains skip directive

Change-Id: Ibf1cb4eab80383dba8f7a5bbfe2bb5bff95ca43f

5 years agoMerge "DO NOT MERGE - Merge pie-platform-release (PPRL.190105.001) into master"
Xin Li [Thu, 17 Jan 2019 21:19:42 +0000 (21:19 +0000)]
Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.190105.001) into master"

5 years agoMerge "Add new Hearing Aids commands to improve L/R Sync" am: 055a5f4056 am: 376b0e83e3
Stanley Tng [Thu, 17 Jan 2019 19:05:12 +0000 (11:05 -0800)]
Merge "Add new Hearing Aids commands to improve L/R Sync" am: 055a5f4056 am: 376b0e83e3
am: 941a75ae40

Change-Id: I315736ef979cc80b362453509a809fed02420d88

5 years agoMerge "Add new Hearing Aids commands to improve L/R Sync" am: 055a5f4056
Stanley Tng [Thu, 17 Jan 2019 18:49:26 +0000 (10:49 -0800)]
Merge "Add new Hearing Aids commands to improve L/R Sync" am: 055a5f4056
am: 376b0e83e3

Change-Id: I8398824a2362b6af4419cad371a41519c9029723

5 years agoMerge "Add new Hearing Aids commands to improve L/R Sync"
Stanley Tng [Thu, 17 Jan 2019 18:45:08 +0000 (10:45 -0800)]
Merge "Add new Hearing Aids commands to improve L/R Sync"
am: 055a5f4056

Change-Id: I19b467c2f4a185c0ea6953b3697597997d33c871

5 years agoMerge "Add new Hearing Aids commands to improve L/R Sync"
Treehugger Robot [Thu, 17 Jan 2019 18:27:10 +0000 (18:27 +0000)]
Merge "Add new Hearing Aids commands to improve L/R Sync"

5 years agoMerge "Wait for Notifications before sending audio data" am: 2bd5ea5772 am: a0e377ac0d
Stanley Tng [Thu, 17 Jan 2019 17:07:31 +0000 (09:07 -0800)]
Merge "Wait for Notifications before sending audio data" am: 2bd5ea5772 am: a0e377ac0d
am: 1cb18fb333

Change-Id: Ie83df0b019b9b7c18f16aa2a29acffed98a04798

5 years agoMerge "Wait for Notifications before sending audio data" am: 2bd5ea5772
Stanley Tng [Thu, 17 Jan 2019 17:00:10 +0000 (09:00 -0800)]
Merge "Wait for Notifications before sending audio data" am: 2bd5ea5772
am: a0e377ac0d

Change-Id: I24474c29c0b4bdc65148357dde18677e404f068c

5 years agoMerge "Wait for Notifications before sending audio data"
Stanley Tng [Thu, 17 Jan 2019 16:55:25 +0000 (08:55 -0800)]
Merge "Wait for Notifications before sending audio data"
am: 2bd5ea5772

Change-Id: Ie9e4efb8efe0e287d7450b587aca0010459c648e

5 years agoMerge "Wait for Notifications before sending audio data"
Treehugger Robot [Thu, 17 Jan 2019 15:25:39 +0000 (15:25 +0000)]
Merge "Wait for Notifications before sending audio data"

5 years agoAdd new Hearing Aids commands to improve L/R Sync
Stanley Tng [Tue, 1 Jan 2019 22:52:07 +0000 (14:52 -0800)]
Add new Hearing Aids commands to improve L/R Sync

Prototyping new commands to the Hearing Aids devices to improve the
Left/Right Sync issues. The new commands are:
1. Add a new byte parameter to the START command that indicates the
other side device is actively streaming or disconnected,
2. Whenever there is an LE Connection Update event from the phone BT
controller, send a new Status Update command to all connected devices,
3. Whenever one side gets disconnected or starts streaming, send a new
Status Update command to the other side to inform about this change.

Bug: 117778955
Bug: 120921220
Test: Manual Testing with Hearing Aids
Change-Id: I5c94867d4574802025e3b433573e52d3c40c9828

5 years agoWait for Notifications before sending audio data
Stanley Tng [Wed, 26 Dec 2018 02:12:51 +0000 (18:12 -0800)]
Wait for Notifications before sending audio data

For the Hearing Aids Profile, wait for the notification status from the
devices after sending the Start command. The reason is that the devices
may be in low power mode and the phone should not start streaming audio
data to these devices until it is fully awake.

Test: Manual testing with Hearing Aids devices
Bug: 117778955
Bug: 120921220
Change-Id: I28b79e7e284d5e75864c0b12315fbb8bd47acf74

5 years agoMetric: Add logging for link layer connection events
Jack He [Thu, 20 Dec 2018 23:46:17 +0000 (15:46 -0800)]
Metric: Add logging for link layer connection events

* Logs when there is an event affecting Bluetooth device's link
  layer connection. Triggerred when there is a related HCI command
  or event
* Users of this metrics can deduce Bluetooth device's connection state
  from these events
* HCI commands are logged before the command is sent, after receiving,
  command status, and after receiving command complete
  event comes back
* HCI events are logged when they arrive
* Simplifies logic in btu_hcif_hdl_command_status() since p_cmd is never
  null and we always ignore parameter total length field
* Call btm_identity_addr_to_random_pseudo() when parsing command status
  packet for LE create connection, extended create connection,
  add/remove/clear whitelist commands

DETAILS:

* Bluetooth classic commands:
  - CMD_CREATE_CONNECTION
  - CMD_DISCONNECT
  - CMD_CREATE_CONNECTION_CANCEL
  - CMD_ACCEPT_CONNECTION_REQUEST
  - CMD_REJECT_CONNECTION_REQUEST
  - CMD_SETUP_ESCO_CONNECTION
  - CMD_ACCEPT_ESCO_CONNECTION
  - CMD_REJECT_ESCO_CONNECTION
  - CMD_ENH_SETUP_ESCO_CONNECTION
  - CMD_ENH_ACCEPT_ESCO_CONNECTION
* Bluetooth low energy commands:
  - CMD_BLE_CREATE_LL_CONN [Only logged when there is an error or initiator filter policy is 0x00]
  - CMD_BLE_CREATE_CONN_CANCEL [Only logged when there is an error]
  - CMD_BLE_EXTENDED_CREATE_CONNECTION [Only logged on error or when initiator filter policy is 0x00]
  - CMD_BLE_CLEAR_WHITE_LIST
  - CMD_BLE_ADD_WHITE_LIST
  - CMD_BLE_REMOVE_WHITE_LIST
* Bluetooth classic events:
  - EVT_CONNECTION_COMP
  - EVT_CONNECTION_REQUEST
  - EVT_DISCONNECTION_COMP
  - EVT_ESCO_CONNECTION_COMP
  - EVT_ESCO_CONNECTION_CHANGED
* Bluetooth low energy meta events:
  - BLE_EVT_CONN_COMPLETE_EVT
  - BLE_EVT_ENHANCED_CONN_COMPLETE_EVT

Bug: 112969790
Test: make and test drive statsd
Change-Id: Ib843dfa95bb6448c41dac261dabcf17947efda06

5 years agoAllow bond request from devices with BTM_IO_CAP_NONE am: c52062c078 am: 21b9e3e50a
Tiansong Cui [Wed, 16 Jan 2019 17:01:29 +0000 (09:01 -0800)]
Allow bond request from devices with BTM_IO_CAP_NONE am: c52062c078 am: 21b9e3e50a
am: ca5b9f4eaf

Change-Id: I8d5888b8aded7775c2fd5b6829ee905be9fa9236

5 years agoAllow bond request from devices with BTM_IO_CAP_NONE am: c52062c078
Tiansong Cui [Wed, 16 Jan 2019 16:49:50 +0000 (08:49 -0800)]
Allow bond request from devices with BTM_IO_CAP_NONE am: c52062c078
am: 21b9e3e50a

Change-Id: I15305db379166df60f9db362e0757640ac899d0f

5 years agoAllow bond request from devices with BTM_IO_CAP_NONE
Tiansong Cui [Wed, 16 Jan 2019 16:40:30 +0000 (08:40 -0800)]
Allow bond request from devices with BTM_IO_CAP_NONE
am: c52062c078

Change-Id: I50aa6393eb74fb83ea5878c7236930dc81f35bc1

5 years agoRevert "Metric: Add logging for link layer connection events"
Antoan Angelov [Wed, 16 Jan 2019 12:28:24 +0000 (12:28 +0000)]
Revert "Metric: Add logging for link layer connection events"

This reverts commit 5283b68a5050a1e0b043bc5b678ae82db5bf906c.

Reason for revert: Breaking one of our targets.

Change-Id: Id621586276c934312b9ea38e8420ac4a46cb88a0

5 years agoAllow bond request from devices with BTM_IO_CAP_NONE
Tiansong Cui [Tue, 15 Jan 2019 21:22:46 +0000 (13:22 -0800)]
Allow bond request from devices with BTM_IO_CAP_NONE

Devices with BTM_IO_CAP_NONE should still be able to create
(although unauthenticated) bond with other devices.

Bug: internal 122119496
Test: manual
Change-Id: Iac008d0199ca11d06db8c91cda821f992ba3d4ee

5 years agoAdd Filtering for snoop logs based on L2CAP and RFCOMM Channels (1/4)
Ajay Panicker [Fri, 16 Nov 2018 21:06:47 +0000 (13:06 -0800)]
Add Filtering for snoop logs based on L2CAP and RFCOMM Channels (1/4)

* Change btsnoop logging into disabled, filtered, and full modes
* When ro.isdebuggable is 1, filtered logging is enabled by default
* Otherwise, disabled by default
* When legacy mode is enabled, translate it to full and reset legacy
  property to empty

Bug: 112970672
Bug: 67669544
Test: See that the snoop file always exists but is filtered when
snooplogs are disabled and unfiltered when enabled.
Change-Id: I894d36cfd976d03c788626b9197fea1182a6f3ba

5 years agoDO NOT MERGE - Merge pie-platform-release (PPRL.190105.001) into master
Xin Li [Tue, 15 Jan 2019 18:17:12 +0000 (10:17 -0800)]
DO NOT MERGE - Merge pie-platform-release (PPRL.190105.001) into master

Bug: 122685541
Change-Id: Iafca519871aab60f057bb7f6abc1bcf2f0394ba2

5 years agoMetric: Add logging for link layer connection events
Jack He [Thu, 20 Dec 2018 23:46:17 +0000 (15:46 -0800)]
Metric: Add logging for link layer connection events

* Logs when there is an event affecting Bluetooth device's link
  layer connection. Triggerred when there is a related HCI command
  or event
* Users of this metrics can deduce Bluetooth device's connection state
  from these events
* HCI commands are logged before the command is sent, after receiving,
  command status, and after receiving command complete
  event comes back
* HCI events are logged when they arrive
* Simplifies logic in btu_hcif_hdl_command_status() since p_cmd is never
  null and we always ignore parameter total length field
* Call btm_identity_addr_to_random_pseudo() when parsing command status
  packet for LE create connection, extended create connection,
  add/remove/clear whitelist commands

DETAILS:

* Bluetooth classic commands:
  - CMD_CREATE_CONNECTION
  - CMD_DISCONNECT
  - CMD_CREATE_CONNECTION_CANCEL
  - CMD_ACCEPT_CONNECTION_REQUEST
  - CMD_REJECT_CONNECTION_REQUEST
  - CMD_SETUP_ESCO_CONNECTION
  - CMD_ACCEPT_ESCO_CONNECTION
  - CMD_REJECT_ESCO_CONNECTION
  - CMD_ENH_SETUP_ESCO_CONNECTION
  - CMD_ENH_ACCEPT_ESCO_CONNECTION
* Bluetooth low energy commands:
  - CMD_BLE_CREATE_LL_CONN [Only logged when there is an error or initiator filter policy is 0x00]
  - CMD_BLE_CREATE_CONN_CANCEL [Only logged when there is an error]
  - CMD_BLE_EXTENDED_CREATE_CONNECTION [Only logged on error or when initiator filter policy is 0x00]
  - CMD_BLE_CLEAR_WHITE_LIST
  - CMD_BLE_ADD_WHITE_LIST
  - CMD_BLE_REMOVE_WHITE_LIST
* Bluetooth classic events:
  - EVT_CONNECTION_COMP
  - EVT_CONNECTION_REQUEST
  - EVT_DISCONNECTION_COMP
  - EVT_ESCO_CONNECTION_COMP
  - EVT_ESCO_CONNECTION_CHANGED
* Bluetooth low energy meta events:
  - BLE_EVT_CONN_COMPLETE_EVT
  - BLE_EVT_ENHANCED_CONN_COMPLETE_EVT

Bug: 112969790
Test: make and test drive statsd
Change-Id: I27fec5f008b2ba7485eb25c3190503e867a36614

5 years ago[automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.190105.001)...
Xin Li [Tue, 15 Jan 2019 02:41:07 +0000 (18:41 -0800)]
[automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.190105.001) into stage-aosp-master am: d1540dd00a -s ours
am: 013068b384 -s ours
am skip reason: subject contains skip directive

Change-Id: I26ce0f39503717ca8c366f9515b5d2757bdaa97d

5 years ago[automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.190105.001)...
Xin Li [Tue, 15 Jan 2019 02:19:14 +0000 (18:19 -0800)]
[automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.190105.001) into stage-aosp-master
am: d1540dd00a -s ours
am skip reason: subject contains skip directive

Change-Id: Ib4cacbf12afe380e31e507a4da05c1ed24660894

5 years agoDO NOT MERGE - Merge pie-platform-release (PPRL.190105.001) into stage-aosp-master
Xin Li [Tue, 15 Jan 2019 00:14:40 +0000 (16:14 -0800)]
DO NOT MERGE - Merge pie-platform-release (PPRL.190105.001) into stage-aosp-master

Bug: 122685541
Change-Id: I579759f87bab672ef5189f9d13e8417651a04d60

5 years agoMerge "Fix BT a bad/ out of bounds array read" am: 7da7696e07 am: 3e5b229b14
Sal Savage [Mon, 14 Jan 2019 23:51:29 +0000 (15:51 -0800)]
Merge "Fix BT a bad/ out of bounds array read" am: 7da7696e07 am: 3e5b229b14
am: 32ca69f64c

Change-Id: Ifbfcdb65a9ed3b544b161afacebb986d61c2c12f

5 years agoMerge "Fix BT a bad/ out of bounds array read" am: 7da7696e07
Sal Savage [Mon, 14 Jan 2019 23:02:49 +0000 (15:02 -0800)]
Merge "Fix BT a bad/ out of bounds array read" am: 7da7696e07
am: 3e5b229b14

Change-Id: Ic087f8ab710e00b55a7174da329563a51e10c3ff

5 years agoMerge "Fix BT a bad/ out of bounds array read"
Sal Savage [Mon, 14 Jan 2019 22:12:00 +0000 (14:12 -0800)]
Merge "Fix BT a bad/ out of bounds array read"
am: 7da7696e07

Change-Id: Idca50acaa84f59f95800e94a846247824d0341ef

5 years agoSnap for 5230900 from aa9c1b4abdb2ca7beea467f7be82e83363a32b11 to pi-platform-release
android-build-team Robot [Mon, 14 Jan 2019 22:03:03 +0000 (22:03 +0000)]
Snap for 5230900 from aa9c1b4abdb2ca7beea467f7be82e83363a32b11 to pi-platform-release

Change-Id: I50623117c36dbe20a0c8d120a7115628a2f53566

5 years agoMerge "Fix BT a bad/ out of bounds array read"
Sal Savage [Mon, 14 Jan 2019 21:43:55 +0000 (21:43 +0000)]
Merge "Fix BT a bad/ out of bounds array read"

5 years agoMerge "SMP: Fix invalid auth_req in LE Security Request handler" am: 6ab305324d am...
Manoj Babulal [Mon, 14 Jan 2019 14:38:46 +0000 (06:38 -0800)]
Merge "SMP: Fix invalid auth_req in LE Security Request handler" am: 6ab305324d am: 7510bae535
am: 2b42344368

Change-Id: Ia1e773a00bae13889d3b6a606acf6b00db5622e9

5 years agoMerge "SMP: Fix invalid auth_req in LE Security Request handler" am: 6ab305324d
Manoj Babulal [Mon, 14 Jan 2019 14:34:57 +0000 (06:34 -0800)]
Merge "SMP: Fix invalid auth_req in LE Security Request handler" am: 6ab305324d
am: 7510bae535

Change-Id: Idf624b3c261f06f82089f81c718390eee691ba15

5 years agoMerge "SMP: Fix invalid auth_req in LE Security Request handler"
Manoj Babulal [Mon, 14 Jan 2019 14:29:36 +0000 (06:29 -0800)]
Merge "SMP: Fix invalid auth_req in LE Security Request handler"
am: 6ab305324d

Change-Id: I408779f11d8778ebd188239e6a5f21e30d0f8f51

5 years agoMerge "SMP: Fix invalid auth_req in LE Security Request handler"
Treehugger Robot [Mon, 14 Jan 2019 14:23:01 +0000 (14:23 +0000)]
Merge "SMP: Fix invalid auth_req in LE Security Request handler"

5 years agoDo not crash on LE Create Connection "Command Disallowed" am: 9d52abf4d4 am: fa5ea4cb1b
Jakub Pawlowski [Mon, 14 Jan 2019 10:11:40 +0000 (02:11 -0800)]
Do not crash on LE Create Connection "Command Disallowed" am: 9d52abf4d4 am: fa5ea4cb1b
am: d1b13c63d6

Change-Id: I463bbb7c91e067e602a677c34272bf92a90bfda3

5 years agoDo not crash on LE Create Connection "Command Disallowed" am: 9d52abf4d4
Jakub Pawlowski [Mon, 14 Jan 2019 09:56:58 +0000 (01:56 -0800)]
Do not crash on LE Create Connection "Command Disallowed" am: 9d52abf4d4
am: fa5ea4cb1b

Change-Id: I5acfc319065ed6d2e2e30c769c826f8036b6e1f9

5 years agoDo not crash on LE Create Connection "Command Disallowed"
Jakub Pawlowski [Mon, 14 Jan 2019 09:32:03 +0000 (01:32 -0800)]
Do not crash on LE Create Connection "Command Disallowed"
am: 9d52abf4d4

Change-Id: Ie2db913998282a20ccf66406ada730347f240e5f

5 years agoDo not crash on LE Create Connection "Command Disallowed"
Jakub Pawlowski [Thu, 3 Jan 2019 14:13:11 +0000 (15:13 +0100)]
Do not crash on LE Create Connection "Command Disallowed"

Being in "Connecting" used to mean we are either doing direct
connection, or background connection procedure. Now we have just one
connection procedure. This means there is no ambiguity when the
controller responds with "Command Disallowed" - we know exactly which
state to go back to.

Bug: 110412113
Bug: 112827989
Test: there is no test, or reproduction scenarion to verify that
      Ran GattConnectTest for sanity

Change-Id: I9ed1cdc7ae4032cda4e8a166310eca0004c7f9dc

5 years agoSMP: Fix invalid auth_req in LE Security Request handler
Manoj Babulal [Thu, 27 Dec 2018 10:43:19 +0000 (02:43 -0800)]
SMP: Fix invalid auth_req in LE Security Request handler

Due to wrong pointer de-reference, auth_req value read
in smp_proc_sec_req (LE Security Request packet handler)
was invalid.

Logcat trace shows invalid auth_req value:
.. bt_smp  : smp_proc_sec_req: auth_req=0xf9
   ....
.. bt_smp  : smp_proc_sec_req: auth_req=0xe9

After the fix, auth_req value is correct:
.. bt_smp  : smp_proc_sec_req: auth_req=0x1
   ....
.. bt_smp  : smp_proc_sec_req: auth_req=0x5

This data flow can be traced in code on this path:
smp_data_received -> smp_sm_event -> smp_proc_sec_req

Issue seen after following change:
https://android-review.googlesource.com/c/platform/system/bt/+/492442

Issue was discovered during execution of PTS test
cases GAP/SEC/AUT/BV-13-C and GAP/SEC/AUT/BV-14-C.

Fixes: 122066779

Test: Verified logcat trace shows valid auth_req
value prints from smp_proc_sec_req() function

Change-Id: I072b4794fb56a05b7ac7f2f4ca606514d7524550

5 years agoJanuary Pi-platform-release merges
Adam Seaton [Fri, 11 Jan 2019 22:55:24 +0000 (22:55 +0000)]
January Pi-platform-release merges

Change-Id: Id66375f8b1f3329e82df3d0fdb06917c065209de

5 years agoMerge "btm_ble_gap: Check bound before accessing pointer"
TreeHugger Robot [Fri, 11 Jan 2019 19:37:58 +0000 (19:37 +0000)]
Merge "btm_ble_gap: Check bound before accessing pointer"

5 years agoFix BT a bad/ out of bounds array read
Sal Savage [Wed, 9 Jan 2019 20:50:07 +0000 (12:50 -0800)]
Fix BT a bad/ out of bounds array read

Bug: 121375525
Test: Used automotive hardware and verified that pairing and media
      streaming and control still work and crashes no longer happen.
Change-Id: I3476425131718aded980f57a8b9be92a8e9f9d3b

5 years agoFix potential NULL dereference in smp_proc_confirm am: 3c3fbd869f am: c92f39f7bd
Jakub Pawlowski [Fri, 11 Jan 2019 17:24:19 +0000 (09:24 -0800)]
Fix potential NULL dereference in smp_proc_confirm am: 3c3fbd869f am: c92f39f7bd
am: 099f65c6c1

Change-Id: I3a29b600ff72f0a57a189f6130577f5dac4d370f

5 years agoFix potential NULL dereference in smp_proc_confirm am: 3c3fbd869f
Jakub Pawlowski [Fri, 11 Jan 2019 17:01:12 +0000 (09:01 -0800)]
Fix potential NULL dereference in smp_proc_confirm am: 3c3fbd869f
am: c92f39f7bd

Change-Id: Ibaa9eb509f5228b00f6474bef190dced059b1662

5 years agoFix potential NULL dereference in smp_proc_confirm
Jakub Pawlowski [Fri, 11 Jan 2019 16:55:05 +0000 (08:55 -0800)]
Fix potential NULL dereference in smp_proc_confirm
am: 3c3fbd869f

Change-Id: I1b3175cb9a393da80adc52c886993af89788e48c

5 years agoFix potential NULL dereference in smp_proc_confirm
Jakub Pawlowski [Fri, 11 Jan 2019 12:43:33 +0000 (13:43 +0100)]
Fix potential NULL dereference in smp_proc_confirm

Bug: 122102910
Test: compilation
Change-Id: Idd16e1c1924165924847f1aad64ddd44a8a1b8ab

5 years agobtm_ble_gap: Check bound before accessing pointer
Hansong Zhang [Fri, 11 Jan 2019 01:55:24 +0000 (17:55 -0800)]
btm_ble_gap: Check bound before accessing pointer

Bug: 121325979
Test: POC
Change-Id: Id1dcaf82bda245ce1ef7bbde153977effb417e92

5 years agoMerge "Fix bt_trace.h #define" am: fa41623e98 am: 34ec29ab65
Jack He [Fri, 11 Jan 2019 00:51:05 +0000 (16:51 -0800)]
Merge "Fix bt_trace.h #define" am: fa41623e98 am: 34ec29ab65
am: db8f004611

Change-Id: Ib25c29f315b71b6b88939a2cda9979737af5c91d

5 years agoMerge "Fix bt_trace.h #define" am: fa41623e98
Jack He [Fri, 11 Jan 2019 00:46:58 +0000 (16:46 -0800)]
Merge "Fix bt_trace.h #define" am: fa41623e98
am: 34ec29ab65

Change-Id: I025a6fe7c81d6fe85f78feaffb13750cb3889b78

5 years agoMerge "Fix bt_trace.h #define"
Jack He [Fri, 11 Jan 2019 00:38:51 +0000 (16:38 -0800)]
Merge "Fix bt_trace.h #define"
am: fa41623e98

Change-Id: I5bafe65f8e17b3daaae84d569878ba27a4ad2407

5 years agoMerge "Fix bt_trace.h #define"
Treehugger Robot [Fri, 11 Jan 2019 00:21:24 +0000 (00:21 +0000)]
Merge "Fix bt_trace.h #define"

5 years agoAdd host tests to TEST_MAPPING am: 491407dbad am: cbed4516db
Dan Shi [Thu, 10 Jan 2019 23:18:01 +0000 (15:18 -0800)]
Add host tests to TEST_MAPPING am: 491407dbad am: cbed4516db
am: 7e7f400549

Change-Id: Ic819c3e9a77656d718f58823529b822ca3e073dc

5 years agoAdd host tests to TEST_MAPPING am: 491407dbad
Dan Shi [Thu, 10 Jan 2019 23:06:50 +0000 (15:06 -0800)]
Add host tests to TEST_MAPPING am: 491407dbad
am: cbed4516db

Change-Id: I9cf9bfe5cc4e74084eb0712f3636fa25a2a7e783

5 years agoAdd host tests to TEST_MAPPING
Dan Shi [Thu, 10 Jan 2019 23:00:45 +0000 (15:00 -0800)]
Add host tests to TEST_MAPPING
am: 491407dbad

Change-Id: I09538ad40d6d5c02f83fe9c870711ebbd7004c1e

5 years agoAdd host tests to TEST_MAPPING
Dan Shi [Thu, 10 Jan 2019 18:55:23 +0000 (10:55 -0800)]
Add host tests to TEST_MAPPING

Also added some missing test_suites setting.

Following tests don't have host_supported set to true in Android.bp:
net_test_audio_a2dp_hw
net_test_btif
net_test_btif_profile_queue
net_test_device
net_test_hci
net_test_stack
net_test_stack_ad_parser
net_test_stack_smp

Following tests failed to run in host with error "did not report any run":
net_test_performance
net_test_stack_rfcomm

Bug: 111921389
Test: system/bt$ atest --host :postsubmit
Change-Id: I5f55cead7a2ad1cadea48220f45781f4f74949dd

5 years ago[automerger skipped] Remove code related to Health Device Profile and MCAP Protocol...
Jack He [Thu, 10 Jan 2019 05:19:51 +0000 (21:19 -0800)]
[automerger skipped] Remove code related to Health Device Profile and MCAP Protocol am: 238f8359a9 am: 0f94b1686a
am: 898dcc87d4 -s ours
am skip reason: change_id I3da1173a8a928af4b26a29e71746241c22af2236 with SHA1 dc13609b58 is in history

Change-Id: I5b588629994ff7756ed91e21f4407730d526aade

5 years agoRemove code related to Health Device Profile and MCAP Protocol am: 238f8359a9
Jack He [Thu, 10 Jan 2019 05:00:05 +0000 (21:00 -0800)]
Remove code related to Health Device Profile and MCAP Protocol am: 238f8359a9
am: 0f94b1686a

Change-Id: Ic2f7a7297e650869d23944ed34fba183e8bd699b

5 years agoFix bt_trace.h #define
Jack He [Thu, 10 Jan 2019 04:47:57 +0000 (20:47 -0800)]
Fix bt_trace.h #define

Test: make
Change-Id: Ie1177f2311db0b7b5dfb440f3f982d4a79aa460d

5 years agoRemove code related to Health Device Profile and MCAP Protocol
Jack He [Thu, 10 Jan 2019 04:51:00 +0000 (20:51 -0800)]
Remove code related to Health Device Profile and MCAP Protocol
am: 238f8359a9

Change-Id: Ib10cda753d45163b4d799ca4c1275fb43284c336

5 years agoRemove code related to Health Device Profile and MCAP Protocol
Jack He [Fri, 4 Jan 2019 01:11:24 +0000 (17:11 -0800)]
Remove code related to Health Device Profile and MCAP Protocol

* Health Device Profile (HDP) and MCAP protocol has been largely
  replaced by BLE. New applications should use Bluetooth Low Energy
  instead of legacy Bluetooth Health Device Profile

Bug: 111562841
Test: make, unit test, use Bluetooth
Change-Id: I3da1173a8a928af4b26a29e71746241c22af2236
Merged-In: I3da1173a8a928af4b26a29e71746241c22af2236
(cherry picked from commit dc13609b58b2f6c6185951f650036f5098e19e92)

5 years agoMerge "HCI: Simplify btu_hcif_hdl_command_status()" am: e5e0a70209 am: aa97fdca84
Jack He [Wed, 9 Jan 2019 22:25:02 +0000 (14:25 -0800)]
Merge "HCI: Simplify btu_hcif_hdl_command_status()" am: e5e0a70209 am: aa97fdca84
am: 39138f4de2

Change-Id: Icc23fbf7726011e0fff2c31c04a2ea5e92b77165

5 years agoMerge "HCI: Simplify btu_hcif_hdl_command_status()" am: e5e0a70209
Jack He [Wed, 9 Jan 2019 22:21:53 +0000 (14:21 -0800)]
Merge "HCI: Simplify btu_hcif_hdl_command_status()" am: e5e0a70209
am: aa97fdca84

Change-Id: I8ed8bc5e8d832931dcf6e3aa6e03ed6ea47309db

5 years agoMerge "HCI: Simplify btu_hcif_hdl_command_status()"
Jack He [Wed, 9 Jan 2019 22:16:44 +0000 (14:16 -0800)]
Merge "HCI: Simplify btu_hcif_hdl_command_status()"
am: e5e0a70209

Change-Id: Icc28b7e93f3f94b82bdbfc7ab923b12b985fdff3

5 years agoMerge "HCI: Simplify btu_hcif_hdl_command_status()"
Treehugger Robot [Wed, 9 Jan 2019 21:59:39 +0000 (21:59 +0000)]
Merge "HCI: Simplify btu_hcif_hdl_command_status()"

5 years agoMerge "Remove code related to Health Device Profile and MCAP Protocol"
TreeHugger Robot [Wed, 9 Jan 2019 21:53:54 +0000 (21:53 +0000)]
Merge "Remove code related to Health Device Profile and MCAP Protocol"

5 years agoMerge "Group all Hearing Aids device information together" am: 89be950b16 am: 4285cebeff
Stanley Tng [Wed, 9 Jan 2019 17:55:25 +0000 (09:55 -0800)]
Merge "Group all Hearing Aids device information together" am: 89be950b16 am: 4285cebeff
am: 917be076aa

Change-Id: Ic54ca53200e431a3ad81efdde93b4c2548b98ff0

5 years agoMerge "Group all Hearing Aids device information together" am: 89be950b16
Stanley Tng [Wed, 9 Jan 2019 17:51:19 +0000 (09:51 -0800)]
Merge "Group all Hearing Aids device information together" am: 89be950b16
am: 4285cebeff

Change-Id: I02646285ae39ac9881c9621d5072c8fea7efaf32

5 years agoMerge "Group all Hearing Aids device information together"
Stanley Tng [Wed, 9 Jan 2019 17:47:12 +0000 (09:47 -0800)]
Merge "Group all Hearing Aids device information together"
am: 89be950b16

Change-Id: I803e04fb6d5f7322eea16aa2f9d3637643a8f00f

5 years agoMerge "Group all Hearing Aids device information together"
Treehugger Robot [Wed, 9 Jan 2019 17:36:40 +0000 (17:36 +0000)]
Merge "Group all Hearing Aids device information together"

5 years agoHCI: Simplify btu_hcif_hdl_command_status()
Jack He [Wed, 9 Jan 2019 01:48:20 +0000 (17:48 -0800)]
HCI: Simplify btu_hcif_hdl_command_status()

* Move 2nd layer switch statements into top layer
* Check if p_cmd is nullptr at the beginning of the function so
  that each case does not need to check it individually. p_cmd
  is never null.
* Skip parameter total length at beginning of the function

Test: make, unit test, use Bluetooth for music and calls
Change-Id: I23cf983a1ade44bcea0b1009860efdfaf3b8bca8