OSDN Git Service

android-x86/system-bt.git
3 years agoMerge "BluetoothMetrics: Remove MetricIdAllocator reference from HalCrashReason"
Chen Chen [Wed, 28 Apr 2021 17:07:47 +0000 (17:07 +0000)]
Merge "BluetoothMetrics: Remove MetricIdAllocator reference from HalCrashReason"

3 years agoshim: Check if dumpsys module has started before invoking
Chris Manton [Tue, 20 Apr 2021 22:16:56 +0000 (15:16 -0700)]
shim: Check if dumpsys module has started before invoking

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

Change-Id: I67c83b36a7a9e5ac476d47760562d78bc1c95d36

3 years agoMerge "shim: Add entry to query gd dumpsys module"
Chris Manton [Wed, 28 Apr 2021 04:14:36 +0000 (04:14 +0000)]
Merge "shim: Add entry to query gd dumpsys module"

3 years agoMerge "GD: Add LogBluetoothHalCrashReason"
Weichin Weng [Wed, 28 Apr 2021 02:17:35 +0000 (02:17 +0000)]
Merge "GD: Add LogBluetoothHalCrashReason"

3 years agoBluetoothMetrics: Remove MetricIdAllocator reference from HalCrashReason
Chen Chen [Tue, 27 Apr 2021 23:14:57 +0000 (16:14 -0700)]
BluetoothMetrics: Remove MetricIdAllocator reference from HalCrashReason

Calling MetricIdAllocator may break its singleton pattern when stack is
half gd and half legacy. Since we are not inputing metric id at this
point, the easiest way is to just delete the reference.

Bug: 181819141
Test: atest --host bluetooth_test_common
Tag: #stability
Change-Id: If4bf0a87a55ef4ee5460065c43577ed22d7b28eb

3 years agoMerge "HCI: Add SetEventMaskPage2 Opcode"
Myles Watson [Wed, 28 Apr 2021 00:50:41 +0000 (00:50 +0000)]
Merge "HCI: Add SetEventMaskPage2 Opcode"

3 years agoGD: Add LogBluetoothHalCrashReason
weichinweng [Tue, 27 Apr 2021 02:14:25 +0000 (10:14 +0800)]
GD: Add LogBluetoothHalCrashReason

Add LogBluetoothHalCrashReason function in GD to collect Bluetooth hal
crash reason.

Bug: 174284338
Tag: #feature
Test: atest BluetoothInstrumentationTests
Change-Id: Ibdf4e1acd60f2f13f65c61c69421192ff246850b

3 years agoshim: Add entry to query gd dumpsys module
Chris Manton [Tue, 20 Apr 2021 21:04:17 +0000 (14:04 -0700)]
shim: Add entry to query gd dumpsys module

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

Change-Id: I7d31565442129ece0778a377a34961a18e2e3e0a

3 years agoMerge "shim: Add method to query stack manager for gd dumpsys module start"
Chris Manton [Tue, 27 Apr 2021 21:09:52 +0000 (21:09 +0000)]
Merge "shim: Add method to query stack manager for gd dumpsys module start"

3 years agoRe-point main/test/ to use common test/mock
Chris Manton [Tue, 27 Apr 2021 00:12:53 +0000 (17:12 -0700)]
Re-point main/test/ to use common test/mock

Toward testable code

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

Change-Id: I6f2d7a4a26858c416750bf35c47f70ec13f2f0f4

3 years agoRe-include bta/vc/devices
Chris Manton [Tue, 27 Apr 2021 16:26:42 +0000 (09:26 -0700)]
Re-include bta/vc/devices

Bug: 163134718
Test: cert
Tag: #refactor

Change-Id: Iae4b30484c2e0a38d5ac61875c1a80c6b04bd97f

3 years agoshim: Add method to query stack manager for gd dumpsys module start
Chris Manton [Tue, 20 Apr 2021 21:55:43 +0000 (14:55 -0700)]
shim: Add method to query stack manager for gd dumpsys module start

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

Change-Id: Ib9bef0b07b5a2248ae4262537b4fa4a4f865e0e3

3 years agoBreak out BTM_LogHistory
Chris Manton [Mon, 8 Feb 2021 23:57:43 +0000 (15:57 -0800)]
Break out BTM_LogHistory

Toward includable code

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

Change-Id: Ibbb8d94783f131a0ad4e455b6a3e9e3861be0dfd

