OSDN Git Service

android-x86/system-bt.git
4 years agobta_dm_search_cb.num_uuid is always 0
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

4 years agoRemove variables never set for search
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

4 years agoRemove variables never set for discovery
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

4 years agoRemove BTA_DmDiscoverUUID
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

4 years agoRemove btif_dm_get_remote_service_record & friends from BTIF
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

4 years agoMerge "get_remote_service_record is never called from JNI"
Zach Johnson [Mon, 17 Aug 2020 22:33:51 +0000 (22:33 +0000)]
Merge "get_remote_service_record is never called from JNI"

4 years agoMerge "Remove unused variables and useless BTM_SetPairable call"
Treehugger Robot [Mon, 17 Aug 2020 22:28:01 +0000 (22:28 +0000)]
Merge "Remove unused variables and useless BTM_SetPairable call"

4 years agoMerge changes I6f7bb67a,Idb75cbfb,I29c6eeae,I8a23fbc8,I225d01c4, ...
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

4 years agoMerge "GD Cert tests block tests with no deadline specified. Adding timeouts. -...
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"

4 years agoMerge "stack/btm: Refactor disconnect handler"
Jakub Pawlowski [Mon, 17 Aug 2020 20:55:27 +0000 (20:55 +0000)]
Merge "stack/btm: Refactor disconnect handler"

4 years agoget_remote_service_record is never called from JNI
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

4 years agoRemove unused variables and useless BTM_SetPairable call
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

4 years agoFold BTA_DmDiscoverByTransport into BTA_DmDiscover
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

4 years agoThe extended part of service mask is never used
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

4 years agomask_ext.num_uuid is always 0
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

4 years agoRemove sdp_search from discovery, it's always true
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

4 years agoRemove hack from I2819702ac068be9515824234e85d81ac2ec7a748
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

4 years agoMinor improvement
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

4 years agoFix error when converting state machine table
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

4 years agoGD Cert tests block tests with no deadline specified. Adding timeouts.
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

4 years agoClean up conditional
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

4 years agoReplace GATT_TRANSPORT=>BT_TRANSPORT
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

4 years agoUse for gatt types/bt_transport
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

4 years agoinclude for gatt transport types/bt_transport.h
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

4 years agoRemove bta/include/bta_api::tBTA_TRANSPORT
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

4 years agoAdd include stack/gatt/gatt_db::btm_sec
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

4 years agoMerge changes I4ddc6e35,I931bd052,I5bf0c9e2,I10390d03,I6ebe3fb7, ...
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

4 years agostack/btm: Refactor disconnect handler
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

4 years agoFlatten BTA_DM_API_SEARCH_CANCEL_EVT
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

4 years agoRemove unused pram from bta_dm_search_clear_queue
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

4 years agoRemove unused pram from bta_dm_search_cancel
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

4 years agofold on_inquiry_complete into bta_dm_inq_cmpl
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

4 years agoPass params to on_inquiry_complete instead of messages
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

4 years agoPull BTA_DM_INQUIRY_CMPL_EVT out of state machine
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

4 years agoRemove unused arg from bta_dm_search_cancel_cmpl
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

4 years agoRemove unused arg from bta_dm_search_cancel_notify
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

4 years agoFlatten bta_dm_search_cancel_transac_cmpl
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

4 years agoReplace tBTA_TRANSPORT=>tBT_TRANSPORT
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

4 years agoUse types/bt_transport::tBT_TRANSPORT
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

4 years agoAdd types/bt_transport::tBT_TRANSPORT
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

4 years agoRemove unused stack/btm/btm_sec::APPL_AUTH_WRITE_EXCEPTION
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

4 years agoUse include stack/btm/btm_sec.h
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

4 years agoStreamline headers stack/btm/btm_sec
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

4 years agoAdd include stack/btm/btm_sec.h
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

4 years agoRemove unused function btm_sec_is_le_capable_dev
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

4 years agoUnnecessary declarations stack/acl/btm_acl
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

4 years agoRe-organize stack/btm/security_device_record.h
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

4 years agoBreak out stack/btm/security_device_record.h
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

4 years agoRemove unused rs_res parameter & friends
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

4 years agoReplace unreadable bta_dm_main state machine
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

4 years agobta_sys_set_trace_level is unused
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

4 years agoRemove unnecessary buffering in BTA_DM_LE_FEATURES_READ
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

4 years agoFlatten bte_search_devices_evt
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

4 years agoClean up bte_search_devices_evt more
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

4 years agoRemove unused code from bte_search_devices_evt
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

