OSDN Git Service

android-x86/system-bt.git
7 years agotest_vendor: Refactor test channel
Myles Watson [Tue, 6 Sep 2016 19:41:09 +0000 (19:41 +0000)]
test_vendor: Refactor test channel
am: e3ab96a689

Change-Id: Ib7c83ff478b40244038faf52c91c0f18496957cc

7 years agotest_vendor: Refactor test channel
Myles Watson [Fri, 20 May 2016 19:06:19 +0000 (12:06 -0700)]
test_vendor: Refactor test channel

The test channel can always be enabled when using the AsyncManager.
 - Remove enabled_ and port_
 - Allow multiple connections
 - Pass file descriptors as parameters instead of private variables
 - Add a clean up function to the Test Channel
 - Add a static class in bt_vendor.cc and always EXPORT the entry point
 - Move the vendor callbacks and the global pointer to the vendor
   manager object from vendor_manager to bt_vendor

Change-Id: I3e0dee846eb89f434893603a705c2b13219272be
Signed-off-by: Myles Watson <mylesgw@google.com>
Signed-off-by: Jorge E. Moreira <jemoreira@google.com>
7 years agoMerge "gatt_db: Fix uuid_to_str for UUID_32"
Greg Kaiser [Sat, 3 Sep 2016 13:14:09 +0000 (13:14 +0000)]
Merge "gatt_db: Fix uuid_to_str for UUID_32"
am: b4f8b75e88

Change-Id: I0ddbf8e4dfe0010786334a722c7938b031e710c1

7 years agoMerge "gatt_db: Fix uuid_to_str for UUID_32"
Treehugger Robot [Sat, 3 Sep 2016 13:09:30 +0000 (13:09 +0000)]
Merge "gatt_db: Fix uuid_to_str for UUID_32"

7 years agoMerge "Deregister from notifications when an HOGP background connection is cancelled"
IHLHO KIM [Sat, 3 Sep 2016 05:00:42 +0000 (05:00 +0000)]
Merge "Deregister from notifications when an HOGP background connection is cancelled"
am: 629f814b9a

Change-Id: Ia0ad02b5b43f5f2ccadbd082f53a3c7a72dd19f1

7 years agoMerge "Deregister from notifications when an HOGP background connection is cancelled"
Treehugger Robot [Sat, 3 Sep 2016 04:55:53 +0000 (04:55 +0000)]
Merge "Deregister from notifications when an HOGP background connection is cancelled"

7 years agogatt_db: Fix uuid_to_str for UUID_32
Greg Kaiser [Sat, 3 Sep 2016 00:34:32 +0000 (17:34 -0700)]
gatt_db: Fix uuid_to_str for UUID_32

A typo in a conditional had us treating LEN_UUID_32 as
an unknown length in this function.

Change-Id: Iec0190fd70859d9b72295e91798af5fdc4dfae93

7 years agoMerge "AVRCP 1.6: media browsing support on Target(1/3)"
Ajay Panicker [Fri, 2 Sep 2016 20:49:35 +0000 (20:49 +0000)]
Merge "AVRCP 1.6: media browsing support on Target(1/3)"
am: 6d488f5272

Change-Id: If9a2b360f190a1799499a71e0ab0429180b8c348

7 years agoMerge "AVRCP 1.6: media browsing support on Target(1/3)"
Ajay Panicker [Fri, 2 Sep 2016 20:46:00 +0000 (20:46 +0000)]
Merge "AVRCP 1.6: media browsing support on Target(1/3)"

7 years agoDeregister from notifications when an HOGP background connection is cancelled
IHLHO KIM [Tue, 16 Aug 2016 08:55:47 +0000 (08:55 +0000)]
Deregister from notifications when an HOGP background connection is cancelled

Bug: 29111689
Change-Id: I5b57da9e08dea372e9b236b360ffeeae4f6b49af

7 years agoMerge "Remove BTA layer components for LE advertising"
Jakub Pawlowski [Fri, 2 Sep 2016 20:26:27 +0000 (20:26 +0000)]
Merge "Remove BTA layer components for LE advertising"
am: ee1e3df872

Change-Id: I6c397d8b87dafc8ba8067e8694a77506e9218a72

7 years agotest_vendor: Add BtAddress unit tests
Myles Watson [Fri, 2 Sep 2016 20:26:25 +0000 (20:26 +0000)]
test_vendor: Add BtAddress unit tests
am: b3a80b682f

Change-Id: Iab8e73b89459a701ebec1cbc3df83f7f6a3ee0c3

7 years agotest_vendor: Add a BtAddress class
Myles Watson [Fri, 2 Sep 2016 20:26:22 +0000 (20:26 +0000)]
test_vendor: Add a BtAddress class
am: 6f8593ec98

Change-Id: I07cfa4b9156807c0d3d20a90eca547ad022c6dbf

7 years agoMerge "Remove BTA layer components for LE advertising"
Jakub Pawlowski [Fri, 2 Sep 2016 20:09:27 +0000 (20:09 +0000)]
Merge "Remove BTA layer components for LE advertising"

7 years agoAVRCP 1.6: media browsing support on Target(1/3)
Avish Shah [Wed, 22 Jun 2016 01:17:20 +0000 (06:47 +0530)]
AVRCP 1.6: media browsing support on Target(1/3)