3 years agoUse proper types tBTM_BLE_SEC_ACT
Chris Manton [Wed, 27 Jan 2021 17:22:07 +0000 (09:22 -0800)]
Use proper types tBTM_BLE_SEC_ACT

Toward readable code

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

Change-Id: Iad6f664ff123e5cee858ef4fee9a7356a89df9c9

3 years agoEnum-ify stack/include/btm/::tBTM_BLE_SEC_ACT
Chris Manton [Wed, 27 Jan 2021 17:25:47 +0000 (09:25 -0800)]
Enum-ify stack/include/btm/::tBTM_BLE_SEC_ACT

Toward readable code

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

Change-Id: I91920ec11dfb0095f271cdda81b7bb1819a68431

3 years agoRemove BLE_DELAY_REQUEST_ENC
Zach Johnson [Fri, 21 Aug 2020 16:51:09 +0000 (09:51 -0700)]
Remove BLE_DELAY_REQUEST_ENC

If it is enabled, the logic makes no sense.

The security flags are stored in 2 bytes.
The upper byte is LE security flags, and the lower byte is classic flags.
It is checking the classic flags to determine whether to start
BLE encryption.

It was false by default.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ifabf514e20c2bc95d2f81a94158b8b63c5e2db6d

3 years agoHCI: Add SetEventMaskPage2 Opcode
Myles Watson [Mon, 26 Apr 2021 23:59:56 +0000 (16:59 -0700)]
HCI: Add SetEventMaskPage2 Opcode

SetEventMaskPage2 is used for enabling/disabling
events for AMP.  Although we don't support these,
we can support (ignore) the command to disable them.

Bug: 186458975
Test: cert/run
Tag: #gd-refactor
Change-Id: Ibe957895fb830baf93b796a6b375928884912e18

3 years agogd: Add module started query method
Chris Manton [Tue, 20 Apr 2021 21:01:17 +0000 (14:01 -0700)]
gd: Add module started query method

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

Change-Id: I7d2dedd4aaa20fd6811166c86d1b9931e6dda536

3 years agoRemove unneeded header file gd/shim/only_..._ever
Chris Manton [Tue, 20 Apr 2021 20:37:34 +0000 (13:37 -0700)]
Remove unneeded header file gd/shim/only_..._ever

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

Change-Id: I66382c4160c0da5c8d3f2fbb5101cd90e37be627

3 years agogd: Use flushable attribute to packets
Chris Manton [Fri, 23 Apr 2021 20:33:47 +0000 (13:33 -0700)]
gd: Use flushable attribute to packets

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

Change-Id: Ie83541faf25a7d8d22877021ff8cc1ff32c110f2

3 years agogd: Add flushable attribute to packets
Chris Manton [Fri, 23 Apr 2021 19:55:07 +0000 (12:55 -0700)]
gd: Add flushable attribute to packets

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

Change-Id: I63dcc91f1ddbca9a0a3fadc38807f2a58b8ab2a8

3 years agoIntroduce stack_hci_test
Chris Manton [Fri, 23 Apr 2021 19:54:38 +0000 (12:54 -0700)]
Introduce stack_hci_test

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

Change-Id: Ib8e78e49a1f4e4f48e811eac0342e9d33eb7ceb4

3 years agoUpdate change packet type logic stack/btm/btm_acl
Chris Manton [Fri, 23 Apr 2021 00:36:38 +0000 (17:36 -0700)]
Update change packet type logic stack/btm/btm_acl

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

Change-Id: I6da232bfab73237969811f913b8394e0c9880507

3 years agoIntroduce stack/acl::PeerPacketTypes
Chris Manton [Fri, 23 Apr 2021 00:36:23 +0000 (17:36 -0700)]
Introduce stack/acl::PeerPacketTypes

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

Change-Id: I5034f21c30f3e8217b0b6d82e588560e0f5cdd7a

3 years agoAdd test mock filegroup TestMockLegacyHciCommands
Chris Manton [Fri, 23 Apr 2021 00:05:10 +0000 (17:05 -0700)]
Add test mock filegroup TestMockLegacyHciCommands

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

Change-Id: I968195c790eced00134739cbb9b6c9c060193d97

3 years agoUse test mocks for device controller
Chris Manton [Thu, 22 Apr 2021 22:19:26 +0000 (15:19 -0700)]
Use test mocks for device controller

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

Change-Id: I2caf2baf34307c92d3dba39dabbda65bb4aa0707

