OSDN Git Service

android-x86/system-bt.git
4 years agogd: Clean up bluetooth_test_gd
Chris Manton [Fri, 21 Feb 2020 03:58:43 +0000 (19:58 -0800)]
gd: Clean up bluetooth_test_gd

Bug: 146363362
Test: bluetooth_test_gd
Change-Id: I0f3fb81d2b79b781918d18ea89a3ed64574a9610

4 years agoMerge "Fix call order for BTM shim RegisterInquiryCallbacks"
Treehugger Robot [Thu, 20 Feb 2020 19:07:46 +0000 (19:07 +0000)]
Merge "Fix call order for BTM shim RegisterInquiryCallbacks"

4 years agoOH MY COD! Why is gabledorsche plural?
Zach Johnson [Thu, 20 Feb 2020 17:50:48 +0000 (09:50 -0800)]
OH MY COD! Why is gabledorsche plural?

Link to a helpful explanation on why gabeldorsche and not gabeldorsch.

Change-Id: I978ac9ba88de0be42a3dde76eafeeca59b26b50e

4 years agoFix call order for BTM shim RegisterInquiryCallbacks
Jakub Pawlowski [Thu, 20 Feb 2020 16:49:32 +0000 (17:49 +0100)]
Fix call order for BTM shim RegisterInquiryCallbacks

This currently causes crash on bringup of GD stack

Bug: 149757450
Test: start stack with GD enabled
Change-Id: Ie86d007dd9fcbab102b7c1e95c97ae5d9989fa29

4 years agoMerge changes Id1de1279,I4fb13f4b,I1f27fffa,I6f650623
Treehugger Robot [Thu, 20 Feb 2020 16:42:37 +0000 (16:42 +0000)]
Merge changes Id1de1279,I4fb13f4b,I1f27fffa,I6f650623

* changes:
  Get rid of HciLayer shim
  Prepare to remove HCI layer shim
  Get rid of Advertising shim
  Get rid of Inquiry shim

4 years agoMerge "L2capTest: Add common event handler and migrate test case"
Treehugger Robot [Thu, 20 Feb 2020 04:48:28 +0000 (04:48 +0000)]
Merge "L2capTest: Add common event handler and migrate test case"

4 years agoMerge "L2CAP Cert with facade only initial commit"
Treehugger Robot [Thu, 20 Feb 2020 04:03:39 +0000 (04:03 +0000)]
Merge "L2CAP Cert with facade only initial commit"

4 years agoL2capTest: Add common event handler and migrate test case
Hansong Zhang [Thu, 20 Feb 2020 01:25:41 +0000 (17:25 -0800)]
L2capTest: Add common event handler and migrate test case

Migrated L2cap tests to use facade only:
test_disconnect_on_timeout
test_respond_to_echo_request
test_reject_unknown_command

Test: cert/run_cert_facade_only.sh
Bug: 14987419
Change-Id: I809a95fbf148f3784377d05e630e69539f8f93ef

4 years agoL2CAP Cert with facade only initial commit
Hansong Zhang [Wed, 12 Feb 2020 00:25:37 +0000 (16:25 -0800)]
L2CAP Cert with facade only initial commit

Test: cert/run_cert_facade_only.sh
Bug: 149874197
Change-Id: I2ec34c19ee609ac8ef4f4da4cc8a9d66b6977543

4 years agoMerge changes from topic "bt-avrcp-controller-cover-art"
Sal Savage [Thu, 20 Feb 2020 02:02:31 +0000 (02:02 +0000)]
Merge changes from topic "bt-avrcp-controller-cover-art"

* changes:
  Find and capture cover art BIP PSM and send it to Java/JNI
  Add cover artwork image handles to requested attributes objects
  Find cover art supported feature and send up to JNI
  Indicate support for controller cover art feature in SDP record

4 years agoAdd LeAclManagerTest, SimpleSecurityTest to dist
Hansong Zhang [Wed, 19 Feb 2020 22:22:32 +0000 (14:22 -0800)]
Add LeAclManagerTest, SimpleSecurityTest to dist

Test: m dist bluetooth_stack_with_facade
Change-Id: Icb8922b2432c9e02b9a231614051d4b9573ce3b2

4 years agoMerge "Swap Cert and DUT index"
Treehugger Robot [Thu, 20 Feb 2020 01:03:36 +0000 (01:03 +0000)]
Merge "Swap Cert and DUT index"

