OSDN Git Service

android-x86/system-bt.git
6 years agoA2DP: Cleanup UIPC when no active device
Hansong Zhang [Wed, 14 Feb 2018 07:15:46 +0000 (07:15 +0000)]
A2DP: Cleanup UIPC when no active device
am: f88552cdd8

Change-Id: If29bd610e0d1d9c63e1337363b33e8f1160b2ccb

6 years agoA2DP: Cleanup UIPC when no active device
Hansong Zhang [Fri, 2 Feb 2018 02:02:53 +0000 (18:02 -0800)]
A2DP: Cleanup UIPC when no active device

* Modified UIPC to support multiple users
* A2DP now calls UIPC_Close() when it has no active device, and calls
  UIPC_Init() when it has an active device

Bug: 72701090
Test: Carkits with A2DP
Change-Id: Ic1b4b1be2aa01c9896883e3cb2a668d7a43316f9

6 years agoMerge "Add AVRCP Browse packets to the completed packets."
Ajay Panicker [Wed, 14 Feb 2018 04:00:26 +0000 (04:00 +0000)]
Merge "Add AVRCP Browse packets to the completed packets."
am: 37a143f49a

Change-Id: Idcfb9df419b035f7f4a7fe335b4a97bab00db29a

6 years agoMerge "Add AVRCP Browse packets to the completed packets."
Treehugger Robot [Wed, 14 Feb 2018 03:48:51 +0000 (03:48 +0000)]
Merge "Add AVRCP Browse packets to the completed packets."

6 years agoMerge "btif: Remove unused synchronization in event_cleanup_stack"
Manu Viswanadhan [Wed, 14 Feb 2018 03:13:52 +0000 (03:13 +0000)]
Merge "btif: Remove unused synchronization in event_cleanup_stack"
am: 001f5a00b2

Change-Id: I05c6256acc7d5da4cede7bd20fcc0b8e4ff11837

6 years agoMerge "btif: Remove unused synchronization in event_cleanup_stack"
Treehugger Robot [Wed, 14 Feb 2018 03:06:38 +0000 (03:06 +0000)]
Merge "btif: Remove unused synchronization in event_cleanup_stack"

6 years agoMerge "IBluetoothHearingAid.aidl"
Jakub Pawlowski [Wed, 14 Feb 2018 02:27:25 +0000 (02:27 +0000)]
Merge "IBluetoothHearingAid.aidl"
am: 03fa65fc71

Change-Id: Id8bacf4d75ba1b27f1f496bda7095bb75bcb5192

6 years agoMerge "IBluetoothHearingAid.aidl"
Treehugger Robot [Wed, 14 Feb 2018 02:13:41 +0000 (02:13 +0000)]
Merge "IBluetoothHearingAid.aidl"

6 years agoMerge "Adjust buffer length to fit in sdp_copy_raw_data()"
Venkata Jagadeesh Garaga [Wed, 14 Feb 2018 01:33:58 +0000 (01:33 +0000)]
Merge "Adjust buffer length to fit in sdp_copy_raw_data()"
am: 29cb0b048b

Change-Id: Ia41425df56765dd9562f7ba65720751fd705dfc8

6 years agoAdd AVRCP Browse packets to the completed packets.
Ajay Panicker [Tue, 30 Jan 2018 18:36:45 +0000 (10:36 -0800)]
Add AVRCP Browse packets to the completed packets.

Also add class representations for the following packet types:
  AVRCP Browse Packet
    AVRCP Change Path
    AVRCP Get Folder Items
    AVRCP Get Item Attributes
    AVRCP Set Browsed Player
    AVRCP Get Total Number of Items
    AVRCP Play Item

Bug: 68854188
Test: run host native test net_test_packets
Change-Id: I0bc682b11ec9181cfe1ed92678bb869ff3ef5740

6 years agoMerge "Adjust buffer length to fit in sdp_copy_raw_data()"
Treehugger Robot [Wed, 14 Feb 2018 01:20:48 +0000 (01:20 +0000)]
Merge "Adjust buffer length to fit in sdp_copy_raw_data()"

6 years agoFactor out libchrome_support_defaults
Myles Watson [Wed, 14 Feb 2018 01:10:32 +0000 (01:10 +0000)]
Factor out libchrome_support_defaults
am: 65d24fb451

Change-Id: I392d30ac3ee7fb85e4121600b351971da6888508

6 years agobtif: Remove unused synchronization in event_cleanup_stack
Manu Viswanadhan [Fri, 14 Oct 2016 11:35:35 +0000 (17:05 +0530)]
btif: Remove unused synchronization in event_cleanup_stack

Use Case: Repeated BT ON/OFF

Failure: FD leak is observed with ON/OFF stress test
which eventually leads to crash due to unavailability
of FDs.

Steps:
BT ON/OFF

Root Cause: During stack cleanup an unused future
structure is created which is not freed, leading to FD
leak.

Fix: Remove the creation of the future structure

