OSDN Git Service
Zach Johnson [Mon, 17 Aug 2020 22:26:18 +0000 (15:26 -0700)]
bta_dm_di_cb.p_di_db is never non-null
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iaf28113061e189eb2e20b2b40e471e82daaff01c
Zach Johnson [Mon, 17 Aug 2020 22:24:23 +0000 (15:24 -0700)]
layer specific is never BTA_DM_API_DI_DISCOVER_EVT
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ie957ae3931a3d07da1c94bd261ea9cc752fccb9a
Zach Johnson [Mon, 17 Aug 2020 22:21:29 +0000 (15:21 -0700)]
Remove bta_dm_di_disc & callback
never called
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ia47546e14cff5655f4afbba2a77f6a3a14c92bfc
Zach Johnson [Mon, 17 Aug 2020 22:18:16 +0000 (15:18 -0700)]
BTA_DM_API_DI_DISCOVER_EVT is never sent as an event
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Icda94de17095b72191e71a3cd1ac72e534697b78
Zach Johnson [Mon, 17 Aug 2020 22:03:45 +0000 (15:03 -0700)]
Flatten bte_dm_search_services_evt
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I31573725c590d840a1e4a3a6a310b903d475332a
Zach Johnson [Mon, 17 Aug 2020 21:52:02 +0000 (14:52 -0700)]
Flatten btm_dm_start_disc_gatt_services
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I0182858361d38360213e2ab0e726c7efa97c745e
Zach Johnson [Mon, 17 Aug 2020 21:42:05 +0000 (14:42 -0700)]
Remove useless condition
If something is true || false it is always true
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ib320e542f325bcca532ee9ee28d4ffe2eafef9a5
Zach Johnson [Mon, 17 Aug 2020 21:29:01 +0000 (14:29 -0700)]
bta_dm_search_cb.uuid is always empty
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I77b8e97b0b466fdd9201168e9f1bf1dd630ad76d
Zach Johnson [Mon, 17 Aug 2020 21:27:16 +0000 (14:27 -0700)]
bta_dm_search_cb.p_srvc_uuid is always null
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I1bee87a4a70715d9be7431235ecdba091d24a438
Zach Johnson [Mon, 17 Aug 2020 21:21:56 +0000 (14:21 -0700)]
bta_dm_search_cb.uuid_to_search is always 0
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ica18fd19ecf6718c88b9f24ba99a290a7abdaf99
Zach Johnson [Mon, 17 Aug 2020 21:19:07 +0000 (14:19 -0700)]
bta_dm_search_cb.num_uuid is always 0
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I78c1f4b4eb7b55739416fcae634ba4ed58d04b35
Zach Johnson [Mon, 17 Aug 2020 21:16:55 +0000 (14:16 -0700)]
Remove variables never set for search
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I08c1b4dc8fdbc517074e691fb56f639472c21ab5
Zach Johnson [Mon, 17 Aug 2020 20:11:28 +0000 (13:11 -0700)]
Remove variables never set for discovery
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ic10a53f160d86737da4ef7ef29f584331edca9f8
Zach Johnson [Mon, 17 Aug 2020 20:04:44 +0000 (13:04 -0700)]
Remove BTA_DmDiscoverUUID
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I92ff702991461f74e4cb3041f44d6f2b2755bfee
Zach Johnson [Mon, 17 Aug 2020 20:02:43 +0000 (13:02 -0700)]
Remove btif_dm_get_remote_service_record & friends from BTIF
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ib032729f185d5a5dea560a8dfad6b35b02083ca7
Zach Johnson [Mon, 17 Aug 2020 22:33:51 +0000 (22:33 +0000)]
Merge "get_remote_service_record is never called from JNI"
Treehugger Robot [Mon, 17 Aug 2020 22:28:01 +0000 (22:28 +0000)]
Merge "Remove unused variables and useless BTM_SetPairable call"
Zach Johnson [Mon, 17 Aug 2020 21:34:32 +0000 (21:34 +0000)]
Merge changes I6f7bb67a,Idb75cbfb,I29c6eeae,I8a23fbc8,I225d01c4, ...
* changes:
Fold BTA_DmDiscoverByTransport into BTA_DmDiscover
The extended part of service mask is never used
mask_ext.num_uuid is always 0
Remove sdp_search from discovery, it's always true
Remove hack from I2819702ac068be9515824234e85d81ac2ec7a748
Minor improvement
Fix error when converting state machine table
David Liem [Mon, 17 Aug 2020 21:28:22 +0000 (21:28 +0000)]
Merge "GD Cert tests block tests with no deadline specified. Adding timeouts. - socket timeouts added - grpc timeouts Test: cert/run Tag: #gd-refactor Bug:
158697098"
Jakub Pawlowski [Mon, 17 Aug 2020 20:55:27 +0000 (20:55 +0000)]
Merge "stack/btm: Refactor disconnect handler"
Zach Johnson [Mon, 17 Aug 2020 19:55:28 +0000 (12:55 -0700)]
get_remote_service_record is never called from JNI
packages/apps/Bluetooth$ grep get_remote_service_record -r .
packages/apps/Bluetooth$
seriously wtf
this means we can now start deleting other stuff that
this was anchoring
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Id3fead35d56c3783ba07e98d2bdf6669aa5b2371
Martin Brabham [Tue, 11 Aug 2020 23:12:09 +0000 (16:12 -0700)]
Remove unused variables and useless BTM_SetPairable call
Bug:
162984360
Tag: #refactor
Test: compiles and devices pair and work
Change-Id: Ic4721ec5a0552ea85662259ff093d7e23e7a3e58
Zach Johnson [Mon, 17 Aug 2020 19:41:11 +0000 (12:41 -0700)]
Fold BTA_DmDiscoverByTransport into BTA_DmDiscover
they are identical, except for the transport
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I6f7bb67a4cd38322aae29d5470aca6a9b744a05f
Zach Johnson [Mon, 17 Aug 2020 19:31:40 +0000 (12:31 -0700)]
The extended part of service mask is never used
bye bye
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Idb75cbfb7c9d5efe2a91399cf2b1999131651ca2
Zach Johnson [Mon, 17 Aug 2020 19:27:05 +0000 (12:27 -0700)]
mask_ext.num_uuid is always 0
This code does nothing.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I29c6eeae10b8efd73183d1a70cd6d6ce2d02569d
Zach Johnson [Mon, 17 Aug 2020 19:09:20 +0000 (12:09 -0700)]
Remove sdp_search from discovery, it's always true
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I8a23fbc8be51dc7845c2677a771483c3492eaac3
Zach Johnson [Mon, 17 Aug 2020 18:58:17 +0000 (11:58 -0700)]
Remove hack from I2819702ac068be9515824234e85d81ac2ec7a748
It wasn't invoked here before.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I225d01c458e8a9aad918e32fb465ecde4bf1c176
Zach Johnson [Mon, 17 Aug 2020 18:30:02 +0000 (11:30 -0700)]
Minor improvement
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iec80316f0c47b44866d7588f8f2f1df48a5c54d8
Zach Johnson [Mon, 17 Aug 2020 18:23:04 +0000 (11:23 -0700)]
Fix error when converting state machine table
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I17ad537a520abd93d82e4d6df6278febca59ca89
David Liem [Mon, 17 Aug 2020 18:14:34 +0000 (11:14 -0700)]
GD Cert tests block tests with no deadline specified. Adding timeouts.
- socket timeouts added
- grpc timeouts
Test: cert/run
Tag: #gd-refactor
Bug:
158697098
Change-Id: I350c978a3767aab60cde50b0bba2e31122b9413d
Martin Brabham [Thu, 13 Aug 2020 21:27:55 +0000 (14:27 -0700)]
Clean up conditional
Bug:
162984360
Tag: #refactor
Test: compiles and devices pair and work
Change-Id: I38a5cec69d57ce1c9ed88cf90582b1245b554a11
Chris Manton [Sun, 16 Aug 2020 02:51:40 +0000 (19:51 -0700)]
Replace GATT_TRANSPORT=>BT_TRANSPORT
Add BT_TRANSPORT_AUTO for GATT_TRANSPORT_AUTO
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
g with '#' will be ignored, and an empty message aborts the commit.
Change-Id: I66683c6539dbac8c3f0dbc564c950a5315f8a7c0
Chris Manton [Sun, 16 Aug 2020 02:46:38 +0000 (19:46 -0700)]
Use for gatt types/bt_transport
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: If48b9ac9f27312c81864d0edd287efeacb76c9ee
Chris Manton [Sun, 16 Aug 2020 02:33:14 +0000 (19:33 -0700)]
include for gatt transport types/bt_transport.h
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Id67659c7e6decf57dfa0f2f34fd749543af0816d
Chris Manton [Sat, 15 Aug 2020 23:05:10 +0000 (16:05 -0700)]
Remove bta/include/bta_api::tBTA_TRANSPORT
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I7a3ac6bc1763a1970b5de021e1c274562b90ada2
Chris Manton [Mon, 17 Aug 2020 15:02:39 +0000 (08:02 -0700)]
Add include stack/gatt/gatt_db::btm_sec
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I07e3255306f43531366d58c3143efab4f7ee4329
Zach Johnson [Mon, 17 Aug 2020 16:09:27 +0000 (16:09 +0000)]
Merge changes I4ddc6e35,I931bd052,I5bf0c9e2,I10390d03,I6ebe3fb7, ...
* changes:
Flatten BTA_DM_API_SEARCH_CANCEL_EVT
Remove unused pram from bta_dm_search_clear_queue
Remove unused pram from bta_dm_search_cancel
fold on_inquiry_complete into bta_dm_inq_cmpl
Pass params to on_inquiry_complete instead of messages
Pull BTA_DM_INQUIRY_CMPL_EVT out of state machine
Remove unused arg from bta_dm_search_cancel_cmpl
Remove unused arg from bta_dm_search_cancel_notify
Flatten bta_dm_search_cancel_transac_cmpl
Remove unused rs_res parameter & friends
Jakub Tyszkowski [Tue, 26 May 2020 08:16:47 +0000 (10:16 +0200)]
stack/btm: Refactor disconnect handler
Make the legacy btm_sco_removed() disconnect handlers return bool
just like the l2c_link_hci_disc_comp() handler does. This will prepare
this code for the ISO Manager that will hook into this legacy code code
as well, but will be based more on a new architecture (similar to GD modules).
Bug:
150670922
Tag: #feature
Sponsor: jpawlowski
Test: compilation
Change-Id: I7a394237c4fd1e5a4b8ddfb9f9801f3e66a263ba
Zach Johnson [Sun, 16 Aug 2020 18:20:27 +0000 (11:20 -0700)]
Flatten BTA_DM_API_SEARCH_CANCEL_EVT
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4ddc6e3574e822d6ae93401ac995d96ef0b6ade7
Zach Johnson [Sun, 16 Aug 2020 18:10:34 +0000 (11:10 -0700)]
Remove unused pram from bta_dm_search_clear_queue
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I931bd052dc801d3d8d2b30e2d8bf52e51e9707c6
Zach Johnson [Sun, 16 Aug 2020 18:06:45 +0000 (11:06 -0700)]
Remove unused pram from bta_dm_search_cancel
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I5bf0c9e20ac774e0d6e1bc7e453ac53216d2ed9e
Zach Johnson [Sun, 16 Aug 2020 18:02:45 +0000 (11:02 -0700)]
fold on_inquiry_complete into bta_dm_inq_cmpl
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I10390d03d7a1820cc9690621aa383938ee761607
Zach Johnson [Sun, 16 Aug 2020 17:57:03 +0000 (10:57 -0700)]
Pass params to on_inquiry_complete instead of messages
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I6ebe3fb7ba855e6e877496edc8f4c3e1544cffa9
Zach Johnson [Sun, 16 Aug 2020 17:51:15 +0000 (10:51 -0700)]
Pull BTA_DM_INQUIRY_CMPL_EVT out of state machine
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I0d3baa7bd74709ebd07eee5f7db9ab1e9f23690a
Zach Johnson [Sun, 16 Aug 2020 17:31:18 +0000 (10:31 -0700)]
Remove unused arg from bta_dm_search_cancel_cmpl
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I1133e4c378625578aea5cbfec2385b9f770afa39
Zach Johnson [Sun, 16 Aug 2020 17:28:24 +0000 (10:28 -0700)]
Remove unused arg from bta_dm_search_cancel_notify
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I24e59faf767ca6371ddc65c69a73dfc00a5c1d3a
Zach Johnson [Sun, 16 Aug 2020 17:24:38 +0000 (10:24 -0700)]
Flatten bta_dm_search_cancel_transac_cmpl
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I1b2dcf46c0e4b7b983d2bd2d7765ce08a5aaf27e
Chris Manton [Sat, 15 Aug 2020 23:26:25 +0000 (16:26 -0700)]
Replace tBTA_TRANSPORT=>tBT_TRANSPORT
No need for duplicate definitions
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: If24d9028416ad972fc8acaf94f9c50eb66aea609
Chris Manton [Sat, 15 Aug 2020 22:55:22 +0000 (15:55 -0700)]
Use types/bt_transport::tBT_TRANSPORT
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I48d26e561994a17deb8d67bff87a59dec3899819
Chris Manton [Sat, 15 Aug 2020 22:47:00 +0000 (15:47 -0700)]
Add types/bt_transport::tBT_TRANSPORT
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Id665c3ee3bb1f1b58c1808921b733ce76291de43
Chris Manton [Sun, 16 Aug 2020 02:09:00 +0000 (19:09 -0700)]
Remove unused stack/btm/btm_sec::APPL_AUTH_WRITE_EXCEPTION
Bug:
164357702
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Id06bdf72bfcb6e640c709d796254a918a4e7557a
Chris Manton [Sat, 15 Aug 2020 15:35:41 +0000 (08:35 -0700)]
Use include stack/btm/btm_sec.h
Bug:
164357702
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ie145bfbd8c309ce62fd098c1418d5cc12c210afb
Chris Manton [Sun, 16 Aug 2020 01:56:40 +0000 (18:56 -0700)]
Streamline headers stack/btm/btm_sec
Bug:
164357702
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I80b46697787dcfd5b06ef14ec2b0a73ec9057169
Chris Manton [Sat, 15 Aug 2020 15:22:32 +0000 (08:22 -0700)]
Add include stack/btm/btm_sec.h
Bug:
164357702
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I7a976c569713ccaeb02dbc9185633eb3fff3c637
Chris Manton [Sat, 15 Aug 2020 15:38:36 +0000 (08:38 -0700)]
Remove unused function btm_sec_is_le_capable_dev
stack/btm/btm_sec::btm_sec_is_le_capable_dev
Bug:
164357702
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I621d0bce0489acf3772215859ab6450bcc2f76fd
Chris Manton [Sat, 15 Aug 2020 15:05:34 +0000 (08:05 -0700)]
Unnecessary declarations stack/acl/btm_acl
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I93a7d5fe9aac4647b54fb48c6fe25072d9ad8167
Chris Manton [Sat, 15 Aug 2020 15:00:59 +0000 (08:00 -0700)]
Re-organize stack/btm/security_device_record.h
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I8bc27f43da6f2a9a0812df6e44dc97933e31d2da
Chris Manton [Sat, 15 Aug 2020 14:44:57 +0000 (07:44 -0700)]
Break out stack/btm/security_device_record.h
Complex enough to warrent it's own file
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iebd7116d948e58d90d2ea840396636495bc696e4
Zach Johnson [Sun, 16 Aug 2020 17:00:09 +0000 (10:00 -0700)]
Remove unused rs_res parameter & friends
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I8f34b1c26684572a8d00ce36d0131798e43d5f0f
Zach Johnson [Sat, 15 Aug 2020 19:09:16 +0000 (12:09 -0700)]
Replace unreadable bta_dm_main state machine
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ie5aaf10f010882f73a084eec235e13050ffe21d6
Zach Johnson [Sat, 15 Aug 2020 18:02:17 +0000 (11:02 -0700)]
bta_sys_set_trace_level is unused
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I342215348188733fcd0246f76aaad4c47d8ff7ff
Zach Johnson [Sat, 15 Aug 2020 17:52:13 +0000 (10:52 -0700)]
Remove unnecessary buffering in BTA_DM_LE_FEATURES_READ
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iae3919a3997118c17a00ee8e2b91608e9e910a99
Zach Johnson [Sat, 15 Aug 2020 17:46:11 +0000 (10:46 -0700)]
Flatten bte_search_devices_evt
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I397ba398f05071a7314e335a7d417834b012ca8a
Zach Johnson [Sat, 15 Aug 2020 17:42:15 +0000 (10:42 -0700)]
Clean up bte_search_devices_evt more
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I2a1b806f6f6a00916a10579c018d34e5d82602bd
Zach Johnson [Sat, 15 Aug 2020 17:40:37 +0000 (10:40 -0700)]
Remove unused code from bte_search_devices_evt
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I1e50d5859e83894a16f2c395c6927173561e38a8
Zach Johnson [Sat, 15 Aug 2020 17:24:44 +0000 (10:24 -0700)]
Flatten BTA_DM_DISABLE_EVT
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Idd6991175ec75e002ff9aff591aebda903b35679
Zach Johnson [Sat, 15 Aug 2020 17:16:36 +0000 (10:16 -0700)]
Flatten BTA_DM_ENABLE_EVT
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I98dcd7785c64ccacec7c03b86898b6cd5860ba1e
Zach Johnson [Sat, 15 Aug 2020 16:54:50 +0000 (09:54 -0700)]
Flatten BTA_DM_ENER_INFO_READ
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ib20b6620be2c550aaa97e4e451b7e5ec515913b7
Zach Johnson [Sat, 15 Aug 2020 16:44:35 +0000 (09:44 -0700)]
btif_dm_search_devices_evt is happening on the main thread now
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I597ab74811ecef5f6d788f20ec8b8c5583a62170
Zach Johnson [Sat, 15 Aug 2020 16:41:56 +0000 (09:41 -0700)]
btif_dm_ssp_reply is happening on the main thread now
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I1a5667ee3f5d7e76414773749c6319bfd2a8892b
Zach Johnson [Sat, 15 Aug 2020 16:40:37 +0000 (09:40 -0700)]
btif_dm_pin_reply is running on the main thread now
no need to post
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I58a6e4b99be777103ddc8fefdd5d15e263157104
Zach Johnson [Sat, 15 Aug 2020 16:37:49 +0000 (09:37 -0700)]
btif_dm_start_discovery is running on the main thread
no need to post to the main thread
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I2df0bfd2874581123064947c5b9401e98d1f9955
Zach Johnson [Sat, 15 Aug 2020 16:35:33 +0000 (09:35 -0700)]
No need to transfer context in bta_energy_info_cb
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I743eb4848bf9f88760a9ea4adaafe45d71d8df4c
Zach Johnson [Sat, 15 Aug 2020 16:34:16 +0000 (09:34 -0700)]
No need to transfer context in bte_dm_remote_service_record_evt
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ia9c7e7378bb5c4c6203764f3ec1b9790e9d6f55f
Zach Johnson [Sat, 15 Aug 2020 16:31:26 +0000 (09:31 -0700)]
No need to transfer context in bte_dm_evt
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Id78113cfe305a6345ba974cdfa1ce4de7f6e16f2
Zach Johnson [Sat, 15 Aug 2020 16:27:56 +0000 (09:27 -0700)]
No need to transfer context in bte_search_devices_evt
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I48bf596e8f71cb2aaef12963506579e1217a66db
Zach Johnson [Sat, 15 Aug 2020 16:14:02 +0000 (09:14 -0700)]
Flatten btif_dm_cb_remove_bond
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I3f856ee7ea338a3f405aa0af92cc75ad441fde6c
Zach Johnson [Sat, 15 Aug 2020 03:23:10 +0000 (20:23 -0700)]
Flatten btif_context_switched
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I565789de3b4d0a21667ff6a7d5f895dcdbc3d93c
Zach Johnson [Sat, 15 Aug 2020 03:22:05 +0000 (20:22 -0700)]
bt_jni_msg_ready only ever handles 1 event
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ia1e4b44945d6576ce448a18f6a6101397ba8d79c
Zach Johnson [Sat, 15 Aug 2020 03:19:21 +0000 (20:19 -0700)]
Remove unused definitions from btif_core.cc
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I8ed5a8dd65aafdf412bb6001f710d653e60731a6
Zach Johnson [Sat, 15 Aug 2020 01:16:42 +0000 (18:16 -0700)]
btif_dm_search_services_evt doesn't need to xfer context
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Id855d07210f36a3e7d08d6e456708660ddeee6a3
Zach Johnson [Sat, 15 Aug 2020 01:06:36 +0000 (18:06 -0700)]
Remove unused return values from btif_enable/disable_service
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I369a6bdea88dfea885270c079a76388594e842d8
Zach Johnson [Sat, 15 Aug 2020 01:04:49 +0000 (18:04 -0700)]
Simplify enabling services
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ib22245d5917eb1ac9ea9f940e1fa009dd58cd446
Zach Johnson [Sat, 15 Aug 2020 01:01:20 +0000 (18:01 -0700)]
btif_dm_execute_service_request is safe to call from main thread
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I304005aaf5e75c2153aadd83d58d796c09f9c1a6
Zach Johnson [Sat, 15 Aug 2020 00:54:23 +0000 (17:54 -0700)]
Remove btif_sendmsg
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I10487028fdaebd00fbbfde91311e43fe5ac7d26d
Zach Johnson [Sat, 15 Aug 2020 00:46:17 +0000 (17:46 -0700)]
BTIF_dm_on_hw_error doesn't need to switch context
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Id794b42e77af167f8ca34c0f2c1492bde59a0774
Zach Johnson [Sat, 15 Aug 2020 00:45:26 +0000 (17:45 -0700)]
BTIF_dm_report_inquiry_status_change doesn't need to switch contexts
anymore
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I5feffc46b0066abc5245361bb3958525b4b95e63
Zach Johnson [Sat, 15 Aug 2020 00:44:10 +0000 (17:44 -0700)]
Clean up btif_dm_init
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working:
Change-Id: Ibff8c893ef86f6772257e558fb600e4893ff22f7
Zach Johnson [Sat, 15 Aug 2020 00:42:19 +0000 (17:42 -0700)]
btif_dm_send_bond_state_changed doesn't need to jni now
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I754e8b4dbdd5b47748ac1d82638c1a0e04a433ce
Zach Johnson [Sat, 15 Aug 2020 00:40:28 +0000 (17:40 -0700)]
bond_state_changed can happen from the main thread now
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I13df06a6a89ede71706ab820d4ccf6bb29bb4083
Zach Johnson [Sat, 15 Aug 2020 00:33:35 +0000 (17:33 -0700)]
Move bluetooth.cc call ins to main thread
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Icd287d22448305e1545522d6eb2422152b15a7c7
Treehugger Robot [Sat, 15 Aug 2020 16:19:28 +0000 (16:19 +0000)]
Merge changes I4578a0ee,Ife020abe,I7f8316c2,I6def2d05,I617bdfc3
* changes:
Add stack/btm/btm_dev header
Simplify stack/acl/btm_acl::btm_acl_role_changed
Encapsulate stack/acl/btm_acl::tBTM_ROLE_SWITCH_CMPL
Clean up stack/acl/acl.h
Simplify stack/btm/btm_ble::BTM_UseLeLink
Chris Manton [Sat, 15 Aug 2020 06:13:59 +0000 (23:13 -0700)]
Add stack/btm/btm_dev header
From:stack/btm/btm_int
Provides device information
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4578a0ee6d2c01030cd54fb7155ff41bdf2c2281
Chris Manton [Sat, 15 Aug 2020 02:10:25 +0000 (19:10 -0700)]
Simplify stack/acl/btm_acl::btm_acl_role_changed
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ife020abe848bbcf93e3d3bb7db68e57211c4d871
Chris Manton [Sat, 15 Aug 2020 00:03:22 +0000 (17:03 -0700)]
Encapsulate stack/acl/btm_acl::tBTM_ROLE_SWITCH_CMPL
Bug:
164357702
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I7f8316c237bdca0bfa8ac39bde915a24113c7e32
Chris Manton [Fri, 14 Aug 2020 23:47:11 +0000 (16:47 -0700)]
Clean up stack/acl/acl.h
Bug:
164357702
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I6def2d058c36bf39a2b10f0ba4fe8e0c307a7daa
Chris Manton [Fri, 14 Aug 2020 22:06:36 +0000 (15:06 -0700)]
Simplify stack/btm/btm_ble::BTM_UseLeLink
Bug:
164357702
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I617bdfc358ef851d21e928e311a14da30f6f4f1b
Zach Johnson [Fri, 14 Aug 2020 23:58:12 +0000 (16:58 -0700)]
Hide bt_hal_cbacks
Force everyone to go through the functions
which do the right thing™
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ied038f21f8905828f83a0e5bb28a249c7eae2539
Zach Johnson [Fri, 14 Aug 2020 23:56:42 +0000 (16:56 -0700)]
Encapsulate energy_info_cb
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ia4226c94a1b7651fb491ebf71d96b183d5d5796a
Zach Johnson [Fri, 14 Aug 2020 23:50:37 +0000 (16:50 -0700)]
Flatten btif_dm_report_test_mode_result
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Idb7bfb06ad3b4d2ada21e4831fe0ad07d826d4e2