OSDN Git Service
Treehugger Robot [Mon, 3 May 2021 21:35:53 +0000 (21:35 +0000)]
Merge "Replace base::MessageLoopCurrent* by base::Current*Thread"
Sal Savage [Mon, 3 May 2021 20:40:03 +0000 (20:40 +0000)]
Merge "Handle connection failures on the control channel properly"
Sonny Sasaka [Mon, 3 May 2021 20:11:38 +0000 (20:11 +0000)]
Merge "Add script to generate libchrome R91 version"
Abhishek Pandit-Subedi [Mon, 3 May 2021 19:56:20 +0000 (12:56 -0700)]
Replace base::MessageLoopCurrent* by base::Current*Thread
Make changes necessary for recent uprev of libchrome to r822064.
Bug:
187086497
Tag: #floss
Test: atest --host bluetooth_test_gd
Change-Id: I63f954c1ce5e0bf455e1da1e258d4a8b88fcfc9d
Treehugger Robot [Mon, 3 May 2021 17:40:25 +0000 (17:40 +0000)]
Merge "OOB: Generate random for LE"
Chris Manton [Sat, 1 May 2021 06:16:19 +0000 (23:16 -0700)]
Unnecessary def BTA_GATTC_CONN_MAX => GATT_MAX_PHY_CHANNEL
Bug:
163134718
Test: gd/cert/run
Tag: #refactor
Change-Id: I034765099d25b207e8085fcdae59de866d400278
Chris Manton [Fri, 30 Apr 2021 22:21:38 +0000 (15:21 -0700)]
Re-point bta:: tests to common test/mock
Bug:
163134718
Test: gd/cert/run
Tag: #refactor
Change-Id: I8dbfc4754a754011a0c06c5f8d21abce15931cd3
Chris Manton [Wed, 17 Mar 2021 01:46:17 +0000 (18:46 -0700)]
Const-ify the bta/hh/bta_hh::API data types
Bug:
163134718
Test: gd/cert/run
Tag: #refactor
Change-Id: I37c61447dc921ce10e112a30bdb8dc011dff3410
Chris Manton [Mon, 15 Mar 2021 17:23:17 +0000 (10:23 -0700)]
Remove unused member tHID_HOST_DEV_CTB::conn_substate
Bug:
163134718
Test: gd/cert/run
Tag: #refactor
Change-Id: I7fcfc640ef7728ae924e55d3ce1f4fa43b09963a
Chris Manton [Fri, 30 Apr 2021 06:20:36 +0000 (23:20 -0700)]
Move stack/l2cap::text from compilation unit into header
Bug:
163134718
Test: gd/cert/run
Tag: #refactor
Change-Id: I7b14bb2a83444d0147dd1f02f39881f8990998d7
Chris Manton [Thu, 29 Apr 2021 20:44:11 +0000 (13:44 -0700)]
Add BTA_ID_HH for logging
Bug:
163134718
Test: gd/cert/run
Tag: #refactor
Change-Id: Ib3798e340688cc400f96b743afc15f46e365022a
Chris Manton [Thu, 29 Apr 2021 20:43:55 +0000 (13:43 -0700)]
Add include/hardware/bt_hh::bthh_connection_state_text
Bug:
163134718
Test: gd/cert/run
Tag: #refactor
Change-Id: I9050d99e913c96454837f95a266efcf828bcf6b4
Chris Manton [Thu, 29 Apr 2021 05:23:22 +0000 (22:23 -0700)]
Remove unused declaration
Bug:
163134718
Test: gd/cert/run
Tag: #refactor
Change-Id: I5c6a76d903e56fe4ec721ec0701e305e8bd1b13d
Chris Manton [Thu, 29 Apr 2021 05:22:49 +0000 (22:22 -0700)]
btm_log: Streamline hid logging
Bug:
163134718
Test: gd/cert/run
Tag: #refactor
No-Typo-Check: Legacy code mocks
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: If3f967ddabe64c481536debd44a31b989eff1565
Chris Manton [Thu, 29 Apr 2021 00:51:59 +0000 (17:51 -0700)]
log: Swap proper initiator
Bug:
163134718
Test: gd/cert/run
Tag: #refactor
Change-Id: I9ade378b5de1677d6be9d7e56af8589ff023e613
Treehugger Robot [Sat, 1 May 2021 20:21:47 +0000 (20:21 +0000)]
Merge "ScanningManagerTest: Wait for the Filter command"
Myles Watson [Fri, 30 Apr 2021 23:45:51 +0000 (16:45 -0700)]
ScanningManagerTest: Wait for the Filter command
Bug:
176832968
Test: atest bluetooth_test_gd
Tag: #gd-refactor
Change-Id: Idf36458a196e1ad3278f3eb8a2d384586ac40afe
Myles Watson [Sat, 1 May 2021 14:15:40 +0000 (07:15 -0700)]
GD: Split tests into module vs unit tests
Move simpler, single-threaded tests into their own set of unit tests.
Bug:
176832968
Test: atest bluetooth_test_gd_unit
Tag: #gd-refactor
Change-Id: Ic3fa06454d119764aa547f975843583c00c32fc4
Martin Brabham [Tue, 27 Apr 2021 04:35:22 +0000 (21:35 -0700)]
OOB: Generate random for LE
Bug:
184377951
Test: Compiles, test app.
Tag: #feature
Change-Id: I92c1fa84383f2a30fbea1f858417393aefe1d302
Sonny Sasaka [Sat, 1 May 2021 00:58:26 +0000 (17:58 -0700)]
Add script to generate libchrome R91 version
Bug:
179821440
Tag: #floss
Test: None
Change-Id: I9114fb825a88b69fb8017943ed24a9cf169c9a09
Erwin Jansen [Fri, 30 Apr 2021 22:31:21 +0000 (15:31 -0700)]
Enable missing HCI cmds in rootcanal
This enables:
- 7.8.44 LE Set Address Resolution Enable command
- 7.8.45 LE Set Resolvable Private Address Timeout
Both are NOPs for now.
Bug:
186861350
Bug:
186541528
Test: NimBLE gets a bit further with root canal
Change-Id: I3d1b95a30afc97d1f1f7555ac891b4f4df872eec
Treehugger Robot [Fri, 30 Apr 2021 22:12:41 +0000 (22:12 +0000)]
Merge "ACL: Delay early RoleChange until after a ConnectionComplete"
Erwin Jansen [Fri, 30 Apr 2021 21:35:37 +0000 (21:35 +0000)]
Merge "Compilation fixes for MSVC"
Treehugger Robot [Fri, 30 Apr 2021 21:00:13 +0000 (21:00 +0000)]
Merge changes I02cc2057,Icb879814,I468ac585,Idf93afcf,If3006967, ...
* changes:
btaa: Add device-activity aggregation dumpsys data
btaa: HCI ACL/SCO/ISO data packets process
btaa: gd: Add wakeup reason dumpsys data
btaa: attribute wakeup and wakelock duration over processed HCI buckets
btaa: HCI LE and special event process
btaa: HCI classic event process
btaa: HCI command process
btaa: handle wakelock notification
btaa: handle wakeup notification
Sal Savage [Fri, 30 Apr 2021 20:42:38 +0000 (13:42 -0700)]
Handle connection failures on the control channel properly
This patch fixes a bug where a failed control channel connection would
fail to exit early. Status was updated and broadcasted to be connected
even when we were not.
Tag: #stability
Bug:
175275589
Test: atest BluetoothInstrumentationTests
Change-Id: Ic089d6317c4c9c7b8830dd1f1c0ff27cb1d008f2
Myles Watson [Wed, 28 Apr 2021 00:52:21 +0000 (17:52 -0700)]
ACL: Delay early RoleChange until after a ConnectionComplete
Bug:
180137651
Tag: #gd-refactor
Test: cert/run
BYPASS_LONG_LINES_REASON: Bluetooth
Change-Id: I02879eff0dfa9589a240042cb53bf57412214fad
Myles Watson [Fri, 30 Apr 2021 15:25:39 +0000 (15:25 +0000)]
Merge "gd: Implement batch scan"
Martin Brabham [Thu, 29 Apr 2021 22:43:02 +0000 (15:43 -0700)]
Disable SecurityRecordStorageTests
Bug:
176170066
Test: atest --host bluetooth_test_gd:SecurityRecordStorageTest (Fails to run/doesn't
exist)
Tag: #refactor
Change-Id: I4aac224fcdd7ee31ce6e672dc4d5b9653b605b7e
Martin Brabham [Thu, 29 Apr 2021 18:51:28 +0000 (18:51 +0000)]
Merge "OOB: generateLocalOobdata()"
Treehugger Robot [Thu, 29 Apr 2021 18:33:26 +0000 (18:33 +0000)]
Merge "gd: Find and fill TX Power with the correct value"
Grzegorz Kołodziejczyk [Thu, 29 Apr 2021 16:36:07 +0000 (16:36 +0000)]
Don't try to do read multiple procedure if only one attribute is to read
Read multiple command requires at least two handles to be performed.
Test: Discovery GATT db with single descriptor characteristic
Sponsor: jpawlowski@
Change-Id: I36bb1077ab8fe6adb3c94274b8ffde56086fd611
Chienyuan [Tue, 27 Apr 2021 17:34:27 +0000 (01:34 +0800)]
gd: Implement batch scan
Tag: #gd-refactor
Bug:
186234480
Test: gd/cert/run
Test: bluetooth_test_gd
Test: sl4a, BleOpportunisticScanTest:test_batch_scan_result
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: I5060826ff79030cae0bacb44e67acc6f42c6adb4
Chienyuan [Thu, 29 Apr 2021 07:54:49 +0000 (15:54 +0800)]
gd: Find and fill TX Power with the correct value
Tag: #gd-refactor
Bug:
185962046
Test: gd/cert/run
Test: manual
Change-Id: If49961fc02d0cdebc28f0d8d247a98ed35bcd6b4
Sonny Sasaka [Thu, 29 Apr 2021 05:24:19 +0000 (05:24 +0000)]
Merge "Change build.py ordering for rust and main"
Sonny Sasaka [Thu, 29 Apr 2021 05:23:48 +0000 (05:23 +0000)]
Merge "Fixes for Linux build"
Chris Manton [Wed, 28 Apr 2021 19:15:51 +0000 (12:15 -0700)]
Fix for hid disconnect with unknown channel
Also introduce net_test_stack_hid
And update mocks to allow functional replacement
Bug:
181199209
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: Iab4ac55477d2d98d52d7b77aee19b4172c63e4eb
Chris Manton [Wed, 28 Apr 2021 19:15:26 +0000 (12:15 -0700)]
Konstify configurable params kHID_HOST_MAX_DEVICES
Bug:
181199209
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: I8b73da2ddebce5117e8bb91176c5cebfef093315
Chris Manton [Wed, 28 Apr 2021 19:14:48 +0000 (12:14 -0700)]
Add test legacy trace stub
Bug:
181199209
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: Ie5be989255c5609da81b6126c266f18f45007e83
Chris Manton [Wed, 28 Apr 2021 16:08:44 +0000 (09:08 -0700)]
Re-include stack/hid/hidh_int
Bug:
181199209
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: I834a2e1cf0ba81cb7cc118dfdae3a0e583c4fc8e
Chris Manton [Wed, 28 Apr 2021 16:07:01 +0000 (09:07 -0700)]
Re-include stack/hid/hidd_int
Bug:
181199209
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: I99339cd65df45efc918694a115bce3fffdb86efc
Chris Manton [Wed, 28 Apr 2021 15:49:14 +0000 (08:49 -0700)]
Decl-def same line stack var stack/hid/::tHID_CONN
Bug:
181199209
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: Ia8f9aa24b72a1bd3b57c3bd850a022a81c2e174b
Chris Manton [Sat, 17 Apr 2021 00:16:47 +0000 (17:16 -0700)]
Re-log stack/btm/btm_sec::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: I7566e6b37b3471fd7fd12e957d30d4585b86f26e
Chen Chen [Wed, 28 Apr 2021 17:07:47 +0000 (17:07 +0000)]
Merge "BluetoothMetrics: Remove MetricIdAllocator reference from HalCrashReason"
Martin Brabham [Wed, 14 Apr 2021 20:10:45 +0000 (13:10 -0700)]
OOB: generateLocalOobdata()
Implement generation of LE OOB Data
- Remove GD flag to NOP for OobDataReply.
GD Stack is only up to ACL, so Legacy SM needs to properly function.
Bug:
184377951
Tag: #feature
Test: Manual implementation from p/a/Settings
Change-Id: I6072c70f5e6707eb8f3a6126ffa1edbb5cba5aa4
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
Chris Manton [Wed, 28 Apr 2021 04:14:36 +0000 (04:14 +0000)]
Merge "shim: Add entry to query gd dumpsys module"
Weichin Weng [Wed, 28 Apr 2021 02:17:35 +0000 (02:17 +0000)]
Merge "GD: Add LogBluetoothHalCrashReason"
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
Myles Watson [Wed, 28 Apr 2021 00:50:41 +0000 (00:50 +0000)]
Merge "HCI: Add SetEventMaskPage2 Opcode"
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
Erwin Jansen [Tue, 27 Apr 2021 21:30:32 +0000 (14:30 -0700)]
Compilation fixes for MSVC
This makes a few changes to compile the libary under clang-cl targeting
windows 10.
- We cannot cast a path to std::string in msvc
- Incorrect function names for generated code, causing linker failures
under windows.
Bug:
186568522
Test: Can successfully build packet gen as part of android emulator
Change-Id: I0edebc3bf459669998295dfbee08df30d4381ff8
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
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"
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
Mingguang Xu [Mon, 19 Apr 2021 20:27:19 +0000 (13:27 -0700)]
btaa: Add device-activity aggregation dumpsys data
1. Add create time into each aggregation entry; aggregation entry
expires after one day.
2. Add device-activity into dumpsys data; Trim down transient
aggregation entries to avoid the unordered map overgrows.
Tag: #feature
Bug:
185819535
Bug:
170315554
Test: mmma -j system/bt
Test: manually capture a bugreport and make sure btaa aggregation data
show up
BYPASS_LONG_LINES_REASON: consist with gd format
Change-Id: I02cc2057796661fa3625492eaf1a429e20da4951
Mingguang Xu [Fri, 16 Apr 2021 20:31:46 +0000 (13:31 -0700)]
btaa: HCI ACL/SCO/ISO data packets process
Parse ACL/SCO/ISO packets to get connection handle, match to device address, and attribute them to device-based activities.
Tag: #feature
Bug:
185596854
Bug:
170315554
Test: mmma -j system/bt
Test: manual
BYPASS_LONG_LINES_REASON: consist with gd format
Change-Id: Icb879814ee34700afa35ace1cdca8ff1e8f55fe4
Mingguang Xu [Thu, 15 Apr 2021 05:24:30 +0000 (22:24 -0700)]
btaa: gd: Add wakeup reason dumpsys data
Create a circular buffer for wakeup history and plumb wakeup history to
dumpsys.
Tag: #feature
Bug:
185037337
Bug:
170315554
Test: mmma -j system/bt
Test: manual
BYPASS_LONG_LINES_REASON: consist with gd format
Change-Id: I468ac585ed0cd3415176b5d9a373e9332efe4d99
Michael Sun [Wed, 6 Jan 2021 00:15:02 +0000 (00:15 +0000)]
btaa: attribute wakeup and wakelock duration over processed HCI buckets
Attach recorded BT wakeup to the first post-wakeup parsed HCI packet.
Distribute wakelock duration over bucketed HCI info based on
transmitted byte counts.
Tag: #feature
Bug:
177232907
BUG:
177228387
Test: verified locally BTAA aggregator updated with BT activities
BYPASS_LONG_LINES_REASON: consist with gd format
Change-Id: Idf93afcf13af9e76b4bc6f6ef30cf8424d8b4982
Michael Sun [Wed, 6 Jan 2021 00:14:36 +0000 (00:14 +0000)]
btaa: HCI LE and special event process
Implementation the HCI process for LE and special (events that contains
more than one device information) events.
Tag: #feature
Bug:
177230507
Test: verified locally BTAA can process LE and special events.
BYPASS_LONG_LINES_REASON: consist with gd format
Change-Id: If30069673bd6164b22af926ca17ea9830f891a8a
Michael Sun [Wed, 6 Jan 2021 00:13:11 +0000 (00:13 +0000)]
btaa: HCI classic event process
Introduce BTAA HCI event processing. This change only handles simple
(event that contains only one device information and do not require
additional processing )classic events. Command status and command
complete events will be associated with previous parsed HCI command.
The lookup table is a skelton implementation that does not contain 100%
correct information.
Tag: #feature
Bug:
177230507
Test: verified locally BTAA can partially process HCI events.
BYPASS_LONG_LINES_REASON: consist with gd format
Change-Id: Idd26318200cfd1f94596dd69083452dba5dff478
Michael Sun [Thu, 31 Dec 2020 01:00:18 +0000 (01:00 +0000)]
btaa: HCI command process
Introduce the first phase of BTAA HCI command process. Upon receives a
HCI command packet, processing module will search the opcode against a
lookup table, only simple (contains only device info) and identifiable
command will be processed. Pair information of connection handle and
device address are associated and recorded for future references.
The lookup table is a skelton implementation that does not contain 100%
correct information.
Tag: #feature
Bug:
177230507
Test: verified locally BTAA can partially process HCI commands
BYPASS_LONG_LINES_REASON: consist with gd format
Change-Id: I7c8640e60ffa06f45953403549d28dc530383bd9
Michael Sun [Thu, 31 Dec 2020 00:46:13 +0000 (00:46 +0000)]
btaa: handle wakelock notification
Handle wakelock acquire and release notification from system suspend
service and record the wakelock duration upon release.
Tag: #feature
Bug:
177232907
Test: verified locally BTAA can capture and timestamp BT wakelocks
BYPASS_LONG_LINES_REASON: consist with gd format
Change-Id: I51dfdbec62b66d5a93f45d8ea2c52a16ce3beec1
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
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
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
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
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
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
Abhishek Pandit-Subedi [Thu, 1 Apr 2021 22:33:05 +0000 (15:33 -0700)]
Change build.py ordering for rust and main
Rust now links to C++ instead of C++ to Rust so change the build
ordering to match.
Bug:
183208689
Tag: #floss
Test: atest --host bluetooth_test_gd
Change-Id: I71518b6efc9e45b880baeb2b7db16bbb0006a6e5
Sonny Sasaka [Tue, 27 Apr 2021 05:34:24 +0000 (22:34 -0700)]
Fixes for Linux build
Some fixes needed to build on Linux:
* Add missing C++ source files to BUILD.gn
* Add stubs in common/metrics_linux.cc
* Add Linux stub implementation of ActivityAttribution
* Add Linux stub for ParameterProvider::SnoozLogFilePath
* Add missing include files
Bug:
184975659
Tag: #floss
Test: atest --host bluetooth_test_gd
Change-Id: I37e6c3f593a95777c9c72bc9cda3da1e7ba466c0
Michael Sun [Thu, 31 Dec 2020 00:19:41 +0000 (00:19 +0000)]
btaa: handle wakeup notification
Compare the wakeup reason to verify if Bluetooth was the wakeup source
and record the wakeup event for future processing.
Tag: #feature
Bug:
177228387
Test: verified locally BTAA module receives and parses Bluetooth wakeup
reasons.
BYPASS_LONG_LINES_REASON: consist with gd format
Change-Id: I301d2a372ddaebdf0818e368019cb8043c2034c5
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
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
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
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
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
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
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
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
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
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
Chris Manton [Sat, 24 Apr 2021 16:24:48 +0000 (16:24 +0000)]
Merge "Use proper types tBTM_STATUS"
Myles Watson [Sat, 24 Apr 2021 11:30:06 +0000 (11:30 +0000)]
Merge "Controller: Set host support flag for Secure Connections"
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
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
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
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
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
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
Abhishek Pandit-Subedi [Fri, 23 Apr 2021 20:21:39 +0000 (20:21 +0000)]
Merge "Additional changes for Linux build"
Sonny Sasaka [Fri, 23 Apr 2021 19:36:01 +0000 (19:36 +0000)]
Merge "Add scripts to generate Debian packages of Fluoride dependencies"
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
Myles Watson [Fri, 23 Apr 2021 17:34:55 +0000 (17:34 +0000)]
Merge "gd test: Enqueue data/command in right order"
Myles Watson [Fri, 23 Apr 2021 17:33:35 +0000 (17:33 +0000)]
Merge "gd acl: Only ack pause when onPause"
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
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
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
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"
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
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