-> As a part of Avrcp 1.6 upgrade, added support
   for following features:
   [1] setAddressedPlayer
   [2] setBrowsedPlayer
   [3] getFolderItems scope=VFS/NowPlaying/Search
   [4] changePath
   [5] getItemAttributes
   [6] playItem
   [7] getTotalNumberOfItems
   [8] search string in current browsed path.
   [9] AddToNowPlaying
-> Defined functions and enhanced structures to
   support above mentioned features.
-> Added Dual RC support.

Bug: 19361366
Merged-In: I45ed60e337b57c686d9693e19993fee1ce3c2504
Change-Id: I45ed60e337b57c686d9693e19993fee1ce3c2504

7 years agotest_vendor: Add BtAddress unit tests
Myles Watson [Wed, 22 Jun 2016 21:55:10 +0000 (14:55 -0700)]
test_vendor: Add BtAddress unit tests

Change-Id: I23d27a1a5c258de330f4eac23d314ef8b9200d2a
Signed-off-by: Myles Watson <mylesgw@google.com>
7 years agotest_vendor: Add a BtAddress class
Myles Watson [Tue, 7 Jun 2016 17:01:28 +0000 (10:01 -0700)]
test_vendor: Add a BtAddress class

The class provides IsValidBtAddress(string), functions to convert
from vectors and strings, and some operators.

Change-Id: I553c47e698ec46ed0e24656f89141c23f7369380
Signed-off-by: Myles Watson <mylesgw@google.com>
7 years agoRemove BTA layer components for LE advertising
Jakub Pawlowski [Tue, 16 Aug 2016 16:41:55 +0000 (09:41 -0700)]
Remove BTA layer components for LE advertising

Advertising is so simple, it doesn't need the BTA layer.
Values returned by BTM_VendorSpecificCommand shouldn't be handled as
success or failure, it's just to inform wether we sent the callback.

Bug: 30622771
Change-Id: I104c4fbf84d3818b76fe8c527fbde4e6c4336c3a

7 years agoUnify LE advertising instance identifiers
Jakub Pawlowski [Fri, 2 Sep 2016 17:20:26 +0000 (17:20 +0000)]
Unify LE advertising instance identifiers
am: 6a96661166

Change-Id: If5385cb981686925dd42fa6616185f5c282557ee

7 years agoUnify LE advertising instance identifiers
Jakub Pawlowski [Tue, 16 Aug 2016 10:25:45 +0000 (03:25 -0700)]
Unify LE advertising instance identifiers

Up till now, we had three numbers associated with each advertising
instance: client_id, inst_id, and cbindex. We also had special structure
mapping each of those numbers to another.

From now on, when registering advertiser, we'll grab next free
advertising instance id and make advertiser_id equal to it. Thanks to
this, we can remove all the mapping and have just one number associated
with each advertising instance.

This also means we no longer need to pass *p_ref value to the BTM layer
with each request, as advertiser_id is equal to inst_id.

Bug: 30622771
Change-Id: Ied71bff36e30d6c6ce4ca3e62d46ba96320cf597

7 years agoCleanup in the bta/av layer
Pavlin Radoslavov [Thu, 1 Sep 2016 22:05:24 +0000 (22:05 +0000)]
Cleanup in the bta/av layer
am: d8c312e624

Change-Id: I33c18706dc9490bddf482a447baaf29506b994b3

7 years agoCleanup in the bta/av layer
Pavlin Radoslavov [Wed, 31 Aug 2016 00:48:01 +0000 (17:48 -0700)]
Cleanup in the bta/av layer

* Removed unused defines and function declarations
* Removed unused tBTA_AV_Q_INFO.vdp
* Cleanup of some of the log messages

Also:
* Added constant AVDT_TSEP_INVALID instead of using a hard-coded value

Change-Id: I9ce7b5b08dec7c9ea9699d9f6c598acb39fb105a

7 years agoAdded A2DP codec-related APIs
Pavlin Radoslavov [Wed, 31 Aug 2016 20:36:19 +0000 (20:36 +0000)]
Added A2DP codec-related APIs
am: 7e5862624f

Change-Id: I4841099c07df6353cf9bfd16bc845d2b0ea01b18

7 years agoAdded A2DP codec-related APIs
Pavlin Radoslavov [Sun, 28 Aug 2016 23:59:51 +0000 (16:59 -0700)]
Added A2DP codec-related APIs

Those APIs can be used to check various codec-related characterictics,
and minimize the codec-specific knowledge in the rest of the code.

The added APIs are:
 - A2D_GetCodecType()
 - A2D_IsCodecSupported()
 - A2D_UsesRtpHeader()
 - A2D_IsVendorCodecSupported()
 - A2D_VendorCodecGetVendorId()
 - A2D_VendorCodecGetCodecId()
 - A2D_VendorUsesRtpHeader()

Also:
 - Added unit tests for the new API calls
 - Removed redundant definition of BTA_AV_CODEC_TYPE_IDX
 - Removed unused A2D_MEDIA_CT_* codec type defines

Bug: 30958229
Change-Id: Id9ab01fd93b0b0a9b55a0af9bfb482310ae0ade4

