OSDN Git Service

android-x86/system-bt.git
3 years agoAdd StopWatch for Hwbinder callback function
weichinweng [Wed, 3 Mar 2021 02:19:19 +0000 (10:19 +0800)]
Add StopWatch for Hwbinder callback function

Add stopWatch feature to monitor HCI callbacks and audio client
callbacks.

Bug: 175754854
Test: atest BluetoothInstrumentationTests
Tag: #stability
Change-Id: I87b9aac85166f345629ea110653cc873ca24c079

3 years agoUpdate owners
Hansong Zhang [Wed, 7 Apr 2021 23:29:11 +0000 (16:29 -0700)]
Update owners

Test: N/A
Change-Id: Ia98b958ea7a97b7aa5a47ce3b118148adcaa5d08

3 years agoMerge "SCO: Use const reference instead of const value"
Treehugger Robot [Wed, 7 Apr 2021 17:28:48 +0000 (17:28 +0000)]
Merge "SCO: Use const reference instead of const value"

3 years agoAdd Volume Control Profile API
Łukasz Rymanowski [Fri, 29 Jan 2021 08:56:03 +0000 (08:56 +0000)]
Add Volume Control Profile API

Bug: 150670922
Test: compilation
Tag: #feature
Sponsor: jpawlowski@
Change-Id: I4a12847f9be7cb77d9094fd5a1a8f9c68053ad21

3 years agoSCO: Use const reference instead of const value
Jack He [Wed, 7 Apr 2021 06:02:32 +0000 (23:02 -0700)]
SCO: Use const reference instead of const value

Bug: 183476377
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I538c46eeb9cf40400f4f4ec424c4da6ae804213c

3 years ago vc: Implement Volume Control Profile
Łukasz Rymanowski [Fri, 29 Jan 2021 09:05:10 +0000 (09:05 +0000)]
 vc: Implement Volume Control Profile

 This implements basic version of VCP which allows to control Volume
 Control Service on ther remote side.

 This profile for expose only connect/disconnect/set volume

 Bug: 150670922
 Tag: #feature
 Test: atest --host bluetooth_test_vc
 Sponsor: jpawlowski@

Change-Id: Ie68c333ffece3958d68580fbfd3a86aec1186711

3 years agolegacy: Plumb gd sco conn req to legacy stack
Chris Manton [Wed, 7 Apr 2021 01:12:21 +0000 (18:12 -0700)]
legacy: Plumb gd sco conn req to legacy stack

Bug: 183476377
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I79fcfcf8dde071aff0a07f5440cfdca6e0e8134e

3 years agoConst-ify btm_sco_conn_req::DEV_CLASS
Chris Manton [Wed, 7 Apr 2021 05:42:02 +0000 (22:42 -0700)]
Const-ify btm_sco_conn_req::DEV_CLASS

Bug: 183476377
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: Iec78ab6a7b46837f9ab512d57b320b565d78f7cd

3 years agoMerge "RFCOMM: Handle failed connection request"
Treehugger Robot [Wed, 7 Apr 2021 06:06:49 +0000 (06:06 +0000)]
Merge "RFCOMM: Handle failed connection request"

3 years agoshim: Plumb e/sco through shim into legacy
Chris Manton [Tue, 6 Apr 2021 22:20:35 +0000 (15:20 -0700)]
shim: Plumb e/sco through shim into legacy

Bug: 183476377
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: Id3b9e0931e17a2e376dee207af86241836e96cbb

3 years agoshim: Plumb e/sco connect request
Chris Manton [Tue, 6 Apr 2021 22:10:23 +0000 (15:10 -0700)]
shim: Plumb e/sco connect request

Bug: 183476377
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: If14d3bf2f8c632e9007fa846d514a9c3e7bbe18a

3 years agoMerge "gd: Plumb remote esco/sco connection requests through GD"
Chris Manton [Wed, 7 Apr 2021 00:39:44 +0000 (00:39 +0000)]
Merge "gd: Plumb remote esco/sco connection requests through GD"

3 years agoMerge changes from topic "bt-gd-vse"
Myles Watson [Tue, 6 Apr 2021 23:50:54 +0000 (23:50 +0000)]
Merge changes from topic "bt-gd-vse"

* changes:
  Hci: Include 0xFF in event loops
  GD: Crash on Root Inflammation Event
  BQR: Print common BQR events
  Revert "GD HCI: Pipe VSEs up in shim layer"
  Revert "GD HCI: Support vendor specific event in GD"

3 years agogd: Plumb remote esco/sco connection requests through GD
Chris Manton [Tue, 6 Apr 2021 00:29:22 +0000 (17:29 -0700)]
gd: Plumb remote esco/sco connection requests through GD

Bug: 183476377
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: Ib36d3fded252a51be550510f11cc102df2277512