4 years agoGet rid of HciLayer shim
Jakub Pawlowski [Thu, 20 Feb 2020 00:25:54 +0000 (01:25 +0100)]
Get rid of HciLayer shim

Bug: 149757450
Change-Id: Id1de12794f3378301442dfab01e3857a5d1c9459

4 years agoPrepare to remove HCI layer shim
Jakub Pawlowski [Wed, 19 Feb 2020 23:09:52 +0000 (00:09 +0100)]
Prepare to remove HCI layer shim

Bug: 149757450
Change-Id: I4fb13f4b7d9a80540ce683eb13bf0e6da39b9fe6

4 years agoGet rid of Advertising shim
Jakub Pawlowski [Wed, 19 Feb 2020 20:16:57 +0000 (21:16 +0100)]
Get rid of Advertising shim

Bug: 149757450
Change-Id: I1f27fffa5aca3bed420c9bfe4e1bb404460f3ffc

4 years agoGet rid of Inquiry shim
Jakub Pawlowski [Wed, 19 Feb 2020 19:13:15 +0000 (20:13 +0100)]
Get rid of Inquiry shim

Bug: 149757450
Change-Id: I6f650623e7f89ed8c75e0f4ddadc218c7f3c8b3c

4 years agoGet rid of Name shim
Jakub Pawlowski [Wed, 19 Feb 2020 17:19:07 +0000 (18:19 +0100)]
Get rid of Name shim

Bug: 149757450
Change-Id: Ie273f88a1fa27a8fa6f748abcf864b080591cdaa

4 years agoMerge "HCI: Remove unused ClassicSecurityManager API"
Treehugger Robot [Wed, 19 Feb 2020 21:42:35 +0000 (21:42 +0000)]
Merge "HCI: Remove unused ClassicSecurityManager API"

4 years agoSwap Cert and DUT index
Hansong Zhang [Wed, 19 Feb 2020 21:19:07 +0000 (13:19 -0800)]
Swap Cert and DUT index

Cert is 0, DUT is 1

Test: cert/run_cert_facade_only.sh
Change-Id: I76231b8cbdb03e2f3a998c82eac859363a9da0d8

4 years agoMerge "Get rid of NameDB shim"
Treehugger Robot [Wed, 19 Feb 2020 21:06:12 +0000 (21:06 +0000)]
Merge "Get rid of NameDB shim"

4 years agoMerge "SM: Add JustWorks cert tests"
Treehugger Robot [Wed, 19 Feb 2020 20:10:06 +0000 (20:10 +0000)]
Merge "SM: Add JustWorks cert tests"

4 years agoMerge "AVRCP Controller manage active device"
Joseph Pirozzo [Wed, 19 Feb 2020 19:15:11 +0000 (19:15 +0000)]
Merge "AVRCP Controller manage active device"

4 years agoMerge changes from topic "gd_sm_ui_wiring"
Treehugger Robot [Wed, 19 Feb 2020 18:36:17 +0000 (18:36 +0000)]
Merge changes from topic "gd_sm_ui_wiring"

* changes:
  SM: Add UI Callbacks to CPH
  Security UI Callbacks wiring

4 years agoMerge "Remove redundant BTA_AR_DEBUG define"
Treehugger Robot [Wed, 19 Feb 2020 18:29:56 +0000 (18:29 +0000)]
Merge "Remove redundant BTA_AR_DEBUG define"

4 years agoGet rid of NameDB shim
Jakub Pawlowski [Wed, 19 Feb 2020 16:30:32 +0000 (17:30 +0100)]
Get rid of NameDB shim

Bug: 149757450
Change-Id: I7d34028f71d333b8b12a8f8a3d164df365d66de5

4 years agoGet rid of Scanning shim
Jakub Pawlowski [Wed, 19 Feb 2020 06:57:14 +0000 (07:57 +0100)]
Get rid of Scanning shim

Bug: 149757450
Change-Id: I8f41bb6d79324bab6dbe40ea5223f42431c57638

4 years agoMerge "L2CAP: Add test scripts for pts test"
Treehugger Robot [Wed, 19 Feb 2020 11:13:17 +0000 (11:13 +0000)]
Merge "L2CAP: Add test scripts for pts test"

4 years agoMerge "L2CAP: Update remote tx_window during channel configuration"
Treehugger Robot [Wed, 19 Feb 2020 11:12:59 +0000 (11:12 +0000)]
Merge "L2CAP: Update remote tx_window during channel configuration"

