OSDN Git Service

android-x86/system-bt.git
3 years agoAdd main/shim/helpers::debug::DumpBtHdr am: 81e50d6cf0
Chris Manton [Sat, 17 Oct 2020 23:58:27 +0000 (23:58 +0000)]
Add main/shim/helpers::debug::DumpBtHdr am: 81e50d6cf0

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1460809

Change-Id: I2e59386a1048a6467e202aa510e2527cf04cfe0a

3 years agoAdd main/shim/helpers::debug::DumpBtHdr
Chris Manton [Wed, 14 Oct 2020 15:44:19 +0000 (08:44 -0700)]
Add main/shim/helpers::debug::DumpBtHdr

Bug: 166280067
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I8593550041440c23f1b8eddef4e51a962e317768

3 years agoAdd main/shim/acl_legacy_interface::on_packets_completed am: 4ebd9b7464
Chris Manton [Sat, 17 Oct 2020 03:02:40 +0000 (03:02 +0000)]
Add main/shim/acl_legacy_interface::on_packets_completed am: 4ebd9b7464

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1460806

Change-Id: I8dd5a38a744cc6b97d986e52b2aa71bf486556cb

3 years agoenum-ify stack/btm/security_device_record::BTM_SEC_STATE_ am: 3f86f5a247
Chris Manton [Sat, 17 Oct 2020 00:10:10 +0000 (00:10 +0000)]
enum-ify stack/btm/security_device_record::BTM_SEC_STATE_ am: 3f86f5a247

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1459357

Change-Id: I82f5b25669008d0ab3695fd4f10be6107eecdfe2

3 years agoAdd main/shim/acl_legacy_interface::on_packets_completed
Chris Manton [Wed, 14 Oct 2020 14:57:40 +0000 (07:57 -0700)]
Add main/shim/acl_legacy_interface::on_packets_completed

Bug: 166280067
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: Ib26e66fbc3ec1e441bb6ffbf368f77e6fa60699f

3 years agoenum-ify stack/btm/security_device_record::BTM_SEC_STATE_
Chris Manton [Mon, 5 Oct 2020 00:11:13 +0000 (17:11 -0700)]
enum-ify stack/btm/security_device_record::BTM_SEC_STATE_

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: I2b44dfca2d36c815d65c786ca7371cc24788bcca

3 years agoTake EventCode::DISCONNECTION_COMPLETE if acl shim is enabled am: 255faddb20
Chris Manton [Fri, 16 Oct 2020 18:40:26 +0000 (18:40 +0000)]
Take EventCode::DISCONNECTION_COMPLETE if acl shim is enabled am: 255faddb20

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1460805

Change-Id: Ic1dc1372d9e381258f3e02505b3973f7109ec054

3 years agoUse proper undefined hci error status code am: 2f5249a191
Chris Manton [Fri, 16 Oct 2020 18:40:22 +0000 (18:40 +0000)]
Use proper undefined hci error status code am: 2f5249a191

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1460804

Change-Id: Iec65a03c54460bca886cf320a790f88356453daa

3 years agoInclude hci_error_code in acl_hci/ble_acl interfaces am: 7768eb542a
Chris Manton [Fri, 16 Oct 2020 18:40:18 +0000 (18:40 +0000)]
Include hci_error_code in acl_hci/ble_acl interfaces am: 7768eb542a

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1460803

Change-Id: I9cc14761f4ebe0bdf500cf1e1e621436b43dd35c

3 years agoenum-ify stack/include/::hci_error_code am: 69d5cb2ceb
Chris Manton [Fri, 16 Oct 2020 18:40:13 +0000 (18:40 +0000)]
enum-ify stack/include/::hci_error_code am: 69d5cb2ceb

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1460802

Change-Id: Ie9e2daca132ddaee8fb074e4f5f97d92b768ca7a

3 years agoStreamline stack/btm/btm_ble_gap::BTM_BleSetScanParams am: 335c1a91fb
Chris Manton [Fri, 16 Oct 2020 18:39:33 +0000 (18:39 +0000)]
Streamline stack/btm/btm_ble_gap::BTM_BleSetScanParams am: 335c1a91fb

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1459360

Change-Id: Ie5eb78bc88b0823037a8213acdfee49a0a74d987

3 years agoTake EventCode::DISCONNECTION_COMPLETE if acl shim is enabled
Chris Manton [Wed, 14 Oct 2020 06:29:35 +0000 (23:29 -0700)]
Take EventCode::DISCONNECTION_COMPLETE if acl shim is enabled

Bug: 166280067
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: Iada55f394e79c197bbb3534c8376a32a040989e5

3 years agoUse proper undefined hci error status code
Chris Manton [Wed, 14 Oct 2020 16:13:00 +0000 (09:13 -0700)]
Use proper undefined hci error status code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I2a95b74e8a8a3b31ec63e2ef64070ab4c2d374f1

