OSDN Git Service
Johanna Ye [Tue, 23 Mar 2021 16:04:43 +0000 (17:04 +0100)]
Add logging message to indicate collision with previous pending connection from the same remote device.
Currently, When there's already a pending connecting procedure going on in the native layer (even if it were the same remote device), the native layer returns BT_STATUS_BUSY which is then interpreted by the JNI layer as a failure to connect, resulting in a disconnection request.
This adds logging message when this happens, until there's a clear
indication to prioritize a complete fix.
Tag: #stability
Bug:
174127136
Test: manual through repeated connections in ADT3 OOBE
Change-Id: Ifc84e883f8ae248ecfa99556465c22b32ce82f79
Treehugger Robot [Tue, 23 Mar 2021 13:23:49 +0000 (13:23 +0000)]
Merge "[LSC] Add LOCAL_LICENSE_KINDS to system/bt"
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
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
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
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
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/"
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
Qasim Javed [Mon, 22 Mar 2021 19:49:25 +0000 (19:49 +0000)]
Merge "rusty-gd: Add controller facade service."
Treehugger Robot [Mon, 22 Mar 2021 17:59:19 +0000 (17:59 +0000)]
Merge "Make controller prop and default commands configurable in rootcanal"
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
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
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
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
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
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
Treehugger Robot [Fri, 19 Mar 2021 21:13:17 +0000 (21:13 +0000)]
Merge "IBluetoothManager: Update createBondOutOfBand interface"
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
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
Julien Desprez [Fri, 19 Mar 2021 16:20:13 +0000 (16:20 +0000)]
Merge "Marking bluetooth_test_gd as not unit tests"
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
Martin Brabham [Thu, 21 Jan 2021 18:37:43 +0000 (10:37 -0800)]
IBluetoothManager: Update createBondOutOfBand interface
Add plumbing for both p192 and p256 data types.
Ignore-AOSP-First: Conflicts with CL previously merged internal
Bug:
178007935
Test: atest net_test_btif
Tag: #refactor
Change-Id: I6b1424c22495821bfbbf56830f3848e6c03b74d4
Merged-In: I6b1424c22495821bfbbf56830f3848e6c03b74d4
Chris Manton [Wed, 10 Mar 2021 03:12:57 +0000 (19:12 -0800)]
Use proper types tHCI_ROLE
Bug:
179120287
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: I6fd932fa39b4d7ea8b88db0877806a636a90deed
Chris Manton [Wed, 10 Mar 2021 02:48:38 +0000 (18:48 -0800)]
Break out tHCI_ROLE type into separate file
Used throughout stack
Bug:
179120287
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: I6a4cb56561d8afbb6715e7598903b0fc6428a950
Chris Manton [Fri, 12 Mar 2021 06:30:22 +0000 (22:30 -0800)]
gd_acl: No need to read remote version twice
Bug:
166280067
Test: Manual verification via wireshark
Tag: #refactor
Change-Id: I2296b99a2bbcfb3adb9585e6541fc21d726fd9eb
Chris Manton [Fri, 12 Mar 2021 16:46:05 +0000 (08:46 -0800)]
gd_acl: On classic connect issue read supported features
Bug:
182568571
Test: Verified on 2.0 device
Tag: #refactor
Change-Id: Ib4d443d9cd0febfa7f82d84313eed280652fd0e9
Chris Manton [Tue, 9 Mar 2021 21:07:17 +0000 (13:07 -0800)]
Convert bluetooth::shim::BtmStatus from 16 to 8 bits
Align with rest of stack.
Bug:
166280067
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: I151c0551e7ebc8e0ecd57695373247ad0bb83a73
Chris Manton [Wed, 10 Mar 2021 03:45:40 +0000 (19:45 -0800)]
Properly log btm_read_failed_contact_counter_complete
Bug:
179120287
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: I6501d6cfc3193d2e6ae9196b89321f0c857946f9
Chris Manton [Wed, 10 Mar 2021 03:08:36 +0000 (19:08 -0800)]
Properly declare tACL_CONN::tPolicy::Role()
Bug:
179120287
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: I6cf33ae3c9a28024c54b7d448c13426e9effe808
Chris Manton [Wed, 10 Mar 2021 17:22:58 +0000 (09:22 -0800)]
Add stack/include/hcidefs::hci_role helpers and aliases
Bug:
179120287
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: I37ec49c8aaac76d49a0f96387129652975a6fa50
Chris Manton [Tue, 9 Mar 2021 23:29:58 +0000 (15:29 -0800)]
Const-ify stack/acl/btm_acl::packet types defs
Bug:
182370398
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: I84063d5c4ada9156f5c9d200b2c0a534cb403eb9
Chris Manton [Thu, 11 Mar 2021 18:28:17 +0000 (10:28 -0800)]
tBTM_AUTH_COMPLETE_CALLBACK Specialize result to HCI_STATUS
Toward proper typechecked code
Bug:
163134718
Test: gd/cert/run
Tag: #refactor
Change-Id: Ia79398d099f9987b52ecd86decc66c810205bab2
Chris Manton [Thu, 11 Mar 2021 18:26:44 +0000 (10:26 -0800)]
Move callback definitions to stack/include/security_client_callbacks
Toward readable code
Bug:
163134718
Test: gd/cert/run
Tag: #refactor
Change-Id: Ia1f70c108d89132a1d993d4add703828c088f60c
Chris Manton [Wed, 3 Mar 2021 01:56:01 +0000 (17:56 -0800)]
Properly type tBTA_AV_STATUS
Toward readable code
Bug:
163134718
Test: gd/cert/run
Tag: #refactor
Change-Id: I28786af205d5a3bd9595b33e00aed2b953f4dee2
Chris Manton [Thu, 11 Mar 2021 18:09:09 +0000 (10:09 -0800)]
Remove useless bta_dm_authentication_complete_cback return value
Toward meaningful code
Bug:
163134718
Test: gd/cert/run
Tag: #refactor
Change-Id: I55fea00a20a23ed917c00255cd992a0ad3eab86f
Treehugger Robot [Sat, 13 Mar 2021 04:21:44 +0000 (04:21 +0000)]
Merge changes Ia06fbdda,I08306608,I8e43aee4
* changes:
HCI: Use 0x0123 for hex
HCI: Add more PDL tests
Only pad the previous field
Chris Manton [Fri, 12 Mar 2021 03:01:53 +0000 (19:01 -0800)]
Log command status error conditions
Bug:
182524282
Test: Manual verification on failing scenario
Tag: #refactor
Change-Id: Ia76e97648c8091e2bde5a26b307d2779c21e6640
Myles Watson [Fri, 12 Mar 2021 05:44:08 +0000 (21:44 -0800)]
HCI: Use 0x0123 for hex
Bug:
182216573
Test: atest bluetooth_test_gd
libbt_packets_test
Tag: #gd-refactor
Change-Id: Ia06fbdda9101b77204c6ee3ba1c8c1edc81aa3bf
Myles Watson [Thu, 11 Mar 2021 21:10:23 +0000 (13:10 -0800)]
HCI: Add more PDL tests
Bug:
182216573
Test: atest bluetooth_test_gd
libbt_packets_test
Tag: #gd-refactor
Change-Id: I083066083a519c19a8d5c3a4928b306e2495c512
Myles Watson [Thu, 11 Mar 2021 18:05:47 +0000 (10:05 -0800)]
Only pad the previous field
Bug:
182216573
Test: atest bluetooth_test_gd
libbt_packets_test
bluetooth_packet_parser_test
Tag: #gd-refactor
Change-Id: I8e43aee420be58af81cd9f47fcf53a566af1b3fa
Myles Watson [Fri, 12 Mar 2021 17:12:01 +0000 (17:12 +0000)]
Merge changes I389b26d7,I0a668115,I75ef0b5c
* changes:
Alias iterator in packet-gen
Use generic type for JsonParser
Change dynamic_cast to static_cast
Erwin Jansen [Thu, 11 Mar 2021 22:53:15 +0000 (14:53 -0800)]
Alias iterator in packet-gen
The msvc compiler is unable to translate some of the generated code:
error: no viable conversion from 'std::array<uint8_t, 248>::iterator'
(aka '_Array_iterator<unsigned char, 248ULL>') to 'uint8_t *' (aka
'unsigned char *')
Instead of assigning the value to a ptr, we alias the iterator instead.
Test: atest bluetooth_test_gd
Tag: #gd-refactor
Bug:
182505215
Change-Id: I389b26d71ef5bd8f96ae819d34ce11590f14a5e6
Jeongik Cha [Fri, 12 Mar 2021 08:02:13 +0000 (17:02 +0900)]
Make controller prop and default commands configurable in rootcanal
Test: set up default commands and then atest
android.bluetooth.cts.BluetoothLeScanTest
Bug:
182508776
Bug:
182230648
Change-Id: I4958fee40b32f646fd162e495aac31eeab29a470
Treehugger Robot [Fri, 12 Mar 2021 02:51:43 +0000 (02:51 +0000)]
Merge "PDL: For the Rust test, clone structs"
Treehugger Robot [Fri, 12 Mar 2021 02:19:33 +0000 (02:19 +0000)]
Merge changes I86da8ca8,Ibb58fae9,I9c6a9fa3,I4d1ab599,I818c0f4a, ...
* changes:
Change libbt-platform-protos dependency
Update the readme to use build.py and explain Rust
Add build.py to simplify building locally
Build support for Rust via Cargo
Add option to build libbluetooth as staticlib
Prevent building some codecs when not supported
Build support and abstractions for Linux build
Add source_root parameter to bluetooth_packetgen
Fix bison 3.7 incompatability
Host tools support
Treehugger Robot [Thu, 11 Mar 2021 22:53:00 +0000 (22:53 +0000)]
Merge "HCI PDL: Fix formatting with spaces"
Jizheng Chu [Thu, 11 Mar 2021 21:42:47 +0000 (21:42 +0000)]
Merge "Unbind cert_self_test from ACTS"
Myles Watson [Tue, 9 Mar 2021 23:44:43 +0000 (15:44 -0800)]
PDL: For the Rust test, clone structs
Bug:
182216573
Test: atest bluetooth_test_gd
libbt_packets_test
Tag: #gd-refactor
Change-Id: Id3e8ddca497fb0014bfcac1c96b465dede4c6995
Myles Watson [Tue, 9 Mar 2021 21:57:18 +0000 (13:57 -0800)]
HCI PDL: Fix formatting with spaces
Bug:
182216573
Test: atest bluetooth_test_gd
libbt_packets_test
Tag: #gd-refactor
Change-Id: Ifd4d681fe95664cec639bab800bec73c26b1d3a4
Erwin Jansen [Thu, 11 Mar 2021 17:42:20 +0000 (09:42 -0800)]
Use generic type for JsonParser
The android emulator team uses a newer libchrome library. The json read
method now returns an Optional type, vs. a unique_ptr.
We now let the compiler infer the type and rely on the operators to do
the right thing.
Change-Id: I0a668115659d6508344190783b7dc55d84374f15
Test: System compiles.
Bug:
182487647
Erwin Jansen [Sun, 7 Mar 2021 21:01:06 +0000 (13:01 -0800)]
Change dynamic_cast to static_cast
dynamic_cast requires type information at run time to throw exceptions.
This is not available in the emulator build system, where execeptions
are explicitly disabled.
Instead we use static_cast to downcast.
Change-Id: I75ef0b5c694320fc1e9fe648e8087e4def8cdf94
Test: Build succeeds.
Chienyuan [Thu, 11 Mar 2021 11:39:08 +0000 (19:39 +0800)]
Shim Scanning: Update address type and device type to storage
Tag: #gd-refactor
Bug:
182243613
Test: gd/cert/run
Test: manual, pair LE device with public address
Change-Id: I8a9a0873dbdf4e8fd85f12ae7f0b2d911f5a47dc
Qasim Javed [Thu, 11 Mar 2021 01:59:20 +0000 (01:59 +0000)]
Merge "rusty-gd: Use a sequenced runner to post closures."
Hansong Zhang [Thu, 4 Mar 2021 02:08:42 +0000 (18:08 -0800)]
GD: Open a pid file when stack is running
So that some other manager process can detect it
Test: cert/run
Bug:
181590011
Tag: #refactor
Change-Id: I340b5d25b4374d47c8c769d80fcd287b23696202
Qasim Javed [Tue, 9 Mar 2021 21:30:01 +0000 (13:30 -0800)]
rusty-gd: Use a sequenced runner to post closures.
With this, I am able to reconnect to Pixel Buds successfully.
Previously, there was a crash due CHECK(ThreadTaskRunner::IsSet())
failing.
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost DirectHciTest
Change-Id: I43ad40b03a63bdec5284c584216671bd3ae20376
Weichin Weng [Wed, 10 Mar 2021 02:04:26 +0000 (02:04 +0000)]
Merge "Remove log.h from mock file"
weichinweng [Fri, 5 Mar 2021 06:12:09 +0000 (14:12 +0800)]
Move Common Criteria mode dependency to Android only.
Bug:
181293964
Test: atest BluetoothInstrumentationTests
Tag: #feature
Change-Id: I92deb21350f9ec963d7d5985aed31563b7384bbd
weichinweng [Mon, 8 Mar 2021 12:08:30 +0000 (20:08 +0800)]
Remove log.h from mock file
Bug:
181293964
Test: atest BluetoothInstrumentationTests
Tag: #feature
Change-Id: I89356bb39fa0fe5cc70d8ee17a28699275a32126
JaeMan Park [Wed, 10 Mar 2021 00:04:51 +0000 (00:04 +0000)]
Merge "Fix handshaking error between HCI driver and rootcanal"
Julien Desprez [Tue, 9 Mar 2021 23:24:51 +0000 (23:24 +0000)]
Marking bluetooth_test_gd as not unit tests
There are few stability issue right now with some of the tests that can result in flakiness.
Example b/
176832968 b/
176170066 those will need to be addressed first.
Change-Id: Iadcce2e7aafb7df22bcca527ee2bec6f8a08d385
Test: presubmit
Bug:
176832968
Chris Manton [Tue, 9 Mar 2021 22:13:27 +0000 (22:13 +0000)]
Merge "Revert "Put stack vars in proper scope""
Myles Watson [Tue, 9 Mar 2021 22:08:18 +0000 (22:08 +0000)]
Merge changes I40975081,Ia1fe07b4,Ieffc9874
* changes:
PDL: Add example test packets
Rust: Add a packet test
PDL: Add support for test
Chris Manton [Tue, 9 Mar 2021 20:36:21 +0000 (12:36 -0800)]
Revert "Put stack vars in proper scope"
Bug:
182259591
Test: Builds and compiles
Tag: #refactor
This reverts commit
3318a1ce16a4fdb3d7a2c4bfc4e9dfe407839d3f.
Change-Id: I25771c2c40089fc46ebce256c0ae1344ac6af2c4
Jeongik Cha [Tue, 9 Mar 2021 05:41:07 +0000 (14:41 +0900)]
Send response as combined form
As-is: root-canal's response consists of packet type and payload
separately
In the case of several request in parallel, the responses could be
overlapped, so make it combined to avoid the situation.
Test: atest AdapterServiceTest
Bug:
182167189
Change-Id: I19b99f6399777e927b81c26366d8e02ae577936e
Chen Chen [Tue, 9 Mar 2021 01:58:42 +0000 (01:58 +0000)]
Merge "Add metric_id_manager to GD using existing Address and LruCache of GD"
Myles Watson [Tue, 9 Mar 2021 00:38:57 +0000 (16:38 -0800)]
PDL: Add example test packets
Bug:
182216573
Test: atest libbt_packets_test
Tag: #gd-refactor
Change-Id: I40975081d5d30f7078a432df94b9d0c58410da97
Myles Watson [Tue, 9 Mar 2021 00:37:55 +0000 (16:37 -0800)]
Rust: Add a packet test
Bug:
182216573
Test: atest libbt_packets_test
Tag: #gd-refactor
Change-Id: Ia1fe07b49363b166d164811dd9aaceea05e66d48
Myles Watson [Tue, 9 Mar 2021 00:51:50 +0000 (16:51 -0800)]
PDL: Add support for test
Bug:
182216573
Test: atest libbt_packets_test
Tag: #gd-refactor
Change-Id: Ieffc9874c0ff17cb2a0acb5e9399b6222f585f7c
Chris Manton [Tue, 9 Mar 2021 00:19:34 +0000 (00:19 +0000)]
Merge changes Ib81960bb,I1d84f463,Id475e310,I4ba9755c,Ib6f7b4ba, ...
* changes:
Introduce main_shim_test
Add main/test::shim mocks
Add gd/neighbor::inquiry mock
Add SCO HACK for shim acl mock
Add gd/hci::controller mock
gd_acl: Directly access acl manager for SCO hack
Put stack vars in proper scope
Return proper type stack/acl/btm_pm::BTM_SetPowerMode
Explicitly specify status type include/hardware/ble_scanner.h
Add stack init indirection for activity_attribution
Use proper tBTM_STATUS types
Use tBTM_STATUS in stack/l2cap/::
gd_shim: Log more info about acl queue state
Add bta_sys post to main alternative method
Remove unused field srvc_id
Template prep for bta hardening
Use btm_status in stack/rfcomm/::
Use proper types tBLE_SCAN_MODE
User proper types tBTM_STATUS
Canonicalize tBTM_APPL_INFO::bta_security
Streamline bta_av_link_role_ok
Use canonical include paths
Add hci code conversion stack/include/hci_error_code
Remove unused bta/include/bta_api::#defs
Remove unused API BTM_GetPeerSCA
Remove unused API BTM_RequestPeerSCA
Remove unused API BTM_IsPhy2mSupported
Properly conform tACL_CONN field names
Add stack/include::BT_HDR rigid struct
Use proper types tSMP_STATUS
Properly type stack/smp::tSMP_EVT
Remove useless extern keyword for definitions
Remove unused stack/gatt/gatt_int::#defs
Re-include bta/ag/bta_ag_sdp.cc
Hansong Zhang [Wed, 3 Mar 2021 23:55:37 +0000 (15:55 -0800)]
Add a way to connect to linux raw HCI HAL
Tag: #refactor
Bug:
181590011
Test: cert/run
Change-Id: I5308fd604b091392b9a8b15154732afeb03dde57
Chris Manton [Fri, 5 Mar 2021 20:25:19 +0000 (12:25 -0800)]
Introduce main_shim_test
Bug:
181991662
Test: gd/cert/run
Tag: #refactor
Change-Id: Ib81960bb3065f3964be16ba0feaf22358be8f323
Chris Manton [Fri, 5 Mar 2021 02:53:07 +0000 (18:53 -0800)]
Add main/test::shim mocks
Bug:
181991662
Test: gd/cert/run
Tag: #refactor
No-Typo-Check: Legacy misnamed code
Change-Id: I1d84f463fe1a126f1cc685b10f77f4872088a78d
Chris Manton [Fri, 5 Mar 2021 02:52:31 +0000 (18:52 -0800)]
Add gd/neighbor::inquiry mock
Bug:
181991662
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: Id475e31092c884b33bd92b4ee18ff53b7c4d4a03
Chris Manton [Fri, 5 Mar 2021 22:47:01 +0000 (14:47 -0800)]
Add SCO HACK for shim acl mock
Bug:
181991662
Test: gd/cert/run
Tag: #refactor
Change-Id: I4ba9755c6f482c99bbbc0bd55de22d45d8949815
Chris Manton [Fri, 5 Mar 2021 02:52:21 +0000 (18:52 -0800)]
Add gd/hci::controller mock
Bug:
181991662
Test: cert
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: Ib6f7b4bada0ae673842f134dc5eb22d9b2bf422d
Chris Manton [Fri, 5 Mar 2021 16:35:18 +0000 (08:35 -0800)]
gd_acl: Directly access acl manager for SCO hack
Also explicitly log SCO disconnect
Bug:
179649871
Test: gd/cert/run
Tag: #refactor
Change-Id: Ia8fb5408d909c02d01bac5057dd388e1d8909e63
Chris Manton [Wed, 3 Mar 2021 01:03:12 +0000 (17:03 -0800)]
Put stack vars in proper scope
Toward refactor-able code
Bug:
163134718
Test: cert
Tag: #refactor
Change-Id: Ied75ac91e075d9072875b34f91d91c1191473215
Chris Manton [Mon, 1 Mar 2021 18:34:01 +0000 (10:34 -0800)]
Return proper type stack/acl/btm_pm::BTM_SetPowerMode
Toward type safe code
Bug:
163134718
Test: cert
Tag: #refactor
Change-Id: Ifdd3fcbd0c149f5d5a8987f6e0a15210d8a6cdc8
Chris Manton [Mon, 1 Mar 2021 18:33:30 +0000 (10:33 -0800)]
Explicitly specify status type include/hardware/ble_scanner.h
Toward readable code
Bug:
163134718
Test: cert
Tag: #refactor
Change-Id: Ifec58b3e95fe9414b27f1199551b7cb65982ca0b
Chris Manton [Fri, 5 Mar 2021 21:51:43 +0000 (13:51 -0800)]
Add stack init indirection for activity_attribution
Conforms to peers and is more testable
Bug:
181991662
Test: cert
Tag: #refactor
Change-Id: Ib01c3b35ee5bb0deb370cbbee4d8e88929beb4dc
Chris Manton [Tue, 2 Mar 2021 21:30:20 +0000 (13:30 -0800)]
Use proper tBTM_STATUS types
Toward readable code
Bug:
163134718
Test: cert
Tag: #refactor
Change-Id: I7727220d4da93279ed215fa366b528cc859b8525
Chris Manton [Mon, 1 Mar 2021 17:32:24 +0000 (09:32 -0800)]
Use tBTM_STATUS in stack/l2cap/::
Toward meaningful code
Bug:
163134718
Test: cert
Tag: #refactor
Change-Id: I588780b8301474b01c2c9f52e3d9c2c1b9fdd937
Chris Manton [Thu, 4 Mar 2021 05:46:43 +0000 (21:46 -0800)]
gd_shim: Log more info about acl queue state
Bug:
179649871
Test: cert
Tag: #refactor
Change-Id: I8aaae60224afa28477d8a556ec11b11df06fa5c0
Chris Manton [Wed, 3 Mar 2021 21:46:20 +0000 (13:46 -0800)]
Add bta_sys post to main alternative method
Toward eliminating BTA sys
Bug:
163134718
Test: cert
Tag: #refactor
Change-Id: Id6b12b2d9744929ebb344fc1caf20c6a8015a525
Chris Manton [Wed, 3 Mar 2021 21:45:40 +0000 (13:45 -0800)]
Remove unused field srvc_id
Toward meaningful code
Bug:
163134718
Test: cert
Tag: #refactor
Change-Id: I3dcaf1e3acacb2fe7754c24c3fd383ddce03bf69
Chris Manton [Mon, 8 Mar 2021 18:05:41 +0000 (10:05 -0800)]
Template prep for bta hardening
Syntactic sugar to wrangle next Union battle
Towards readable code
Bug:
163134718
Test: cert
Tag: #refactor
Change-Id: I5921b2ab188f1062b0c1ad19bf9e2d0e2c8017db
Chris Manton [Mon, 1 Mar 2021 17:32:01 +0000 (09:32 -0800)]
Use btm_status in stack/rfcomm/::
Toward readable code
Bug:
163134718
Test: cert
Tag: #refactor
Change-Id: I2e15fca337cbec3e265b7945d59a2fdbb6d178d5
Chris Manton [Wed, 3 Mar 2021 01:03:01 +0000 (17:03 -0800)]
Use proper types tBLE_SCAN_MODE
Toward readable code
Bug:
163134718
Test: cert
Tag: #refactor
Change-Id: I740140779cea143d829d137d8cb8dff4748489cc
Chris Manton [Wed, 3 Mar 2021 01:02:42 +0000 (17:02 -0800)]
User proper types tBTM_STATUS
Toward readable code
Bug:
163134718
Test: cert
Tag: #refactor
Change-Id: I495d4d13dfbac92b80c83223687b99763c9381a5
Chris Manton [Sun, 28 Feb 2021 07:08:57 +0000 (23:08 -0800)]
Canonicalize tBTM_APPL_INFO::bta_security
Toward readable code
Bug:
163134718
Test: cert
Tag: #refactor
Change-Id: I52cb204abc1b6e42c7239c25211e87772c7c1b8d
Chris Manton [Sun, 28 Feb 2021 04:52:00 +0000 (20:52 -0800)]
Streamline bta_av_link_role_ok
Toward readable code
Bug:
163134718
Test: cert
Tag: #refactor
Change-Id: Ic559c133134392b6123a292e991ef933080cb043
Chris Manton [Thu, 4 Mar 2021 05:47:09 +0000 (21:47 -0800)]
Use canonical include paths
Toward readable code
Bug:
163134718
Test: gd/cert/run
Tag: #refactor
Change-Id: I5248569747177e3bb169509e34c7053145bfbfda
Chris Manton [Mon, 1 Mar 2021 21:54:35 +0000 (13:54 -0800)]
Add hci code conversion stack/include/hci_error_code
Bug:
163134718
Test: cert
Tag: #refactor
Change-Id: Ib3aadbecc039df43b6fc6bf4cc603674ecf6b4c0
Chris Manton [Wed, 3 Mar 2021 01:55:28 +0000 (17:55 -0800)]
Remove unused bta/include/bta_api::#defs
Toward meaningful code
Bug:
163134718
Test: cert
Tag: #refactor
Change-Id: I46b2473c22ea1cf9f111f768d47263c19d2249ae
Chris Manton [Sun, 28 Feb 2021 04:20:44 +0000 (20:20 -0800)]
Remove unused API BTM_GetPeerSCA
Toward meaningful code
Bug:
163134718
Test: cert
Tag: #refactor
Change-Id: I5050817e500d33265ecd8bfc9ec2b547ab0ff625
Chris Manton [Sun, 28 Feb 2021 04:18:04 +0000 (20:18 -0800)]
Remove unused API BTM_RequestPeerSCA
Toward meaningful code
Bug:
163134718
Test: cert
Tag: #refactor
Change-Id: I2bacaee6f567d717065cab643a249072645bc0ba
Chris Manton [Sun, 28 Feb 2021 04:14:33 +0000 (20:14 -0800)]
Remove unused API BTM_IsPhy2mSupported
Toward meaningful code
Bug:
163134718
Test: cert
Tag: #refactor
Change-Id: I3ea1d0538678f7617b8a485c9430ecd0e43741e9
Chris Manton [Fri, 5 Mar 2021 00:50:53 +0000 (16:50 -0800)]
Properly conform tACL_CONN field names
And put getters in header
Bug:
163134718
Test: cert
Tag: #refactor
Change-Id: I544de67b543b272485e8993fc609288703c16bbf
Chris Manton [Thu, 4 Mar 2021 22:27:37 +0000 (14:27 -0800)]
Add stack/include::BT_HDR rigid struct
Missing the dreaded flexible array member which is embedded
in the middle of so many larger structs
Bug:
163134718
Test: cert
Tag: #refactor
Change-Id: I7c4f92221b25dc93e6165ed7ab1991529ffc1539
Chris Manton [Tue, 2 Mar 2021 17:49:50 +0000 (09:49 -0800)]
Use proper types tSMP_STATUS
Bug:
163134718
Test: cert
Tag: #refactor
Change-Id: Ie0851299d1d4467c4beb60b73405269cf174036a