3 years agoMerge "Use proper types tBTM_STATUS"
Chris Manton [Sat, 24 Apr 2021 16:24:48 +0000 (16:24 +0000)]
Merge "Use proper types tBTM_STATUS"

3 years agoMerge "Controller: Set host support flag for Secure Connections"
Myles Watson [Sat, 24 Apr 2021 11:30:06 +0000 (11:30 +0000)]
Merge "Controller: Set host support flag for Secure Connections"

3 years agoRevert "gd_acl: Remove redundant call stack/l2cap/l2c_link"
Chris Manton [Fri, 23 Apr 2021 23:35:11 +0000 (23:35 +0000)]
Revert "gd_acl: Remove redundant call stack/l2cap/l2c_link"

This reverts commit f1e52ce0390fc817d192263f910fb124b44adc9b.

Reason for revert: Breaks CTKD

Bug: 180137651
Test: gd/cert/run
Tag: #gd-refactor

Change-Id: Ie67838980b69872926239f6511e2ff2efe7167c7

3 years agoUse proper types tBTM_STATUS
Chris Manton [Mon, 1 Mar 2021 18:33:25 +0000 (10:33 -0800)]
Use proper types tBTM_STATUS

Toward readable code

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

Change-Id: Ie4eb62898e05e9031c5df1e64e94d3935415fed2

3 years agoController: Set host support flag for Secure Connections
Myles Watson [Fri, 23 Apr 2021 22:56:24 +0000 (15:56 -0700)]
Controller: Set host support flag for Secure Connections

Bug: 180137651
Tag: #gd-refactor
Test: cert/run
Change-Id: I74eac7315defd955875a0b744a67788c0d9ca97c

3 years agoAdd test mocks for device controller
Chris Manton [Thu, 22 Apr 2021 21:49:12 +0000 (14:49 -0700)]
Add test mocks for device controller

Bug: 182370398
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
No-Typo-Check: Legacy code mocks

Change-Id: I0b3c9f4400db8108156957aaca9e5ab41be043a5

3 years agoRemove inaccessible mock functions
Chris Manton [Thu, 22 Apr 2021 21:47:59 +0000 (14:47 -0700)]
Remove inaccessible mock functions

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

Change-Id: I01f3a0e34fe281f9257913d7ef414e40a4e6516c

3 years agoEnum-ify stack/include/hcidefs::tHCI_PKT_TYPE_BITMASK
Chris Manton [Thu, 22 Apr 2021 21:17:44 +0000 (14:17 -0700)]
Enum-ify stack/include/hcidefs::tHCI_PKT_TYPE_BITMASK

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

Change-Id: I428a3123847ad60d31709765105b95834c7d7d92

3 years agoMerge "Additional changes for Linux build"
Abhishek Pandit-Subedi [Fri, 23 Apr 2021 20:21:39 +0000 (20:21 +0000)]
Merge "Additional changes for Linux build"

3 years agoMerge "Add scripts to generate Debian packages of Fluoride dependencies"
Sonny Sasaka [Fri, 23 Apr 2021 19:36:01 +0000 (19:36 +0000)]
Merge "Add scripts to generate Debian packages of Fluoride dependencies"

3 years agoAdditional changes for Linux build
Abhishek Pandit-Subedi [Sat, 10 Apr 2021 00:41:07 +0000 (00:41 +0000)]
Additional changes for Linux build

While building for Linux on cloudtop, a few more problems were
identified in the build. There were a couple of missing #include and
some incomplete struct definitions in btm_int_types.h. Also put
statslog.h behind an #ifdef OS_ANDROID.

Bug: 184975659
Tag: #floss
Test: atest --host bluetooth_test_gd
Change-Id: Ic2272a3acfa66259e692db280b48b4ddadff2171

3 years agoMerge "gd test: Enqueue data/command in right order"
Myles Watson [Fri, 23 Apr 2021 17:34:55 +0000 (17:34 +0000)]
Merge "gd test: Enqueue data/command in right order"

3 years agoMerge "gd acl: Only ack pause when onPause"
Myles Watson [Fri, 23 Apr 2021 17:33:35 +0000 (17:33 +0000)]
Merge "gd acl: Only ack pause when onPause"

3 years agogd test: Enqueue data/command in right order
Chienyuan [Fri, 23 Apr 2021 10:12:44 +0000 (18:12 +0800)]
gd test: Enqueue data/command in right order

