OSDN Git Service

android-x86/system-bt.git
3 years agoFix the delta_time_ms types mismtach in btsnooz.py
Alice Kuo [Tue, 23 Feb 2021 03:11:12 +0000 (11:11 +0800)]
Fix the delta_time_ms types mismtach in btsnooz.py

The delta_time_ms field in btif_debug_btsnoop.h is 32 bits. The offset
count for 64 bits, and cause the decoder error. Change the offset back
for 32 bits.

Bug: 175283029
Test: ./btsnooz.py bugreport-WXYZ.txt
Change-Id: I28324c4ff33ab817dbad5c813616a8e8c994ff2a

3 years agoMerge "Rename for updating BluetoothA2dp API naming"
More Kuo [Tue, 23 Feb 2021 02:37:41 +0000 (02:37 +0000)]
Merge "Rename for updating BluetoothA2dp API naming"

3 years agoMerge "Add explicit rate units for SCO fields"
Treehugger Robot [Mon, 22 Feb 2021 21:13:39 +0000 (21:13 +0000)]
Merge "Add explicit rate units for SCO fields"

3 years agoMerge "Surface ACL disconnect reasons from native to Java"
Andrew Cheng [Mon, 22 Feb 2021 19:25:13 +0000 (19:25 +0000)]
Merge "Surface ACL disconnect reasons from native to Java"

3 years agoUse Builders for Iso and Sco
Myles Watson [Sat, 20 Feb 2021 04:57:57 +0000 (20:57 -0800)]
Use Builders for Iso and Sco

Change-Id: Ic0b237d6b48d3b7fe5b190a74940cb7eab3f9d14

3 years agoAdd explicit rate units for SCO fields
Chris Manton [Fri, 19 Feb 2021 21:33:12 +0000 (13:33 -0800)]
Add explicit rate units for SCO fields

Bug: 175844355
Test: gd/cert/run
Tag: #gd-refactor
Change-Id: I2ecc05a2ef46016929afedeafd44ef7d9a77f333

3 years agoMerge "Packet: Remove non-standard iterator cases"
Myles Watson [Sat, 20 Feb 2021 04:47:25 +0000 (04:47 +0000)]
Merge "Packet: Remove non-standard iterator cases"

3 years agoSurface ACL disconnect reasons from native to Java
Andrew Cheng [Fri, 15 Jan 2021 01:28:13 +0000 (17:28 -0800)]
Surface ACL disconnect reasons from native to Java

HCI disconnect commands and events have an accompanying "reason"
parameter comprising of a HCI error code. This can be useful in both
debugging and re-connection logic at the Java level.

This CL grabs the HCI codes from native and passes it up to Java via an
extra parameter to existing ACL connection callbacks.

Tag: #feature
Bug: 177668957
Test: atest net_test_bluetooth # verify no regressions
Test: atest bluetoothtbd_test # verify no regressions
Test: atest bt_headless # verify test still builds
Test: manually disconnect local and remote devices and check logcats
from Java layer for disconnect reasons

Change-Id: Idcb1711345b515c5f60e55430352f5f4ff252d69

3 years agoMerge changes I026085cc,I7b090528,I0223c420,I3884a9b3
Chris Manton [Sat, 20 Feb 2021 01:50:08 +0000 (01:50 +0000)]
Merge changes I026085cc,I7b090528,I0223c420,I3884a9b3

* changes:
  Re-include bta/av/bta_av_api.cc
  Re-include bta/av/bta_av_act.cc
  Re-include bta/av/bta_av_aact.cc
  Re-include bta/ar/bta_ar.cc

3 years agoMerge changes I453ace5a,I6184560e
Myles Watson [Sat, 20 Feb 2021 01:24:03 +0000 (01:24 +0000)]
Merge changes I453ace5a,I6184560e

* changes:
  RootCanal: Support LeReadRemoteFeatures
  RootCanal: Send LeReadRemoteFeaturesStatus

3 years agoPacket: Remove non-standard iterator cases
Myles Watson [Fri, 29 Jan 2021 23:54:18 +0000 (15:54 -0800)]
Packet: Remove non-standard iterator cases

Clang-tidy was complaining about the non-const iterators.

Bug: 180016989
Test: cert/run
Tag: #gd-refactor
Change-Id: I2223955ab35af4f20b9dccbc1313a4e66a4734fc

3 years agobtaa: add btaa btif implementation
Michael Sun [Mon, 23 Nov 2020 18:54:29 +0000 (18:54 +0000)]
btaa: add btaa btif implementation

Implement the btaa btif layer to connect gd with btif through the shim
layer.

Tag: #feature
Bug: 172501038
Test: m
Change-Id: I5a463f854e6b4cd7cfae5f6b8100c62a1b8903d5

3 years agoMerge "btaa: add btaa shim implementation"
Treehugger Robot [Fri, 19 Feb 2021 23:04:05 +0000 (23:04 +0000)]
Merge "btaa: add btaa shim implementation"