7 years agoSeparate advertiser from GATT client (4/4)
Jakub Pawlowski [Wed, 31 Aug 2016 18:14:48 +0000 (18:14 +0000)]
Separate advertiser from GATT client (4/4)
am: 67d5a25233

Change-Id: I1640cd73003ab4d37b751ecb8e47f7da5bbf4588

7 years agoSeparate advertiser from GATT client (4/4)
Jakub Pawlowski [Wed, 13 Jul 2016 18:55:16 +0000 (11:55 -0700)]
Separate advertiser from GATT client (4/4)

Bug: 30622771
Change-Id: I761f0bff09aec1047bd512915960021e4fbdc0c8

7 years agoUse closures in advertising related code
Jakub Pawlowski [Tue, 30 Aug 2016 21:20:43 +0000 (21:20 +0000)]
Use closures in advertising related code
am: 5b12a83ba9

Change-Id: I2ad76a71fc3af35c5c60a5d44be6eff5cc827d6c

7 years agoUse closures in advertising related code
Jakub Pawlowski [Thu, 11 Aug 2016 10:30:47 +0000 (03:30 -0700)]
Use closures in advertising related code

This patch is a preparation to get rid of BTA layer for advertising, and
for further refactoring required to keep this code maintainable.

Tests: SL4A/ConcurrentBleAdvertisingTest
Bug: 30622771
Change-Id: I574b57159390d090b16d264d3c1fba2f07b70d4c

7 years agoCleanup and removed BTIF-related unused code
Pavlin Radoslavov [Mon, 29 Aug 2016 17:56:42 +0000 (17:56 +0000)]
Cleanup and removed BTIF-related unused code
am: a62c5a302e

Change-Id: I449704fafd17f331fac8c201eabdf9f3af30fc4e

7 years agoCleanup and removed BTIF-related unused code
Pavlin Radoslavov [Thu, 25 Aug 2016 22:34:57 +0000 (15:34 -0700)]
Cleanup and removed BTIF-related unused code

* Removed field tBTIF_MEDIA_CB.av_sm_hdl, because it is never used
  after an assignment.
* Removed the corresponding function btif_av_get_sm_handle() which
  is not used/needed anymore.
* Declared btif_hf_is_call_idle() function in a new header file
  "btif_hf.h"
* Removed tBTIF_STATUS, BTIF_SUCCESS and BTIF_ERROR_SRV_* error codes
  which are never used.
* Removed duplicate conditional define of BTA_AV_CO_CP_SCMS_T
* Removed unused typedef tBTA_AV_AUDIO_CODEC_INFO, and unused
  BTA_AV_CO_* defines and enums.

Change-Id: I7bb49957fad94073d474fea6ea0d466f36df37fb

7 years agoMerge "Update linux BUILD.gn files"
Jakub Pawlowski [Thu, 25 Aug 2016 22:20:50 +0000 (22:20 +0000)]
Merge "Update linux BUILD.gn files"
am: c143b4a3fa

Change-Id: Iad689fa7313868a072f7e1836d39d47ca4e471aa

7 years agoMerge "Update linux BUILD.gn files"
Treehugger Robot [Thu, 25 Aug 2016 22:11:07 +0000 (22:11 +0000)]
Merge "Update linux BUILD.gn files"

7 years agoFree av_open_on_rc_timer on cleanup
Pavlin Radoslavov [Thu, 25 Aug 2016 21:00:17 +0000 (21:00 +0000)]
Free av_open_on_rc_timer on cleanup
am: 8981fb2f35

Change-Id: I4a429c099df2ca47c1759499127aeb267bb22937

7 years agoUpdate linux BUILD.gn files
Jakub Pawlowski [Thu, 25 Aug 2016 20:14:26 +0000 (13:14 -0700)]
Update linux BUILD.gn files

Change-Id: Iccec195d35b5a62d7b45834670229a68deeb4add

7 years agoRemove log spam in btif_gattc_update_properties
Andre Eisenbach [Thu, 25 Aug 2016 18:30:27 +0000 (18:30 +0000)]
Remove log spam in btif_gattc_update_properties
am: 831bec7af3

Change-Id: I1c967f90cbb87551b9a50ff2cc6da019871afbfc

7 years agoFree av_open_on_rc_timer on cleanup
Pavlin Radoslavov [Wed, 16 Mar 2016 22:28:07 +0000 (15:28 -0700)]
Free av_open_on_rc_timer on cleanup

Bug: 27602473
Change-Id: I4b0f1563952be75a6dee238607e6674ce98ea623

7 years agoRemove log spam in btif_gattc_update_properties
Andre Eisenbach [Thu, 23 Jun 2016 21:22:35 +0000 (14:22 -0700)]
Remove log spam in btif_gattc_update_properties

Bug: 29601962
Change-Id: Ibcccbe20a4b7c79edcaff162e4f4a19078ffb75d
(cherry picked from commit ffdb33b5fcfa0a652e9fa368f7f8c3bb0654b46e)

7 years agoMerge "Don't set the A2DP sink data callback when registering A2DP source"
Pavlin Radoslavov [Thu, 25 Aug 2016 08:52:21 +0000 (08:52 +0000)]
Merge "Don't set the A2DP sink data callback when registering A2DP source"
am: e1211822cc