3 years agoInclude hci_error_code in acl_hci/ble_acl interfaces
Chris Manton [Wed, 14 Oct 2020 16:44:27 +0000 (09:44 -0700)]
Include hci_error_code in acl_hci/ble_acl interfaces

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: Ic06d5fbfcbba0a5bb1cb4f7f64354942959af46c

3 years agoenum-ify stack/include/::hci_error_code
Chris Manton [Wed, 14 Oct 2020 06:27:27 +0000 (23:27 -0700)]
enum-ify stack/include/::hci_error_code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: Ibb48638187a777e307321ea1c309387f0290c4c6

3 years agoStreamline stack/btm/btm_ble_gap::BTM_BleSetScanParams
Chris Manton [Mon, 5 Oct 2020 15:16:45 +0000 (08:16 -0700)]
Streamline stack/btm/btm_ble_gap::BTM_BleSetScanParams

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: I24971c11203a47a4f06c12b39af2191860666e74

3 years agoMerge "bt: don't conditionally dereference an undefined pointer" am: 193634b010
Treehugger Robot [Fri, 16 Oct 2020 14:06:36 +0000 (14:06 +0000)]
Merge "bt: don't conditionally dereference an undefined pointer" am: 193634b010

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1458581

Change-Id: Iccca813bc2d6a937009b4bc3db727dea29b92777

3 years agoMerge "bt: don't conditionally dereference an undefined pointer"
Treehugger Robot [Fri, 16 Oct 2020 13:39:56 +0000 (13:39 +0000)]
Merge "bt: don't conditionally dereference an undefined pointer"

3 years agoStreamline stack/l2cap/l2c_ble::L2CA_GetBleConnRole am: e15614b575
Chris Manton [Fri, 16 Oct 2020 11:12:34 +0000 (11:12 +0000)]
Streamline stack/l2cap/l2c_ble::L2CA_GetBleConnRole am: e15614b575

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1460811

Change-Id: Ic166f4f4a8291ba3186a3afe9b98aaa1373755b9

3 years agoInternally link stack/hid/hidh_conn:: am: cae38eece8
Chris Manton [Fri, 16 Oct 2020 11:12:30 +0000 (11:12 +0000)]
Internally link stack/hid/hidh_conn:: am: cae38eece8

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1459359

Change-Id: I1817a20550e0926e90380a1b7b1fb61867b9e9d2

3 years agoRemove unused code am: 3de29288a4
Chris Manton [Fri, 16 Oct 2020 11:11:45 +0000 (11:11 +0000)]
Remove unused code am: 3de29288a4

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1459358

Change-Id: I8ea2ea02b5181ff67a8cc6a42ff9e924249307f0

3 years agoStreamline stack/l2cap/l2c_ble::L2CA_GetBleConnRole
Chris Manton [Mon, 12 Oct 2020 15:31:58 +0000 (08:31 -0700)]
Streamline stack/l2cap/l2c_ble::L2CA_GetBleConnRole

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: Iad905f404a8cfead76b74ec3ed10f9d50b0ec8df

3 years agoInternally link stack/hid/hidh_conn::
Chris Manton [Mon, 5 Oct 2020 05:44:10 +0000 (22:44 -0700)]
Internally link stack/hid/hidh_conn::

hidh_try_repage
hidh_process_repage_timer_timeout

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: Ia6e0e29fc7a466d5441b991ce38211f5378dfcb9

3 years agoRemove unused code
Chris Manton [Mon, 5 Oct 2020 00:11:24 +0000 (17:11 -0700)]
Remove unused code

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: I646bd2f5ee59cd0ba3cf321a04c143605251b438

3 years agoMerge changes I3120d8a3,I784dfcb7 am: 211bc5edcc
Treehugger Robot [Fri, 16 Oct 2020 05:44:36 +0000 (05:44 +0000)]
Merge changes I3120d8a3,I784dfcb7 am: 211bc5edcc

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1463044

Change-Id: I352ab13165e59a9c1293ad10eb2b5013a38ea46d

3 years agoMerge changes I3120d8a3,I784dfcb7
Treehugger Robot [Fri, 16 Oct 2020 04:48:01 +0000 (04:48 +0000)]
Merge changes I3120d8a3,I784dfcb7

* changes:
  Cuttlefish: Call SCO callback for SCO packet
  Cuttlefish: Log an error and close on !isOk()

3 years agoCuttlefish: Call SCO callback for SCO packet
Myles Watson [Thu, 15 Oct 2020 23:16:43 +0000 (16:16 -0700)]
Cuttlefish: Call SCO callback for SCO packet