3 years agoRootCanal: Support LeReadRemoteFeatures
Myles Watson [Fri, 19 Feb 2021 23:02:28 +0000 (15:02 -0800)]
RootCanal: Support LeReadRemoteFeatures

Bug: 180748274
Test: cert/run LeAclManagerTest
Tag: #root-canal
Change-Id: I453ace5a55170e58fd70b128d703b331d57ef219

3 years agoMerge "RootCanal: Check for disallowed commands"
Myles Watson [Fri, 19 Feb 2021 22:29:37 +0000 (22:29 +0000)]
Merge "RootCanal: Check for disallowed commands"

3 years agoMerge "Rootcanal: fix ISO packet routing"
Treehugger Robot [Fri, 19 Feb 2021 22:27:23 +0000 (22:27 +0000)]
Merge "Rootcanal: fix ISO packet routing"

3 years agoMerge "[GD HCI] Add BtStopWatch log tag"
Treehugger Robot [Fri, 19 Feb 2021 22:20:12 +0000 (22:20 +0000)]
Merge "[GD HCI] Add BtStopWatch log tag"

3 years agoRootCanal: Send LeReadRemoteFeaturesStatus
Myles Watson [Fri, 19 Feb 2021 21:52:10 +0000 (13:52 -0800)]
RootCanal: Send LeReadRemoteFeaturesStatus

Bug: 180748274
Test: cert/run LeAclManagerTest
Tag: #root-canal
Change-Id: I6184560ed739563af1cc8224271c40f724f56577

3 years agoMerge "Fix use-after-free in async_manager.cc."
Treehugger Robot [Fri, 19 Feb 2021 21:47:21 +0000 (21:47 +0000)]
Merge "Fix use-after-free in async_manager.cc."

3 years agoRe-include bta/av/bta_av_api.cc
Chris Manton [Thu, 28 Jan 2021 03:28:57 +0000 (19:28 -0800)]
Re-include bta/av/bta_av_api.cc

Bug: 163134718
Test: cert
Tag: #refactor
Change-Id: I026085cc77b19955f22a8524e6b303d1fe0de5ce

3 years agoRe-include bta/av/bta_av_act.cc
Chris Manton [Thu, 28 Jan 2021 03:24:29 +0000 (19:24 -0800)]
Re-include bta/av/bta_av_act.cc

Bug: 163134718
Test: cert
Tag: #refactor
Change-Id: I7b0905289b76cd444dac6f083f48df34b7d54a31

3 years agoRe-include bta/av/bta_av_aact.cc
Chris Manton [Sat, 23 Jan 2021 17:36:58 +0000 (09:36 -0800)]
Re-include bta/av/bta_av_aact.cc

Bug: 163134718
Test: cert
Tag: #refactor
Change-Id: I0223c4201b359063f3ca4c97bd399d1bcf4df03a

3 years agoRe-include bta/ar/bta_ar.cc
Chris Manton [Thu, 28 Jan 2021 03:24:38 +0000 (19:24 -0800)]
Re-include bta/ar/bta_ar.cc

Bug: 163134718
Test: cert
Tag: #refactor
Change-Id: I3884a9b3c3fba6d2958ac058466521e1a6b547a8

3 years agobtaa: add btaa shim implementation
Michael Sun [Mon, 23 Nov 2020 18:30:34 +0000 (18:30 +0000)]
btaa: add btaa shim implementation

Implement the btaa shim layer to connect gd with btif.

Tag: #feature
Bug: 172501038
Test: m
Change-Id: I8f6ec9d0b74425184ca19128167ed4ae554b4197

3 years agoRootcanal: fix ISO packet routing
Jakub Pawlowski [Fri, 19 Feb 2021 18:52:51 +0000 (19:52 +0100)]
Rootcanal: fix ISO packet routing

Bug: 177907117
Test: NotImlementedYet
Change-Id: Ic75f6a11b5494fd351a307647337817d2bbb13ea

3 years ago[GD HCI] Add BtStopWatch log tag
Jack He [Thu, 18 Feb 2021 21:25:44 +0000 (13:25 -0800)]
[GD HCI] Add BtStopWatch log tag

* StopWatch logs are very verbose, adding a tag so that we can
  filter or disable it via config setup

Bug: 164973960
Test: make and run BT stack
Tag: #gd-refactor
Change-Id: I5cd8f24228948559ecee180fb57727469fe7eeb8

3 years agoMerge "gd: Get local address from acl module for legacy SMP"
Treehugger Robot [Fri, 19 Feb 2021 18:36:11 +0000 (18:36 +0000)]
Merge "gd: Get local address from acl module for legacy SMP"

3 years agoRootCanal: Check for disallowed commands
Myles Watson [Wed, 10 Feb 2021 17:16:52 +0000 (09:16 -0800)]
RootCanal: Check for disallowed commands