Tag: #gd-refactor
Bug: 186071486
Test: gd/cert/run
Test: bluetooth_test_gd
Change-Id: Iec8663e8ae99fb689871e982b85c81a4f093b555

3 years agogd acl: Only ack pause when onPause
Chienyuan [Fri, 23 Apr 2021 07:26:03 +0000 (15:26 +0800)]
gd acl: Only ack pause when onPause

Tag: #gd-refactor
Bug: 186071486
Test: gd/cert/run
Change-Id: I5557312ec21485dea3513977bc893de3d58a50fa

3 years agoGD-Shim: Free BT_HDR after use or callback failure
Jack He [Fri, 23 Apr 2021 07:20:38 +0000 (00:20 -0700)]
GD-Shim: Free BT_HDR after use or callback failure

* Legacy stack always assume the last user of BT_HDR
  will free the structure. Make sure we do this in GD
  shim as well

Bug: 185083624
Tag: #gd-refactor
Test: gd/cert/run

Send a 31MB video
- before this change, RSS increased by 86 MB when 10% (3MB) was sent
- after this change, RSS increased by 37 MB and stabilized, this
  increase is anticipated as the file needs to be cached in RAM

BYPASS_LONG_LINES_REASON: consist with gd format

Change-Id: Ie934e6d4edd7dfc79b4444ce1c13819834f59692

3 years agoMerge "GD metrics: Log remote version info and manufacturer info at connection complete"
Chen Chen [Thu, 22 Apr 2021 17:55:56 +0000 (17:55 +0000)]
Merge "GD metrics: Log remote version info and manufacturer info at connection complete"

3 years agoMerge changes Ib883ada4,Ie9d9fb20
Treehugger Robot [Thu, 22 Apr 2021 17:39:34 +0000 (17:39 +0000)]
Merge changes Ib883ada4,Ie9d9fb20

* changes:
  GD: Add verbose logging to module start-up code
  GD Controller: Do not register events that are already registered in HCI

3 years agoGD: Add verbose logging to module start-up code
Jack He [Thu, 22 Apr 2021 05:32:57 +0000 (22:32 -0700)]
GD: Add verbose logging to module start-up code

Bug: 184608842
Test: make, start bluetooth
Tag: #gd-refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: Ib883ada4cd64d2adb37fdb00312ab581d7a4d50a

3 years agoMerge "HIDH: Initialize the ctrl_cid after trigger l2cap disconnect"
Treehugger Robot [Thu, 22 Apr 2021 17:36:35 +0000 (17:36 +0000)]
Merge "HIDH: Initialize the ctrl_cid after trigger l2cap disconnect"

3 years agoGD Controller: Do not register events that are already registered in HCI
Jack He [Thu, 22 Apr 2021 04:49:13 +0000 (21:49 -0700)]
GD Controller: Do not register events that are already registered in HCI

Bug: 186069471
Test: make, enable BT, pair headset, listen to music, make calls
Tag: #gd-refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: Ie9d9fb20f0b442ed5c84edd5ef03e46be2370504

3 years agodumpsys: Properly log classic/le ACL
Chris Manton [Sun, 14 Mar 2021 16:51:53 +0000 (09:51 -0700)]
dumpsys: Properly log classic/le ACL

Toward loggable code

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

Change-Id: I2abfb24cdcd174dc026d75f8d37d53abfa983266

3 years agoMerge changes I32c92511,I1a3d841d,Ibc688eac
Treehugger Robot [Thu, 22 Apr 2021 04:12:44 +0000 (04:12 +0000)]
Merge changes I32c92511,I1a3d841d,Ibc688eac

* changes:
  legacy: Add HACK to set legacy SM4 from gd_acl
  gd: Re-introduce read remote supported features
  BTM_history: Add dev states to stack hid host profile

3 years agoPolish tBTM_SEC_DEV_REC::ToString
Chris Manton [Sun, 14 Mar 2021 16:51:37 +0000 (09:51 -0700)]
Polish tBTM_SEC_DEV_REC::ToString

Toward loggable code

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

Change-Id: I1e6e7a2ed45fd61da9b6020b3d09f1135e7c59d3

3 years agolegacy: Add HACK to set legacy SM4 from gd_acl
Chris Manton [Thu, 22 Apr 2021 01:14:35 +0000 (18:14 -0700)]
legacy: Add HACK to set legacy SM4 from gd_acl

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