4 years agoRemove redundant BTA_AR_DEBUG define
Cheney Ni [Wed, 19 Feb 2020 09:19:27 +0000 (17:19 +0800)]
Remove redundant BTA_AR_DEBUG define

Bug: none
Test: compile
Change-Id: Id63e2f9a8881c16b2b48eeef2b941f7c0cde628b

4 years agoSM: Add JustWorks cert tests
Martin Brabham [Fri, 14 Feb 2020 02:09:23 +0000 (18:09 -0800)]
SM: Add JustWorks cert tests

Add some classic JustWorks use cases as cert tests.

Bug: 145638034
Test: ./cert/run_cert_facade_only.sh
Change-Id: I56a1ba5fb42a97e8b87e5f8d87722a93bba0f08f

4 years agoHCI: Remove unused ClassicSecurityManager API
Martin Brabham [Thu, 13 Feb 2020 19:14:35 +0000 (11:14 -0800)]
HCI: Remove unused ClassicSecurityManager API

Bug: 146363467
Test: bluetooth_test_gd
Change-Id: Ib8994f858161ce0ba5143cef49da755f5f5599df

4 years agoSM: Add UI Callbacks to CPH
Martin Brabham [Wed, 19 Feb 2020 05:16:52 +0000 (21:16 -0800)]
SM: Add UI Callbacks to CPH

Test: bluetooth_test_gd
Change-Id: I8b7b587f720a897e416ed3abea0fde6ad6788338

4 years agoSecurity UI Callbacks wiring
Jakub Pawlowski [Fri, 14 Feb 2020 00:03:31 +0000 (01:03 +0100)]
Security UI Callbacks wiring

Test: bluetooth_test_gd
Change-Id: I713e4efd923359a36fc943362d59ae619dd515ca

4 years agoMerge "Fix crash at unexpected code after root inflammation"
Treehugger Robot [Wed, 19 Feb 2020 03:32:11 +0000 (03:32 +0000)]
Merge "Fix crash at unexpected code after root inflammation"

4 years agoGet rid of Storage shim
Jakub Pawlowski [Wed, 19 Feb 2020 01:29:20 +0000 (02:29 +0100)]
Get rid of Storage shim

Bug: 149757450
Change-Id: I90130121c5fdf23ec8cacf19fedd4b3e154351a5

4 years agoGet rid of Connectability shim
Jakub Pawlowski [Wed, 19 Feb 2020 00:17:53 +0000 (01:17 +0100)]
Get rid of Connectability shim

Bug: 149757450
Change-Id: Idef691e97109e2634fc05fc7bddfeca72b967d11

4 years agoGet rid of Page shim
Jakub Pawlowski [Tue, 18 Feb 2020 22:46:00 +0000 (23:46 +0100)]
Get rid of Page shim

Bug: 149757450
Change-Id: I9ce812831a0d8ff62772ea5b98ab4a7e646b162a

4 years agoGet rid of Security shim
Jakub Pawlowski [Tue, 18 Feb 2020 19:39:33 +0000 (20:39 +0100)]
Get rid of Security shim

Bug: 149757450
Change-Id: Id7137d64059cf5d15cd94419255c4b1f051bee60

4 years agosmp_generate_stk: reduce log level for key type information
Jakub Pawlowski [Tue, 18 Feb 2020 16:20:25 +0000 (17:20 +0100)]
smp_generate_stk: reduce log level for key type information

Change-Id: I7499a3f507914db9cb9c062f4ad9cfccdb51f06b

4 years agoMerge "gd: Unregister events at the hci layer"
Treehugger Robot [Tue, 18 Feb 2020 22:17:29 +0000 (22:17 +0000)]
Merge "gd: Unregister events at the hci layer"

4 years agoMerge "Save bonding and pairing state to security record"
Treehugger Robot [Tue, 18 Feb 2020 22:08:18 +0000 (22:08 +0000)]
Merge "Save bonding and pairing state to security record"

4 years agoGet rid of Discoverability shim
Jakub Pawlowski [Tue, 18 Feb 2020 18:40:52 +0000 (19:40 +0100)]
Get rid of Discoverability shim

Bug: 149757450
Change-Id: Ibe6cccc0971d4a723ba5489332ca7933e7609a34

4 years agoGet rid of the redundant shim interfaces
Jakub Pawlowski [Sun, 16 Feb 2020 00:03:04 +0000 (01:03 +0100)]
Get rid of the redundant shim interfaces

