OSDN Git Service

android-x86/system-bt.git
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

4 years agoEncapsulate invocations of adapter_properties_cb
Zach Johnson [Fri, 14 Aug 2020 22:42:22 +0000 (15:42 -0700)]
Encapsulate invocations of adapter_properties_cb

Prep to start moving more stuff off the jni thread, and only
invoke it to transact data up to java.

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

4 years agoSimplify btif_le_test_mode
Zach Johnson [Fri, 14 Aug 2020 21:25:49 +0000 (14:25 -0700)]
Simplify btif_le_test_mode

inline checking into bluetooth.cc

break into separate functions so we can post internally

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

4 years agoSimplify btif_dut_mode_send
Zach Johnson [Fri, 14 Aug 2020 21:16:35 +0000 (14:16 -0700)]
Simplify btif_dut_mode_send

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

4 years agoSimplify btif_dut_mode_configure
Zach Johnson [Fri, 14 Aug 2020 21:08:26 +0000 (14:08 -0700)]
Simplify btif_dut_mode_configure

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

4 years agoDispatch btif_dm_read_energy_info on jni thread
Zach Johnson [Fri, 14 Aug 2020 21:03:44 +0000 (14:03 -0700)]
Dispatch btif_dm_read_energy_info on jni thread

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

4 years agoSimplify btif_dm_ssp_reply
Zach Johnson [Fri, 14 Aug 2020 21:02:15 +0000 (14:02 -0700)]
Simplify btif_dm_ssp_reply

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

4 years agoSimplify btif_dm_pin_reply
Zach Johnson [Fri, 14 Aug 2020 20:39:45 +0000 (13:39 -0700)]
Simplify btif_dm_pin_reply

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

4 years agoSimplify btif_dm_remove_bond
Zach Johnson [Fri, 14 Aug 2020 20:08:57 +0000 (13:08 -0700)]
Simplify btif_dm_remove_bond

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

4 years agoSimplify btif_dm_cancel_bond
Zach Johnson [Fri, 14 Aug 2020 20:06:01 +0000 (13:06 -0700)]
Simplify btif_dm_cancel_bond

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

4 years agoSimplify btif_dm_create_bond_out_of_band
Zach Johnson [Fri, 14 Aug 2020 20:00:54 +0000 (13:00 -0700)]
Simplify btif_dm_create_bond_out_of_band

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

4 years agoSimplify btif_dm_create_bond
Zach Johnson [Fri, 14 Aug 2020 19:52:58 +0000 (12:52 -0700)]
Simplify btif_dm_create_bond

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

4 years agoSimplify btif_dm_cancel_discovery
Zach Johnson [Fri, 14 Aug 2020 19:47:29 +0000 (12:47 -0700)]
Simplify btif_dm_cancel_discovery

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

4 years agosimplify btif_dm_start_discovery
Zach Johnson [Fri, 14 Aug 2020 19:44:42 +0000 (12:44 -0700)]
simplify btif_dm_start_discovery

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

4 years agobanish btif_get_remote_service_record
Zach Johnson [Fri, 14 Aug 2020 19:37:05 +0000 (12:37 -0700)]
banish btif_get_remote_service_record

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

4 years agoSimplify btif_dm_get_remote_services
Zach Johnson [Fri, 14 Aug 2020 19:34:06 +0000 (12:34 -0700)]
Simplify btif_dm_get_remote_services

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

4 years agoSimplify btif_get_remote_service_record
Zach Johnson [Fri, 14 Aug 2020 19:28:56 +0000 (12:28 -0700)]
Simplify btif_get_remote_service_record

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

4 years agoFlatten BTIF_CORE_STORAGE_REMOTE_WRITE
Zach Johnson [Fri, 14 Aug 2020 19:23:34 +0000 (12:23 -0700)]
Flatten BTIF_CORE_STORAGE_REMOTE_WRITE

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