Change-Id: I32c92511fadebf458175a7f8f210c4ec0e0d3c74

3 years agogd: Re-introduce read remote supported features
Chris Manton [Thu, 22 Apr 2021 00:36:09 +0000 (17:36 -0700)]
gd: Re-introduce read remote supported features

This command is very similar to the remote extended
features for page 0 and can cause confusion.  Broke out
into its own code path for clarity

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

Change-Id: I1a3d841d811b47c928521ac3422c13c0c69ea975

3 years agoBTM_history: Add dev states to stack hid host profile
Chris Manton [Sat, 17 Apr 2021 18:02:47 +0000 (11:02 -0700)]
BTM_history: Add dev states to stack hid host profile

Toward loggable code

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

Change-Id: Ibc688eacf75a8520fdd74dfef41b2794668bbfa4

3 years agoStore remote lmp version in security record
Chris Manton [Fri, 12 Mar 2021 06:30:46 +0000 (22:30 -0800)]
Store remote lmp version in security record

Toward loggable code

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

Change-Id: I928bcb52c65b5c9a3cbfd67d48a3465b7e14959f

3 years agoRe-log btif_update_remote_version_property
Chris Manton [Fri, 12 Mar 2021 01:57:21 +0000 (17:57 -0800)]
Re-log btif_update_remote_version_property

Toward readable code

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

Change-Id: I1fab5db45be15edaae5a6a68f5661347fe80cf02

3 years agoGD metrics: Log remote version info and manufacturer info at connection complete
Chen Chen [Wed, 21 Apr 2021 00:24:32 +0000 (17:24 -0700)]
GD metrics: Log remote version info and manufacturer info at connection complete

Test: gd/cert/run
Manual test: build and run Bluetooth (connection, pairing, music and phone call)
Bug: 181819141
Tag: #gd-refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: I4febd598ea786ffdaeef100e04edd35a72db4b6c

3 years agoRemove mutable param input bta/hh/bta_hh_act
Chris Manton [Wed, 17 Mar 2021 03:05:03 +0000 (20:05 -0700)]
Remove mutable param input bta/hh/bta_hh_act

Please do not modify the parameters

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

Change-Id: I63a2d921aef40f897058a4a826f9732d6f3d72ae

3 years agoMerge changes Iac4351a2,Ib8fadd80
Treehugger Robot [Wed, 21 Apr 2021 18:01:04 +0000 (18:01 +0000)]
Merge changes Iac4351a2,Ib8fadd80

* changes:
  Demote log message to informational LeAddressManagerCallback
  shim: Add sync at completion connection test

3 years agoDemote log message to informational LeAddressManagerCallback
Chris Manton [Fri, 12 Mar 2021 01:56:57 +0000 (17:56 -0800)]
Demote log message to informational LeAddressManagerCallback

It is normal for multiple handlers to invoke upon receipt
of this event.

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

Change-Id: Iac4351a21883bf991c43885ae4bab473681ad1cc

3 years agoshim: Add sync at completion connection test
Chris Manton [Mon, 19 Apr 2021 15:29:39 +0000 (08:29 -0700)]
shim: Add sync at completion connection test

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

Change-Id: Ib8fadd805da65d24be6dc590ecdb0f4978341ffc

3 years agogd hci: Check extended feature supported when read remote feature complete
Chienyuan [Wed, 21 Apr 2021 13:37:19 +0000 (21:37 +0800)]
gd hci: Check extended feature supported when read remote feature complete

Tag: #gd-refactor
Bug: 185972929
Test: gd/cert/run
Change-Id: Id8bbb197694e2e68211968c46fe556062a60f31c

3 years agoMerge "gd Scanning: Ignore non-anonymous advertising report with empty address"
Treehugger Robot [Wed, 21 Apr 2021 13:27:21 +0000 (13:27 +0000)]
Merge "gd Scanning: Ignore non-anonymous advertising report with empty address"

3 years agogd Scanning: Ignore non-anonymous advertising report with empty address
Chienyuan [Tue, 20 Apr 2021 11:50:53 +0000 (19:50 +0800)]
gd Scanning: Ignore non-anonymous advertising report with empty address

Tag: #gd-refactor
Bug: 185793671
Test: gd/cert/run
Change-Id: I56d671aa2726db64ae6e34bc8b32bc5461ae3609