Bug: 180015700
Test: cert/run LeAclManagerTest
Tag: #gd-refactor
Change-Id: I66b7fb35e470c543b040a3de094b650c59cf0e7e

3 years agoRename for updating BluetoothA2dp API naming
More Kuo [Fri, 19 Feb 2021 10:32:10 +0000 (18:32 +0800)]
Rename for updating BluetoothA2dp API naming

- Rename setBufferMillis to setBufferLengthMillis

Bug: 179814567
Test: Build
Change-Id: I62bda971e57667daa8a75ebaa7099fae01aacf02

3 years agogd: Get local address from acl module for legacy SMP
Chienyuan [Fri, 19 Feb 2021 09:19:07 +0000 (17:19 +0800)]
gd: Get local address from acl module for legacy SMP

Tag: #gd-refactor
Bug: 179452679
Test: gd/cert/run --host
Test: manual, pair LE device
Change-Id: I35e4ef614272865bd52ec66959384279705cc042

3 years agoMerge changes I8c94b803,Ie96668df
Josh Wu [Fri, 19 Feb 2021 02:54:26 +0000 (02:54 +0000)]
Merge changes I8c94b803,Ie96668df

* changes:
  SCO: codec parameters refactor
  HFP: Refactor HFP version flags

3 years agoRe-include bta/ag/bta_ag_rfc.cc
Chris Manton [Fri, 22 Jan 2021 17:14:20 +0000 (09:14 -0800)]
Re-include bta/ag/bta_ag_rfc.cc

Bug: 163134718
Test: cert
Tag: #refactor
Change-Id: Idb7801752398c852ae1855f0812b2f6b99e5ac80

3 years agoRe-include bta/ag/bta_ag_main.cc
Chris Manton [Sun, 24 Jan 2021 23:49:40 +0000 (15:49 -0800)]
Re-include bta/ag/bta_ag_main.cc

Bug: 163134718
Test: cert
Tag: #refactor
Change-Id: I872bd18433ab622509de50100d397fd78b28cfa4

3 years agoRe-include bta/ag/bta_ag_cmd.cc
Chris Manton [Thu, 28 Jan 2021 03:12:03 +0000 (19:12 -0800)]
Re-include bta/ag/bta_ag_cmd.cc

Bug: 163134718
Test: cert
Tag: #refactor
Change-Id: I4e6871177c308eedf56050ade5b20400e35482c4

3 years agoRe-include bta/ag/bta_ag_cfg.cc
Chris Manton [Thu, 28 Jan 2021 03:07:26 +0000 (19:07 -0800)]
Re-include bta/ag/bta_ag_cfg.cc

Bug: 163134718
Test: cert
Tag: #refactor
Change-Id: Ia338b436c41ff1aca7bb1f40c6029a0a041cde51

3 years agoRe-include bta/ag/bta_ag_at.cc
Chris Manton [Thu, 18 Feb 2021 17:00:00 +0000 (09:00 -0800)]
Re-include bta/ag/bta_ag_at.cc

Bug: 163134718
Test: cert
Tag: #refactor
Change-Id: I0f6ef323bad78c04b67d96ba861c6132be793b6a

3 years agoRe-include bta/ag/bta_ag_api.cc
Chris Manton [Thu, 28 Jan 2021 02:59:56 +0000 (18:59 -0800)]
Re-include bta/ag/bta_ag_api.cc

Bug: 163134718
Test: cert
Tag: #refactor
Change-Id: I55f3cb8055e9f126605d4976a4568256db090772

3 years agoRe-include bta/ag/bta_ag_act.cc
Chris Manton [Thu, 28 Jan 2021 02:56:11 +0000 (18:56 -0800)]
Re-include bta/ag/bta_ag_act.cc

Bug: 163134718
Test: cert
Tag: #refactor
Change-Id: I5f09d63761b01c9f6ce96670aa30766e42b64443

3 years agoL2cap: Don't erase link when outgoing packet pending
Hansong Zhang [Thu, 4 Feb 2021 22:51:18 +0000 (14:51 -0800)]
L2cap: Don't erase link when outgoing packet pending

Otherwise we will post to L2cap handler DataController::OnSdu with
deleted object.

Test: LE mouse
Bug: 179326888
Tag: #gd-refactor
Change-Id: I517ac9890cc8d3894067bcad346a80765d24aeca

3 years agoMerge changes Ib334609b,Ic94f70fc
Treehugger Robot [Thu, 18 Feb 2021 19:22:55 +0000 (19:22 +0000)]
Merge changes Ib334609b,Ic94f70fc

* changes:
  [GD ACL] Add btsnooz support in GD
  GD-Common: Add CircularBuffer::Drain() method

3 years agoMerge "Rootcanal: fix typos in handling CIS"
Treehugger Robot [Thu, 18 Feb 2021 18:21:11 +0000 (18:21 +0000)]
Merge "Rootcanal: fix typos in handling CIS"