3 years agoHci: Include 0xFF in event loops
Myles Watson [Tue, 6 Apr 2021 17:26:20 +0000 (10:26 -0700)]
Hci: Include 0xFF in event loops

Bug: 183057550
Test: Enable VSEs
Tag: #gd-refactor
Change-Id: Ib06340af7965863343610c1b53d37d1f92c6c8da

3 years agoRFCOMM: Handle failed connection request
Chienyuan [Tue, 6 Apr 2021 12:52:16 +0000 (20:52 +0800)]
RFCOMM: Handle failed connection request

Tag: #refactor
Bug: 183672787
Test: manual
Change-Id: Iae2682b9c6b8da5a3dead2c333b8c2054be4ac30

3 years agoMerge "A2DP: Log BLUETOOTH_A2DP_PLAYBACK_STATE_CHANGED"
Josh Wu [Tue, 6 Apr 2021 01:35:57 +0000 (01:35 +0000)]
Merge "A2DP: Log BLUETOOTH_A2DP_PLAYBACK_STATE_CHANGED"

3 years agoGD: Crash on Root Inflammation Event
Myles Watson [Sat, 3 Apr 2021 00:50:46 +0000 (17:50 -0700)]
GD: Crash on Root Inflammation Event

Use the crash timer to allow enough time for debugging logs.

Bug: 183057550
Test: Enable VSEs
Tag: #gd-refactor
Change-Id: I11d19c7fd012cd11e237bb13b84b9d77c83c1c1f

3 years agoBQR: Print common BQR events
Myles Watson [Sat, 3 Apr 2021 00:43:14 +0000 (17:43 -0700)]
BQR: Print common BQR events

Bug: 183057550
Test: Enable BQR events
Tag: #logging
Change-Id: Ibda9f7041c7f68b0bb9fff203fea556a47c12079

3 years agoRevert "GD HCI: Pipe VSEs up in shim layer"
Myles Watson [Mon, 5 Apr 2021 22:05:30 +0000 (15:05 -0700)]
Revert "GD HCI: Pipe VSEs up in shim layer"

This reverts commit e53576837aa0691199cba916b692711a41b499ba.

We prefer to keep the shim small and implement VSE
handling in btif, since it's mostly for logging.

Bug: 183057550
Test: Enable BQR events
Tag: #gd-refactor
Change-Id: I8f57c479eb57439f2ede486b645edc9b3975c25a

3 years agoRevert "GD HCI: Support vendor specific event in GD"
Myles Watson [Mon, 5 Apr 2021 21:59:17 +0000 (14:59 -0700)]
Revert "GD HCI: Support vendor specific event in GD"

This reverts commit 9462335b7fedd1579e5961a1dc8ddbfd1a4b35ed.

Bug: 183057550
Test: Enable BQR events
Tag: #gd-refactor
Change-Id: Ibb9302ae6bb9495880174a1ed8c6457a1e781027

3 years agoMerge "Do not close the fd on drop."
Treehugger Robot [Mon, 5 Apr 2021 20:12:58 +0000 (20:12 +0000)]
Merge "Do not close the fd on drop."

3 years agoDo not close the fd on drop.
Joel Galenson [Fri, 2 Apr 2021 22:50:38 +0000 (15:50 -0700)]
Do not close the fd on drop.

The nix crate now closes the fd itself, so we cannot close it ourselves.

Test: libbt_common_inline_tests
Change-Id: I270c84ff198416ad472be86b7d9fb506e3a74232

3 years agoMerge "Correct log stack/rfcomm/rfc_mx_fsm::rfc_mx_sm_execute"
Treehugger Robot [Fri, 2 Apr 2021 17:46:42 +0000 (17:46 +0000)]
Merge "Correct log stack/rfcomm/rfc_mx_fsm::rfc_mx_sm_execute"

3 years agoCorrect log stack/rfcomm/rfc_mx_fsm::rfc_mx_sm_execute
Chienyuan [Thu, 1 Apr 2021 17:43:50 +0000 (01:43 +0800)]
Correct log stack/rfcomm/rfc_mx_fsm::rfc_mx_sm_execute

Tag: #logging
Bug: 183672787
Test: manual
Change-Id: Id52a0d1c2c8ed18c79a4f48886e2b54487cc5bda

3 years agoMerge "rusty-gd: Remove CancelableTaskTracker"
Qasim Javed [Thu, 1 Apr 2021 19:57:01 +0000 (19:57 +0000)]
Merge "rusty-gd: Remove CancelableTaskTracker"

3 years agoMerge "gd hci: Check acl connection when start round robin"
Treehugger Robot [Thu, 1 Apr 2021 18:34:54 +0000 (18:34 +0000)]
Merge "gd hci: Check acl connection when start round robin"