3 years agoHIDH: Initialize the ctrl_cid after trigger l2cap disconnect
weichinweng [Wed, 21 Apr 2021 07:42:27 +0000 (15:42 +0800)]
HIDH: Initialize the ctrl_cid after trigger l2cap disconnect

Since the ctrl_cid doesn't initialize, the HIDH sm can't initialize.
Next time, can't correctly trigger connect and handle the ctrl_cid
connect request.

Bug: 184128916
Test: compile && disconnect/reconnect HID device
Tag: #feature
Change-Id: I7bafe8728726d3df1d0bc58c8bc5224260042365

3 years agoAlign bt_transport_text syntactically with legacy
Chris Manton [Sun, 14 Mar 2021 16:50:25 +0000 (09:50 -0700)]
Align bt_transport_text syntactically with legacy

Also disambiguate from identical call
service/logging_helpers.h

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

Change-Id: I75f25dcffb799879ab8f53e3cecba8bc573b5c16

3 years agoEnum-ify stack/l2cap/l2c_int::tL2CEVT
Chris Manton [Tue, 16 Mar 2021 02:40:25 +0000 (19:40 -0700)]
Enum-ify stack/l2cap/l2c_int::tL2CEVT

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

Change-Id: I5b890c27aa183b183800806e012383d66ee27fd0

3 years agolegacy: Re-log btif/src/btif_hh::bte_hh_evt
Chris Manton [Sun, 18 Apr 2021 06:24:47 +0000 (23:24 -0700)]
legacy: Re-log btif/src/btif_hh::bte_hh_evt

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

Change-Id: Ia0203bc1b05687d6d701a3ccef7e40a51ee30f79

3 years agoReplace BT_HDR => BT_HDR_RIGID
Chris Manton [Sat, 6 Mar 2021 23:35:36 +0000 (15:35 -0800)]
Replace BT_HDR => BT_HDR_RIGID

Toward structurally sound code

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

Change-Id: Ib6569c0c19c7f1e6f4b9e9c1abc27e30d1e33fbf

3 years agoRemove unused flags
Zach Johnson [Fri, 21 Aug 2020 17:43:01 +0000 (10:43 -0700)]
Remove unused flags

nobody needs this

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I1dc37a831f0faf92990ec5e83c2759dedce2551b

3 years agoshim: Const-ify helper translations
Chris Manton [Sun, 18 Apr 2021 06:23:04 +0000 (23:23 -0700)]
shim: Const-ify helper translations

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

Change-Id: I7e95481a762fce8afd3111c497784dc97d4eae13

3 years agolegacy: Remove unused var stack/hid/hidh_conn
Chris Manton [Sat, 17 Apr 2021 18:02:35 +0000 (11:02 -0700)]
legacy: Remove unused var stack/hid/hidh_conn

Toward meaningful code

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

Change-Id: I8837a66dcba4ab160fc152319b9eb71f27a61045

3 years agolegacy: Use stack/hid/hid_conn::tHID_CONN_STATE
Chris Manton [Sat, 17 Apr 2021 17:35:31 +0000 (10:35 -0700)]
legacy: Use stack/hid/hid_conn::tHID_CONN_STATE

Toward readable code

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

Change-Id: I8984eb536a7241758e5276bd26aaab4bd02b97ac

3 years agolegacy: Add stack/hid/hid_conn::hid_conn_state_text
Chris Manton [Sat, 17 Apr 2021 17:33:23 +0000 (10:33 -0700)]
legacy: Add stack/hid/hid_conn::hid_conn_state_text

Toward loggable code

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

Change-Id: I95495eb823cd4b01df96b48773ede6818d52b301

3 years agolegacy: Enum-ify stack/hid/hid_conn::tHID_CONN_STATE
Chris Manton [Sat, 17 Apr 2021 17:27:21 +0000 (10:27 -0700)]
legacy: Enum-ify stack/hid/hid_conn::tHID_CONN_STATE

Toward readable code

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

Change-Id: I2869eb18c858b724a34d234ea67c0246d494d5f7

3 years agoRemove useless typedefs
Chris Manton [Tue, 16 Mar 2021 00:14:29 +0000 (17:14 -0700)]
Remove useless typedefs

Toward meaningful code

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

Change-Id: I5d96ba04a4dea271488fc59b53558c775a315452

3 years agoRe-log btm_sec_connected
Chris Manton [Fri, 12 Mar 2021 01:27:24 +0000 (17:27 -0800)]
Re-log btm_sec_connected