Test: BT ON/OFF
Fixes: 36019324
Change-Id: Id5945da87f00eb7ab77a5f217c95cc43f0136e06

6 years agoIBluetoothHearingAid.aidl
Jakub Pawlowski [Tue, 13 Feb 2018 18:12:00 +0000 (10:12 -0800)]
IBluetoothHearingAid.aidl

Bug: 69623109
Test: Spec was reviewed, tests will be included with client/server implementation
Change-Id: I8c972ac0e4aa908a14893c957ae07dd2244abbfe

6 years agoAdjust buffer length to fit in sdp_copy_raw_data()
Venkata Jagadeesh Garaga [Thu, 15 Sep 2016 10:21:40 +0000 (15:51 +0530)]
Adjust buffer length to fit in sdp_copy_raw_data()

Align copy length with source buffer offset so that copy length will be
in boundary of the allocated buffer size

Test: Manual tested with DECK speaker.
Fixes: 35864526
Change-Id: If1a49e46e2948346226fbc96d7c2b56244cd60cc

6 years agoFactor out libchrome_support_defaults
Myles Watson [Tue, 13 Feb 2018 18:33:54 +0000 (10:33 -0800)]
Factor out libchrome_support_defaults

Disable Mac support for host binaries in one place, since
the dependency is based on libchrome support.

Test: build
Change-Id: I6641e18deffdff5205da181ad97e8b2892073a8f

6 years agoMerge "Remove libbluetooth-system requirement."
Steven Moreland [Tue, 13 Feb 2018 17:49:49 +0000 (17:49 +0000)]
Merge "Remove libbluetooth-system requirement."
am: a45d385323

Change-Id: I7e93d58e493338a6bbd01d68ad5c9aedd05107c9

6 years agoMerge "Remove libbluetooth-system requirement."
Treehugger Robot [Tue, 13 Feb 2018 17:34:05 +0000 (17:34 +0000)]
Merge "Remove libbluetooth-system requirement."

6 years agoAdd more details in native Bluetooth debug logs
Stanley Tng [Tue, 13 Feb 2018 16:54:26 +0000 (16:54 +0000)]
Add more details in native Bluetooth debug logs
am: 273ffd858e

Change-Id: I3a1ab4082b78e319ed71468ce655afffc9123e0e

6 years agoMake loghex properly count numer length
Jakub Pawlowski [Tue, 13 Feb 2018 16:54:20 +0000 (16:54 +0000)]
Make loghex properly count numer length
am: 78b3e7b303

Change-Id: I303112998d7629c8a26a698c548b80bad58157fd

6 years agoAdd more details in native Bluetooth debug logs
Stanley Tng [Thu, 8 Feb 2018 20:26:51 +0000 (12:26 -0800)]
Add more details in native Bluetooth debug logs

As part of debugging a security/pairing issue, these logs are modified
to give better debug information.

Test: compiled
Bug: 71364658
Change-Id: I742cc7dda0afc6350e881c22d03bdc1c69d37d88

6 years agoMake loghex properly count numer length
Jakub Pawlowski [Mon, 12 Feb 2018 21:18:33 +0000 (13:18 -0800)]
Make loghex properly count numer length

Test: manual logs observation
Change-Id: I7ea8d4afa5ea980f11067a8dd920a1735cf28993

6 years agoRemove libbluetooth-system requirement.
Steven Moreland [Mon, 12 Feb 2018 22:40:07 +0000 (14:40 -0800)]
Remove libbluetooth-system requirement.

This module doesn't exist and it being missing was
silently ignored.

Bug: 7456955
Test: no longer receive an error for this.
Change-Id: Ib84b592d25e19b2c6b0d20466015553fe57f5bf8

6 years agoAVRCP: Don't fail in set_volume on disconnected devices
Ajay Panicker [Mon, 12 Feb 2018 20:21:05 +0000 (20:21 +0000)]
AVRCP: Don't fail in set_volume on disconnected devices
am: a7b668b6bc

Change-Id: I4083a6d60f506e1bc7bf882ad97cc39af7796ea1

6 years agoAVRCP: Don't fail in set_volume on disconnected devices
Ajay Panicker [Sat, 10 Feb 2018 02:42:56 +0000 (18:42 -0800)]
AVRCP: Don't fail in set_volume on disconnected devices

Test: Change the volume on a headset with absolute volume
Bug: 72987704
Change-Id: Ia1acd28c51707e7b71e47140aaded0298ba4e8aa

6 years agoMerge "Build: Remove DCHECK_ALWAYS_ON flag"
Jack He [Sat, 10 Feb 2018 02:03:05 +0000 (02:03 +0000)]
Merge "Build: Remove DCHECK_ALWAYS_ON flag"
am: 51c084e434

Change-Id: Ia3fe3df2c4344d46844df275353668699dc029de

6 years agoMerge "Build: Remove DCHECK_ALWAYS_ON flag"
Treehugger Robot [Sat, 10 Feb 2018 00:28:54 +0000 (00:28 +0000)]
Merge "Build: Remove DCHECK_ALWAYS_ON flag"