3 years agoMerge "[GD Controller] Return version info to legacy stack"
Treehugger Robot [Thu, 1 Apr 2021 08:44:08 +0000 (08:44 +0000)]
Merge "[GD Controller] Return version info to legacy stack"

3 years agoMerge "BluetoothAudioHAL: Don't fetch the provider without HAL version"
Cheney Ni [Thu, 1 Apr 2021 08:24:34 +0000 (08:24 +0000)]
Merge "BluetoothAudioHAL: Don't fetch the provider without HAL version"

3 years agoBluetoothAudioHAL: Don't fetch the provider without HAL version
Cheney Ni [Wed, 31 Mar 2021 17:33:08 +0000 (01:33 +0800)]
BluetoothAudioHAL: Don't fetch the provider without HAL version

This fixes a native crash while enabling BT with no bluetooth.audio HAL.

Fixes: 184147199
Bug: 184147199
Tag: #stability
Test: start Bluetooth on device without bluetooth.audio HAL
Change-Id: I96974b33316a73e1c0c291b9de05400d2e842e92

3 years agogd hci: Check acl connection when start round robin
Chienyuan [Wed, 31 Mar 2021 18:06:54 +0000 (02:06 +0800)]
gd hci: Check acl connection when start round robin

Tag: #gd-refactor
Bug: 182541100
Test: gd/cert/run
Change-Id: I341fb4358e74b75bc1c6165af961c85cfc2ae739

3 years agoMerge "gd hci: Handle overflow of acl credits"
Myles Watson [Wed, 31 Mar 2021 20:23:51 +0000 (20:23 +0000)]
Merge "gd hci: Handle overflow of acl credits"

3 years agorusty-gd: Remove CancelableTaskTracker
Qasim Javed [Tue, 30 Mar 2021 20:22:55 +0000 (13:22 -0700)]
rusty-gd: Remove CancelableTaskTracker

Pairing, connection and A2DP streaming works with rusty-gd.

Also, tested with the default flags to make sure I am not breaking
anything.

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

Change-Id: I325e6aba146d9351aa7a06ab3c847cd410a502f3

3 years agoMerge "A2DP: don't apply codec preference if service disabled"
Treehugger Robot [Wed, 31 Mar 2021 19:27:35 +0000 (19:27 +0000)]
Merge "A2DP: don't apply codec preference if service disabled"

3 years agogd hci: Handle overflow of acl credits
Chienyuan [Wed, 24 Mar 2021 11:59:28 +0000 (19:59 +0800)]
gd hci: Handle overflow of acl credits

Tag: #gd-refactor
Bug: 178668450
Test: gd/cert/run
Change-Id: I3efc7a73cfbc90b876fa055b29250587c689df0c

3 years ago[GD Controller] Return version info to legacy stack
Jack He [Wed, 31 Mar 2021 09:30:13 +0000 (02:30 -0700)]
[GD Controller] Return version info to legacy stack

* Copy and return version info to legacy stack
* Support parsing BT 5.2 version info

Tag: #gd-refactor
Bug: 183349385
Test: make, A2DP streaming
Change-Id: Ic8921570000599175b9b219052f95f6c7b4035a8

3 years agoA2DP: Log BLUETOOTH_A2DP_PLAYBACK_STATE_CHANGED
Josh Wu [Wed, 24 Mar 2021 12:15:43 +0000 (20:15 +0800)]
A2DP: Log BLUETOOTH_A2DP_PLAYBACK_STATE_CHANGED

Enable BLUETOOTH_A2DP_PLAYBACK_STATE_CHANGED Result metrics logged in stack

Tag: #feature
Bug: 183473902
Test: atest BluetoothInstrumentationTests
Change-Id: I9e9b7d1d0e6fd094978ccaad9c16a0e2306e7882

3 years agoMerge "Use hci_root_inflamed_abort if received root inflamed packet"
Treehugger Robot [Wed, 31 Mar 2021 01:49:18 +0000 (01:49 +0000)]
Merge "Use hci_root_inflamed_abort if received root inflamed packet"

3 years agoMerge "audio: Introduce client interface support for HAL 2.1"
Jakub Pawlowski [Tue, 30 Mar 2021 15:14:53 +0000 (15:14 +0000)]
Merge "audio: Introduce client interface support for HAL 2.1"

3 years agoMerge "eatt: Adjust to new L2CAP API behaviour"
Jakub Pawlowski [Tue, 30 Mar 2021 14:55:19 +0000 (14:55 +0000)]
Merge "eatt: Adjust to new L2CAP API behaviour"

3 years agoeatt: Adjust to new L2CAP API behaviour
Łukasz Rymanowski [Tue, 30 Mar 2021 10:30:29 +0000 (10:30 +0000)]
eatt: Adjust to new L2CAP API behaviour