Toward loggable code

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

Change-Id: If38627c7034b88ddbd7306d9e9d0dc8c07f9ba9e

3 years agoRemove #def BTA_HH_DEBUG
Chris Manton [Tue, 16 Mar 2021 01:32:58 +0000 (18:32 -0700)]
Remove #def BTA_HH_DEBUG

Toward loggable code

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

Change-Id: I3daf1d4bb8e7ec37828f6eb589b878215f769635

3 years agoRe-log acl_send_data_packet_br_edr
Chris Manton [Fri, 12 Mar 2021 01:27:38 +0000 (17:27 -0800)]
Re-log acl_send_data_packet_br_edr

Toward loggable code

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

Change-Id: I0310f9e143fa1b1bec60efb113025000112d6fe6

3 years agoPoint BtmStatus to tBTM_STATUS
Chris Manton [Mon, 1 Mar 2021 18:33:43 +0000 (10:33 -0800)]
Point BtmStatus to tBTM_STATUS

Towards converging code

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

Change-Id: Id2c30a0deb41bb6cd1dd55099c17924e80e88335

3 years agoAdd stack/include/btm_status helpers
Chris Manton [Mon, 1 Mar 2021 18:32:04 +0000 (10:32 -0800)]
Add stack/include/btm_status helpers

Toward reliable code

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

Change-Id: If8a990740ea4446df2c9293d6f9342dc0e316f39

3 years agoMerge changes Iac5bc982,I90c66a3b,I4ed5973b,I5173b895,I28420a70, ...
Treehugger Robot [Tue, 20 Apr 2021 02:34:17 +0000 (02:34 +0000)]
Merge changes Iac5bc982,I90c66a3b,I4ed5973b,I5173b895,I28420a70, ...

* changes:
  legacy: Move BTM_SEC_ #defs to compilation unit
  legacy: Re-log stack/smp/smp_utils::smp_proc_pairing_cmpl
  legacy: Re-log stack/smp/smp_utils::smp_send_cmd
  legacy: Add stack/include/smp_api_types::smp_opcode_text
  legacy: Use proper types tSDP_STATUS
  shim: Add default for HCI_STATUS helper
  Use proper types tSDP_STATUS

3 years agolegacy: Move BTM_SEC_ #defs to compilation unit
Chris Manton [Fri, 16 Apr 2021 17:50:29 +0000 (10:50 -0700)]
legacy: Move BTM_SEC_ #defs to compilation unit

Toward modularized code

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

Change-Id: Iac5bc9821127bc95d71384eb2a02555540ddb0dc

3 years agolegacy: Re-log stack/smp/smp_utils::smp_proc_pairing_cmpl
Chris Manton [Fri, 16 Apr 2021 17:13:33 +0000 (10:13 -0700)]
legacy: Re-log stack/smp/smp_utils::smp_proc_pairing_cmpl

Toward loggable code

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

Change-Id: I90c66a3b676d3ee4c694e0cb9751d1dbc53c34b3

3 years agolegacy: Re-log stack/smp/smp_utils::smp_send_cmd
Chris Manton [Fri, 16 Apr 2021 16:55:51 +0000 (09:55 -0700)]
legacy: Re-log stack/smp/smp_utils::smp_send_cmd

Toward loggable code

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

Change-Id: I4ed5973b81ad0691e7f85cca732650d0d5c2f225

3 years agolegacy: Add stack/include/smp_api_types::smp_opcode_text
Chris Manton [Fri, 16 Apr 2021 16:52:19 +0000 (09:52 -0700)]
legacy: Add stack/include/smp_api_types::smp_opcode_text

Toward loggable code

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

Change-Id: I5173b895f0dba0637a5985dbae6e94038fe65ff9

3 years agolegacy: Use proper types tSDP_STATUS
Chris Manton [Mon, 19 Apr 2021 02:32:53 +0000 (19:32 -0700)]
legacy: Use proper types tSDP_STATUS

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

Change-Id: I28420a70fca3eacdaf3a0e19ab2360324d26c317

3 years agoshim: Add default for HCI_STATUS helper
Chris Manton [Sun, 18 Apr 2021 16:34:58 +0000 (09:34 -0700)]
shim: Add default for HCI_STATUS helper

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

Change-Id: I1681f65cfb3aa3cdfe38a1de987bf0aaf62d6c99