6 years agoMerge "A2DP: Construct BtWorkerThread's message loop on designated thread"
Jack He [Sat, 10 Feb 2018 00:03:21 +0000 (00:03 +0000)]
Merge "A2DP: Construct BtWorkerThread's message loop on designated thread"
am: 199bf77055

Change-Id: Iada4a606411d0811bc60b3fc2cd63ef54e2bcb16

6 years agoMerge "A2DP: Construct BtWorkerThread's message loop on designated thread"
Treehugger Robot [Fri, 9 Feb 2018 22:14:27 +0000 (22:14 +0000)]
Merge "A2DP: Construct BtWorkerThread's message loop on designated thread"

6 years agoBuild: Remove DCHECK_ALWAYS_ON flag
Jack He [Fri, 9 Feb 2018 11:02:46 +0000 (03:02 -0800)]
Build: Remove DCHECK_ALWAYS_ON flag

* According to libchrome documentation, DCHECK_ALWAYS_ON must be set or
  unset on both our library and libchrome. Flag mis-match may cause
  hard-to-debug segfaults which we experience when using base::Thread

Change-Id: If3740196340b02d2d0bb41e08f0b551d47f49864
Fixes: 73147157
Test: make

6 years agoA2DP: Construct BtWorkerThread's message loop on designated thread
Jack He [Thu, 8 Feb 2018 01:33:16 +0000 (17:33 -0800)]
A2DP: Construct BtWorkerThread's message loop on designated thread

* Moves BtWorkerThread's message_loop_'s construction to the
  Run() method run by the designated message_loop_thread_ so that
  message_loop_'s construction and execution are on the same thread
* Makes BtWorkerThread::StartUp() blocking until message_loop_
  starts running using std:condition_variable
* Modify BtWorkerThread::DoInThread() to return boolean

Detail:

Before this CL, BtWorkerThread.message_loop_ is created on Java main
thread and run on message_loop_thread_. During clean-up, A2DP shutdown
message_loop_thread_, rendering the posted_from field in current_pending_task_
invalid. However, although the runner thread is killed, the owner
thread, the Java main thread, is still active. Therefore, we we try to
PostTask() from Java main thread after message_loop_thread_ is killed,
we will try to access an invalid Location object. This results in a
SEGV_MAPPER SEGFAULT. Thus, the fix would be creating and running the
message loop on the same thread so that Java main thread won't have an
invalid message loop after the worker thread is killed.

This can be detected earlier through adding "-DDCHECK_ALWAYS_ON" in both
libchrome and libbluetooth and libchrome will validate the thread for
us.

Fixes: 72831931
Test: Test with DCHECK_ALWAYS_ON in both libbluetooth and libchrome
      ProfileServiceTest stress tests

Change-Id: I7b196b8c1113c2758c2b82ddf4d13c46352bb620

6 years agoMerge "Prevent spurious connect failures callback"
Stanley Tng [Fri, 9 Feb 2018 04:35:55 +0000 (04:35 +0000)]
Merge "Prevent spurious connect failures callback"
am: 29ff71470e

Change-Id: If8b053eaf419f3f44fcb8877f1e0a49f028d43cf

6 years agoMerge "Prevent spurious connect failures callback"
Treehugger Robot [Fri, 9 Feb 2018 04:19:31 +0000 (04:19 +0000)]
Merge "Prevent spurious connect failures callback"

6 years agobtif_rc - make set_volume easier to comprehend
Jakub Pawlowski [Thu, 8 Feb 2018 20:44:14 +0000 (20:44 +0000)]
btif_rc - make set_volume easier to comprehend
am: 884314c1d9

Change-Id: I71e44ac5ba5bd2762228a87bb6c61c5fb5f824d9

6 years agobtif_rc - make set_volume easier to comprehend
Jakub Pawlowski [Thu, 8 Feb 2018 18:26:35 +0000 (10:26 -0800)]
btif_rc - make set_volume easier to comprehend

Test: compilation
Change-Id: I73c01cb5e3a2da1cdb9acc3b7fe3114f4af7373e

6 years agoPrevent spurious connect failures callback
Stanley Tng [Thu, 8 Feb 2018 01:59:04 +0000 (17:59 -0800)]
Prevent spurious connect failures callback

Send connection failures only if the event's mac address matches the
currently bonding device.

Test: Run SL4A "BleCocTest:test_coc_secured_connection_throughput"
Bug: 71364658
Change-Id: I64243996ae37dd376ed36363a7d749b4b5ab36b2

6 years agoMerge "Make sure task_runner is valid when we call PostTask on it"
Jakub Pawlowski [Thu, 8 Feb 2018 05:11:33 +0000 (05:11 +0000)]
Merge "Make sure task_runner is valid when we call PostTask on it"
am: c0df1edbf1

Change-Id: Ic38745138958a7e9c5d58a6e81742deb101c5d43