It was agred to expose gd types into the system/bt/main folder.
All the interfaces already use pimpl pattern to make them testable.
Thus there is no need for the I* shim interfaces.

Test: updated tests
Bug: 149757450
Change-Id: I9662f9ab48c61b764e4df082da1a73483cb0b2b9

4 years agoSave bonding and pairing state to security record
Chris Manton [Tue, 11 Feb 2020 23:49:14 +0000 (15:49 -0800)]
Save bonding and pairing state to security record

Bug: 142341141
Test: bluetooth_test_gd

Change-Id: I226d9f2f74e12d911fbb8e1f3d5924db7763bdaf

4 years agoCanonicalize header include files
Chris Manton [Tue, 18 Feb 2020 19:20:31 +0000 (11:20 -0800)]
Canonicalize header include files

Bug: 147316415
Test: Compiles and Builds
Change-Id: I00316dba9cce8d727fc718250237e80ff87cdd00

4 years agoDo not redefine logging if already defined
Jakub Pawlowski [Sat, 15 Feb 2020 21:41:02 +0000 (22:41 +0100)]
Do not redefine logging if already defined

This patch lets us include gd code in system/bt/main. Currently if we
were to do that, we would get errors about logs being redefined.

Test: compilation
Change-Id: Ifc2c9eb913c311a50763a26f864dd91872c273cc

4 years agoMerge "gd: Add shim access to name db"
Treehugger Robot [Tue, 18 Feb 2020 17:06:36 +0000 (17:06 +0000)]
Merge "gd: Add shim access to name db"

4 years agoModify service_type constants to not collide with constants in GD
Jakub Pawlowski [Sat, 15 Feb 2020 17:46:38 +0000 (18:46 +0100)]
Modify service_type constants to not collide with constants in GD

Test: compilation
Change-Id: Ieb9540a3c5ca390a1e04d20ae378d1ab06b33707

4 years agoL2CAP: Add test scripts for pts test
Ted Wang [Thu, 30 Jan 2020 06:16:05 +0000 (14:16 +0800)]
L2CAP: Add test scripts for pts test

Add following PTS test scripts:
  L2CAP/EXF/BV-01-C
  L2CAP/CMC/BV-01-C
  L2CAP/CMC/BV-02-C
  L2CAP/ERM/BV-01-C
  L2CAP/ERM/BV-02-C
  L2CAP/ERM/BV-03-C
  L2CAP/ERM/BV-08-C
  L2CAP/ERM/BV-09-C
  L2CAP/ERM/BV-10-C
  L2CAP/ERM/BV-11-C
  L2CAP/ERM/BV-18-C
  L2CAP/ERM/BV-19-C
  L2CAP/ERM/BV-20-C

Add cert tests:
  test_initiated_configurtion_ertm [L2CAP/CMC/BV-01-C]
  test_receive_i_frames [L2CAP/ERM/BV-02-C]
  test_acknowledging_received_i_frames [L2CAP/ERM/BV-03-C]
  test_transmit_s_frame_rr_with_poll_bit_set [L2CAP/ERM/BV-08-C]
  test_transmit_s_frame_rr_with_final_bit_set [L2CAP/ERM/BV-09-C]
  test_receive_s_frame_rr_final_bit_set [L2CAP/ERM/BV-18-C]
  test_receive_i_frame_final_bit_set [L2CAP/ERM/BV-19-C]
  test_recieve_rnr [L2CAP/ERM/BV-20-C]

Bug: 145784332
Test: run_cert.sh
Change-Id: If5b25880f731dbfbb0447a6edaccbbf3d8829d11

4 years agoL2CAP: Update remote tx_window during channel configuration
Ted Wang [Mon, 10 Feb 2020 06:28:48 +0000 (14:28 +0800)]
L2CAP: Update remote tx_window during channel configuration

* Update tx_window as transmit window in configuration request from
  remote.
* Fix logic of checking valid f bit, f bit should be valid only if:
  1. tx_state is in XMIT and f not set
  2. tx_state is in WAIT_F and f set to POLL_RESPONSE

* Add follwoing test cases in simple_l2cap_cert:
  test_resume_transmitting_when_received_rr
  test_resume_transmitting_when_acknowledge_previously_sent
  test_respond_to_rej
  test_handle_duplicate_srej
  test_handle_Receipt_rej_and_rr_with_f_set
  test_handle_rej_and_i_frame_with_f_set