Bug: 171000929
Test: compiles
Change-Id: I3120d8a35e9c278ad63acce1653dd8737da0ad27

3 years agoCuttlefish: Log an error and close on !isOk()
Myles Watson [Thu, 15 Oct 2020 23:16:21 +0000 (16:16 -0700)]
Cuttlefish: Log an error and close on !isOk()

Bug: 170189916
Test: device health tests
Change-Id: I784dfcb7fe9f92158406531582029770bc55679e

3 years agoMerge "Logging: Improve logging in legacy L2CAP to help debugging" am: 37bdd43c2b
Treehugger Robot [Thu, 15 Oct 2020 20:19:12 +0000 (20:19 +0000)]
Merge "Logging: Improve logging in legacy L2CAP to help debugging" am: 37bdd43c2b

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1461447

Change-Id: I1d160b97cb623907407b43cdd1d18dde22b6aa00

3 years agoMerge "Logging: Improve logging in legacy L2CAP to help debugging"
Treehugger Robot [Thu, 15 Oct 2020 19:54:41 +0000 (19:54 +0000)]
Merge "Logging: Improve logging in legacy L2CAP to help debugging"

3 years agoMerge changes Id0a22412,I4a18d89e,I8b70fb37,I3d030824 am: c89dbbe295
Treehugger Robot [Thu, 15 Oct 2020 19:28:56 +0000 (19:28 +0000)]
Merge changes Id0a22412,I4a18d89e,I8b70fb37,I3d030824 am: c89dbbe295

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1459355

Change-Id: I9b6b04e3a0170adca2bdf52c72e36a239ab1a7fc

3 years ago[automerger skipped] Merge "Updated SIG wording: whitelist to acceptlist" am: f2e87f0...
Chen Chen [Thu, 15 Oct 2020 19:27:45 +0000 (19:27 +0000)]
[automerger skipped] Merge "Updated SIG wording: whitelist to acceptlist" am: f2e87f0bf8 -s ours

am skip reason: Change-Id I6707def7cca06068fbbf25f1f403bb5fd31eb215 with SHA-1 c492b27d34 is in history

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1455051

Change-Id: I7514b11ac2a346b0a446ac17099254521911a2a9

3 years agoMerge changes Id0a22412,I4a18d89e,I8b70fb37,I3d030824
Treehugger Robot [Thu, 15 Oct 2020 19:07:22 +0000 (19:07 +0000)]
Merge changes Id0a22412,I4a18d89e,I8b70fb37,I3d030824

* changes:
  enum-ify stack/include/btm_api_types::BTM_SEC_MODE_
  Re-log stack/l2cap/l2c_api::L2CA_SendFixedChnlData
  Re-log stack/gatt/gatt_cl::gatt_act_discovery
  Re-log stack/gatt/att_protocol::attp_send_msg_to_l2cap

3 years agoMerge "Updated SIG wording: whitelist to acceptlist"
Chen Chen [Thu, 15 Oct 2020 19:03:12 +0000 (19:03 +0000)]
Merge "Updated SIG wording: whitelist to acceptlist"

3 years agoMerge "Propagate the bluetooth activity attribution hci log flag to the native layer...
Treehugger Robot [Thu, 15 Oct 2020 18:32:41 +0000 (18:32 +0000)]
Merge "Propagate the bluetooth activity attribution hci log flag to the native layer." am: b4a8d79348

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1461222

Change-Id: I68dce9e519a2a7700d8e949dd145739fe5cdac2d

3 years agoMerge "Propagate the bluetooth activity attribution hci log flag to the native layer."
Treehugger Robot [Thu, 15 Oct 2020 18:08:01 +0000 (18:08 +0000)]
Merge "Propagate the bluetooth activity attribution hci log flag to the native layer."

3 years agoMerge "Updated SIG wording: whitelist to acceptlist" into stage-aosp-master
TreeHugger Robot [Thu, 15 Oct 2020 17:59:17 +0000 (17:59 +0000)]
Merge "Updated SIG wording: whitelist to acceptlist" into stage-aosp-master

3 years agoRe-log stack/gatt/gatt_api::GATTC_Discover am: 05ededb03d
Chris Manton [Thu, 15 Oct 2020 09:17:03 +0000 (09:17 +0000)]
Re-log stack/gatt/gatt_api::GATTC_Discover am: 05ededb03d

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1459351

Change-Id: I2ba824b61a7f7f574691fdae052c833f2b3ae17f

3 years agoPropagate the bluetooth activity attribution hci log flag to the native
Rahul Sabnis [Wed, 14 Oct 2020 18:29:19 +0000 (11:29 -0700)]
Propagate the bluetooth activity attribution hci log flag to the native
layer.

Tag: #feature
Bug: 170769651
Test: atest bluetooth_test_gd:InitFlagsTest
Change-Id: I5c7384ee028d8a688dd391558541714d9121064e