There were a changes in the L2CAP layer which needs to be taken into
account by EATT.

L2CAP calls L2CA_DisconnectInd_Cb only when channel
has been disconnected by peer and there is also no confirmation on
L2CA_DisconnectReq.

Having above in mind, EATT needs to clear its channels list just
after calling L2CA_DisconnectReq() othwerwise state of EATT will
be incorrect.

Tag: #feature
Bug: 159786353
Sponsor: jpawlowski@
Test: atest --host net_test_eatt

Change-Id: I49949ca071f40abb9ca38dcd337b4de63f493f09

3 years agoaudio: Introduce client interface support for HAL 2.1
Grzegorz Kołodziejczyk [Fri, 12 Feb 2021 17:05:03 +0000 (17:05 +0000)]
audio: Introduce client interface support for HAL 2.1

Patch introduces HAL 2.1 client interface support with backward compatibility.

Tag: #feature
Test: atest bluetooth-test-audio-hal-interface
Bug: 150670922
Sponsor: jpawlowski@
Change-Id: I4c277c48e4794d8ae615742de0d27084d23fd266

3 years agoMerge "Use proper UUID for PBAP-PCE profile descriptor list"
Sal Savage [Mon, 29 Mar 2021 18:32:36 +0000 (18:32 +0000)]
Merge "Use proper UUID for PBAP-PCE profile descriptor list"

3 years agoA2DP: don't apply codec preference if service disabled
Cheney Ni [Mon, 29 Mar 2021 07:38:59 +0000 (15:38 +0800)]
A2DP: don't apply codec preference if service disabled

Because the codec preference is saved at upper-layer, it was timing that
JNI callbacks were reset by BT turning off while querying the
preference. In order to prevent NPE, this CL checks whether A2DP is
still enabled, and uses a JNI variable to store those callbacks.

Tag: #stability
Fixes: 182756107
Test: atest net_test_btif
Change-Id: Iacfb9fee0e69a47ca7c7ed7c5fc8b4782b647f84

3 years agoMerge changes I60b334ef,I390a385c,I0a562e1b
Jakub Pawlowski [Mon, 29 Mar 2021 06:54:56 +0000 (06:54 +0000)]
Merge changes I60b334ef,I390a385c,I0a562e1b

* changes:
  Revert "Remove unused API BTM_IsPhy2mSupported"
  Revert "Remove unused API BTM_RequestPeerSCA"
  Revert "Remove unused API BTM_GetPeerSCA"

3 years agoUse hci_root_inflamed_abort if received root inflamed packet
weichinweng [Tue, 23 Mar 2021 09:21:42 +0000 (17:21 +0800)]
Use hci_root_inflamed_abort if received root inflamed packet

Sometimes, Since the hci_timeout_abort abort_timer triggered is faster
then the bluetooth HIDL service died, the bt_stack doesn't call
hci_root_inflamed_abort even if received root inflamed packet. Use
hci_root_inflamed_abort when HCI command timeout if it received the root
inflamed packet.

Bug: 182940721
Test: atest BluetoothInstrumentationTests
Tag: #feature
Change-Id: I877ac13e46ac12ef42fc149a7d4a16d932f014d2

3 years agoRevert "Remove unused API BTM_IsPhy2mSupported"
Łukasz Rymanowski [Fri, 26 Mar 2021 17:28:59 +0000 (17:28 +0000)]
Revert "Remove unused API BTM_IsPhy2mSupported"

Reason for revert: This is needed for LE Audio

This reverts commit 5f3ca2bb910c5f18927a15be017879a8387c78fe.

Change-Id: I60b334ef9d3f376eb1b2c68c2a40f748861a5368

3 years agoRevert "Remove unused API BTM_RequestPeerSCA"
Łukasz Rymanowski [Fri, 26 Mar 2021 17:28:22 +0000 (17:28 +0000)]
Revert "Remove unused API BTM_RequestPeerSCA"

Reason for revert: This is needed for LE Audio

This reverts commit ddc067a95ef95fcdc888bfdefc07f784ecac2f1e.

Change-Id: I390a385ce8b5c2b0e76c7775ba3cae8db707b331

3 years agoRevert "Remove unused API BTM_GetPeerSCA"
Łukasz Rymanowski [Fri, 26 Mar 2021 17:27:33 +0000 (17:27 +0000)]
Revert "Remove unused API BTM_GetPeerSCA"

Reason for revert: This is needed for LE Audio

This reverts commit ab4932be3bad052d5a0f7b05cd59b21a88fe26e6.

Change-Id: I0a562e1bee8d3c4f3f7170e34ea92fe657123b96