* Add following test case in pts_l2cap_test:
  test_L2CAP_ERM_BV_05_C
  test_L2CAP_ERM_BV_06_C
  test_L2CAP_ERM_BV_13_C
  test_L2CAP_ERM_BI_03_C
  test_L2CAP_ERM_BI_04_C
  test_L2CAP_ERM_BI_05_C

Bug: 149182548
Test: run_cert.sh
Change-Id: I0828e570017b954980f23912937e36524814a0f6

4 years agogd: Unregister events at the hci layer
Chris Manton [Sat, 15 Feb 2020 04:32:51 +0000 (20:32 -0800)]
gd: Unregister events at the hci layer

bt_headless with the pairing option fails

Bug:149524116
Test: blueooth_test_gd
Test: bt_headless
Change-Id: I65d9f928c6ff63e5ddde8380cae847d180876fac

4 years agoMerge "PDL: Serialize nested packets in Python"
Treehugger Robot [Sat, 15 Feb 2020 02:26:22 +0000 (02:26 +0000)]
Merge "PDL: Serialize nested packets in Python"

4 years agoMerge changes Iea352d4b,Ic0737465
Treehugger Robot [Fri, 14 Feb 2020 21:33:33 +0000 (21:33 +0000)]
Merge changes Iea352d4b,Ic0737465

* changes:
  GRPC: Use server_stream_call.cancelled() instead of hidden API
  RootCanal HAL: Fixed race condition when tearing down rootcanal HAL

4 years agoPDL: Serialize nested packets in Python
Myles Watson [Sat, 4 Jan 2020 00:30:27 +0000 (16:30 -0800)]
PDL: Serialize nested packets in Python

Bug: 148096951
Test: ./cert/run_cert_facade_only.sh
Change-Id: I2c54bb5d35dec9a9b5101165d2d1ccb22b116ef4

4 years agoFix crash at unexpected code after root inflammation
Ugo Yu [Wed, 12 Feb 2020 06:04:11 +0000 (14:04 +0800)]
Fix crash at unexpected code after root inflammation

* Clean up the hci/startup timers after the receiving of root
  inflammation packet so they will not be scheduled again and
  expire before the abort_timer.
* Abort Bluetooth when HAL is dead with correct reason.

Bug: 144592765
Test: Manual
Change-Id: I1458defeebaac7951aa8c7f52decf5b6ca3ab4fc

4 years agogd: Add shim access to name db
Chris Manton [Fri, 14 Feb 2020 00:19:05 +0000 (16:19 -0800)]
gd: Add shim access to name db

Provides replacement for remote name request db
for legacy shim side.

Bug: 149524116
Test: bluetooth_test_gd

Change-Id: I69c8c65c01935ae371debedcef2d921cea7beb4a

4 years agoMerge "Use mobly.asserts"
Treehugger Robot [Fri, 14 Feb 2020 06:23:06 +0000 (06:23 +0000)]
Merge "Use mobly.asserts"

4 years agoMerge "gd: Authenticate only if necessary"
Treehugger Robot [Fri, 14 Feb 2020 05:35:07 +0000 (05:35 +0000)]
Merge "gd: Authenticate only if necessary"

4 years agoMerge "gd: Add link layer collision hci error code"
Treehugger Robot [Fri, 14 Feb 2020 05:14:15 +0000 (05:14 +0000)]
Merge "gd: Add link layer collision hci error code"

4 years agoMerge "gd: Add a remote name database"
Treehugger Robot [Fri, 14 Feb 2020 05:06:06 +0000 (05:06 +0000)]
Merge "gd: Add a remote name database"

4 years agoMerge "gd: Ensure all events are handled for new classic pairing manager"
Treehugger Robot [Fri, 14 Feb 2020 03:23:47 +0000 (03:23 +0000)]
Merge "gd: Ensure all events are handled for new classic pairing manager"

4 years agoMerge "gd: Expand and log more acl events"
Treehugger Robot [Fri, 14 Feb 2020 03:19:37 +0000 (03:19 +0000)]
Merge "gd: Expand and log more acl events"

4 years agoMerge "Set proper scan type before first discovery"
Treehugger Robot [Fri, 14 Feb 2020 02:20:16 +0000 (02:20 +0000)]
Merge "Set proper scan type before first discovery"

4 years agogd: Add a remote name database
Chris Manton [Fri, 14 Feb 2020 00:18:30 +0000 (16:18 -0800)]
gd: Add a remote name database