Change-Id: I4f984c5ebdfdb7c5d03f92c05bf98209bbd82a9d

7 years agoMerge "Don't set the A2DP sink data callback when registering A2DP source"
Treehugger Robot [Thu, 25 Aug 2016 08:44:55 +0000 (08:44 +0000)]
Merge "Don't set the A2DP sink data callback when registering A2DP source"

7 years agoRemoved duplicate and unused BTA_AV_ and BTIF_AV_ constants
Pavlin Radoslavov [Thu, 25 Aug 2016 07:40:16 +0000 (07:40 +0000)]
Removed duplicate and unused BTA_AV_ and BTIF_AV_ constants
am: 89330a3888

Change-Id: I4d2b8e6816b589d5f83978098a3754f66c6e896c

7 years agoRemoved duplicate and unused BTA_AV_ and BTIF_AV_ constants
Pavlin Radoslavov [Wed, 24 Aug 2016 18:46:58 +0000 (11:46 -0700)]
Removed duplicate and unused BTA_AV_ and BTIF_AV_ constants

* Replaced usage of BTA_AV_CODEC_SBC and BTIF_AV_CODEC_SBC
  with A2D_MEDIA_CT_SBC
* Removed remaining unused BTA_AV_CODEC_* re-defines
* Removed other BTA_* constants and re-defines that are never used
* Removed unused BTIF_AV_ constants and typedefs

Change-Id: I38090acee3dfdcd1196185e0b060cdad7572003a

7 years agoDon't set the A2DP sink data callback when registering A2DP source
Pavlin Radoslavov [Wed, 24 Aug 2016 17:42:22 +0000 (10:42 -0700)]
Don't set the A2DP sink data callback when registering A2DP source

The p_sink_data_cback pointer should be NULL when registering
A2DP source with BTA_AvRegister()

Change-Id: I1a709c4e0d3cfe6faf0368a013b391c6e6a53a82

7 years agoMerge "Removed unused log-related defines and typedefs"
Pavlin Radoslavov [Wed, 24 Aug 2016 21:03:01 +0000 (21:03 +0000)]
Merge "Removed unused log-related defines and typedefs"
am: fc32808f2f

Change-Id: Ie48e32bafe7a0ba7baedc1138b525062d136127d

7 years agoMerge "Removed unused log-related defines and typedefs"
Treehugger Robot [Wed, 24 Aug 2016 20:55:54 +0000 (20:55 +0000)]
Merge "Removed unused log-related defines and typedefs"

7 years agoMake it possible to post closures to BTA message queue
Jakub Pawlowski [Wed, 24 Aug 2016 20:15:25 +0000 (20:15 +0000)]
Make it possible to post closures to BTA message queue
am: e5c78954fb

Change-Id: Ic90c6e430f33949695926f602ed9f801bebed6cc

7 years agoMerge remote-tracking branch 'goog/stage-aosp-master' into HEAD
Bill Yi [Wed, 24 Aug 2016 20:15:23 +0000 (20:15 +0000)]
Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD
am: 2cb07a3468

Change-Id: Idfe3f56752b12a4961c692f2dd33117c0c02a77b

7 years agotest_vendor: Build independently from the stack
Myles Watson [Wed, 24 Aug 2016 20:15:22 +0000 (20:15 +0000)]
test_vendor: Build independently from the stack
am: 8f981328ad

Change-Id: I8635261da07e0ea20a3db3624e776c69d467ec6e

7 years agotest_vendor: Fix style for UNUSED_ATTR, whitespace
Myles Watson [Wed, 24 Aug 2016 20:15:21 +0000 (20:15 +0000)]
test_vendor: Fix style for UNUSED_ATTR, whitespace
am: 98dcd0babf

Change-Id: Idc44d0bc0f1c445d2b08bdd22436c47e062504e4

7 years agoMake it possible to post closures to BTA message queue
Jakub Pawlowski [Wed, 10 Aug 2016 16:07:44 +0000 (09:07 -0700)]
Make it possible to post closures to BTA message queue

Currently, every task executed on bta thread needs a separate event id,
structure holding its parameters, API method, and method that will be
executed in bta thread, which must accept generic tBTA_DM_MSG.

Because of that we end up with lots of boilerplate code, and possibility
to misinterpret bytes in tBTA_DM_MSG struct.

After this patch, we can post closures onto bta thread. Thanks to it we
don't need a struct to hold parameters, and the executed method can have
a meaningful parameters.

First experiments showed over 50% reduction in code size when rewriting
advertising code to new style, not to mention much better readability.

Bug: 30622771
Change-Id: I400839b920c04c67c893899969d07a02d9c1b2e6

7 years agoMerge remote-tracking branch 'goog/stage-aosp-master' into HEAD
Bill Yi [Wed, 24 Aug 2016 18:18:47 +0000 (11:18 -0700)]
Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD

7 years agoRemoved unused log-related defines and typedefs
Pavlin Radoslavov [Wed, 24 Aug 2016 18:01:42 +0000 (11:01 -0700)]
Removed unused log-related defines and typedefs

Change-Id: I794f07821a653f03e02cb5ad11790dfe2dfaea98