6 years agoMerge "Make sure task_runner is valid when we call PostTask on it"
Treehugger Robot [Thu, 8 Feb 2018 05:02:48 +0000 (05:02 +0000)]
Merge "Make sure task_runner is valid when we call PostTask on it"

6 years agoCall BTA_GATTS_AddService on correct thread
Jakub Pawlowski [Thu, 8 Feb 2018 02:29:01 +0000 (02:29 +0000)]
Call BTA_GATTS_AddService on correct thread
am: 541862ce72

Change-Id: I40487af3885e01b95fddb9f8260992e5995c11b2

6 years agoCall BTA_GATTS_AddService on correct thread
Jakub Pawlowski [Wed, 7 Feb 2018 19:37:18 +0000 (11:37 -0800)]
Call BTA_GATTS_AddService on correct thread

Right now BTA_GATTS_AddService is incorrectly called on btif thread.
This might lead to situations where it is executed while bta thread is
already cleaning up, and deleted the control blocks, resulting in crashes.
From now on, execute it on bta thread. This ensures that it is executed
before control blocks are freed.

Test: sl4a GattClientTest
Bug: 73054849
Change-Id: Ie2bf80414bceba2590c21d3825c78fbb58449520

6 years agoMake sure task_runner is valid when we call PostTask on it
Jakub Pawlowski [Wed, 7 Feb 2018 02:50:10 +0000 (18:50 -0800)]
Make sure task_runner is valid when we call PostTask on it

Test: runtest -j32 bluetooth -c com.android.bluetooth.btservice.ProfileServiceTest
Change-Id: I89426f7eb1204af9def0fa927dfeef1d5aec689f

6 years agoHBS1098 Paring failure after connection with Car-Audio
Srinu Jella [Wed, 7 Feb 2018 01:26:13 +0000 (01:26 +0000)]
HBS1098 Paring failure after connection with Car-Audio
am: 0c0d2975d7

Change-Id: Iee1c51c7581f2236788eab88f74912ba47ebc3ab

6 years agoHBS1098 Paring failure after connection with Car-Audio
Srinu Jella [Fri, 24 Feb 2017 04:31:32 +0000 (10:01 +0530)]
HBS1098 Paring failure after connection with Car-Audio

Use Case: HBS1100 Paring failure after connection with Car-Audio

Steps:
1. Establish connection with Volkswagen CK, and then playback music
2. Try to pair with HBS-1100

Failure: DUT going for temporary pairing with HBS1100 when request received
while remote name is not present

Root Cause: As auth_req is not handled properly in bta_dm_pinname_cback during
RNR, auth_req variable got reset and DUT is going for temporary pairing.

Fix: local and remote auth_req and local and remote IO capabilities stored and
retained in call backs properly.

Test: Manually tested

Fixes: 35735338

Change-Id: I83382aac9fc1197d7fb31feedbd0fe3b35de87e8

6 years agoMerge changes from topic "coc-test-increase-data-len"
Stanley Tng [Tue, 6 Feb 2018 03:07:54 +0000 (03:07 +0000)]
Merge changes from topic "coc-test-increase-data-len"
am: b46c3bf557

Change-Id: Ic9340baf7dde702a26e954395acf5e64314d1b5d

6 years agoLE Read Maximum Data Length during startup
Jakub Pawlowski [Tue, 6 Feb 2018 03:07:20 +0000 (03:07 +0000)]
LE Read Maximum Data Length during startup
am: 4f0c5b5838

Change-Id: If6d467f483132101f649e4ebdb1d26434b74ca12

6 years agoMerge changes from topic "coc-test-increase-data-len"
Stanley Tng [Tue, 6 Feb 2018 01:02:33 +0000 (01:02 +0000)]
Merge changes from topic "coc-test-increase-data-len"

* changes:
  Add function to change LE Tx Data Length
  LE Read Maximum Data Length during startup

6 years agoUnify logging in btif_sock_l2cap.cc
Jakub Pawlowski [Mon, 5 Feb 2018 18:37:50 +0000 (18:37 +0000)]
Unify logging in btif_sock_l2cap.cc
am: 35ee023655

Change-Id: If90184c2211b7b3ce1bd405611bb83f929b6274a

6 years agoAdd function to change LE Tx Data Length
Stanley Tng [Tue, 23 Jan 2018 01:08:03 +0000 (17:08 -0800)]
Add function to change LE Tx Data Length

As part of new SL4A tests for LE CoC to measure data throughput, this
commit adds a function to modify the LE Tx Data Length parameter to its
maximum.

Test: Ran the new ACTS Tests for LE CoC; BtCocTest and BtCoc2ConnTest
Bug: 70683224
Change-Id: I06d3f95a339dcdc310a18bcf17fbca8623f849d6

6 years agoLE Read Maximum Data Length during startup
Jakub Pawlowski [Sat, 3 Feb 2018 06:05:11 +0000 (22:05 -0800)]
LE Read Maximum Data Length during startup