Simple module to cache remote names.  Used by shim layer.

Bug: 149524116
Test: bluetooth_test_gd

Change-Id: I63e94e0ff1ea04c3ec35d502ac1de001a11f7b98

4 years agogd: Authenticate only if necessary
Chris Manton [Fri, 14 Feb 2020 00:20:14 +0000 (16:20 -0800)]
gd: Authenticate only if necessary

If a device are pairing but not bonding then
authenticate may get called twice, once when
the channel is set up and again when the
pairing manager is launched.

Bug: 149524116
Test: bluetooth_test_gd

Change-Id: Icddecd549030ade41e5679d46580881b56833d9e

4 years agogd: Expand and log more acl events
Chris Manton [Fri, 14 Feb 2020 00:19:47 +0000 (16:19 -0800)]
gd: Expand and log more acl events

Bug: 146086425
Test: blueooth_test_gd

Change-Id: I8dc506eea0bbcc3a9310d758311f369a31993bfd

4 years agogd: Ensure all events are handled for new classic pairing manager
Chris Manton [Wed, 12 Feb 2020 20:10:08 +0000 (12:10 -0800)]
gd: Ensure all events are handled for new classic pairing manager

a new classic pairing manager never processes the initiating event.

Bug: 146086425
Test: bluetooth_test_gd

Change-Id: I3471bc5849315456d7429747e894cf80eda8b8cb

4 years agoMerge "Update time stamp when new inq_db"
Treehugger Robot [Fri, 14 Feb 2020 00:28:34 +0000 (00:28 +0000)]
Merge "Update time stamp when new inq_db"

4 years agoMerge "Remove some unused inquiry code and callback function"
Treehugger Robot [Thu, 13 Feb 2020 23:20:48 +0000 (23:20 +0000)]
Merge "Remove some unused inquiry code and callback function"

4 years agoUse mobly.asserts
Hansong Zhang [Thu, 13 Feb 2020 23:12:45 +0000 (15:12 -0800)]
Use mobly.asserts

Test: cert/run_cert_facade_only.sh
Change-Id: I3f19bba39953eca9c013aab8813610c3fbfb5f83

4 years agoGet rid of UI callbacks from SecurityManagerListener
Jakub Pawlowski [Wed, 12 Feb 2020 23:10:12 +0000 (00:10 +0100)]
Get rid of UI callbacks from SecurityManagerListener

Test: updated unittests
Bug: 142341141
Change-Id: If6b086f74d92e757d02df4174af73edb36d6de3d

4 years agoMerge "HCI: Set default event mask"
Treehugger Robot [Thu, 13 Feb 2020 20:52:23 +0000 (20:52 +0000)]
Merge "HCI: Set default event mask"

4 years agoMerge "Cert: Move DUT assignment to common code"
Treehugger Robot [Thu, 13 Feb 2020 18:20:01 +0000 (18:20 +0000)]
Merge "Cert: Move DUT assignment to common code"

4 years agoUpdate time stamp when new inq_db
Charles Lin [Thu, 13 Feb 2020 08:05:27 +0000 (16:05 +0800)]
Update time stamp when new inq_db

Test: Simulate a sitution with many LE devices around and start le scan
Bug: 146474336
Change-Id: I3a0f87786d0c7b13e4d85942ac0387fc334c26d4

4 years agoSet proper scan type before first discovery
Charles Lin [Thu, 13 Feb 2020 08:03:44 +0000 (16:03 +0800)]
Set proper scan type before first discovery

Set scan type when start first discover after bt enabled.
And replace adv evt hex code to define code

Test: Enable Bluetooth and then start discovery.
Bug: 146474336
Change-Id: I63c8cda5343de15381c83da4ea3afde6b75aaf6a

4 years agoRemove some unused inquiry code and callback function
Charles Lin [Thu, 13 Feb 2020 08:00:11 +0000 (16:00 +0800)]
Remove some unused inquiry code and callback function

Test: manually
Bug: 146474336
Change-Id: I6d3a0d9066ef6a4fbc14f938db6f120147340804

4 years agoMerge "Don't guess transport during pairing"
Treehugger Robot [Thu, 13 Feb 2020 06:49:21 +0000 (06:49 +0000)]
Merge "Don't guess transport during pairing"

4 years agoSecurity UI interface cleanup
Jakub Pawlowski [Wed, 12 Feb 2020 21:02:40 +0000 (22:02 +0100)]
Security UI interface cleanup