3 years agoAdd btif/include/btif_hh::btif_hh_status_text
Chris Manton [Sun, 14 Mar 2021 16:52:19 +0000 (09:52 -0700)]
Add btif/include/btif_hh::btif_hh_status_text

Toward loggable code

Bug: 163134718
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: Iab6a4f33a3e498c33f4870abc5abd59e073d03f2

3 years agoUse proper type tHCI_REASON btm_get_acl_disc_reason_code
Chris Manton [Sat, 13 Mar 2021 03:24:11 +0000 (19:24 -0800)]
Use proper type tHCI_REASON btm_get_acl_disc_reason_code

Toward readable code

Bug: 163134718
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I7b2adfaa55feb96c620adfa5a6cb997055f1ce10

3 years agoMerge "Use whole_static_library for cxx library deps."
Ivan Lozano [Fri, 26 Mar 2021 13:01:14 +0000 (13:01 +0000)]
Merge "Use whole_static_library for cxx library deps."

3 years agoMerge "Fix for HID disconnect bug"
Chris Manton [Fri, 26 Mar 2021 06:31:34 +0000 (06:31 +0000)]
Merge "Fix for HID disconnect bug"

3 years agoMerge changes I6b35e11d,Iacec1d37
Jack He [Fri, 26 Mar 2021 05:56:01 +0000 (05:56 +0000)]
Merge changes I6b35e11d,Iacec1d37

* changes:
  HCI: Send Debug packet when HCI timeout
  HCI: Add support for Debug packet

3 years agoFix for HID disconnect bug
Chris Manton [Mon, 15 Mar 2021 17:46:12 +0000 (10:46 -0700)]
Fix for HID disconnect bug

Callback to btif layer to clear state and inform about
HID host profile disconnecting a peripheral.

Bug: 170187650
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I17cefb6e0c641ccb4517479e6b358c80e83f1ee7

3 years agoUse proper UUID for PBAP-PCE profile descriptor list
Sal Savage [Thu, 25 Mar 2021 23:16:22 +0000 (16:16 -0700)]
Use proper UUID for PBAP-PCE profile descriptor list

According to the PBAP specification, the PCE SDP record should use the
UUID 0x1130 (PBAP) in the profile descriptor list. We mistakenly use the
PBAP-PCE UUID of 0x112e instead, coming from the JNI. This changes
updates our record to use the correct UUID.

Tag: #stability
Bug: 160443921
Test: sdptool browse and check for the proper UUID 0x1130
Change-Id: I5256da3a5bba1f7ced04aa58e9784409e8ae4fc5

3 years agoHCI: Send Debug packet when HCI timeout
Myles Watson [Thu, 25 Mar 2021 20:10:33 +0000 (13:10 -0700)]
HCI: Send Debug packet when HCI timeout

Bug: 183061492
Test: cert/run
      atest bluetooth_test_gd
Tag: #gd-refactor
Change-Id: I6b35e11dd802138469b0024611113eb822b08637

3 years agoHCI: Add support for Debug packet
Myles Watson [Thu, 25 Mar 2021 20:10:12 +0000 (13:10 -0700)]
HCI: Add support for Debug packet

Bug: 183061492
Test: cert/run
      atest bluetooth_test_gd
Tag: #gd-refactor
Change-Id: Iacec1d37a95514d23f90a26f42808d627d2c6b0f

3 years agoAdd tBTA_HH_DEV_DSCP_INFO::ToString
Chris Manton [Wed, 17 Mar 2021 16:47:24 +0000 (09:47 -0700)]
Add tBTA_HH_DEV_DSCP_INFO::ToString

Toward loggable code

Bug: 163134718
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: Ic3cdd525b544f593634b9b233722a40f6c10b840

3 years agoMerge "Re-log btm_sec_l2cap_access_req_by_requirement"
Chris Manton [Thu, 25 Mar 2021 22:16:10 +0000 (22:16 +0000)]
Merge "Re-log btm_sec_l2cap_access_req_by_requirement"

3 years agoMerge "RootCanal shouldn't depend on common"
Treehugger Robot [Thu, 25 Mar 2021 21:27:52 +0000 (21:27 +0000)]
Merge "RootCanal shouldn't depend on common"

3 years agoRe-log btm_sec_l2cap_access_req_by_requirement
Chris Manton [Thu, 18 Mar 2021 21:16:45 +0000 (14:16 -0700)]
Re-log btm_sec_l2cap_access_req_by_requirement

Toward loggable code

Bug: 163134718
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I39b877969a38622ec8dffed39ea8c531afab88af

3 years agoUse whole_static_library for cxx library deps.
Ivan Lozano [Thu, 25 Mar 2021 15:56:49 +0000 (11:56 -0400)]
Use whole_static_library for cxx library deps.

static_library has reverted to the old behavior of not being bundled
into rlibs, however whole_static_library has been added to support that
behavior.