Test: verified in sl4a test for LE CoC throughput
Bug: 68359837
Change-Id: Ie424fef50f6f355d2919d9304bd062e4604c3341

6 years agoUnify logging in btif_sock_l2cap.cc
Jakub Pawlowski [Fri, 2 Feb 2018 19:47:09 +0000 (11:47 -0800)]
Unify logging in btif_sock_l2cap.cc

Test: compilation
Bug: 68359837
Change-Id: I71edd3d04734471b6cd586c323aa6b335f903fae

6 years agoRemove Mac host libraries build depending on libchrome.
Hidehiko Abe [Mon, 5 Feb 2018 10:36:11 +0000 (10:36 +0000)]
Remove Mac host libraries build depending on libchrome.
am: 30aa9c9447

Change-Id: I6b5463133e13ff3ac05141cdd0a70227ce3bd8de

6 years agoRemove Mac host libraries build depending on libchrome.
Hidehiko Abe [Wed, 31 Jan 2018 07:59:18 +0000 (16:59 +0900)]
Remove Mac host libraries build depending on libchrome.

Libchrome will drop the support for Mac host.
This is the preparation.

Bug: 72618679
Test: Built on Mac.
Change-Id: I37982210a1da74d56c1da3227c5887685cd8b6cb

6 years agoMerge "Add function to update LE connection parameters"
Stanley Tng [Sat, 3 Feb 2018 04:10:54 +0000 (04:10 +0000)]
Merge "Add function to update LE connection parameters"
am: 2fc4777ff1

Change-Id: I323c50150dc691d12ffd80233238490d2d1346c9

6 years agoMerge "Add function to update LE connection parameters"
Stanley Tng [Sat, 3 Feb 2018 01:36:03 +0000 (01:36 +0000)]
Merge "Add function to update LE connection parameters"

6 years agoMaximize L2CAP socket MTU
Jakub Pawlowski [Sat, 3 Feb 2018 01:21:04 +0000 (01:21 +0000)]
Maximize L2CAP socket MTU
am: 622bd222e4

Change-Id: Ia1a74b45b0fdea696c17ff23b39503627aac262a

6 years agoBTA_JvL2capConnect simplification
Jakub Pawlowski [Fri, 2 Feb 2018 22:04:26 +0000 (22:04 +0000)]
BTA_JvL2capConnect simplification
am: 3538b64d97

Change-Id: I0ac5d16c8bab410f2fb6d2ca99811ae2d2768e31

6 years agoSimplify btSock_start_l2cap_server_l
Jakub Pawlowski [Fri, 2 Feb 2018 22:04:18 +0000 (22:04 +0000)]
Simplify btSock_start_l2cap_server_l
am: e5e2dd556b

Change-Id: I0e6757ebdfb4b85cfaa60285960c70b82f669044

6 years agoAdd function to update LE connection parameters
Stanley Tng [Thu, 4 Jan 2018 23:49:35 +0000 (15:49 -0800)]
Add function to update LE connection parameters

As part of new SL4A tests for LE CoC to measure data throughput
performance, this commit will add a function to enable the CoC Facade
to modify the LE Connection Parameters especially the Connection
Intervals. Also, add some debug logs.

Test: Ran the new ACTS Tests for LE CoC
Bug: 70683224
Change-Id: If7665cf70a18756a58556c60cb9ce2a587ae691f

6 years agoMaximize L2CAP socket MTU
Jakub Pawlowski [Tue, 30 Jan 2018 23:40:03 +0000 (15:40 -0800)]
Maximize L2CAP socket MTU

Introduce L2CAP_SDU_LENGTH_LE_MAX constant, and use it for LE CoC
sockets, while still keeping the old value for Classic sockets.

This also require change in how we send the rx_mtu up the stack - it
must be read from the socket property.

Additionally in this patch, l2cap_socket.mtu is renamed to tx_mtu to
distinguish it from rx_mtu. Assignment of this variable is also added
when we receive it from the remote.

Bug: 68359837
Test: tranfer file using OPP, do obex, run LE CoC tests. Run tests
between device with this patch, and older android phones.
Change-Id: Iffa20a6c6a93d5787bada7bf28655e9880d8c1a0

6 years agoBTA_JvL2capConnect simplification
Jakub Pawlowski [Wed, 31 Jan 2018 06:35:11 +0000 (22:35 -0800)]
BTA_JvL2capConnect simplification

Test: manual
Change-Id: I18ac5ac451490e0d3c0c9fc5daa9f8d64ff19bd5

6 years agoSimplify btSock_start_l2cap_server_l
Jakub Pawlowski [Wed, 31 Jan 2018 05:46:08 +0000 (21:46 -0800)]
Simplify btSock_start_l2cap_server_l

Test: run OPP, chekc LE CoC
Change-Id: I4091ea8065ba913966fcd14495b90b2c565fdba3