We currently have two separate UI interfaces for LE and Classic, this
patch merges them into single one.

Bug: 142341141
Test: tests updated
Change-Id: I5fa347a1d4d50d85bb051782ca27f38f3d146239

4 years agoMerge "Pass UI Into Security Manager"
Treehugger Robot [Thu, 13 Feb 2020 02:21:07 +0000 (02:21 +0000)]
Merge "Pass UI Into Security Manager"

4 years agoGRPC: Use server_stream_call.cancelled() instead of hidden API
Jack He [Wed, 12 Feb 2020 20:43:13 +0000 (12:43 -0800)]
GRPC: Use server_stream_call.cancelled() instead of hidden API

* Use server_stream_call.cancelled() to check if a stream
  is cancelled to avoid calling hidden APIs

Test: run cert tests multiple times
Bug: 148147248
Change-Id: Iea352d4b428b9b57b911576a44f7a91842613fc7

4 years agoRootCanal HAL: Fixed race condition when tearing down rootcanal HAL
Jack He [Wed, 12 Feb 2020 20:39:33 +0000 (12:39 -0800)]
RootCanal HAL: Fixed race condition when tearing down rootcanal HAL

* One race condition exist when incoming_packet_callback_ is being
  reset while an incoming packet is being processed. This is fixed
  by adding a dedicated mutex incoming_packet_callback_mutex_
* Another race condition happen when HciHalHostRootcanal::Stop()
  tries to close the rootcanal FD while incomding_packet_callback
  is trying to read from it

Test: run cert tests multiple times
Bug: 148147248
Change-Id: Ic07374651c5ec38e90e7ddc545ca4fcd4a84cd04

4 years agoCert: Move DUT assignment to common code
Hansong Zhang [Thu, 13 Feb 2020 00:22:14 +0000 (16:22 -0800)]
Cert: Move DUT assignment to common code

Test: run_cert_facade_only.sh
Change-Id: I5ca6fd006294f00e06a4d6b52832a1d64aae8c9f

4 years agoDon't guess transport during pairing
Hansong Zhang [Wed, 12 Feb 2020 22:10:38 +0000 (14:10 -0800)]
Don't guess transport during pairing

Test: pair to AirPods
Bug: 149278864
Change-Id: I689ba0a0966b3f7a2cc2ac9a29ddf694017bfb0b

4 years agoHCI: Set default event mask
Myles Watson [Wed, 12 Feb 2020 16:53:39 +0000 (08:53 -0800)]
HCI: Set default event mask

Bug: 145638034
Test: ./cert/run_cert_facade_only.sh
Change-Id: I6b5df371162222cda4c6219be56cb95611acb3e5

4 years agoFind and capture cover art BIP PSM and send it to Java/JNI
Sal Savage [Fri, 1 Nov 2019 21:12:53 +0000 (14:12 -0700)]
Find and capture cover art BIP PSM and send it to Java/JNI

Bug: b/132812696
Test: Manual, ensure that PSM sent from remote device (indicated by
wireshark traces) matches the one found and communicated up the stack.
Make sure devices that *do not* support cover art do not communicate any
PSM up the stack.
Change-Id: I2d7d7d77b0fb4dc1c2963b8e7499f8291fa31a77

4 years agoAdd cover artwork image handles to requested attributes objects
Sal Savage [Thu, 31 Oct 2019 21:44:05 +0000 (14:44 -0700)]
Add cover artwork image handles to requested attributes objects

Bug: b/132812696
Test: Connect to an AVRCP Target device that supports cover artwork and
make sure metadata contains cover artwork image handles.

Change-Id: Ie9f23d896412479ade7263066b343207e29dca6d

4 years agoFind cover art supported feature and send up to JNI
Sal Savage [Thu, 31 Oct 2019 21:10:46 +0000 (14:10 -0700)]
Find cover art supported feature and send up to JNI

Bug: b/132812696
Test: Connect with a AVRCP Target device that indicates support for
cover art in their 0x311 supported features attribute in their SDP
record. Make sure we report that the device supports cover art in our
object that is sent up to the JNI and Java.

Change-Id: I98beafdf8a803e944abc9b2f8248ae580595f087

4 years agoIndicate support for controller cover art feature in SDP record
Sal Savage [Thu, 31 Oct 2019 20:09:26 +0000 (13:09 -0700)]
Indicate support for controller cover art feature in SDP record