3 years ago[GD ACL] Add btsnooz support in GD
Jack He [Thu, 18 Feb 2021 07:52:51 +0000 (23:52 -0800)]
[GD ACL] Add btsnooz support in GD

* Support in-memory btsnooz log in GD
* It uses maximum of 256KB of memory to store HCI commands, events,
  L2CAP signaling channel data, and first 14 bytes of other ACL
  packet
* The data is dumped to a log file when dumpsys is taken for the
  Bluetooth module and when Bluetooth stack shutsdown so that
  developer can debug Bluetooth issues with it

Bug: 180569201
Test: gd/cert/run
Test: bluetooth_test_gd
Tag: #gd-refactor
Change-Id: Ib334609b0f6667846f458d2967ffa520d3af39e3

3 years agoMerge "btaa: add btaa into the shim"
Treehugger Robot [Thu, 18 Feb 2021 07:56:25 +0000 (07:56 +0000)]
Merge "btaa: add btaa into the shim"

3 years agoGD-Common: Add CircularBuffer::Drain() method
Jack He [Thu, 18 Feb 2021 07:44:57 +0000 (23:44 -0800)]
GD-Common: Add CircularBuffer::Drain() method

* Drain() allows a circular buffer to return and clear
  its content so that one can clear a circular buffer
  in-place
* Moreover, Drain() uses move semantic to avoid copying
  its content and hence is more efficient
* Modify Pull() to use range-based initialization to do
  blocked copy that tends to be more efficient
* Add circular buffer unit test to compilation target
  and presubmit

Bug: 180569201
Test: gd/cert/run
Test: bluetooth_test_gd
Tag: #gd-refactor
Change-Id: Ic94f70fc862f244dcdc6b9d5f2526c45d0b8eb52

3 years agoMerge "rusty-gd: Add missing GAP data types and fix EIR length"
Qasim Javed [Thu, 18 Feb 2021 02:53:23 +0000 (02:53 +0000)]
Merge "rusty-gd: Add missing GAP data types and fix EIR length"

3 years agorusty-gd: Add missing GAP data types and fix EIR length
Qasim Javed [Wed, 17 Feb 2021 21:39:07 +0000 (13:39 -0800)]
rusty-gd: Add missing GAP data types and fix EIR length

Devices with EIR containing Gap data type 0x10 were not showing up in
the pairing list.

Tested using Pixel Buds. They now show up in the pairing dialog. When
tapped, pairing still fails.

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost DirectHciTest

Change-Id: I00c90b6ca4ab0bb5eca97202f7652f35260197c4

3 years agoMerge "Add max_connected_audio_devices parameter to A2DP Sink init"
Sal Savage [Wed, 17 Feb 2021 21:01:57 +0000 (21:01 +0000)]
Merge "Add max_connected_audio_devices parameter to A2DP Sink init"

3 years agobtaa: add btaa into the shim
Michael Sun [Mon, 23 Nov 2020 17:51:04 +0000 (17:51 +0000)]
btaa: add btaa into the shim

Add btaa module into the shim. Implemented various helper functions.

Tag: #feature
Bug: 172501038
Test: m
Change-Id: I23b86a7b75ad301aae62d47ca34a5524a60844a1

3 years agoMerge "btaa: introduce btaa module into gd"
Treehugger Robot [Wed, 17 Feb 2021 18:17:25 +0000 (18:17 +0000)]
Merge "btaa: introduce btaa module into gd"

3 years agoRootcanal: fix typos in handling CIS
Jakub Pawlowski [Wed, 17 Feb 2021 15:44:08 +0000 (16:44 +0100)]
Rootcanal: fix typos in handling CIS

* fix order of some badly passed parameters
* add/fix error log messages

Change-Id: Ie13580b6051a6afa15615b634d9c42ae0fd5f5d6

3 years agoRootcanal fix typo - return success
Jakub Pawlowski [Tue, 16 Feb 2021 22:36:20 +0000 (23:36 +0100)]
Rootcanal fix typo - return success

Test: run the not yet existing ISO tests
Change-Id: Ie3b2674336d2b97297d1be96b97351c4a82676aa

3 years agoMerge "Send Bluetooth call quality report to telephony"
Treehugger Robot [Wed, 17 Feb 2021 00:00:08 +0000 (00:00 +0000)]
Merge "Send Bluetooth call quality report to telephony"

3 years agoMerge "Fix test for googletest upgrade"
Haibo Huang [Tue, 16 Feb 2021 23:38:09 +0000 (23:38 +0000)]
Merge "Fix test for googletest upgrade"

3 years agoMerge "Wipe cache when HID report cache isn't compatible with the current cache version."
Treehugger Robot [Tue, 16 Feb 2021 22:39:02 +0000 (22:39 +0000)]
Merge "Wipe cache when HID report cache isn't compatible with the current cache version."

3 years agobtaa: introduce btaa module into gd
Michael Sun [Mon, 23 Nov 2020 05:58:48 +0000 (05:58 +0000)]
btaa: introduce btaa module into gd