6 years agoMerge changes I00560443,I2e39bd31
Jakub Pawlowski [Fri, 2 Feb 2018 06:54:26 +0000 (06:54 +0000)]
Merge changes I00560443,I2e39bd31
am: 70a0c9e436

Change-Id: Ib9a6ab8b75066a0b73dc3d1f39312ca0ed3905b9

6 years agoMerge changes I00560443,I2e39bd31
Treehugger Robot [Fri, 2 Feb 2018 05:00:19 +0000 (05:00 +0000)]
Merge changes I00560443,I2e39bd31

* changes:
  Stricter check of the MTU size in the BTIF L2CAP socket
  Fix naming error in btif l2cap MPS -> MTU

6 years agoMerge "Add more checks to LE Connection Parameters"
Stanley Tng [Fri, 2 Feb 2018 04:00:16 +0000 (04:00 +0000)]
Merge "Add more checks to LE Connection Parameters"
am: 85807ed9b6

Change-Id: I4ac8135b166abc3d49c0ed4f224b6da79021bba0

6 years agoMerge "Metrics: Dump native metrics to Java as std:string"
Jack He [Fri, 2 Feb 2018 03:51:47 +0000 (03:51 +0000)]
Merge "Metrics: Dump native metrics to Java as std:string"
am: a53c929550

Change-Id: Iafc3fc2b7aa484539961210e6bbf094594cf5367

6 years agoMerge "Minimize amount of Flow Control packets for L2CAP CoC"
Jakub Pawlowski [Fri, 2 Feb 2018 03:51:07 +0000 (03:51 +0000)]
Merge "Minimize amount of Flow Control packets for L2CAP CoC"
am: f262cb9f93

Change-Id: I4a0d546d06a53e98977982a179e4687ab0a5e9aa

6 years agoMerge "PDU data lengty computation fix"
Jakub Pawlowski [Fri, 2 Feb 2018 03:50:51 +0000 (03:50 +0000)]
Merge "PDU data lengty computation fix"
am: edde455514

Change-Id: I620a686465baca6f0ef65ff211a459076bca1b3d

6 years agoMerge "Add more checks to LE Connection Parameters"
Treehugger Robot [Fri, 2 Feb 2018 01:41:53 +0000 (01:41 +0000)]
Merge "Add more checks to LE Connection Parameters"

6 years agoMerge "Metrics: Dump native metrics to Java as std:string"
Treehugger Robot [Fri, 2 Feb 2018 00:23:42 +0000 (00:23 +0000)]
Merge "Metrics: Dump native metrics to Java as std:string"

6 years agoStricter check of the MTU size in the BTIF L2CAP socket
Jakub Pawlowski [Wed, 31 Jan 2018 03:45:35 +0000 (19:45 -0800)]
Stricter check of the MTU size in the BTIF L2CAP socket

Test: manual
Bug: 68359837
Change-Id: I0056044388f8886f704a9ff2f30db09b3110d143

6 years agoFix naming error in btif l2cap MPS -> MTU
Jakub Pawlowski [Wed, 31 Jan 2018 03:39:52 +0000 (19:39 -0800)]
Fix naming error in btif l2cap MPS -> MTU

BTIF layer uses only MTU, maximum size of SDU, to do computations around
sizes. This error was introduced earlier during refactor.

Test: compilation
Bug: 68359837
Change-Id: I2e39bd31ce712d22f43e3059b6e1c73ef7b0fee7

6 years agoAdd more checks to LE Connection Parameters
Stanley Tng [Thu, 1 Feb 2018 21:21:24 +0000 (13:21 -0800)]
Add more checks to LE Connection Parameters

This part of code is missing the necessary LE Connection Parameters
checks.

Test: Tested on R.A.T. LE mouse
Bug: 70683224
Change-Id: I966a3dd4fd2fa9dc54109872df3d4c43d34f0156

6 years agoMerge "Minimize amount of Flow Control packets for L2CAP CoC"
Treehugger Robot [Thu, 1 Feb 2018 21:19:47 +0000 (21:19 +0000)]
Merge "Minimize amount of Flow Control packets for L2CAP CoC"

6 years agoMerge "PDU data lengty computation fix"
Treehugger Robot [Thu, 1 Feb 2018 20:02:05 +0000 (20:02 +0000)]
Merge "PDU data lengty computation fix"

6 years agoMetrics: Dump native metrics to Java as std:string
Jack He [Thu, 1 Feb 2018 00:51:26 +0000 (16:51 -0800)]
Metrics: Dump native metrics to Java as std:string

* Dump metrics to Java layer as std::string instead of going through a
  file descriptor so that Java layer can process metrics data directly
* Add new method dumpMetrics(std::string*)

Bug: 33693818
Test: adb shell dumpsys bluetooth_manager --proto-bin
      SL4A metrics tests: BtMetricsTest, BtFunhausMetricsTest
Change-Id: I67883c1371862d7e4ff33cec01d710d2d8f274c9