3 years agoUse proper types tSDP_STATUS
Chris Manton [Tue, 16 Mar 2021 00:14:10 +0000 (17:14 -0700)]
Use proper types tSDP_STATUS

Toward readable code

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

Change-Id: Ie8f28b14b00e791110ffc5367a81ca8bf4a1060d

3 years agoMerge "HCI: Warn on unhandled events"
Treehugger Robot [Mon, 19 Apr 2021 21:44:01 +0000 (21:44 +0000)]
Merge "HCI: Warn on unhandled events"

3 years agoshim: Wrap TRY_POSTING_ON_MAIN conditional
Chris Manton [Mon, 19 Apr 2021 00:41:52 +0000 (17:41 -0700)]
shim: Wrap TRY_POSTING_ON_MAIN conditional

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

Change-Id: I34afd1b42744f1357f4a5ea6624e343bd7f59ad1

3 years agoHCI: Warn on unhandled events
Myles Watson [Mon, 19 Apr 2021 19:09:05 +0000 (12:09 -0700)]
HCI: Warn on unhandled events

Bug: 185731391
Test: cert/run
Tag: #gd-refactor
Change-Id: I0d63c4c85ab49a0bee857d384dd5b0d27a8fe8fd

3 years agoMerge "Fix valid check for btm_process_remote_ext_features"
Jack He [Mon, 19 Apr 2021 18:42:57 +0000 (18:42 +0000)]
Merge "Fix valid check for btm_process_remote_ext_features"

3 years agoMerge "gd hci: Correct max_page_number for read remote feature complete"
Jack He [Mon, 19 Apr 2021 18:42:48 +0000 (18:42 +0000)]
Merge "gd hci: Correct max_page_number for read remote feature complete"

3 years agoFix valid check for btm_process_remote_ext_features
Chienyuan [Mon, 19 Apr 2021 10:10:53 +0000 (18:10 +0800)]
Fix valid check for btm_process_remote_ext_features

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

3 years agogd hci: Correct max_page_number for read remote feature complete
Chienyuan [Mon, 19 Apr 2021 08:38:38 +0000 (16:38 +0800)]
gd hci: Correct max_page_number for read remote feature complete

Tag: #gd-refactor
Bug: 183688717
Test: gd/cert/run
Change-Id: I2386fb48d06f164fb3660bbb04603713ec4a742e

3 years agoGD Storage: Call SaveDelayed on the right thread
Jack He [Sat, 17 Apr 2021 08:37:25 +0000 (01:37 -0700)]
GD Storage: Call SaveDelayed on the right thread

* To resolve a dedlock between StorageModule and ConfigCache

Fixes: 178976563
Bug: 178976563
Test: atest bluetooth_test_gd
Tag: #gd-refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I13a51931111eb3c0e1c999cd4b7f4fc30d9e1f13

3 years agoMerge changes Ic583e487,Ic589759c,Ibe9720b5,I3fc83d6d,I3cccdf77, ...
Chris Manton [Fri, 16 Apr 2021 21:21:11 +0000 (21:21 +0000)]
Merge changes Ic583e487,Ic589759c,Ibe9720b5,I3fc83d6d,I3cccdf77, ...

* changes:
  shim: Move disconnect classic/le into thread safe space
  shim: Add acl tests
  shim: Replace mock do_in_main_thread with a fake
  shim: Move dumpsys map off heap into static allocation
  shim: Clean up mock entry and add common header inclusion
  gd: Make address protected to set it for tests
  Untangle HCI_STATUS/BTM_STATUS bta/dm/bta_dm_act
  Enum-ify tSMP_STATUS

3 years agoshim: Move disconnect classic/le into thread safe space
Chris Manton [Thu, 15 Apr 2021 02:03:09 +0000 (19:03 -0700)]
shim: Move disconnect classic/le into thread safe space

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

Change-Id: Ic583e4878a2d7428f3007303f9f030e9a78bd32f

3 years agoshim: Add acl tests
Chris Manton [Thu, 15 Apr 2021 02:06:04 +0000 (19:06 -0700)]
shim: Add acl tests

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

Change-Id: Ic589759cec3190e99f0a1659985740f415569ab2

3 years agoshim: Replace mock do_in_main_thread with a fake
Chris Manton [Thu, 15 Apr 2021 20:54:20 +0000 (13:54 -0700)]
shim: Replace mock do_in_main_thread with a fake

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

Change-Id: Ibe9720b5934806bca2d62055fc50dc20ecac927d