Introduce the btaa module skeleton implementation in gd.

Tag: #feature
Bug: 172501038
Test: mmma -j system/bt
Change-Id: I7fa28e8ef5eb25ff08b96ab7b43a2526359450f8

3 years agoWipe cache when HID report cache isn't compatible with the current cache version.
Johanna Ye [Tue, 16 Feb 2021 13:10:55 +0000 (14:10 +0100)]
Wipe cache when HID report cache isn't compatible with the current cache version.

This is to fix a big triggered by the OTA from any previous version to S
due to the structure change of the cache report entries.

Also corrected minor typos in documentation.

Tag: #stability
Test: Bond with HID device, upgrade from Q to S, verify device is
working.
Bug: 178874105
Bug: 159868059

Change-Id: Ibbd5da90892a637ffe8ff09b2b98bfc9fe3fb0cd

3 years agoFix test for googletest upgrade
Haibo Huang [Tue, 9 Feb 2021 18:47:25 +0000 (10:47 -0800)]
Fix test for googletest upgrade

bluetooth::hci::Address conflicts with testing::Address. Move the whole
test out of testing namespace.

Tag: refactor
Test: build
Change-Id: I6015c426a80e1f2aeed9a7aea4856dec5bd36d16

3 years agoRemove unneeded func stack/btm/btm_ble_bgconn::btm_ble_acceptlist_init
Chris Manton [Thu, 11 Feb 2021 06:33:40 +0000 (22:33 -0800)]
Remove unneeded func stack/btm/btm_ble_bgconn::btm_ble_acceptlist_init

Towards meaningful code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: Ib4e759a47e947de205f680d31b25c8bb10a1f252

3 years agoRemove unneccesary API BTM_GetAcceptlistSize
Chris Manton [Thu, 11 Feb 2021 06:32:05 +0000 (22:32 -0800)]
Remove unneccesary API BTM_GetAcceptlistSize

Towards meaningful code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: I4df37acc3f7bfd210e48d0a892624fbffeb19bbf

3 years agoFix for gd_acl le connections
Chris Manton [Tue, 16 Feb 2021 16:34:03 +0000 (08:34 -0800)]
Fix for gd_acl le connections

Bug: 173985410
Tag: #refactor
Test: gd/cert/run

Change-Id: I1040a6daced42b048c31382398b899157b235630

3 years agogd_acl: Add add/remove acceptlist
Chris Manton [Wed, 10 Feb 2021 02:49:18 +0000 (18:49 -0800)]
gd_acl: Add add/remove acceptlist

Also rename Accept/Ignore LeConnections

Bug: 173985410
Tag: #refactor
Test: gd/cert/run

Change-Id: I96c3d09bf86887f9fdff9fb09475c909f0045f02

3 years agoEnum-ify bta/include/bta_hh_api::tBTA_HH_STATUS
Chris Manton [Wed, 10 Feb 2021 21:02:15 +0000 (13:02 -0800)]
Enum-ify bta/include/bta_hh_api::tBTA_HH_STATUS

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: Ifb26c5df247705f6e2661a3c32ded112ded71aab

3 years agoRe-log stack/btm/btm_sec::btm_sec_is_a_bonded_dev
Chris Manton [Wed, 10 Feb 2021 02:50:06 +0000 (18:50 -0800)]
Re-log stack/btm/btm_sec::btm_sec_is_a_bonded_dev

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: I56db3d0f6676102c40e6ad1361ea59277acfe6fe

3 years agoRe-log stack/btm/btm_ble_privacy::btm_ble_suspend_resolving_list_activity
Chris Manton [Wed, 10 Feb 2021 02:49:56 +0000 (18:49 -0800)]
Re-log stack/btm/btm_ble_privacy::btm_ble_suspend_resolving_list_activity

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: I6086e0ac0a2487ce3b871d3cc117fbc2a858497c

3 years agoRe-log stack/btm/btm_ble_gap::btm_ble_update_mode_operation
Chris Manton [Wed, 10 Feb 2021 02:49:43 +0000 (18:49 -0800)]
Re-log stack/btm/btm_ble_gap::btm_ble_update_mode_operation

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: I0b04060b0fa827f1ae0499858eac115fba12034c

3 years agoUse proper types tHCI_STATUS
Chris Manton [Wed, 10 Feb 2021 02:49:01 +0000 (18:49 -0800)]
Use proper types tHCI_STATUS

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: I2ae7248a2503fad7ef22c08ca09b43fcbf877cbf

3 years agoRe-log stack/smp/smp_l2c::smp_connect_callback
Chris Manton [Wed, 10 Feb 2021 02:48:06 +0000 (18:48 -0800)]
Re-log stack/smp/smp_l2c::smp_connect_callback

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: Id6f73034d4ccdecc2679c9f25bbb380ed5070d18

3 years agogd_acl: Assert on paths when gd_acl enabled
Chris Manton [Tue, 9 Feb 2021 22:39:32 +0000 (14:39 -0800)]
gd_acl: Assert on paths when gd_acl enabled