Bug: 183182230
Test: mma
Change-Id: If0166b1347b005c03e9e1e1c2805513c0ec245d3

3 years agogd_acl: Ensure acl is running prior to shutdown
Chris Manton [Mon, 22 Mar 2021 22:04:05 +0000 (15:04 -0700)]
gd_acl: Ensure acl is running prior to shutdown

Synchronize stack shutdown

Bug: 176960731
Test: bluetooth_test_gd --gtest_filter=AclManagerLifeCycleTest.*
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I8a2a321f9605e26da8ce340badc87e2f7208209d

3 years agoRootCanal shouldn't depend on common
Myles Watson [Wed, 24 Mar 2021 23:04:57 +0000 (16:04 -0700)]
RootCanal shouldn't depend on common

Bug: 180413087
Test: cert/run
      atest bluetooth_test_gd
Tag: #gd-refactor
Change-Id: I743af9de1b816a485d4fb8e4c242d7beebd2eb49

3 years agoGD HCI: Pipe VSEs up in shim layer
Jack He [Thu, 25 Mar 2021 07:29:29 +0000 (00:29 -0700)]
GD HCI: Pipe VSEs up in shim layer

* Register known Android VSEs in shim layer
* Pipeline them through data callbacks so that they will
  be handled by btu_hcif_process_event() after beging posted
  to main thread by post_to_main_message_loop()

Tag: #gd-refactor
Bug: 183057550
Test: make, manual test BQR events
Change-Id: I849f02eec35f739f27d16803cea639c5e1ee1147

3 years agoGD Metrics: Check if RawAddress is null before converting
Jack He [Thu, 25 Mar 2021 06:25:59 +0000 (23:25 -0700)]
GD Metrics: Check if RawAddress is null before converting

Tag: #gd-refactor
Fixes: 183670698
Bug: 183670698
Test: make
Change-Id: Ibc46813a34db08ec899145e9d196d6bf0c96d897

3 years agoMerge "GD HCI: Support vendor specific event in GD"
Treehugger Robot [Thu, 25 Mar 2021 05:51:31 +0000 (05:51 +0000)]
Merge "GD HCI: Support vendor specific event in GD"

3 years agoGD HCI: Support vendor specific event in GD
Jack He [Thu, 25 Mar 2021 00:53:18 +0000 (17:53 -0700)]
GD HCI: Support vendor specific event in GD

* Add a handler for vendor specific command
* Add registration and unregistration APIs
* LOG_ERROR when an unknown vendor specific event is received
* Add unit tests to validate the above functions

Tag: #gd-refactor
Bug: 183057550
Test: bluetooth_test_gd
Change-Id: I00d6d892f3d60a8909352061dcae45f92d47b91d

3 years agoMerge "metrics: don't crash if `address` is NULL"
Treehugger Robot [Wed, 24 Mar 2021 18:30:30 +0000 (18:30 +0000)]
Merge "metrics: don't crash if `address` is NULL"

3 years agoMerge "btaa: Add the method of onActivityLogsReady into btif interface"
Mingguang Xu [Wed, 24 Mar 2021 17:53:36 +0000 (17:53 +0000)]
Merge "btaa: Add the method of onActivityLogsReady into btif interface"

3 years agoRe-log btm_sec_check_upgrade
Chris Manton [Thu, 18 Mar 2021 21:16:37 +0000 (14:16 -0700)]
Re-log btm_sec_check_upgrade

Toward loggable code

Bug: 163134718
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: Ib26183b2b63fcd9f877d876bb1d5d6954d82768c

3 years agoRemove dependency of the hci hal on activity attribution if the flag
Rahul Sabnis [Wed, 24 Mar 2021 00:30:38 +0000 (17:30 -0700)]
Remove dependency of the hci hal on activity attribution if the flag
value indicates it is not enabled. Adds activity attribution to gd
dumpsys.

Tag: #feature
Bug: 182283555
Test: Manual
Change-Id: I4c01dcda9d5a9b6e1273285fa32c95386329cf80

3 years agobtaa: Add the method of onActivityLogsReady into btif interface
Mingguang Xu [Fri, 19 Mar 2021 18:43:14 +0000 (11:43 -0700)]
btaa: Add the method of onActivityLogsReady into btif interface

The method of onActivityLogsReady will be used to pass BT activity logs
to BTAA core module to JNI.

Tag: #feature

Bug: 183215497
Bug: 170315554

Test: m

Signed-off-by: Mingguang Xu <mingguangxu@google.com>
Change-Id: I4dfeece15cb04a1b01fd5ad59da3bbceccecbf91

3 years agoMerge "Keystore 2.0: Remove references to Keystore 1"
Treehugger Robot [Tue, 23 Mar 2021 22:30:39 +0000 (22:30 +0000)]
Merge "Keystore 2.0: Remove references to Keystore 1"