6 years agoPDU data lengty computation fix
Jakub Pawlowski [Thu, 1 Feb 2018 18:03:37 +0000 (10:03 -0800)]
PDU data lengty computation fix

PDU data must also account for PDU length and Channel ID fields.
Otherwise each PDU is split into 2 BB packets, decreasing the link
speed.

Test: manual data transimssion test.
Change-Id: I026bf0e32c58eec620b5c55d748ecd81fa3ea67b

6 years agoMerge "Set pending_discovery when doing GATT over BR/EDR"
Jakub Pawlowski [Thu, 1 Feb 2018 03:36:46 +0000 (03:36 +0000)]
Merge "Set pending_discovery when doing GATT over BR/EDR"
am: 023f79e8ce

Change-Id: Ica7a4ed260edc7c8176ab7fccd5965bb2eea55a2

6 years agoMerge "Set pending_discovery when doing GATT over BR/EDR"
Treehugger Robot [Wed, 31 Jan 2018 22:49:28 +0000 (22:49 +0000)]
Merge "Set pending_discovery when doing GATT over BR/EDR"

6 years agoMinimize amount of Flow Control packets for L2CAP CoC
Jakub Pawlowski [Thu, 4 Jan 2018 13:06:21 +0000 (05:06 -0800)]
Minimize amount of Flow Control packets for L2CAP CoC

In order to not waste bandwidth on Flow Control packets with credits:
1. Set Initial Credits in the connect request/response to the maximum value
2. Send credits only when the remote has less than 64 of them left,
   increasing the value back to maximum.

Bug: 68359837
Test: observe data flow in btsnoop log
Change-Id: I34e1fecc55422b34df0b1e82bb2b402eb06620bd

6 years agoBUILD: Fix broken build for test-vendor_test_host
Jack He [Wed, 31 Jan 2018 21:33:53 +0000 (21:33 +0000)]
BUILD: Fix broken build for test-vendor_test_host
am: bc94521056

Change-Id: I9b4044f7b3faa54740b7cc089c26bb131c46543b

6 years agoBUILD: Fix broken build for test-vendor_test_host
Jack He [Wed, 31 Jan 2018 21:02:12 +0000 (13:02 -0800)]
BUILD: Fix broken build for test-vendor_test_host

* Disable darwin build for test-vendor_test_host explicitly as
  it does not use "fluoride_defaults" in its build configuration.

Bug: 72618679
Test: make
Change-Id: Ia81bf705ad248e129df69c14e385ced118c6df58

6 years agoMerge "BUILD: Disable build for mac-host target"
Jack He [Wed, 31 Jan 2018 20:06:53 +0000 (20:06 +0000)]
Merge "BUILD: Disable build for mac-host target"
am: 61f4003e52

Change-Id: I7fbad3751db03d69edeea6a4085cdedc58bb4002

6 years agoMerge "BUILD: Disable build for mac-host target"
Treehugger Robot [Wed, 31 Jan 2018 20:01:39 +0000 (20:01 +0000)]
Merge "BUILD: Disable build for mac-host target"

6 years agoBUILD: Disable build for mac-host target
Jack He [Tue, 30 Jan 2018 22:35:20 +0000 (14:35 -0800)]
BUILD: Disable build for mac-host target

* Move disable darwin (mac) options to "fluoride_defaults".
* mac-host target is disabled across fluoride, but developer can still
  build for non-mac targets on a mac host.
* Remove vendor_libs/Android.mk that is no longer used.

Bug: 72618679
Test: make
Change-Id: Ibad9fad3df169e9c4e418a4511c42066fcb10fdc

6 years agoSet pending_discovery when doing GATT over BR/EDR
Jakub Pawlowski [Wed, 31 Jan 2018 19:49:59 +0000 (11:49 -0800)]
Set pending_discovery when doing GATT over BR/EDR

SDP discovery can return services before LE discovery, or after LE
discovery is already done. In both cases, pending_discover is not a
valid pointer, and must be set before call to bta_gattc_explore_srvc

Test: sl4a GattOverBrEdr
Change-Id: I2b43d2348edfa641c56a8085a92b6367b146030d

6 years agoGet rid of L2CAP_MAX_BUF_SIZE, use variable-size buffers instead
Jakub Pawlowski [Tue, 30 Jan 2018 23:05:43 +0000 (23:05 +0000)]
Get rid of L2CAP_MAX_BUF_SIZE, use variable-size buffers instead
am: f47bfde2ed

Change-Id: Icb7dc81a1a476705984e33c171d8d1b577bd03e6

6 years agoGet rid of L2CAP_MAX_BUF_SIZE, use variable-size buffers instead
Jakub Pawlowski [Mon, 29 Jan 2018 21:54:24 +0000 (13:54 -0800)]
Get rid of L2CAP_MAX_BUF_SIZE, use variable-size buffers instead

This is step towards increasing L2CAP_MAX_SDU_LENGTH value.