7 years agotest_vendor: Build independently from the stack
Myles Watson [Tue, 21 Jun 2016 23:45:02 +0000 (16:45 -0700)]
test_vendor: Build independently from the stack

Remove the dependency on bluetooth_* flags.
Enable more warnings.

(Based on the build flags in system/bt/Android.mk)

Change-Id: I5f480f15c037955404502a0216b61aa407670163
Signed-off-by: Myles Watson <mylesgw@google.com>
7 years agotest_vendor: Fix style for UNUSED_ATTR, whitespace
Myles Watson [Wed, 24 Aug 2016 16:03:32 +0000 (09:03 -0700)]
test_vendor: Fix style for UNUSED_ATTR, whitespace

Remove "/* args */" and use UNUSED_ATTR.  It's easier to find using grep.

Change-Id: Ic1a95e44b86d019647acafe982cfef5c69e1da1a
Signed-off-by: Myles Watson <mylesgw@google.com>
7 years agoFix a typo: __func_ -> __func__
Pavlin Radoslavov [Wed, 24 Aug 2016 09:01:30 +0000 (09:01 +0000)]
Fix a typo: __func_ -> __func__
am: 3e0f253c28

Change-Id: I4309954020a7630fa1dc4eca766fc12e982fbefc

7 years agoFix a typo: __func_ -> __func__
Pavlin Radoslavov [Wed, 24 Aug 2016 08:44:41 +0000 (01:44 -0700)]
Fix a typo: __func_ -> __func__

Change-Id: I8b6f0664a96932c35a804541d54a50370d09c022

7 years agoA2DP-related naming refactoring and cleanup
Pavlin Radoslavov [Wed, 24 Aug 2016 05:17:32 +0000 (05:17 +0000)]
A2DP-related naming refactoring and cleanup
am: 7aaf7c6c42

Change-Id: I2420388d1335ab2ff9edef957ed0934433e3e63e

7 years agoA2DP-related naming refactoring and cleanup
Pavlin Radoslavov [Tue, 23 Aug 2016 19:24:03 +0000 (12:24 -0700)]
A2DP-related naming refactoring and cleanup

* Renamed A2DP-related function names, types, constants and fields.
  Also, move some of those functions to a better location.
 - tAVDT_DATA_CBACK -> tAVDT_SINK_DATA_CBACK
 - tAVDT_MEDIA_CBACK -> tAVDT_SINK_MEDIA_CBACK
 - p_data_cback -> p_sink_data_cback
 - p_media_cback -> p_sink_media_cback
 - p_app_data_cback -> p_app_sink_data_cback
 - tBTA_AV_DATA_CBACK -> tBTA_AV_SINK_DATA_CBACK
 - BTA_AV_MEDIA_SINK_CFG_EVT -> BTA_AV_SINK_MEDIA_CFG_EVT
 - BTA_AV_MEDIA_DATA_EVT -> BTA_AV_SINK_MEDIA_DATA_EVT
 - bta_av_stream_data_cback() -> bta_av_sink_data_cback()
 - bte_av_media_callback() -> bte_av_sink_media_callback()
 - tBTA_AV_CODEC -> tA2D_CODEC
 - btif_a2dp_get_track_frequency() -> A2D_sbc_get_track_frequency()
 - btif_a2dp_get_track_channel_count() -> A2D_sbc_get_track_channel_count()
 - dump_codec_info() -> A2D_sbc_dump_codec_info()

* Misc. other cleanup:
  - log messages cleanup
  - normalize usage of "+=" in Android.mk files

Change-Id: Ida1528fb5d75cc322533f921daefb65be44562f1

7 years agotest_vendor: Allow includes from bt_hci_defs
Myles Watson [Tue, 23 Aug 2016 01:10:54 +0000 (01:10 +0000)]
test_vendor: Allow includes from bt_hci_defs
am: a11e1c1b71

Change-Id: Ie3494281cda35263f0b0a259eef045541aba3585

7 years agoRemoved BTA_AV_INCLUDED conditional guard which is always true
Pavlin Radoslavov [Tue, 23 Aug 2016 01:10:53 +0000 (01:10 +0000)]
Removed BTA_AV_INCLUDED conditional guard which is always true
am: bde45bd653

Change-Id: I3e3775b77c304fa5d440fc841bb6c76efbe3ef89

7 years agotest_vendor: Allow includes from bt_hci_defs
Myles Watson [Mon, 13 Jun 2016 19:46:38 +0000 (12:46 -0700)]
test_vendor: Allow includes from bt_hci_defs

Avoid duplicating header files for BT constants.

Update Android.mk to search $(BT_DIR)/include and
$(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR)

Change-Id: I1403724c1cf9cda8156a5b65cf55da8178bd910f
Signed-off-by: Myles Watson <mylesgw@google.com>
7 years agoRemoved BTA_AV_INCLUDED conditional guard which is always true
Pavlin Radoslavov [Mon, 22 Aug 2016 21:49:11 +0000 (14:49 -0700)]
Removed BTA_AV_INCLUDED conditional guard which is always true

Change-Id: Idf7063359600b30c007fbde89dde55ef987c0368