4 years agoSimplify btif_set_remote_device_property
Zach Johnson [Fri, 14 Aug 2020 19:17:08 +0000 (12:17 -0700)]
Simplify btif_set_remote_device_property

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

4 years agoFlatten BTIF_CORE_STORAGE_REMOTE_READ_ALL
Zach Johnson [Fri, 14 Aug 2020 19:09:21 +0000 (12:09 -0700)]
Flatten BTIF_CORE_STORAGE_REMOTE_READ_ALL

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

4 years agoSimplify btif_get_remote_device_properties
Zach Johnson [Fri, 14 Aug 2020 19:07:19 +0000 (12:07 -0700)]
Simplify btif_get_remote_device_properties

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

4 years agoFlatten BTIF_CORE_STORAGE_REMOTE_READ
Zach Johnson [Fri, 14 Aug 2020 19:01:51 +0000 (12:01 -0700)]
Flatten BTIF_CORE_STORAGE_REMOTE_READ

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

4 years agoSimplify btif_get_remote_device_property
Zach Johnson [Fri, 14 Aug 2020 18:58:08 +0000 (11:58 -0700)]
Simplify btif_get_remote_device_property

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

4 years agoremove execute_storage_request
Zach Johnson [Fri, 14 Aug 2020 18:47:03 +0000 (11:47 -0700)]
remove execute_storage_request

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

4 years agoSimplify btif_set_adapter_property
Zach Johnson [Fri, 14 Aug 2020 18:24:35 +0000 (11:24 -0700)]
Simplify btif_set_adapter_property

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

4 years agoMerge "Fix le transport selection"
Treehugger Robot [Fri, 14 Aug 2020 23:32:13 +0000 (23:32 +0000)]
Merge "Fix le transport selection"

4 years agoMerge "Add parameters to DispatchPairingHandler"
Treehugger Robot [Fri, 14 Aug 2020 23:10:11 +0000 (23:10 +0000)]
Merge "Add parameters to DispatchPairingHandler"

4 years agoMerge "Consolidate evt data initialization"
Treehugger Robot [Fri, 14 Aug 2020 23:02:02 +0000 (23:02 +0000)]
Merge "Consolidate evt data initialization"

4 years agoMerge "Fail fast"
Treehugger Robot [Fri, 14 Aug 2020 22:31:20 +0000 (22:31 +0000)]
Merge "Fail fast"

4 years agoFix le transport selection
Chris Manton [Fri, 14 Aug 2020 21:31:43 +0000 (14:31 -0700)]
Fix le transport selection

Bug: 164357702
Test: LE pairing dialog using nRF
Tag:#refactor

Change-Id: I3b0ce75435e91b409329dcae61e69a2c09e90b4b

4 years agoMerge "GD-Storage: Move constructor to protected"
Treehugger Robot [Fri, 14 Aug 2020 21:55:13 +0000 (21:55 +0000)]
Merge "GD-Storage: Move constructor to protected"

4 years agoMerge "Logging: Rename buf and now to avoid collisions"
Treehugger Robot [Fri, 14 Aug 2020 21:22:52 +0000 (21:22 +0000)]
Merge "Logging: Rename buf and now to avoid collisions"

4 years agoAdd parameters to DispatchPairingHandler
Martin Brabham [Thu, 13 Aug 2020 15:22:45 +0000 (08:22 -0700)]
Add parameters to DispatchPairingHandler

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: If75678ca64c5a8fd152ec04dc5c3092f353ecbd1

4 years agoMerge "Directly use parameter to create p_dev_rec"
Treehugger Robot [Fri, 14 Aug 2020 21:11:43 +0000 (21:11 +0000)]
Merge "Directly use parameter to create p_dev_rec"

4 years agoMerge changes I7876611d,I9f640034,Ia9b4f580,I881c1c82,I302e27b7, ...
Zach Johnson [Fri, 14 Aug 2020 20:33:12 +0000 (20:33 +0000)]
Merge changes I7876611d,I9f640034,Ia9b4f580,I881c1c82,I302e27b7, ...