3 years agoenum-ify stack/include/btm_api_types::BTM_SEC_MODE_
Chris Manton [Sun, 4 Oct 2020 23:06:46 +0000 (16:06 -0700)]
enum-ify stack/include/btm_api_types::BTM_SEC_MODE_

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: Id0a224123165082c4a4c6d9dcaa9c6d4dc9bdfbe

3 years agoRe-log stack/l2cap/l2c_api::L2CA_SendFixedChnlData
Chris Manton [Mon, 28 Sep 2020 20:46:14 +0000 (13:46 -0700)]
Re-log stack/l2cap/l2c_api::L2CA_SendFixedChnlData

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: I4a18d89e6c2035df8134462ac40e6401f3274790

3 years agoRe-log stack/gatt/gatt_cl::gatt_act_discovery
Chris Manton [Mon, 28 Sep 2020 20:46:01 +0000 (13:46 -0700)]
Re-log stack/gatt/gatt_cl::gatt_act_discovery

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: I8b70fb3717a6f89b4d667158f3f3f8cc35a5ef16

3 years agoRe-log stack/gatt/att_protocol::attp_send_msg_to_l2cap
Chris Manton [Mon, 28 Sep 2020 20:45:48 +0000 (13:45 -0700)]
Re-log stack/gatt/att_protocol::attp_send_msg_to_l2cap

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: I3d030824629bb43cfc7f2b6d8e1c4367f591017e

3 years agoRe-log stack/gatt/gatt_api::GATTC_Discover
Chris Manton [Mon, 28 Sep 2020 16:00:54 +0000 (09:00 -0700)]
Re-log stack/gatt/gatt_api::GATTC_Discover

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: Ib28229c431785d31888cfd8163329f0959fd066b

3 years agoMerge "Inclusive Language Updates" am: d13ed2899d
Treehugger Robot [Thu, 15 Oct 2020 01:13:46 +0000 (01:13 +0000)]
Merge "Inclusive Language Updates" am: d13ed2899d

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1456151

Change-Id: I3975580124676da55472a2a285cbf782fc62be3e

3 years agoMerge "Inclusive Language Updates"
Treehugger Robot [Thu, 15 Oct 2020 00:48:20 +0000 (00:48 +0000)]
Merge "Inclusive Language Updates"

3 years agoLogging: Improve logging in legacy L2CAP to help debugging
Jack He [Thu, 15 Oct 2020 00:16:04 +0000 (17:16 -0700)]
Logging: Improve logging in legacy L2CAP to help debugging

Bug: 170603745
Test: build
Tag: #gd-refactor
Change-Id: Icca1f5bd2ba15601799dc14d2dbb444f76b60f5f

3 years agoUpdated SIG wording: whitelist to acceptlist
Chen Chen [Mon, 12 Oct 2020 20:03:48 +0000 (13:03 -0700)]
Updated SIG wording: whitelist to acceptlist

Bug: 170342881
Tag: #refactor
Test: atest --host bluetooth_test_common
Test: atest --host bluetooth_test_gd
Test: atest net_test_btif
BYPASS_INCLUSIVE_LANGUAGE_REASON=required to explain the update
Ignore-AOSP-First: Conflict with git_master.
Need to merge in internal first
Merged-In: I6707def7cca06068fbbf25f1f403bb5fd31eb215
Change-Id: I6707def7cca06068fbbf25f1f403bb5fd31eb215

3 years agoInclusive Language Updates
Martin Brabham [Mon, 12 Oct 2020 20:17:47 +0000 (13:17 -0700)]
Inclusive Language Updates

master -> central
MASTER -> CENTRAL
Master -> Central

BYPASS_INCLUSIVE_LANGUAGE_REASON=required to explain the update

Bug: 170342881
Tag: #refactor
Test: cert/run --host
Test: atest --host bluetooth_test_common
Test: atest --host bluetooth_test_gd
Test: atest net_test_btif
Change-Id: I861ca756f04c06547ee9cb580029404308c678f2
Merged-In: I861ca756f04c06547ee9cb580029404308c678f2

3 years agoMerge "Add aac vbr support for net_test_stack" am: 06aa68f6f8
Treehugger Robot [Wed, 14 Oct 2020 16:18:55 +0000 (16:18 +0000)]
Merge "Add aac vbr support for net_test_stack" am: 06aa68f6f8

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1455158

Change-Id: I8cc2fdcb188a7b67070290e9a8c1af44a8f64e89

3 years agoMerge "Add aac vbr support for net_test_stack"
Treehugger Robot [Wed, 14 Oct 2020 15:36:29 +0000 (15:36 +0000)]
Merge "Add aac vbr support for net_test_stack"