Bug: b/132812696
Test: Inspect SDP record of controller device using linux sdptool --raw
--bdaddr <device-mac> 0x110F and check the 0x0311 attribute for bits 7,
8 and 9 being set to 1, 1, and 0.
Change-Id: I3ae62ff7c65700602004871a35f4513a222353a4

4 years agoMerge "Initialize device_type before use it"
Treehugger Robot [Wed, 12 Feb 2020 21:44:44 +0000 (21:44 +0000)]
Merge "Initialize device_type before use it"

4 years agogd: Add link layer collision hci error code
Chris Manton [Wed, 12 Feb 2020 18:54:32 +0000 (10:54 -0800)]
gd: Add link layer collision hci error code

Seen with pairing with two authentication requests

Bug: 145638034
Test: bluetooth_test_gd

Change-Id: I8af068f9a11a67fae00d4b108082a3208a44d95a

4 years agoPass UI Into Security Manager
Jakub Pawlowski [Wed, 12 Feb 2020 18:19:11 +0000 (19:19 +0100)]
Pass UI Into Security Manager

Currently we have a static UI handler inside SecurityManagerImpl. Have
it passed from upper layers instead, to match what we will need in the
future.

Bug: 142341141
Change-Id: Iabc865a325b53c6455017347ade58ea23dd02a00

4 years agogd: Provide more info for unimplemented link responses
Chris Manton [Wed, 12 Feb 2020 16:45:24 +0000 (08:45 -0800)]
gd: Provide more info for unimplemented link responses

Provide the unimplemented event info as they occur

Bug: 146086425
Test: bluetooth_test_gd
Change-Id: I7b06be303cdb36748304775b9b8554d0c605288b

4 years agoInitialize device_type before use it
Ugo Yu [Wed, 12 Feb 2020 09:04:34 +0000 (17:04 +0800)]
Initialize device_type before use it

We are using the default value of device_type when the transport type
is unkown, initialize it in case we get something weird.

Bug: 149353835
Test: Manual
Change-Id: I56d13fcebdf330356d1214cb095fcd4d5e658ff9

4 years agoMerge "Cert: Use site-packages instead of root"
Treehugger Robot [Wed, 12 Feb 2020 01:34:42 +0000 (01:34 +0000)]
Merge "Cert: Use site-packages instead of root"

4 years agoLE Pairing Handler wiring
Jakub Pawlowski [Mon, 10 Feb 2020 21:29:48 +0000 (22:29 +0100)]
LE Pairing Handler wiring

Test: manual : single pairing with LE device should pass
Bug: 142341141
Change-Id: I4ec096e2d728d4b4caea1f4c4b5ba85cadaea0ae

4 years agoMerge "Increase allowed error in repeating_timer_unittest"
Treehugger Robot [Wed, 12 Feb 2020 00:43:32 +0000 (00:43 +0000)]
Merge "Increase allowed error in repeating_timer_unittest"

4 years agoMerge changes I5acd7ba9,If41d86e9,I4cea9ed3,I30a4ed0b
Treehugger Robot [Wed, 12 Feb 2020 00:39:33 +0000 (00:39 +0000)]
Merge changes I5acd7ba9,If41d86e9,I4cea9ed3,I30a4ed0b

* changes:
  Cert: Always unzip for host tests
  HCI: Add LE AclManager tests
  HCI: Advertise an address with D for DUT
  HCI: Spell COMPLETE_ADVERTISEMENT

4 years agoIncrease allowed error in repeating_timer_unittest
Hansong Zhang [Tue, 11 Feb 2020 22:41:54 +0000 (14:41 -0800)]
Increase allowed error in repeating_timer_unittest

Bug: 147469737
Test: atest bluetooth_test_common
Change-Id: I076192d55835b34300962e450407f8c21109ac1e

4 years agoMerge "DeviceCert: Add timeout for some test cases"
Treehugger Robot [Wed, 12 Feb 2020 00:32:13 +0000 (00:32 +0000)]
Merge "DeviceCert: Add timeout for some test cases"

4 years agoMerge changes I685873b0,Iac3078fa
Treehugger Robot [Tue, 11 Feb 2020 23:25:30 +0000 (23:25 +0000)]
Merge changes I685873b0,Iac3078fa

* changes:
  HF_Client: Send BTA_HF_CLIENT_RFC_CLOSE_EVT when client_cb == NULL
  HF_Client: Free the RFC if the handle doesn't match