* changes:
  Flatten BTIF_CORE_STORAGE_ADAPTER_READ
  Simplify btif_get_adapter_property
  Flatten BTIF_CORE_STORAGE_ADAPTER_READ_ALL
  Simplify btif_get_adapter_properties
  Flatten BTIF_DM_CB_LE_TEST_END and remove btif_dm_generic_evt
  Flatten BTIF_DM_CB_LE_(TX|RX)_TEST
  Flatten BTIF_DM_CB_BOND_STATE_BONDING
  Flatten BTIF_DM_CB_REMOVE_BOND

4 years agoMerge "gd HCI: assign client_handler_ before execute queued callbacks"
Treehugger Robot [Fri, 14 Aug 2020 18:55:25 +0000 (18:55 +0000)]
Merge "gd HCI: assign client_handler_ before execute queued callbacks"

4 years agoMerge "gd HCI: Remove on_le_set_random_address_complete"
Treehugger Robot [Fri, 14 Aug 2020 18:53:16 +0000 (18:53 +0000)]
Merge "gd HCI: Remove on_le_set_random_address_complete"

4 years agoGD-Storage: Move constructor to protected
Jack He [Thu, 13 Aug 2020 08:29:55 +0000 (01:29 -0700)]
GD-Storage: Move constructor to protected

Bug: 162269750
Test: atest bluetooth_test_gd
Tag: #gd-refactor
Change-Id: I17488c3717511dcb3f2929cdbe39565944bc76f0

4 years agoMerge "Implementation of OOB PTS cert test cases"
Treehugger Robot [Fri, 14 Aug 2020 18:23:55 +0000 (18:23 +0000)]
Merge "Implementation of OOB PTS cert test cases"

4 years agoMerge "If a LINK_KEY_REQUEST comes in without us calling CreateBond then it isn't...
Treehugger Robot [Fri, 14 Aug 2020 18:03:04 +0000 (18:03 +0000)]
Merge "If a LINK_KEY_REQUEST comes in without us calling CreateBond then it isn't explicitly triggered by the local stack."

4 years agoLogging: Rename buf and now to avoid collisions
Myles Watson [Thu, 13 Aug 2020 18:07:20 +0000 (11:07 -0700)]
Logging: Rename buf and now to avoid collisions

Test: cert/run --host
Bug: 163818400
Tag: #gd-refactor
Change-Id: I97e2c3ac912131033e128b4b788e460c8e6397cb

4 years agoConsolidate evt data initialization
Martin Brabham [Tue, 11 Aug 2020 19:43:42 +0000 (12:43 -0700)]
Consolidate evt data initialization

Bug: 162984360
Tag: #refactor
Test: compiles and devices pair and work
Change-Id: I73d8e2655f84f47d7c8e2623cf600449735df506

4 years agoFail fast
Martin Brabham [Tue, 11 Aug 2020 19:41:01 +0000 (12:41 -0700)]
Fail fast

When this function is called, it will set a bool true.
Later the ACL connection calls a function that checks
the bool and calls this function again now that the
remote features have been fetched.

Bug: 162984360
Tag: #refactor
Test: compiles and devices pair and work
Change-Id: I4ff8e81b93b93b144313a2d809b3cd6f501a4fad

4 years agoDirectly use parameter to create p_dev_rec
Martin Brabham [Tue, 11 Aug 2020 19:27:10 +0000 (12:27 -0700)]
Directly use parameter to create p_dev_rec

Bug: 162984360
Tag: #refactor
Test: compiles and devices pair and work
Change-Id: I9a777cd7a2d12c97640e22b64f77c534d4c86e28
Merged-In: I9a777cd7a2d12c97640e22b64f77c534d4c86e28