4 years agoFlatten BTA_DM_DISABLE_EVT
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

4 years agoFlatten BTA_DM_ENABLE_EVT
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

4 years agoFlatten BTA_DM_ENER_INFO_READ
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

4 years agobtif_dm_search_devices_evt is happening on the main thread now
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

4 years agobtif_dm_ssp_reply is happening on the main thread now
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

4 years agobtif_dm_pin_reply is running on the main thread now
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

4 years agobtif_dm_start_discovery is running on the main thread
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

4 years agoNo need to transfer context in bta_energy_info_cb
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

4 years agoNo need to transfer context in bte_dm_remote_service_record_evt
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

4 years agoNo need to transfer context in bte_dm_evt
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

4 years agoNo need to transfer context in bte_search_devices_evt
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

4 years agoFlatten btif_dm_cb_remove_bond
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

4 years agoFlatten btif_context_switched
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

4 years agobt_jni_msg_ready only ever handles 1 event
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

4 years agoRemove unused definitions from btif_core.cc
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

4 years agobtif_dm_search_services_evt doesn't need to xfer context
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

4 years agoRemove unused return values from btif_enable/disable_service
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

4 years agoSimplify enabling services
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

4 years agobtif_dm_execute_service_request is safe to call from main thread
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

4 years agoRemove btif_sendmsg
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

4 years agoBTIF_dm_on_hw_error doesn't need to switch context
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

4 years agoBTIF_dm_report_inquiry_status_change doesn't need to switch contexts
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

4 years agoClean up btif_dm_init
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

4 years agobtif_dm_send_bond_state_changed doesn't need to jni now
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

4 years agobond_state_changed can happen from the main thread now
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

4 years agoMove bluetooth.cc call ins to main thread
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

4 years agoMerge changes I4578a0ee,Ife020abe,I7f8316c2,I6def2d05,I617bdfc3
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

4 years agoAdd stack/btm/btm_dev header
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

4 years agoSimplify stack/acl/btm_acl::btm_acl_role_changed
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

4 years agoEncapsulate stack/acl/btm_acl::tBTM_ROLE_SWITCH_CMPL
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

4 years agoClean up stack/acl/acl.h
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

4 years agoSimplify stack/btm/btm_ble::BTM_UseLeLink
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

4 years agoHide bt_hal_cbacks
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

4 years agoEncapsulate energy_info_cb
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

4 years agoFlatten btif_dm_report_test_mode_result
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

4 years agoEncapsulate le_test_mode_cb
Zach Johnson [Fri, 14 Aug 2020 23:48:46 +0000 (16:48 -0700)]
Encapsulate le_test_mode_cb

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

4 years agoEncapsulate thread_evt_cb
Zach Johnson [Fri, 14 Aug 2020 23:43:57 +0000 (16:43 -0700)]
Encapsulate thread_evt_cb

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

4 years agoEncapsulate acl_state_changed_cb
Zach Johnson [Fri, 14 Aug 2020 23:38:27 +0000 (16:38 -0700)]
Encapsulate acl_state_changed_cb

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

4 years agoEncapsulate bond_state_changed_cb
Zach Johnson [Fri, 14 Aug 2020 23:35:12 +0000 (16:35 -0700)]
Encapsulate bond_state_changed_cb

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

4 years agoEncapsulate ssp_request_cb
Zach Johnson [Fri, 14 Aug 2020 23:23:45 +0000 (16:23 -0700)]
Encapsulate ssp_request_cb

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

4 years agoEncapsulate pin_request_cb
Zach Johnson [Fri, 14 Aug 2020 23:15:26 +0000 (16:15 -0700)]
Encapsulate pin_request_cb

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

4 years agoEncapsulate discovery_state_changed_cb
Zach Johnson [Fri, 14 Aug 2020 23:11:09 +0000 (16:11 -0700)]
Encapsulate discovery_state_changed_cb

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

4 years agoEncapsulate device_found_cb
Zach Johnson [Fri, 14 Aug 2020 23:06:59 +0000 (16:06 -0700)]
Encapsulate device_found_cb

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

4 years agoEncapsulate remote_device_properties_cb
Zach Johnson [Fri, 14 Aug 2020 23:02:11 +0000 (16:02 -0700)]
Encapsulate remote_device_properties_cb

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

4 years agoEcapsulate invocations of adapter_state_changed_cb
Zach Johnson [Fri, 14 Aug 2020 22:52:36 +0000 (15:52 -0700)]
Ecapsulate invocations of adapter_state_changed_cb

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