3 years agoUpdated SIG wording: whitelist to acceptlist
Chen Chen [Mon, 12 Oct 2020 20:03:48 +0000 (13:03 -0700)]
Updated SIG wording: whitelist to acceptlist

Bug: 170342881
Tag: #refactor
Test: atest --host bluetooth_test_common
Test: atest --host bluetooth_test_gd
Test: atest net_test_btif
Merged-In: I6707def7cca06068fbbf25f1f403bb5fd31eb215
BYPASS_INCLUSIVE_LANGUAGE_REASON=required to explain the update

Change-Id: I6707def7cca06068fbbf25f1f403bb5fd31eb215

3 years agoMerge "HFP: Open SLC after AT+BIND if HF indicators supported" am: b549e96242
Treehugger Robot [Wed, 14 Oct 2020 02:34:02 +0000 (02:34 +0000)]
Merge "HFP: Open SLC after AT+BIND if HF indicators supported" am: b549e96242

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1458182

Change-Id: Icf0424c5d3c29bb32a386ba0c81bdc724b86a929

3 years agoMerge "HFP: Open SLC after AT+BIND if HF indicators supported"
Treehugger Robot [Wed, 14 Oct 2020 01:59:27 +0000 (01:59 +0000)]
Merge "HFP: Open SLC after AT+BIND if HF indicators supported"

3 years agoHFP: Open SLC after AT+BIND if HF indicators supported
Chienyuan [Tue, 13 Oct 2020 08:23:59 +0000 (16:23 +0800)]
HFP: Open SLC after AT+BIND if HF indicators supported

If HF indicators is supported by HF and AG. Service Level Connection
shall consider established after the HF has successfully retrieved
information about HF indicators currently enabled by the AG using the
AT+BIND? command.

Bug: 169935138
Test: connect headset during a call
Tag: #compatibility
Change-Id: I67cfac3b035904a2375c77d726a8e16accf2b014

3 years agoMerge "l2c: Fix invalid p_lcb usage" am: a75531b164
Treehugger Robot [Tue, 13 Oct 2020 22:50:40 +0000 (22:50 +0000)]
Merge "l2c: Fix invalid p_lcb usage" am: a75531b164

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1458302

Change-Id: I077fa1706dd85b8e6b0fa35c6222e3670b946d1c

3 years agobt: don't conditionally dereference an undefined pointer
George Burgess IV [Tue, 13 Oct 2020 16:33:09 +0000 (09:33 -0700)]
bt: don't conditionally dereference an undefined pointer

If `lcids` is empty here, the `p_ccb->p_lcb` access on line 898 uses an
uninitialized pointer. We ideally shouldn't be doing that.

Caught by the static analyzer:
system/bt/stack/l2cap/l2c_api.cc:889:21: warning: Dereference of
undefined pointer value [clang-analyzer-core.NullDereference]

Tag: #security
Bug: 159786353
Test: TreeHugger
Change-Id: Ifbcdb3f2f297b2bf3ff5324b6fb4039fecade43f

3 years agoMerge "l2c: Fix invalid p_lcb usage"
Treehugger Robot [Tue, 13 Oct 2020 22:35:02 +0000 (22:35 +0000)]
Merge "l2c: Fix invalid p_lcb usage"

3 years agoEnum-ify bta/include/bta_gatt_api::tBTA_GATTC_EVT am: e221d1f418
Chris Manton [Tue, 13 Oct 2020 20:51:45 +0000 (20:51 +0000)]
Enum-ify bta/include/bta_gatt_api::tBTA_GATTC_EVT am: e221d1f418

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1458591

Change-Id: I266a0379175926efbb704e4e932071b5b4a35a1e

3 years agoAdd stack/l2cap/l2c_api::l2c_get_transport_from_fixed_cid am: 8c1cdf4dbb
Chris Manton [Tue, 13 Oct 2020 20:51:42 +0000 (20:51 +0000)]
Add stack/l2cap/l2c_api::l2c_get_transport_from_fixed_cid am: 8c1cdf4dbb

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1458590

Change-Id: Ib36f662c40e23822340f881c46b27a2d75b85fc8

3 years agoAdd stack/gatt/gatt_main::GattClientEventText am: 1b43d31733
Chris Manton [Tue, 13 Oct 2020 20:51:39 +0000 (20:51 +0000)]
Add stack/gatt/gatt_main::GattClientEventText am: 1b43d31733

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1458589

Change-Id: I60c7f0626e29620e988775dbaf80858edddccf63

3 years agoRe-log bta/dm/bta_dm_act::bta_dm_acl_up am: 286f502a73
Chris Manton [Tue, 13 Oct 2020 20:51:37 +0000 (20:51 +0000)]
Re-log bta/dm/bta_dm_act::bta_dm_acl_up am: 286f502a73

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1458588