4 years agoFlatten BTIF_CORE_STORAGE_ADAPTER_READ
Zach Johnson [Fri, 14 Aug 2020 17:27:18 +0000 (10:27 -0700)]
Flatten BTIF_CORE_STORAGE_ADAPTER_READ

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

4 years agoSimplify btif_get_adapter_property
Zach Johnson [Fri, 14 Aug 2020 17:23:10 +0000 (10:23 -0700)]
Simplify btif_get_adapter_property

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

4 years agoFlatten BTIF_CORE_STORAGE_ADAPTER_READ_ALL
Zach Johnson [Fri, 14 Aug 2020 17:13:23 +0000 (10:13 -0700)]
Flatten BTIF_CORE_STORAGE_ADAPTER_READ_ALL

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

4 years agoSimplify btif_get_adapter_properties
Zach Johnson [Fri, 14 Aug 2020 17:11:14 +0000 (10:11 -0700)]
Simplify btif_get_adapter_properties

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

4 years agoFlatten BTIF_DM_CB_LE_TEST_END and remove btif_dm_generic_evt
Zach Johnson [Fri, 14 Aug 2020 16:26:45 +0000 (09:26 -0700)]
Flatten BTIF_DM_CB_LE_TEST_END and remove btif_dm_generic_evt

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

4 years agoFlatten BTIF_DM_CB_LE_(TX|RX)_TEST
Zach Johnson [Fri, 14 Aug 2020 16:20:59 +0000 (09:20 -0700)]
Flatten BTIF_DM_CB_LE_(TX|RX)_TEST

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

4 years agoFlatten BTIF_DM_CB_BOND_STATE_BONDING
Zach Johnson [Fri, 14 Aug 2020 16:12:47 +0000 (09:12 -0700)]
Flatten BTIF_DM_CB_BOND_STATE_BONDING

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

4 years agoFlatten BTIF_DM_CB_REMOVE_BOND
Zach Johnson [Fri, 14 Aug 2020 16:07:23 +0000 (09:07 -0700)]
Flatten BTIF_DM_CB_REMOVE_BOND

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

4 years agoImplementation of OOB PTS cert test cases
Jakub Pawlowski [Thu, 13 Aug 2020 22:19:34 +0000 (00:19 +0200)]
Implementation of OOB PTS cert test cases

SM/SLA/SCOB/BV-02-C
SM/SLA/SCOB/BV-03-C
SM/MAS/SCOB/BV-04-C

This patch also fixes how we wait for disconnection event. Instead of
using fixed timeout, wait for actual disconnection.

Tag: #gd-refactor
Bug: 155399771
Test: gd/cert/run --host LeSecurityTest
Change-Id: I6d132334a8f435f2fbc10a1fc010ace06134abae

4 years agogd HCI: Remove on_le_set_random_address_complete
Chienyuan [Fri, 14 Aug 2020 10:00:58 +0000 (18:00 +0800)]
gd HCI: Remove on_le_set_random_address_complete

Bug: 145832107
Tag: #gd-refactor
Test: cert/run --host; manual
Change-Id: Ib63e457e2e8c882f290837d05fd3bd614ffc8c34

4 years agogd HCI: assign client_handler_ before execute queued callbacks
Chienyuan [Fri, 14 Aug 2020 09:52:42 +0000 (17:52 +0800)]
gd HCI: assign client_handler_ before execute queued callbacks

Tag: #gd-refactor
Bug: 145832107
Test: atest bluetooth_test_gd
Test: ./cert/run --host
Change-Id: Id45980cb1975fd8a893c262099e64f1cf4b65b3e

4 years agoFormalize acl API BTM_ReadPowerMode
Chris Manton [Fri, 14 Aug 2020 05:55:43 +0000 (22:55 -0700)]
Formalize acl API BTM_ReadPowerMode

Creating ACL API

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

4 years agoBecause #defines interleaved with {} is a nightmare
Chris Manton [Fri, 14 Aug 2020 05:31:58 +0000 (22:31 -0700)]
Because #defines interleaved with {} is a nightmare