7 years agoMerge "Removed unused code related to Audio, A2DP Sink and Video"
Pavlin Radoslavov [Mon, 22 Aug 2016 19:42:31 +0000 (19:42 +0000)]
Merge "Removed unused code related to Audio, A2DP Sink and Video"
am: e80e75b4a5

Change-Id: I877e15663150975a102adf692e68e1d27cfc56b8

7 years agoMerge "Removed unused code related to Audio, A2DP Sink and Video"
Treehugger Robot [Mon, 22 Aug 2016 19:36:45 +0000 (19:36 +0000)]
Merge "Removed unused code related to Audio, A2DP Sink and Video"

7 years agoExpose function audio_a2dp_hw_dump_ctrl_event()
Pavlin Radoslavov [Mon, 22 Aug 2016 19:30:29 +0000 (19:30 +0000)]
Expose function audio_a2dp_hw_dump_ctrl_event()
am: febb1515f9

Change-Id: Ifbaade2d4edb6792e328dc37ae21bd0ac5f24560

7 years agoExpose function audio_a2dp_hw_dump_ctrl_event()
Pavlin Radoslavov [Fri, 19 Aug 2016 22:04:18 +0000 (15:04 -0700)]
Expose function audio_a2dp_hw_dump_ctrl_event()

Renamed function dump_a2dp_ctrl_event() to
audio_a2dp_hw_dump_ctrl_event() and expose it, so it can be used
by outside code to print events.

Change-Id: Ibd9d3171c7d5256f80101ecc1563b472b7f5e92d

7 years agoRemoved unused code related to Audio, A2DP Sink and Video
Pavlin Radoslavov [Sat, 20 Aug 2016 00:46:19 +0000 (17:46 -0700)]
Removed unused code related to Audio, A2DP Sink and Video

* Function BTA_AvEnable_Sink() - never used
  - Event BTA_AV_API_SINK_ENABLE_EVT
  - Processing function bta_av_api_sink_enable()
  - AVDT_SINK_Activate() and AVDT_SINK_Deactivate() : not used anymore

* A2DP SINK related functions that are only declared:
  - btif_queue_focus_request()
  - audio_focus_status()

* Audio-related function that is never used:
  - bta_av_sbc_cfg_for_cap()

* Video-related functions that are only declared:
  - bta_av_co_video_src_data_path()
  - bta_av_co_video_setconfig()
  - bta_av_co_video_open()
  - bta_av_co_video_close()
  - bta_av_co_video_start()
  - bta_av_co_video_report_conn()
  - bta_av_co_video_report_rr()
  - bta_av_co_video_delay()
  - bta_av_co_video_disc_res()
  - bta_av_co_video_getconfig()
  - bta_av_co_video_stop()

Change-Id: I0c0c80578ab2675d2fe23dea3f11b2a0d82283f0

7 years agoMerge "Implement the AVRCP "continue" and "abort continue" responses"
Ajay Panicker [Sat, 20 Aug 2016 03:00:12 +0000 (03:00 +0000)]
Merge "Implement the AVRCP "continue" and "abort continue" responses"
am: d3e8a45884

Change-Id: I0c8c22beb6c899cf97ccd87744c8fb27964d0f32

7 years agoMerge "Implement the AVRCP "continue" and "abort continue" responses"
Treehugger Robot [Sat, 20 Aug 2016 02:54:13 +0000 (02:54 +0000)]
Merge "Implement the AVRCP "continue" and "abort continue" responses"

7 years agoMerge "Added new function time_get_os_boottime_us() and unit tests"
Pavlin Radoslavov [Sat, 20 Aug 2016 00:57:02 +0000 (00:57 +0000)]
Merge "Added new function time_get_os_boottime_us() and unit tests"
am: 2637d3cd9d

Change-Id: Icb7fbbe31234c26efb21166b3ed91e03b07177fd

7 years agoMerge "Added new function time_get_os_boottime_us() and unit tests"
Treehugger Robot [Sat, 20 Aug 2016 00:48:38 +0000 (00:48 +0000)]
Merge "Added new function time_get_os_boottime_us() and unit tests"

7 years agoAdded new function fixed_queue_flush() and the unit test
Pavlin Radoslavov [Sat, 20 Aug 2016 00:14:35 +0000 (00:14 +0000)]
Added new function fixed_queue_flush() and the unit test
am: 3335cf4e87

Change-Id: I69e145c2e2c4afda6ab0c16c5cf3c9e097b8a8e7

7 years agoAdded new function fixed_queue_flush() and the unit test
Pavlin Radoslavov [Fri, 19 Aug 2016 22:32:30 +0000 (15:32 -0700)]
Added new function fixed_queue_flush() and the unit test

Change-Id: Ic90e3ffdcaea9573b135bd26ef102a1740fb2d3d

7 years agoAdded new function time_get_os_boottime_us() and unit tests
Pavlin Radoslavov [Fri, 19 Aug 2016 23:01:18 +0000 (16:01 -0700)]
Added new function time_get_os_boottime_us() and unit tests

Also, re-implement existing function time_get_os_boottime_ms()
by using the new function time_get_os_boottime_us()

Change-Id: I5c6ba3d04b04c96e0a415b2be1050ef05cb04585