Change-Id: Ie846392f879fe35f9adb935fd12f55be0f8fbd2b

3 years agoRe-log stack/l2cap/l2c_api::L2CA_ConnectFixedChnl am: 16c7467e86
Chris Manton [Tue, 13 Oct 2020 20:51:34 +0000 (20:51 +0000)]
Re-log stack/l2cap/l2c_api::L2CA_ConnectFixedChnl am: 16c7467e86

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1458587

Change-Id: I517e4df316e1fcb7d08bdf7d37ea5e9b8349ccb0

3 years agoRe-log ble acl disconnect path am: 3316d64aa4
Chris Manton [Tue, 13 Oct 2020 20:51:32 +0000 (20:51 +0000)]
Re-log ble acl disconnect path am: 3316d64aa4

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1458586

Change-Id: I6e2b0b79ff8f4fd876c7a72ec6690cab908682d3

3 years agoRe-log stack/gatt/gatt_api::GATT_ am: cbc946cd11
Chris Manton [Tue, 13 Oct 2020 20:51:29 +0000 (20:51 +0000)]
Re-log stack/gatt/gatt_api::GATT_ am: cbc946cd11

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1458585

Change-Id: I7d1169cf407dea6a580da5f6f05617970b574945

3 years agoAdd logtags stack/::gatt/gatt_cl ::smp/smp_main am: 512b18c947
Chris Manton [Tue, 13 Oct 2020 20:51:27 +0000 (20:51 +0000)]
Add logtags stack/::gatt/gatt_cl ::smp/smp_main am: 512b18c947

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1458584

Change-Id: I9164b1e3348308afd02ec5ce55f9bb8a857e79ba

3 years agoStreamline stack/acl/btm_acl::btm_ble_refresh_local_resolvable_private_addr am: e10c7...
Chris Manton [Tue, 13 Oct 2020 20:51:24 +0000 (20:51 +0000)]
Streamline stack/acl/btm_acl::btm_ble_refresh_local_resolvable_private_addr am: e10c700fb7

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1458583

Change-Id: Iae5f8fbc7fcd611b50202fcefed1a49763193a27

3 years agoRemove unused function stack/smp/smp_utils::smp_reverse_array am: a487dd5790
Chris Manton [Tue, 13 Oct 2020 20:50:28 +0000 (20:50 +0000)]
Remove unused function stack/smp/smp_utils::smp_reverse_array am: a487dd5790

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1458582

Change-Id: I8e5b035cfe7954e488063591b263656785da1246

3 years agoEnum-ify bta/include/bta_gatt_api::tBTA_GATTC_EVT
Chris Manton [Thu, 24 Sep 2020 16:18:27 +0000 (09:18 -0700)]
Enum-ify bta/include/bta_gatt_api::tBTA_GATTC_EVT

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: If5a4dd390ce0879a19ab5187d89d0c26a5d99395

3 years agoAdd stack/l2cap/l2c_api::l2c_get_transport_from_fixed_cid
Chris Manton [Mon, 12 Oct 2020 21:36:07 +0000 (14:36 -0700)]
Add stack/l2cap/l2c_api::l2c_get_transport_from_fixed_cid

Toward readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I8032481fbd4ef6ed14b821e1e04ed5498aba10e9

3 years agoAdd stack/gatt/gatt_main::GattClientEventText
Chris Manton [Thu, 24 Sep 2020 17:03:40 +0000 (10:03 -0700)]
Add stack/gatt/gatt_main::GattClientEventText

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: Ia8f074500d2951f15feae5608cb21c6f165871dc

3 years agoRe-log bta/dm/bta_dm_act::bta_dm_acl_up
Chris Manton [Thu, 24 Sep 2020 16:35:50 +0000 (09:35 -0700)]
Re-log bta/dm/bta_dm_act::bta_dm_acl_up

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: Ic61cc686952e0732d5740e8f53b2aa1854c079f0

3 years agoRe-log stack/l2cap/l2c_api::L2CA_ConnectFixedChnl
Chris Manton [Thu, 24 Sep 2020 16:03:16 +0000 (09:03 -0700)]
Re-log stack/l2cap/l2c_api::L2CA_ConnectFixedChnl

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I43cb37e6599e7b47bdf5d99de4d4ba7ce9eeac7e

3 years agoRe-log ble acl disconnect path
Chris Manton [Thu, 24 Sep 2020 06:12:14 +0000 (23:12 -0700)]
Re-log ble acl disconnect path

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I34680dc2a3ad25db4e1db804e4ea3eaf22ebc1e8

3 years agoRe-log stack/gatt/gatt_api::GATT_
Chris Manton [Thu, 24 Sep 2020 00:57:42 +0000 (17:57 -0700)]
Re-log stack/gatt/gatt_api::GATT_

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: Ia23baca22de44ab971d8a05280b13f1a0ec78d11