Creating ACL API

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

4 years agoRemove unused return value in bta_dm_pm_sniff
Chris Manton [Fri, 14 Aug 2020 05:26:39 +0000 (22:26 -0700)]
Remove unused return value in bta_dm_pm_sniff

Unused in locally linked function

bool=>void

Creating ACL API

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working

Change-Id: If4748a33567fa3e8b9980ee68d947ee45e56aad2

4 years agoPrivatize tBTM_CB::tACL_CB::btm_scn[]
Chris Manton [Thu, 13 Aug 2020 21:34:42 +0000 (14:34 -0700)]
Privatize tBTM_CB::tACL_CB::btm_scn[]

Creating ACL API

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

4 years agoPrivatize tBTM_CB::tACL_CB::btm_def_link_policy
Chris Manton [Thu, 13 Aug 2020 21:30:26 +0000 (14:30 -0700)]
Privatize tBTM_CB::tACL_CB::btm_def_link_policy

Creating ACL API

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

4 years agoPrivatize tBTM_CB::tACL_CB::pm_pend_link
Chris Manton [Thu, 13 Aug 2020 21:25:53 +0000 (14:25 -0700)]
Privatize tBTM_CB::tACL_CB::pm_pend_link

Creating ACL API

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

4 years agoPrivatize tBTM_CB::tACL_CB::btm_acl_pkt_types_supported
Chris Manton [Thu, 13 Aug 2020 21:23:32 +0000 (14:23 -0700)]
Privatize tBTM_CB::tACL_CB::btm_acl_pkt_types_supported

Creating ACL API

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working

Change-Id: I23460e1ec67e68ed907f2476f3d44734ba03d87a

4 years agoPrivatize tBTM_CB::tACL_CB::acl_disc_reason
Chris Manton [Thu, 13 Aug 2020 20:31:16 +0000 (13:31 -0700)]
Privatize tBTM_CB::tACL_CB::acl_disc_reason

Creating ACL API

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working

Change-Id: I521c44f45a4d4c296bc2469aac9802ad32841c4c

4 years agoPrivatize tBTM_CB::tACL_CB::tBTM_PM_MCB
Chris Manton [Thu, 13 Aug 2020 20:10:54 +0000 (13:10 -0700)]
Privatize tBTM_CB::tACL_CB::tBTM_PM_MCB

Creating ACL API

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working

Change-Id: I5662d3cb641b5c76e3f0770adb2330591055a0a5

4 years agoPrivatize tBTM_CB::tACL_CB:tACL_CONN[]
Chris Manton [Thu, 13 Aug 2020 05:31:44 +0000 (22:31 -0700)]
Privatize tBTM_CB::tACL_CB:tACL_CONN[]

Creating ACL API

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working

Change-Id: I1e65fe788158bd6c7a02806385c1fe69b46c7394

4 years agoPrivatize tBTM_CB::tACL_CB::btm_def_link_super_tout
Chris Manton [Thu, 13 Aug 2020 04:30:15 +0000 (21:30 -0700)]
Privatize tBTM_CB::tACL_CB::btm_def_link_super_tout

Creating ACL API

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

4 years agoUse stack/include/acl_hci_link_interface
Chris Manton [Thu, 13 Aug 2020 23:51:50 +0000 (16:51 -0700)]
Use stack/include/acl_hci_link_interface

Also shuffle inclusions from stack/include/btm_int

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working

Change-Id: Ib735d920f27652091d4494db9a5a80742103c347

4 years agoAdd stack/include/acl_hci_link_interface.h
Chris Manton [Thu, 13 Aug 2020 23:10:00 +0000 (16:10 -0700)]
Add stack/include/acl_hci_link_interface.h

Prototypes for hci=>acl functions

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