3 years agoKeystore 2.0: Remove references to Keystore 1
Janis Danisevskis [Tue, 23 Mar 2021 20:30:32 +0000 (13:30 -0700)]
Keystore 2.0: Remove references to Keystore 1

Test: N/A
Bug: 171305684
Change-Id: I4a09c24e18bef4361dc4b75e6df665a9d38689f9

3 years agoRemove unnecessary transport param
Chris Manton [Thu, 11 Mar 2021 21:52:23 +0000 (13:52 -0800)]
Remove unnecessary transport param

Can only set packets on classic/BR_EDR

Bug: 163134718
Test: gd/cert/run
Tag: #refactor
Change-Id: Icf38654478a36671775d34c716bb86f6636bbffe

3 years agoAdd API stacl/acl/acl to set default packet type bitmask
Chris Manton [Thu, 11 Mar 2021 21:42:51 +0000 (13:42 -0800)]
Add API stacl/acl/acl to set default packet type bitmask

Bug: 182370398
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: Idc91e1dba6784d4989adcf10c4f94b468bd535c6

3 years agoHandle dual mode device with same address in bta_dm_remove_device
Chienyuan [Tue, 23 Mar 2021 15:09:16 +0000 (23:09 +0800)]
Handle dual mode device with same address in bta_dm_remove_device

Tag: #refactor
Bug: 183065766
Test: manual
Change-Id: Iff1b1c640b96606fa2dcdf49d30d2fa9a50ff891

3 years agoMerge "[LSC] Add LOCAL_LICENSE_KINDS to system/bt"
Treehugger Robot [Tue, 23 Mar 2021 13:23:49 +0000 (13:23 +0000)]
Merge "[LSC] Add LOCAL_LICENSE_KINDS to system/bt"

3 years agoInclude new hci_role file
Chris Manton [Wed, 10 Mar 2021 16:01:37 +0000 (08:01 -0800)]
Include new hci_role file

Bug: 179120287
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I22043f815a33ee0459a4a609080651ede5a60bbe

3 years ago[LSC] Add LOCAL_LICENSE_KINDS to system/bt
Bob Badour [Tue, 23 Mar 2021 02:02:24 +0000 (19:02 -0700)]
[LSC] Add LOCAL_LICENSE_KINDS to system/bt

Added SPDX-license-identifier-Apache-2.0 to:
  vendor_libs/test_vendor_lib/data/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

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

3 years agogd: Add Unregister::acl_manager classic/le
Chris Manton [Thu, 11 Mar 2021 00:30:47 +0000 (16:30 -0800)]
gd: Add Unregister::acl_manager classic/le

Synchronize stack shutdown

Bug: 176960731
Test: bluetooth_test_gd --gtest_filter=AclManagerLifeCycleTest.*
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: Iad2b6ce5f93f3aa3c9676179d9353cfa9f679fcd

3 years agometrics: don't crash if `address` is NULL
George Burgess IV [Mon, 22 Mar 2021 22:13:18 +0000 (15:13 -0700)]
metrics: don't crash if `address` is NULL

We check earlier if `address != nullptr` in this function; it stands to
reason that we should have the same check here, as well.

Potential use of null was caught by the static analyzer:
> system/bt/gd/common/metrics.cc:74:9: warning: Called C++ object
pointer is null [clang-analyzer-core.CallAndMessage]

Tag: #security
Bug: 181819141
Test: TreeHugger
Change-Id: I4baf5fe648c8fd841875515b024e1658b7ea20cd

3 years agoBTMLogHistory: Add HID device open/close
Chris Manton [Wed, 17 Mar 2021 16:46:55 +0000 (09:46 -0700)]
BTMLogHistory: Add HID device open/close

Toward loggable code

Bug: 163134718
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I2201febbce720a2534800e7e9c69d31b0f8b0ced

3 years agoMerge "GD metrics: Add shim layers for metrics in GD 1) Add shim layer for MetricIdMa...
Treehugger Robot [Mon, 22 Mar 2021 20:25:21 +0000 (20:25 +0000)]
Merge "GD metrics: Add shim layers for metrics in GD 1) Add shim layer for MetricIdManager 2) Add shim layer for metric logging functions who take metric id 3) reference the 2 shim layers at btif/, main/shim and stack/"

3 years agoRevert "gd: Add Unregister::acl_manager classic/le"
Chris Manton [Mon, 22 Mar 2021 18:12:27 +0000 (18:12 +0000)]
Revert "gd: Add Unregister::acl_manager classic/le"

This reverts commit f0436493c05fe8d70375f461bc7e158b94f74e9b.
Bug:183349791
Tag: #refactor
Test: Builds
Reason for revert: broke