3 years agoAdd logtags stack/::gatt/gatt_cl ::smp/smp_main
Chris Manton [Tue, 13 Oct 2020 16:29:34 +0000 (09:29 -0700)]
Add logtags stack/::gatt/gatt_cl ::smp/smp_main

Toward loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I03108e275fdd1350d45ddae6c173a39095dd20ea

3 years agoStreamline stack/acl/btm_acl::btm_ble_refresh_local_resolvable_private_addr
Chris Manton [Tue, 13 Oct 2020 00:58:56 +0000 (17:58 -0700)]
Streamline stack/acl/btm_acl::btm_ble_refresh_local_resolvable_private_addr

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I9f01cebfa6f64ca2eaff28e7fceea48b3428cd10

3 years agoRemove unused function stack/smp/smp_utils::smp_reverse_array
Chris Manton [Mon, 12 Oct 2020 21:56:54 +0000 (14:56 -0700)]
Remove unused function stack/smp/smp_utils::smp_reverse_array

Toward readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I5526214a9aae5db40a93c396773c2789aa6b85b0

3 years agol2c: Fix invalid p_lcb usage
Łukasz Rymanowski [Tue, 13 Oct 2020 07:58:27 +0000 (07:58 +0000)]
l2c: Fix invalid p_lcb usage

Tag: #feature
Bug: 159786353
Sponsor: jpawlowski@
Test: compile & manual testing
Change-Id: Ic667f4281986dd16038e332baef4f35005998a1c

3 years agoMerge "Merge ab/6749736 in stage." into stage-aosp-master
TreeHugger Robot [Tue, 13 Oct 2020 03:31:31 +0000 (03:31 +0000)]
Merge "Merge ab/6749736 in stage." into stage-aosp-master

3 years agoAdd aac vbr support for net_test_stack
Alice Kuo [Thu, 8 Oct 2020 17:37:09 +0000 (01:37 +0800)]
Add aac vbr support for net_test_stack

The original a2dp stack test only supports aac cbr. Check the aac vbr
status in front of the related code section and then test different local test codec info and capability based on aac vbr status.

Tag: #feature
Bug: 170368057
Test: atest net_test_stack
Change-Id: I8dcada94eebe88d02a348d78a7ec8dce463c8600

3 years agoUse return condition to stack/l2cap/l2c_ble::l2cble_conn_comp am: a3d687c254
Chris Manton [Mon, 12 Oct 2020 20:19:15 +0000 (20:19 +0000)]
Use return condition to stack/l2cap/l2c_ble::l2cble_conn_comp am: a3d687c254

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1456346

Change-Id: I4aebeb507bfca80626b52b5e48d41ecccb99eb81

3 years agoAdd return condition to stack/l2cap/l2c_ble::l2cble_conn_comp am: 0c422c2027
Chris Manton [Mon, 12 Oct 2020 20:19:12 +0000 (20:19 +0000)]
Add return condition to stack/l2cap/l2c_ble::l2cble_conn_comp am: 0c422c2027

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1456345

Change-Id: I344078b46371b9100b22c81b58d201586227c249

3 years agoUse stack/acl/ble_acl::acl_ble_common_connection am: d32ececca3
Chris Manton [Mon, 12 Oct 2020 20:19:09 +0000 (20:19 +0000)]
Use stack/acl/ble_acl::acl_ble_common_connection am: d32ececca3

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1456344

Change-Id: I14e1f75f887d83ea7d8da43ed33b1a49429667e2

3 years agoAdd stack/acl/ble_acl::acl_ble_common_connection am: e8b08f55a0
Chris Manton [Mon, 12 Oct 2020 20:19:06 +0000 (20:19 +0000)]
Add stack/acl/ble_acl::acl_ble_common_connection am: e8b08f55a0

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1456343

Change-Id: I64d4b45dc6d827cd95a9b3417767827faf8f1a13

3 years agoGD-LOGGING: Do not allow LOG_TAG to be NULL am: 6d2d3d5b67
Jack He [Mon, 12 Oct 2020 17:27:48 +0000 (17:27 +0000)]
GD-LOGGING: Do not allow LOG_TAG to be NULL am: 6d2d3d5b67

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1456340

Change-Id: Ie9b97494ddbccbefb99d12dbe1cd981b9003dc5d

3 years agoUse return condition to stack/l2cap/l2c_ble::l2cble_conn_comp
Chris Manton [Fri, 9 Oct 2020 21:21:45 +0000 (14:21 -0700)]
Use return condition to stack/l2cap/l2c_ble::l2cble_conn_comp

Also pull in flow execution from l2c back to btm