Towards behaving code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: I8947c15a840166ad61ec91607e915d9270ea2a5b

3 years agoRe-layout stack/btm/btm_ble_bgconn.cc
Chris Manton [Tue, 9 Feb 2021 22:39:12 +0000 (14:39 -0800)]
Re-layout stack/btm/btm_ble_bgconn.cc

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: Ia9f8c2fb14b15669b5a744ad5eaee45c1b955481

3 years agoRe-log stack/gatt/gatt_api::GATT_Connect
Chris Manton [Tue, 9 Feb 2021 22:39:07 +0000 (14:39 -0800)]
Re-log stack/gatt/gatt_api::GATT_Connect

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: I49b368915fef7ef2c51c867cff05474874714757

3 years agoRe-log stack/smp/smp_l2c::smp_connect_callback
Chris Manton [Tue, 9 Feb 2021 17:27:24 +0000 (09:27 -0800)]
Re-log stack/smp/smp_l2c::smp_connect_callback

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: I044aaf0bb09160ef6d4d1515b5a8444eaabd7434

3 years agoRe-log stack/gap/gap_ble::client_connect_cback
Chris Manton [Wed, 10 Feb 2021 18:06:32 +0000 (10:06 -0800)]
Re-log stack/gap/gap_ble::client_connect_cback

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: I96161fef848f45b28883bce6df9467f14e9fec64

3 years agoRe-log bta/gatt/bta_gattc_act::bta_gattc_close
Chris Manton [Tue, 9 Feb 2021 17:25:20 +0000 (09:25 -0800)]
Re-log bta/gatt/bta_gattc_act::bta_gattc_close

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: I26c11fde63a332b20bf7ea126bd42f0f8015d3e1

3 years agoGroup internally linked functions stack/btm/btm_ble_bgconn
Chris Manton [Tue, 9 Feb 2021 21:35:13 +0000 (13:35 -0800)]
Group internally linked functions stack/btm/btm_ble_bgconn

Also group API functions, inclusive language
and packet length checks.

Towards readable code

Bug: 173985410
Tag: #refactor
Test: gd/cert/run

Change-Id: Iace409d2ac69364a920cfb8b2994e5e7bb6f7f13

3 years agoDirectly query controller for acceptlist size
Chris Manton [Thu, 11 Feb 2021 06:24:00 +0000 (22:24 -0800)]
Directly query controller for acceptlist size

Towards meaningful code

Bug: 173985410
Tag: #refactor
Test: gd/cert/run

Change-Id: Id6852ba6ef916aa68731c4270259430e98b432d9

3 years agoAdd API for tBTM_SEC_DEV_REC::has_ble
Chris Manton [Fri, 12 Feb 2021 00:05:57 +0000 (16:05 -0800)]
Add API for tBTM_SEC_DEV_REC::has_ble

Bitmask or value ?

Bug: 173985410
Tag: #refactor
Test: gd/cert/run
Change-Id: I7ebe09e7e84fc368bb7aed53479f6741cd22bef7

3 years agoReduce unneeded namespace resolution main/shim/acl
Chris Manton [Thu, 11 Feb 2021 06:02:34 +0000 (22:02 -0800)]
Reduce unneeded namespace resolution main/shim/acl

Bug: 173985410
Tag: #refactor
Test: gd/cert/run

Change-Id: Ic0587e34be24597c4ed318459817ad68aced8ebc

3 years agoIntroduce bta_test
Chris Manton [Mon, 8 Feb 2021 04:27:05 +0000 (20:27 -0800)]
Introduce bta_test

Towards testable code

Bug: 176960731
Tag: #refactor
Test: gd/cert/run

Change-Id: I653ee9dcbb63fa0d9d52f8db17e498f8820fc2dc

3 years agoIntroduce bta/test mocks and fakes
Chris Manton [Mon, 8 Feb 2021 04:26:22 +0000 (20:26 -0800)]
Introduce bta/test mocks and fakes

Towards testable code

Bug: 176960731
Tag: #refactor
Test: gd/cert/run

Change-Id: I0527f4daf7d03d12a05975fa9fd01a06bd2105e5

3 years agoRemove unnecessary include bta/hh/bta_hh_act.cc::log
Chris Manton [Mon, 8 Feb 2021 04:27:40 +0000 (20:27 -0800)]
Remove unnecessary include bta/hh/bta_hh_act.cc::log

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: I31086a13b9c7fae16df2087b2aff7eff813a0f37

3 years agoDeclare bta/dm/bta_dm_int::deinit
Chris Manton [Mon, 8 Feb 2021 04:27:52 +0000 (20:27 -0800)]
Declare bta/dm/bta_dm_int::deinit

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: I93271880291135b652de8299c74413874c84e653