7 years agoAdd a socket unit test for the async_manager
Myles Watson [Fri, 19 Aug 2016 22:29:24 +0000 (22:29 +0000)]
Add a socket unit test for the async_manager
am: d4f80ae7ca

Change-Id: I646c3271fc61d656908c5c75d609e7bd2b7c3265

7 years agoAdd a socket unit test for the async_manager
Myles Watson [Fri, 19 Aug 2016 15:22:42 +0000 (15:22 +0000)]
Add a socket unit test for the async_manager

This reverts commit 10986700c302f79376894ebef9f2ec92a65b8b08.
Which reverted commit 1387d4330da52034af67d1dbc61b870e8f89c820.

Some minor style changes as well.

Change-Id: I83ea40b4cf96adfa58c24d0cd9109ed9974519f1

7 years agoImplement the AVRCP "continue" and "abort continue" responses
Ajay Panicker [Tue, 16 Aug 2016 20:02:40 +0000 (13:02 -0700)]
Implement the AVRCP "continue" and "abort continue" responses

Test: TestTracker/58842/5473
Bug: 30571638
Change-Id: I3bb1a0171e220b6e59b6b739259f98519a31aa27
(cherry picked from commit 3282d12818a0e660a5f3f4295bac55aa8e8d27b4)

7 years agoRevert "DO NOT MERGE Proper construction of AVDTP general reject message"
JivakDhadse [Thu, 18 Aug 2016 21:38:47 +0000 (21:38 +0000)]
Revert "DO NOT MERGE Proper construction of AVDTP general reject message"
am: b8b761e722  -s ours

Change-Id: Ieae60a1a48dac361e5efb9acfd9f549d620ece57

7 years agoRevert "DO NOT MERGE Proper construction of AVDTP general reject message"
JivakDhadse [Fri, 7 Aug 2015 13:28:38 +0000 (18:58 +0530)]
Revert "DO NOT MERGE Proper construction of AVDTP general reject message"

This reverts commit 2ed10d442266eade44be121cd24fd473c85007d0.

Original change needs to be reverted to align with Errata
ESR04 where "Section 8.17, General Reject Page 71" of adopted
AvDTP Spec is changed to have "Invalid Signal Identifier"
in first 6 bits of Octet 1.
This change helps passing PTS case TP/SIG/SMG/ESR04/BI-28-C

Bug: 27852645
Change-Id: I9deba6821284f0cb1423d543550786cc76a61a33
(cherry picked from commit 825cd49864f7338be8b33f901ddf3be8e1bab7c1)

7 years agoAdded cancelling for fd watching on async manager
Jorge E. Moreira [Thu, 18 Aug 2016 19:40:37 +0000 (19:40 +0000)]
Added cancelling for fd watching on async manager
am: b2bbe93c1b

Change-Id: I621620b800f0bec0df0ec0b07bc4beb384482de3

7 years agoAdded cancelling for fd watching on async manager
Jorge E. Moreira [Tue, 16 Aug 2016 18:55:27 +0000 (11:55 -0700)]
Added cancelling for fd watching on async manager

Change-Id: I4107b3b50345f81833c47c85c4a322a582973bb2

7 years agoRevert "Added unit test for async_manager with sockets"
Myles Watson [Thu, 18 Aug 2016 16:28:54 +0000 (16:28 +0000)]
Revert "Added unit test for async_manager with sockets"
am: 10986700c3

Change-Id: I3b8264f5b4124dda166cafdce61ac0c941e18710

7 years agoRevert "Added unit test for async_manager with sockets"
Myles Watson [Thu, 18 Aug 2016 16:22:01 +0000 (16:22 +0000)]
Revert "Added unit test for async_manager with sockets"

This reverts commit 1387d4330da52034af67d1dbc61b870e8f89c820.

Change-Id: I4af4e0d5ac5a108f3de44d186db97592a70c729e

7 years agoAdded unit test for async_manager with sockets
Jorge E. Moreira [Thu, 18 Aug 2016 15:37:51 +0000 (15:37 +0000)]
Added unit test for async_manager with sockets
am: 1387d4330d

Change-Id: I4ccdc7e14b81e2bdc7862764b49f4d2dd4044d04

7 years agoAdded unit test for async_manager with sockets
Jorge E. Moreira [Wed, 17 Aug 2016 20:53:00 +0000 (13:53 -0700)]
Added unit test for async_manager with sockets

Change-Id: I8d31f766722e4b4a6c6fe00e30a957ac43176cf1

7 years agoFix clang-tidy warnings in bt.
Chih-Hung Hsieh [Thu, 18 Aug 2016 01:57:01 +0000 (01:57 +0000)]
Fix clang-tidy warnings in bt.
am: 5dc0d15e78

Change-Id: I217b7399aa9294ca3fe47bc862aebe83343037c0

7 years agoFix clang-tidy warnings in bt.
Chih-Hung Hsieh [Wed, 17 Aug 2016 21:12:51 +0000 (14:12 -0700)]
Fix clang-tidy warnings in bt.

* Add explicit keyword to conversion constructors,
  or add NOLINT to implicit conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters,
  or add NOLINT to keep same callback function signature.