Bug: 170396407
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: Ic8aa743376ca7f8a9f0b868dad4a59437af69847

3 years agoAdd return condition to stack/l2cap/l2c_ble::l2cble_conn_comp
Chris Manton [Fri, 9 Oct 2020 20:44:07 +0000 (13:44 -0700)]
Add return condition to stack/l2cap/l2c_ble::l2cble_conn_comp

Eventually not pass control here

Bug: 170396407
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: Idda6b2ad34499ce1a7ad0e7770cb973a9b5d44ec

3 years agoUse stack/acl/ble_acl::acl_ble_common_connection
Chris Manton [Fri, 9 Oct 2020 19:45:36 +0000 (12:45 -0700)]
Use stack/acl/ble_acl::acl_ble_common_connection

Bug: 170396407
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I18eb29f9a28cba0b259d512edd813fed6ac60e5a

3 years agoAdd stack/acl/ble_acl::acl_ble_common_connection
Chris Manton [Fri, 9 Oct 2020 19:44:27 +0000 (12:44 -0700)]
Add stack/acl/ble_acl::acl_ble_common_connection

Bug: 170396407
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: Ifdd54f756c1ef0c4fd2c8b9406aa015820a535f4

3 years agoGD-LOGGING: Do not allow LOG_TAG to be NULL
Jack He [Sat, 10 Oct 2020 00:57:31 +0000 (17:57 -0700)]
GD-LOGGING: Do not allow LOG_TAG to be NULL

* Check if it is null in log.h during compilation

Bug: 170163727
Test: atest bluetooth_test_gd
Tag: #gd-refactor
Change-Id: I6a7f1f7c827d1c944e11ae1baee2558e59069a9c

3 years agoMerge "Pass locally generated keys around" am: f3f383b9b7
Jakub Pawlowski [Mon, 12 Oct 2020 06:00:21 +0000 (06:00 +0000)]
Merge "Pass locally generated keys around" am: f3f383b9b7

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1456375

Change-Id: Ic8dc97a863e3309d6735db6de75d2dbd715d4583

3 years agoMerge "Pass locally generated keys around"
Jakub Pawlowski [Mon, 12 Oct 2020 05:45:56 +0000 (05:45 +0000)]
Merge "Pass locally generated keys around"

3 years agoPass locally generated keys around
Jakub Pawlowski [Fri, 9 Oct 2020 18:53:36 +0000 (20:53 +0200)]
Pass locally generated keys around

This is preparation for storing those keys and using them for
reconnecting.

Bug: 142341141
Tag: #gd-refactor
Test: atest SecurityRecordStorageTest
Change-Id: I357e9ec1a3739eb65fef0dc5817b42712357581e

3 years agoRemove duplicate code am: 3c0cf202d2
Chris Manton [Sun, 11 Oct 2020 21:16:34 +0000 (21:16 +0000)]
Remove duplicate code am: 3c0cf202d2

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1456342

Change-Id: I37f4d984d8af5e69bfdc0b041a79ef0d9f8c18ea

3 years agoRe-include stack/acl/ble_acl::btm_sec.h am: 0a2c5bf9c9
Chris Manton [Sun, 11 Oct 2020 21:15:52 +0000 (21:15 +0000)]
Re-include stack/acl/ble_acl::btm_sec.h am: 0a2c5bf9c9

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1456341

Change-Id: I858ffcdf987825048ed1a2d7555b6616ea4947d0

3 years agoRemove duplicate code
Chris Manton [Fri, 9 Oct 2020 21:14:32 +0000 (14:14 -0700)]
Remove duplicate code

Bug: 170396407
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: Ibc6194b79025171d1ba8bdc73186ecbe79acaf6b

3 years agoRe-include stack/acl/ble_acl::btm_sec.h
Chris Manton [Fri, 9 Oct 2020 21:24:05 +0000 (14:24 -0700)]
Re-include stack/acl/ble_acl::btm_sec.h

Bug: 170396407
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I8c1f7dea7cc7a5f68b81856a3ced82b0fde80f65

3 years agoRe-log bta/gatt/bta_gattc_act am: b6bafc3e1d
Chris Manton [Fri, 9 Oct 2020 23:10:41 +0000 (23:10 +0000)]
Re-log bta/gatt/bta_gattc_act am: b6bafc3e1d

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1455841

Change-Id: I596487e28c904ade6214823ead4c95b0ac3a1a01

3 years agoRe-log stack/gatt/connection_manager::direct_connect_ am: 14615db0ce
Chris Manton [Fri, 9 Oct 2020 23:10:38 +0000 (23:10 +0000)]
Re-log stack/gatt/connection_manager::direct_connect_ am: 14615db0ce

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1455840

Change-Id: I42f84c8b58b2fde26b55fb7425895d550bc2b3a8