3 years agoRe-layout stack/acl/btm_acl::btm_remove_acl
Chris Manton [Fri, 5 Feb 2021 05:47:45 +0000 (21:47 -0800)]
Re-layout stack/acl/btm_acl::btm_remove_acl

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: Ieb9d1a0c66d45c7d500f88bcc33c355f05886ed6

3 years agobt_headless: Various updates
Chris Manton [Thu, 4 Feb 2021 21:10:04 +0000 (13:10 -0800)]
bt_headless: Various updates

Towards testable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: I21a564e868df671881428b659cf0cc81d185f94b

3 years agogd_acl: Connect gd acl shutdown
Chris Manton [Fri, 5 Feb 2021 02:34:58 +0000 (18:34 -0800)]
gd_acl: Connect gd acl shutdown

Bug: 176960731
Tag: #refactor
Test: gd/cert/run

Change-Id: I12636d06b863617255a4266956c9252095c870ba

3 years agoRe-log bta/dm/bta_dm_act::bta_dm_disable_conn_down_timer_cback
Chris Manton [Fri, 5 Feb 2021 01:15:50 +0000 (17:15 -0800)]
Re-log bta/dm/bta_dm_act::bta_dm_disable_conn_down_timer_cback

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: I44f957126b6d6a7760b27660c853a85b8258a0b6

3 years agoRe-log btif/src/btif_dm::BTIF_dm_disable
Chris Manton [Fri, 5 Feb 2021 01:15:40 +0000 (17:15 -0800)]
Re-log btif/src/btif_dm::BTIF_dm_disable

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: I89d1bc8333b41357314560d402c6723aec21d717

3 years agoRe-log stack/avdt/avdt_api::AVDT_Connect
Chris Manton [Fri, 5 Feb 2021 00:11:40 +0000 (16:11 -0800)]
Re-log stack/avdt/avdt_api::AVDT_Connect

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: If6422d056e24e00a65d8ef09765dc7a01dc61019

3 years agoRe-log stack/avdt/avdt_api::AVDT_DisconnectReq
Chris Manton [Fri, 5 Feb 2021 00:11:23 +0000 (16:11 -0800)]
Re-log stack/avdt/avdt_api::AVDT_DisconnectReq

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: I1c2cc57a9cb99dbc810372bdc2fd9e371418f3c1

3 years agoEnum-ify stack/include/avdt_api::tAVDT_RESULT
Chris Manton [Fri, 5 Feb 2021 00:10:35 +0000 (16:10 -0800)]
Enum-ify stack/include/avdt_api::tAVDT_RESULT

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: Icdb7fa8765ed2eb5ad13433d9653708e6915834d

3 years agoRe-log l2c_link_hci_conn_comp
Chris Manton [Thu, 4 Feb 2021 21:21:29 +0000 (13:21 -0800)]
Re-log l2c_link_hci_conn_comp

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: Ica3d22f8396437c708fea4411f5f6709df06c223

3 years agoMerge "[LSC] Add LOCAL_LICENSE_KINDS to system/bt"
Treehugger Robot [Mon, 15 Feb 2021 23:21:47 +0000 (23:21 +0000)]
Merge "[LSC] Add LOCAL_LICENSE_KINDS to system/bt"

3 years agoMerge "iso/tests: Add more cases for Iso Manager"
Treehugger Robot [Mon, 15 Feb 2021 11:51:25 +0000 (11:51 +0000)]
Merge "iso/tests: Add more cases for Iso Manager"

3 years ago[LSC] Add LOCAL_LICENSE_KINDS to system/bt
Bob Badour [Sat, 13 Feb 2021 02:05:29 +0000 (18:05 -0800)]
[LSC] Add LOCAL_LICENSE_KINDS to system/bt