Bug: 30407689
* Use const reference type for loop index variables to avoid unnecessary copy.
Bug: 30413223
* Use const reference type to avoid unnecessary copy.
Bug: 30413862
Test: build with WITH_TIDY=1

Change-Id: I8237d332f32d7be09ab72a8de82160fdb776dcd1

7 years agoFix incorrect fd used for select() call in vendor lib async_manager
Jorge E. Moreira [Thu, 18 Aug 2016 00:12:14 +0000 (00:12 +0000)]
Fix incorrect fd used for select() call in vendor lib async_manager
am: 7225e499e8

Change-Id: Icfc520b04919ab57b7a7a3b36435e05842a62f39

7 years agoFix incorrect fd used for select() call in vendor lib async_manager
Jorge E. Moreira [Wed, 17 Aug 2016 20:59:15 +0000 (13:59 -0700)]
Fix incorrect fd used for select() call in vendor lib async_manager

Change-Id: Iabb8389ee6fcef0f9c6a17838d6a3a9a517befc6

7 years agoMake gatt_attr use opportunistic connection
Jakub Pawlowski [Wed, 17 Aug 2016 16:11:50 +0000 (16:11 +0000)]
Make gatt_attr use opportunistic connection
am: 109891d07f

Change-Id: I432143bb5149619e2ec223b84e03f3280f1182c1

7 years agoMake gatt_attr use opportunistic connection
Jakub Pawlowski [Mon, 18 Jul 2016 16:06:49 +0000 (09:06 -0700)]
Make gatt_attr use opportunistic connection

This patch creates new connection mode - opportunistic connection. When
such connection is made, no call to gatt_update_app_hold_link_status
will be made when it's started.

This means that connecting and disconnecting in this mode won't trigger
disconnect timer. When other, app creates regular connection and then
disconnects, the physical connection might get disconnected.

Opportunistic connection is used only for code setting CCC right now.

Bug: 30186455
Change-Id: Ia5be7682b6c3dcb4993060f818dee603aef3e19e

7 years agoMerge "Synchronize the code with AOSP" into stage-aosp-master
TreeHugger Robot [Wed, 17 Aug 2016 04:15:14 +0000 (04:15 +0000)]
Merge "Synchronize the code with AOSP" into stage-aosp-master

7 years agoSynchronize the code with the internal tree
Pavlin Radoslavov [Wed, 17 Aug 2016 04:05:32 +0000 (04:05 +0000)]
Synchronize the code with the internal tree
am: 55f82cd30f

Change-Id: I0e7041e39efad3e51638091e1f9e9b24b8a4176c

7 years agoRandomize allocation canary
Marie Janssen [Fri, 4 Mar 2016 01:50:26 +0000 (17:50 -0800)]
Randomize allocation canary

A static allocation canary can be susceptible to buffer overflow
exploit code bypassing, so this randomizes it on every run.

Bug: 27411268
Change-Id: I81b06f89951a012c08d846042653ec957f3e9127
(cherry picked from commit 7c054350fb7da9da1fdb86e7f7b9a801cf1c39e4)

7 years agoSynchronize the code with the internal tree
Pavlin Radoslavov [Wed, 17 Aug 2016 02:42:16 +0000 (19:42 -0700)]
Synchronize the code with the internal tree

Spacing, line split, etc.

Change-Id: I781e771e93b104bbc044d1646106c19d8af55e7b

7 years agoSynchronize the code with AOSP
Pavlin Radoslavov [Wed, 17 Aug 2016 02:35:51 +0000 (19:35 -0700)]
Synchronize the code with AOSP

Minor edits - spacing, etc.

Change-Id: I172d64585e82c23789fbad17e7366bbc55a9e50d

7 years agoMerge "Fix a typo in pre-compiler error message"
Glenn Kasten [Wed, 17 Aug 2016 01:50:24 +0000 (01:50 +0000)]
Merge "Fix a typo in pre-compiler error message"
am: 7cc80100e1

Change-Id: Ieccd17672a872e3d60bb48cf1b3a34c8cbe09ae9

7 years agoMerge "Fix a typo in pre-compiler error message"
Treehugger Robot [Wed, 17 Aug 2016 01:44:34 +0000 (01:44 +0000)]
Merge "Fix a typo in pre-compiler error message"

7 years agoAdd Subaru and Nissan car kits to auto pair blacklist
Andre Eisenbach [Wed, 17 Aug 2016 01:14:22 +0000 (01:14 +0000)]
Add Subaru and Nissan car kits to auto pair blacklist
am: ed272ff2f7

Change-Id: I1b39608a553f5cef0748c9b6464fa92cc1eee823

7 years agoFix a typo in pre-compiler error message
Glenn Kasten [Tue, 8 Mar 2016 20:11:38 +0000 (12:11 -0800)]
Fix a typo in pre-compiler error message

Change-Id: Ia584c748ea065739e0f6df1ea8a86df517a257af

7 years agoDisable 3Mbps packets for AVDT ACL links
Sathya Kumar [Tue, 16 Aug 2016 23:58:21 +0000 (23:58 +0000)]
Disable 3Mbps packets for AVDT ACL links
am: f527ce28b4  -s ours

Change-Id: I2b464cbf192b41edfd904ae4eddd7159a64213e7