4 years agoInternalize btm_handle_to_acl_index to stack/acl
Chris Manton [Thu, 13 Aug 2020 23:18:39 +0000 (16:18 -0700)]
Internalize btm_handle_to_acl_index to stack/acl

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

4 years agoMerge changes Ic219f578,Ib63dc45a
Zach Johnson [Fri, 14 Aug 2020 04:10:23 +0000 (04:10 +0000)]
Merge changes Ic219f578,Ib63dc45a

* changes:
  Remove BTIF_DM_CB_CREATE_BOND
  Remove BTIF_DM_CB_HID_REMOTE_NAME, it's never used

4 years agoMerge changes If1f09f06,Ic49bbdf4,I40d30944
Zach Johnson [Fri, 14 Aug 2020 02:03:28 +0000 (02:03 +0000)]
Merge changes If1f09f06,Ic49bbdf4,I40d30944

* changes:
  Remove BTIF_DM_CB_CREATE_BOND, it's never used
  Remove unused lines from bte_main
  l2c_link_send_to_lower always returns true

4 years agoMerge "HAL: Add ISO packet callbacks"
Treehugger Robot [Fri, 14 Aug 2020 00:52:49 +0000 (00:52 +0000)]
Merge "HAL: Add ISO packet callbacks"

4 years agoMerge "Inline stack/acl/btm_acl::btm_pm_sm_alloc"
Treehugger Robot [Fri, 14 Aug 2020 00:04:18 +0000 (00:04 +0000)]
Merge "Inline stack/acl/btm_acl::btm_pm_sm_alloc"

4 years agoMerge "Inline stack/acl/btm_acl::btm_pm_check_stored"
Treehugger Robot [Fri, 14 Aug 2020 00:01:56 +0000 (00:01 +0000)]
Merge "Inline stack/acl/btm_acl::btm_pm_check_stored"

4 years agoRemove BTIF_DM_CB_CREATE_BOND
Zach Johnson [Thu, 13 Aug 2020 23:51:53 +0000 (16:51 -0700)]
Remove BTIF_DM_CB_CREATE_BOND

go to the jni thread directly instead of
going through all the manual ceremony of
a manually defined event type & struct

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

4 years agoRemove BTIF_DM_CB_HID_REMOTE_NAME, it's never used
Zach Johnson [Thu, 13 Aug 2020 23:39:18 +0000 (16:39 -0700)]
Remove BTIF_DM_CB_HID_REMOTE_NAME, it's never used

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

4 years agoRemove BTIF_DM_CB_CREATE_BOND, it's never used
Zach Johnson [Thu, 13 Aug 2020 23:34:36 +0000 (16:34 -0700)]
Remove BTIF_DM_CB_CREATE_BOND, it's never used

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

4 years agoMerge changes I660901a4,I73ef9a97,Iccfb31fe,If8adec40,Ie379258b, ...
Zach Johnson [Thu, 13 Aug 2020 23:04:02 +0000 (23:04 +0000)]
Merge changes I660901a4,I73ef9a97,Iccfb31fe,If8adec40,Ie379258b, ...

* changes:
  Remove functions orphaned by the removal of BTM_VendorCleanup
  Remove unreachable BT(A|M)_VendorCleanup functions
  This call will never be successful
  Flatten bte_main_cleanup
  Move bte_main_cleanup call to stack_manager
  Rename bte_main_boot_entry, and pull out irrelevant module inits

4 years agoMerge changes I19bc0daf,I9e93cf4e
Zach Johnson [Thu, 13 Aug 2020 22:51:21 +0000 (22:51 +0000)]
Merge changes I19bc0daf,I9e93cf4e

* changes:
  Pull bte_main_boot_entry out of btif_init_bluetooth
  Flatten btu_free_core and remove btu_init.cc

4 years agoRemove unused lines from bte_main
Zach Johnson [Thu, 13 Aug 2020 22:46:06 +0000 (15:46 -0700)]
Remove unused lines from bte_main

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