Added SPDX-license-identifier-Apache-2.0 to:
  apex/Android.bp
  audio_a2dp_hw/Android.bp
  audio_bluetooth_hw/Android.bp
  audio_hal_interface/Android.bp
  audio_hearing_aid_hw/Android.bp
  binder/Android.bp
  bta/Android.bp
  btcore/Android.bp
  btif/Android.bp
  build/Android.bp
  common/Android.bp
  conf/Android.bp
  device/Android.bp
  embdrv/g722/fuzzer/Android.bp
  embdrv/sbc/Android.bp
  embdrv/sbc/decoder/Android.bp
  embdrv/sbc/encoder/Android.bp
  gd/att/Android.bp
  gd/common/Android.bp
  gd/dumpsys/Android.bp
  gd/dumpsys/bundler/Android.bp
  gd/fuzz/Android.bp
  gd/hal/Android.bp
  gd/hci/Android.bp
  gd/iso/Android.bp
  gd/l2cap/Android.bp
  gd/l2cap/fuzz/Android.bp
  gd/neighbor/Android.bp
  gd/os/Android.bp
  gd/packet/Android.bp
  gd/packet/parser/Android.bp
  gd/packet/parser/test/Android.bp
  gd/proto/Android.bp
  gd/rust/common/Android.bp
  gd/rust/facade/Android.bp
  gd/rust/gddi/Android.bp
  gd/rust/hal/Android.bp
  gd/rust/hci/Android.bp
  gd/rust/link/Android.bp
  gd/rust/main/Android.bp
  gd/rust/shim/Android.bp
  gd/security/Android.bp
  gd/security/channel/Android.bp
  gd/security/pairing/Android.bp
  gd/security/record/Android.bp
  gd/shim/Android.bp
  gd/storage/Android.bp
  hci/Android.bp
  include/Android.bp
  internal_include/Android.bp
  main/Android.bp
  main/shim/Android.bp
  osi/test/fuzzers/Android.bp
  osi/test/fuzzers/alarm/Android.bp
  osi/test/fuzzers/allocation_tracker/Android.bp
  osi/test/fuzzers/allocator/Android.bp
  osi/test/fuzzers/array/Android.bp
  osi/test/fuzzers/buffer/Android.bp
  osi/test/fuzzers/compat/Android.bp
  osi/test/fuzzers/fixed_queue/Android.bp
  osi/test/fuzzers/future/Android.bp
  osi/test/fuzzers/list/Android.bp
  osi/test/fuzzers/ringbuffer/Android.bp
  packet/Android.bp
  packet/avrcp/Android.bp
  packet/base/Android.bp
  packet/tests/fuzzers/Android.bp
  profile/avrcp/Android.bp
  profile/sdp/Android.bp
  service/Android.bp
  service/common/Android.bp
  stack/test/fuzzers/Android.bp
  stack/test/fuzzers/a2dp/Android.bp
  stack/test/fuzzers/a2dp/codec/Android.bp
  stack/test/fuzzers/sdp/Android.bp
  test/Android.bp
  test/headless/Android.bp
  test/rootcanal/Android.bp
  test/suite/Android.bp
  types/Android.bp
  udrv/Android.bp
  utils/Android.bp
  vendor_libs/Android.bp
  vendor_libs/linux/Android.bp
  vendor_libs/linux/interface/Android.bp
  vendor_libs/test_vendor_lib/Android.bp
  vendor_libs/test_vendor_lib/types/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
  gd/Android.bp
  gd/crypto_toolbox/Android.bp
  stack/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-MIT legacy_unencumbered
to:
  Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    legacy_unencumbered
to:
  embdrv/g722/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
to:
  osi/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I883bd6b68223a5bc77fdac89e0280993f617d6d0

3 years agoUse proper types btm_sec_dev_rec_cback_event::bt_status_t
Chris Manton [Thu, 4 Feb 2021 21:20:58 +0000 (13:20 -0800)]
Use proper types btm_sec_dev_rec_cback_event::bt_status_t

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: I42b950a9fb804761217a35a1c489100d8132e76b

3 years agoRe-log stack/btm/btm_sec::btm_sec_connected
Chris Manton [Thu, 4 Feb 2021 21:20:41 +0000 (13:20 -0800)]
Re-log stack/btm/btm_sec::btm_sec_connected

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: I41ea59a249acd33ec750b1955adc25139ece9528

3 years agoAdd gd acl shim connection shutdown
Chris Manton [Thu, 4 Feb 2021 07:31:47 +0000 (23:31 -0800)]
Add gd acl shim connection shutdown

Bug: 176960731
Tag: #refactor
Test: gd/cert/run

Change-Id: I598e8a3f352a78c989cecf10eae1b00bb755fe2c

3 years agoMerge "Remove direct dependency on libcutils"
Sonny Sasaka [Fri, 12 Feb 2021 18:31:49 +0000 (18:31 +0000)]
Merge "Remove direct dependency on libcutils"

3 years agoMerge "Revert "hci: Remove SimultaneousLeHost bit""
Treehugger Robot [Fri, 12 Feb 2021 05:35:31 +0000 (05:35 +0000)]
Merge "Revert "hci: Remove SimultaneousLeHost bit""

3 years agoSend Bluetooth call quality report to telephony
Chen Chen [Fri, 5 Feb 2021 01:38:31 +0000 (17:38 -0800)]
Send Bluetooth call quality report to telephony

Bug: 178232343
Test: manually test the function and check log
tag: #feature

Change-Id: I3ae1db6ab670bacb06380a532f39841f6fa07994

3 years agoAdd max_connected_audio_devices parameter to A2DP Sink init
Sal Savage [Thu, 11 Feb 2021 21:36:11 +0000 (13:36 -0800)]
Add max_connected_audio_devices parameter to A2DP Sink init

This movess us off of a hardcoded value for number of connected devices
and allows Java, through the JNI, to have input on the maximum number of
audio devices it would like to have connected. This moves A2DP Sink in
linne with A2DP Source. It will also enable easily configurable
multi-a2dp sink and avrcp controller experiences.

Tag: #refactor
Bug: 180039146
Test: atest BluetoothInstrumentationTests
Change-Id: I98b7d55d8aa53c07af6451f3d5dca529b96739fc