Test: transfer file using OPP, send data using CoC
Bug: 68359837
Change-Id: Ia4fb6b2325cb92db9c90c6a4d2ab17f271640ea8

6 years agoPacket: Disable host tests for Mac
Myles Watson [Tue, 30 Jan 2018 19:45:45 +0000 (19:45 +0000)]
Packet: Disable host tests for Mac
am: bf101fa2c5

Change-Id: I7cbd2e2b811cf95e813428029b1c00a440852b08

6 years agoPacket: Disable host tests for Mac
Myles Watson [Tue, 30 Jan 2018 17:15:16 +0000 (09:15 -0800)]
Packet: Disable host tests for Mac

Bug: 72618679
Test: Build on Mac
Change-Id: I85c1412b86a1fbbab01491a755be9bc2b8241d50

6 years agoMerge "Drops unittest build on Mac host."
Hidehiko Abe [Tue, 30 Jan 2018 15:46:32 +0000 (15:46 +0000)]
Merge "Drops unittest build on Mac host."
am: 2706fc2cd5

Change-Id: I62ee4f02dd8b3481420582e15f7048597b2271f6

6 years agoMerge "Drops unittest build on Mac host."
Treehugger Robot [Tue, 30 Jan 2018 15:37:46 +0000 (15:37 +0000)]
Merge "Drops unittest build on Mac host."

6 years agoAdd Packet class as alternative to BT_HDR
Ajay Panicker [Tue, 30 Jan 2018 03:49:34 +0000 (03:49 +0000)]
Add Packet class as alternative to BT_HDR
am: 341ab2befa

Change-Id: If25a3b85486b871b99919429d37efc265a0b601c

6 years agoAdd Packet class as alternative to BT_HDR
Ajay Panicker [Wed, 3 Jan 2018 22:23:44 +0000 (14:23 -0800)]
Add Packet class as alternative to BT_HDR

Adds Packets, Iterators, and Packet Builders to Bluetooth to be used as
an alternative to BT_HDR.

 - Packet is a base class used to pass around data. It is intended to be
   immutable after creation and subclasses will implement all required
   functions and their own accessor methods to retrieve data.

 - Iterator provides a convienent way to traverse packet data.

 - PacketBuilder is used to construct Packets. This class is should be
   the only way to mutate packet objects.

Also add class representations for the following packet types:
  AVRCP (Base Packet)
    AVRCP Vendor Packet
      AVRCP Get Capabilities Packet
      AVRCP Get Element Attributes Packet
      AVRCP Register Notification Packet
      AVRCP Get Play Status Packet
      AVRCP Reject Packet
    AVRCP Pass Through Packet

Adds net_test_btpackets to run_host_unit_tests.py for pre-submit

Bug: 68854188
Test: run host native test net_test_packets
Change-Id: I0d385710178e5feb2d5089847580754ad6308709

6 years agoDrops unittest build on Mac host.
Hidehiko Abe [Mon, 29 Jan 2018 06:43:47 +0000 (15:43 +0900)]
Drops unittest build on Mac host.

Bug: 72618679
Test: Built on Mac.
Change-Id: If6e2f8cf39cd80e80a419fbbed0ce34931ede915

6 years agoReport LE CoC credits to GAP clients
Jakub Pawlowski [Sat, 27 Jan 2018 16:07:34 +0000 (16:07 +0000)]
Report LE CoC credits to GAP clients
am: b9c95d5a61

Change-Id: I28db97500b79b8e4d90ab31334310deb2779c158

6 years agoReport LE CoC credits to GAP clients
Jakub Pawlowski [Sat, 27 Jan 2018 01:18:52 +0000 (17:18 -0800)]
Report LE CoC credits to GAP clients

Test: manual with HA
Change-Id: Ic4552b05b6e6c7dad5311e0b893da3166bf1895c

6 years agoMerge "Report credit count change, when credits are received for LE CoC"
Jakub Pawlowski [Sat, 27 Jan 2018 04:13:08 +0000 (04:13 +0000)]
Merge "Report credit count change, when credits are received for LE CoC"
am: f6f158713a

Change-Id: I6bc20a0b10414c9e73333bce9e550e8b32390d74

6 years agoMerge "Report credit count change, when credits are received for LE CoC"
Treehugger Robot [Sat, 27 Jan 2018 04:08:05 +0000 (04:08 +0000)]
Merge "Report credit count change, when credits are received for LE CoC"

6 years agoMerge "HFP: Fix NPE in error logging for voice recognition events"
Jack He [Sat, 27 Jan 2018 03:50:17 +0000 (03:50 +0000)]
Merge "HFP: Fix NPE in error logging for voice recognition events"
am: 7676c7df90

Change-Id: I03f15ceda56a53616ec514fc46419288a624cdf3

6 years agoMerge "HFP: Fix NPE in error logging for voice recognition events"
Treehugger Robot [Sat, 27 Jan 2018 03:44:34 +0000 (03:44 +0000)]
Merge "HFP: Fix NPE in error logging for voice recognition events"