4 years agol2c_link_send_to_lower always returns true
Zach Johnson [Thu, 13 Aug 2020 22:41:31 +0000 (15:41 -0700)]
l2c_link_send_to_lower always returns true

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

4 years agoMerge "Define appl_trace_level needed for coverage instrumentation"
Treehugger Robot [Thu, 13 Aug 2020 22:48:53 +0000 (22:48 +0000)]
Merge "Define appl_trace_level needed for coverage instrumentation"

4 years agoInline stack/acl/btm_acl::btm_pm_sm_alloc
Chris Manton [Thu, 13 Aug 2020 20:40:25 +0000 (13:40 -0700)]
Inline stack/acl/btm_acl::btm_pm_sm_alloc

Unnecessary internally linked function

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

4 years agoInline stack/acl/btm_acl::btm_pm_check_stored
Chris Manton [Thu, 13 Aug 2020 20:14:29 +0000 (13:14 -0700)]
Inline stack/acl/btm_acl::btm_pm_check_stored

Unnecessary internally linked function

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

4 years agoRemove functions orphaned by the removal of BTM_VendorCleanup
Zach Johnson [Thu, 13 Aug 2020 21:54:59 +0000 (14:54 -0700)]
Remove functions orphaned by the removal of BTM_VendorCleanup

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

4 years agoDefine appl_trace_level needed for coverage instrumentation
Pirama Arumuga Nainar [Thu, 13 Aug 2020 21:20:53 +0000 (14:20 -0700)]
Define appl_trace_level needed for coverage instrumentation

Bug: 163819563

Define appl_trace_level even though LogMsg is trivial.  This is required
when coverage is enabled because the compiler is unable to eliminate the
`if` checks against appl_trace_level in APPL_TRACE_* macros.

Test: m CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS='system/bt' \
          net_test_hf_client_add_record
Change-Id: I0455d1f95146551f77ded662da1f5d85fb245c4e

4 years agoRemove unreachable BT(A|M)_VendorCleanup functions
Zach Johnson [Thu, 13 Aug 2020 21:48:54 +0000 (14:48 -0700)]
Remove unreachable BT(A|M)_VendorCleanup functions

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

4 years agoMerge "Add stack/acl/btm_acl::acl_ble_is_role_master"
Treehugger Robot [Thu, 13 Aug 2020 21:48:29 +0000 (21:48 +0000)]
Merge "Add stack/acl/btm_acl::acl_ble_is_role_master"

4 years agoThis call will never be successful
Zach Johnson [Thu, 13 Aug 2020 21:44:37 +0000 (14:44 -0700)]
This call will never be successful

The main thread lifetime is tied to start/stop, this call is part of
cleanup which happens after stop. So this call has no effect.

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

4 years agoFlatten bte_main_cleanup
Zach Johnson [Thu, 13 Aug 2020 21:38:23 +0000 (14:38 -0700)]
Flatten bte_main_cleanup

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

4 years agoMove bte_main_cleanup call to stack_manager
Zach Johnson [Thu, 13 Aug 2020 21:35:45 +0000 (14:35 -0700)]
Move bte_main_cleanup call to stack_manager

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

4 years agoPull bte_main_boot_entry out of btif_init_bluetooth
Zach Johnson [Thu, 13 Aug 2020 21:12:07 +0000 (14:12 -0700)]
Pull bte_main_boot_entry out of btif_init_bluetooth

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

4 years agoRename bte_main_boot_entry, and pull out irrelevant module inits
Zach Johnson [Thu, 13 Aug 2020 21:16:40 +0000 (14:16 -0700)]
Rename bte_main_boot_entry, and pull out irrelevant module inits

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

4 years agoFlatten btu_free_core and remove btu_init.cc
Zach Johnson [Thu, 13 Aug 2020 20:38:10 +0000 (13:38 -0700)]
Flatten btu_free_core and remove btu_init.cc

bye

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