Change-Id: Idb2a6845b9740a6112eabf0e40985d0a972c2ea3

3 years agoMerge "rusty-gd: Add controller facade service."
Qasim Javed [Mon, 22 Mar 2021 19:49:25 +0000 (19:49 +0000)]
Merge "rusty-gd: Add controller facade service."

3 years agoMerge "Make controller prop and default commands configurable in rootcanal"
Treehugger Robot [Mon, 22 Mar 2021 17:59:19 +0000 (17:59 +0000)]
Merge "Make controller prop and default commands configurable in rootcanal"

3 years agogd: Add Unregister::acl_manager classic/le
Chris Manton [Thu, 11 Mar 2021 00:30:47 +0000 (16:30 -0800)]
gd: Add Unregister::acl_manager classic/le

Synchronize stack shutdown

Bug: 176960731
Test: bluetooth_test_gd --gtest_filter=AclManagerLifeCycleTest.*
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: Ic7a41bbcb01dd61c5db7f4326daa8dd6585cbe86

3 years agoSpecial case -INT_MAX for hex conversion
Chris Manton [Fri, 19 Mar 2021 06:20:21 +0000 (23:20 -0700)]
Special case -INT_MAX for hex conversion

Bug: 183171310
Test: bluetooth_test_gd --gtest_filter=StringsTest*
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I4150f4f6dc3445e4853bea51c68eee26e891e45a

3 years agoMerge changes Ic1f5b589,I34e05959
Treehugger Robot [Sat, 20 Mar 2021 01:56:00 +0000 (01:56 +0000)]
Merge changes Ic1f5b589,I34e05959

* changes:
  PDL: Add more tests for C++
  GD: Include init_flags where used

3 years agoCert: OOB Test, verify different data.
Martin Brabham [Wed, 24 Feb 2021 01:48:32 +0000 (17:48 -0800)]
Cert: OOB Test, verify different data.

This test ensures that the data fetched is always different.

Bug: 178007935
Test: cert/run SecurityTest:test_make_sure_oob_data_different
Tag: #gd-refactor
Change-Id: I1847eebdcead9e13cb4bc2d8eb86cdb63bcaf978

3 years agorusty-gd: Add controller facade service.
Qasim Javed [Tue, 16 Mar 2021 19:55:53 +0000 (12:55 -0700)]
rusty-gd: Add controller facade service.

The ControllerTest pass with this change.

ControllerExports is currently not being updated as a result of
set_local_name. That will be handled as a follow up.

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

Change-Id: I1ceca00bac74451e915518288108ba149750dc6f

3 years agoPDL: Add more tests for C++
Myles Watson [Fri, 19 Mar 2021 20:50:53 +0000 (13:50 -0700)]
PDL: Add more tests for C++

Bug: 182216573
Test: atest bluetooth_test_gd
Tag: #gd-refactor
Change-Id: Ic1f5b5897451fcf31eb5b1b0b64426eb5ad2b1f7

3 years agoMerge "IBluetoothManager: Update createBondOutOfBand interface"
Treehugger Robot [Fri, 19 Mar 2021 21:13:17 +0000 (21:13 +0000)]
Merge "IBluetoothManager: Update createBondOutOfBand interface"

3 years agoGD: Include init_flags where used
Myles Watson [Fri, 12 Mar 2021 17:13:09 +0000 (09:13 -0800)]
GD: Include init_flags where used

Bug: 182586624
Tag: #gd-refactor
Test: cert/run
Change-Id: I34e05959b0167740f4e6c426c5f36c54d8d65c6e

3 years agoGD metrics: Add shim layers for metrics in GD
Chen Chen [Wed, 10 Mar 2021 23:41:42 +0000 (15:41 -0800)]
GD metrics: Add shim layers for metrics in GD
1) Add shim layer for MetricIdManager
2) Add shim layer for metric logging functions who take metric id
3) reference the 2 shim layers at btif/, main/shim and stack/

Bug: 181819141
Test: atest bluetooth_test_gd
Manual test by printing log at legacy stack and gd stack to make sure
function calls, parameters and callbacks are fowarded correctly

Change-Id: Ic5ee1ef95a7e4d7683de328ac78894986ba5011e

3 years agoMerge "Marking bluetooth_test_gd as not unit tests"
Julien Desprez [Fri, 19 Mar 2021 16:20:13 +0000 (16:20 +0000)]
Merge "Marking bluetooth_test_gd as not unit tests"

3 years agoGD metrics: add logging definitions to GD
Chen Chen [Tue, 9 Mar 2021 21:20:13 +0000 (13:20 -0800)]
GD metrics: add logging definitions to GD

Test: atest bluetooth_test_gd
Bug: 181819141

Change-Id: I1a49859c6ca93e196e95f6e230c15af094fae57b