OSDN Git Service

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

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