OSDN Git Service

android-x86/system-bt.git
7 years agoMerge "GATT: Fixed typo while notifying connection update" into oc-dev
TreeHugger Robot [Thu, 1 Jun 2017 22:36:18 +0000 (22:36 +0000)]
Merge "GATT: Fixed typo while notifying connection update" into oc-dev

7 years agoMerge changes I90a48db4,I8b9815a0 into oc-dev
TreeHugger Robot [Thu, 1 Jun 2017 20:50:11 +0000 (20:50 +0000)]
Merge changes I90a48db4,I8b9815a0 into oc-dev

* changes:
  HCI: Improve timeout handling
  HCI: Get debug info from the firmware on timeout

7 years agoGATT: Fixed typo while notifying connection update
Avish Shah [Wed, 31 May 2017 05:13:57 +0000 (10:43 +0530)]
GATT: Fixed typo while notifying connection update

Current conditions checks whether the app registered for
PHY_UPDATE instead it should check for CONN_UPDATE.

Bug: 62206018
Test: Manual
Change-Id: Ie9d068a24d13ea0b186b0ca874531aa4ffd1121f
(cherry picked from commit 44a1c7eafb2db9012c26dd622726655f19fbc0b7)

7 years agoDO NOT MERGE ANYWHERE HOGP mouse connect failed during OPP TX am: dae59d3b83 -s...
Yamei Du [Thu, 1 Jun 2017 07:49:58 +0000 (07:49 +0000)]
DO NOT MERGE ANYWHERE HOGP mouse connect failed during OPP TX am: dae59d3b83  -s ours
am: 0d0e9514ad  -s ours

Change-Id: I37e10ab29d083a8d16e756caf3b094c188692d73

7 years agoDO NOT MERGE ANYWHERE HOGP mouse connect failed during OPP TX
Yamei Du [Thu, 1 Jun 2017 07:47:29 +0000 (07:47 +0000)]
DO NOT MERGE ANYWHERE HOGP mouse connect failed during OPP TX
am: dae59d3b83  -s ours

Change-Id: I2c48b9c67afda8ba35bfac258031de6909d1af12

7 years agoDO NOT MERGE ANYWHERE HOGP mouse connect failed during OPP TX
Yamei Du [Wed, 18 Nov 2015 09:28:07 +0000 (17:28 +0800)]
DO NOT MERGE ANYWHERE HOGP mouse connect failed during OPP TX

FW ACL buffer overflow.
One more ACL packet was sent to FW which is unexpected.

fix l2cap TX control defect.
Call fixed channel TX complete cb after packets is send to lower.

Bug: 26763700
Tested: manual
Change-Id: Iaba14a11c1583da2a72769ebd096e0baedf857c3
CR-Id: ALPS02404396

7 years agoMerge "HSP: Use peer_version during SCO setup" into oc-dev
TreeHugger Robot [Wed, 31 May 2017 22:54:03 +0000 (22:54 +0000)]
Merge "HSP: Use peer_version during SCO setup" into oc-dev

7 years agoHCI: Improve timeout handling
Myles Watson [Wed, 24 May 2017 20:16:40 +0000 (13:16 -0700)]
HCI: Improve timeout handling

Remove pending commands before enqueueing new ones and log all
pending commands when there is a timeout.

Bug: 37298084
Test: set the timeout to 20ms
Change-Id: I90a48db46a78f75dd78e468ee2d5c948afc1850e
(cherry picked from commit 4788821a0b3c47645deacb3b0047addf192956e2)

7 years agoHCI: Get debug info from the firmware on timeout
Myles Watson [Tue, 9 May 2017 23:50:00 +0000 (16:50 -0700)]
HCI: Get debug info from the firmware on timeout

Bug: 37298084
Test: set the timeout to 20ms

Change-Id: I8b9815a03a15dcb6ce78c0692874b55cb4fc07bc
(cherry picked from commit 2bfb56a2a92c897c8c0648674c51197fa8fe7f0a)

7 years agoMerge "GATT: Interop fix for service changed indications" into oc-dev
TreeHugger Robot [Wed, 31 May 2017 01:51:34 +0000 (01:51 +0000)]
Merge "GATT: Interop fix for service changed indications" into oc-dev

7 years agoDO NOT MERGE ANYWHERE Fix connect second BLE fail while BREDR coexist am: e90e72bb82...
Ruina Liu [Wed, 31 May 2017 00:42:10 +0000 (00:42 +0000)]
DO NOT MERGE ANYWHERE Fix connect second BLE fail while BREDR coexist am: e90e72bb82  -s ours
am: c139d021b2  -s ours

Change-Id: I5c70d7e288f401cfef7de9f93ed9ed8366ee7914

7 years agoDO NOT MERGE ANYWHERE Fix connect second BLE fail while BREDR coexist
Ruina Liu [Wed, 31 May 2017 00:38:38 +0000 (00:38 +0000)]
DO NOT MERGE ANYWHERE Fix connect second BLE fail while BREDR coexist
am: e90e72bb82  -s ours

Change-Id: Iee3ecc2a5c6d81a4fc2e72e8e21cd0d898199624

7 years agoDO NOT MERGE ANYWHERE Fix connect second BLE fail while BREDR coexist
Ruina Liu [Thu, 24 Sep 2015 02:04:16 +0000 (10:04 +0800)]
DO NOT MERGE ANYWHERE Fix connect second BLE fail while BREDR coexist

In scenario where BREDR/BLE links coexist, and BLE
transport is doing round-robin but BREDR transport is
not use round-robin, when uplayer trigger to transmit
BLE data, the BREDR lcb_pool with smaller array index
will break the for loop firstly. This can block the
L2cap packets transmission of the following BLE lcb_pool
even though there is available BLE controller buffer.

If BLE_INCLUDE is TRUE, then BREDR/BLE links maybe
coexist, change break to continue statement, so the
data transmission will not be blocked by the other
transport type in round-robin case.

Change-Id: I7ca739dfbf02acd2e30527c16ca616a7bad70c51
CR-Id: ALPS02303646

7 years agoMerge "DO NOT MERGE ANYWHERE Remove incorrect assert in btm_read_rssi_cb" into cw...
Andre Eisenbach [Tue, 30 May 2017 21:10:55 +0000 (21:10 +0000)]
Merge "DO NOT MERGE ANYWHERE Remove incorrect assert in btm_read_rssi_cb" into cw-f-dev am: b044bae800  -s ours
am: 310ce8b220  -s ours

Change-Id: Ic13bec3228eebc49d2cf82ecc6f2eee4156a31ef

7 years agoMerge "DO NOT MERGE ANYWHERE Remove incorrect assert in btm_read_rssi_cb" into cw...
Andre Eisenbach [Tue, 30 May 2017 21:06:25 +0000 (21:06 +0000)]
Merge "DO NOT MERGE ANYWHERE Remove incorrect assert in btm_read_rssi_cb" into cw-f-dev
am: b044bae800  -s ours

Change-Id: Ic7314f6710c10c670ea3a4a24b4865661ee1451e

7 years agoMerge "DO NOT MERGE ANYWHERE Remove incorrect assert in btm_read_rssi_cb" into cw...
TreeHugger Robot [Tue, 30 May 2017 21:00:28 +0000 (21:00 +0000)]
Merge "DO NOT MERGE ANYWHERE Remove incorrect assert in btm_read_rssi_cb" into cw-f-dev

7 years agoDO NOT MERGE ANYWHERE Remove incorrect assert in btm_read_rssi_cb
Andre Eisenbach [Thu, 3 Nov 2016 21:53:49 +0000 (14:53 -0700)]
DO NOT MERGE ANYWHERE Remove incorrect assert in btm_read_rssi_cb

|data| may be NULL if the RSSI request times out.
See btm_read_rssi_timeout implementation for details.

Bug: 32587130
Test: manual
Change-Id: Ide9dee819e1db24a39c05b086cd4c0b558ca23ef

7 years agoHSP: Use peer_version during SCO setup
Jack He [Tue, 23 May 2017 02:23:04 +0000 (19:23 -0700)]
HSP: Use peer_version during SCO setup

* HSP profile should use peer_version obtained through SDP search to
  determine its behavior during SCO setup instead of a local version
  during initialization
* Added a WARNING message if SDP search failed to get remote HSP
  version, the default behavior is to use HSP 1.0
* Changed SDP search initialization to look for one UUID at a time
* See Bluetooth Erratum 3507

Test: make, HSP PTS test
Bug: 38210042
Change-Id: I67ce615a785b25a2e9304613a29d9be66a656c54
(cherry picked from commit a3745c645f3ab5b80a7325092bd6bb14accc265f)

7 years agoGATT: Interop fix for service changed indications
Myles Watson [Fri, 26 May 2017 00:24:49 +0000 (17:24 -0700)]
GATT: Interop fix for service changed indications

The Pixel C Keyboard disconnects if it receives an indication
for which it hasn't registered.

Test: Add a GATT service with Pixel C connected
Bug: 34352677
Change-Id: I1f717db40b2ba9ec21feac5fd9e339c09f140d51
(cherry picked from commit 43c7f9f4775e589d8fd0604ef4717996696a0321)

7 years agoMerge "Fix crashes when GAP operation is interrupted by disconnection" into oc-dev
TreeHugger Robot [Fri, 26 May 2017 17:34:54 +0000 (17:34 +0000)]
Merge "Fix crashes when GAP operation is interrupted by disconnection" into oc-dev

7 years agoFix GATT Server disconnecting for no reason
Jakub Pawlowski [Thu, 25 May 2017 16:09:12 +0000 (09:09 -0700)]
Fix GATT Server disconnecting for no reason

Connections created by GAP profile should be ephemeral, and not
interfere with the connection timeout.

When a device is bonded, listing services through DM would cause a
DM APP to create a connection, and later to disconnect. This causes
connection to timeout. In case a device was already connected, this
should not happen.

Bug: 34951749
Test: manual
Change-Id: Iad04fd9eed4c664f35131442e3f83a704497a067
(cherry picked from commit 16bb48b320cde54a1a06a525f4d9be1421689649)

7 years agoFix crashes when GAP operation is interrupted by disconnection
Jakub Pawlowski [Thu, 25 May 2017 15:21:53 +0000 (08:21 -0700)]
Fix crashes when GAP operation is interrupted by disconnection

Also fixes potential issue while allocating control blocks.

Test: none
Bug: 38499153
Change-Id: I5101ac97476953cdfece45c3fa9b909e38b9d2dd
(cherry picked from commit feec106412c54dbbfdb0e13d62d744f8fec6fd52)

7 years agoMCAP: Add test interface for PTS test (2/2)
Jack He [Sat, 13 May 2017 20:52:12 +0000 (13:52 -0700)]
MCAP: Add test interface for PTS test (2/2)

* PTS tests requires MCAP APIs to be called at protocol level
* This CL creates a test interface to enable the above functionality

Bug: 37867299
Test: make, no user visible effect
Change-Id: I15cc6cc613ce8f7c57564296e45077ab877c269b
(cherry picked from commit 722ce12babbd3d1e814f6e704860699a0b726e4f)

7 years agoMCAP: Fix bugs in MCAP stack
Jack He [Thu, 18 May 2017 05:22:18 +0000 (22:22 -0700)]
MCAP: Fix bugs in MCAP stack

* Fix error response message for clock sync opcodes
* Fix error response message for CREATE_MDL opcode
* Fix logging in the MCAP stack

Bug: 37867299
Test: make, PTS MCAP test
Change-Id: I7a37ac04806bca20d732357f00b4761577b4be19
(cherry picked from commit b3a8dc2ece90770b41f4bc0555fabb2742093176)

7 years agoeSCO: Format changes to original vendor patch (4/5)
Jack He [Mon, 8 May 2017 00:27:47 +0000 (17:27 -0700)]
eSCO: Format changes to original vendor patch (4/5)

* Format changes to original vendor patch
* Re-order part of SCO creation code to improve readability
* Make log more concise and usefull

Bug: 19540029
Test: make, HFP PTS test, testplans/86884, testplans/87103
Change-Id: Ie0199519afb30f56568c04fef728fce44a172063
(cherry picked from commit fe695a557a92053d4c44428ba08c0b8e945d4711)

7 years agoeSCO: Additional fix to get eSCO working for HFP and HSP (3/5)
Jack He [Mon, 8 May 2017 00:26:02 +0000 (17:26 -0700)]
eSCO: Additional fix to get eSCO working for HFP and HSP (3/5)

* Removed vendor specific call after codec negotiation and before eSCO
  command is sent to Bluetooth chip
* Removed vendor specific call after a SCO connection is requested by
  the peer
* Removed vendor specific save audio state methods

Bug: 19540029
Test: make, HFP PTS test, testplans/86884, testplans/87103
Change-Id: I899405a8eaa2f38ee0de04949c5288f9eefa74df
(cherry picked from commit 400ac497f45181d3c64f6a19687992de9b69b094)

7 years agoeSCO: Remove BTM_WBS_INCLUDED from the stack (2/5)
Myles Watson [Fri, 10 Feb 2017 00:26:34 +0000 (16:26 -0800)]
eSCO: Remove BTM_WBS_INCLUDED from the stack (2/5)

All of our platforms support WBS.

Bug: 19540029
Test: make, HFP PTS test, testplans/86884, testplans/87103
Change-Id: I384d49f73935ebb35b17132e71c85174797c435e
(cherry picked from commit 3e634d6c1e83f053005c9abdbd89e662ad81c4d4)

7 years agoeSCO: BT 4.1 Enhanced SCO command (1/5)
Mudumba Ananth [Thu, 9 Feb 2017 17:05:48 +0000 (09:05 -0800)]
eSCO: BT 4.1 Enhanced SCO command (1/5)

Added support for BT 4.1 enhanced SCO feature on the stack.
This feature allows the stack to create a SCO connection with
remote device by using Hci_Enhanced_Setup_Synchronous_Connection
command after checking the controller (4.1) support for
enhanced SCO command.
Added the command parameters to use the command in both wide band
speech(WBS) and narrow band speech(NBS) scenarios.

Number of Broadcom vendor specific commands(VSCs)that are needed
to be sent to Broadcom controllers along with this command have
also been updated accordingly

NOTE: This change would also need a firmware patch for
the feature to work on Broadcom contollers which will
be delivered to Google in a separate change set.

Bug: 19540029
Test: make, HFP PTS test, testplans/86884, testplans/87103
Change-Id: I1014d81be5cbe91078a4484dd072ac3957bfdfe4
(cherry picked from commit 57f6508cf7b22788fa2e7a739cec241b785718fb)

7 years agoMerge "Remove logspam when initializing logging for Bluetooth" into oc-dev
TreeHugger Robot [Mon, 22 May 2017 22:54:35 +0000 (22:54 +0000)]
Merge "Remove logspam when initializing logging for Bluetooth" into oc-dev

7 years agoRemove logspam when initializing logging for Bluetooth
Ajay Panicker [Wed, 17 May 2017 05:43:51 +0000 (22:43 -0700)]
Remove logspam when initializing logging for Bluetooth

Bug: 37803501
Test: Code still compiles
Change-Id: I9326e58aff0d80e441cb92c41e0e4a7d70e32b1b
(cherry picked from commit 5dd1e2de4a7411870d7ca13f549690a6498a6452)

7 years agoRemove logspam when adding GATT attributes
Ajay Panicker [Wed, 17 May 2017 01:46:22 +0000 (18:46 -0700)]
Remove logspam when adding GATT attributes

Bug: 37905488
Test: Code still compiles
Change-Id: I479fc82a15f977b7e3d50b07302241909efc8856
(cherry picked from commit 60177e01c4644d1194d75248e8d2a6b1b40f7670)

7 years agoMerge "Reject LE COC if cid is duplicated" into oc-dev
TreeHugger Robot [Mon, 22 May 2017 18:17:41 +0000 (18:17 +0000)]
Merge "Reject LE COC if cid is duplicated" into oc-dev

7 years agoProtect concurrent access to local state used during BLE scanning
Jakub Pawlowski [Wed, 17 May 2017 22:23:22 +0000 (15:23 -0700)]
Protect concurrent access to local state used during BLE scanning

Make sure that all access happens on jni thread

Bug: 38298938
Test: Code compilation
Change-Id: I38246626d2c6390586b314b27889dd9ba905f406
(cherry picked from commit eb43e9cf12139aeb227e26a8201a80974129c553)

7 years agoProtect the message loop from accesses after HCI shutdown
Pavlin Radoslavov [Wed, 17 May 2017 01:50:43 +0000 (18:50 -0700)]
Protect the message loop from accesses after HCI shutdown

Bug: 38330724
Test: Manual: enable/disable Bluetooth
Change-Id: Iaece4cd608c67b28b436ded9fcc51c0bf28f4098
(cherry picked from commit 7277f39540fefe551dc2120fc4db787a9ed57646)

7 years agoBlacklist Kinivo BTC350 for Absolute Volume
Marie Janssen [Wed, 17 May 2017 01:40:45 +0000 (18:40 -0700)]
Blacklist Kinivo BTC350 for Absolute Volume

The volume is erratic on the speakers when the speaker is reporting
linear increase, with decreases for higher volumes.

Test: check that absolute volume not used for Kinivo Speakers
Bug: 37872586
Change-Id: Ic5f409e8631bece66a75372b916faa9c104e2024
(cherry picked from commit e1fca1bacd76bd4e2c6c00ea3e292633e0eae0ec)

7 years agoDisable MONO channel mode for LDAC
Pavlin Radoslavov [Tue, 16 May 2017 23:20:23 +0000 (16:20 -0700)]
Disable MONO channel mode for LDAC

Bug: 38351937
Test: A2DP streaming to LDAC headset and switching MONO/STEREO in Settings
Change-Id: I20c5069fd5d104b9ebe767ae2728af7d7b2ae1d9
(cherry picked from commit f7e48dff99ffbce639c37379976b8cd9519e1d06)

7 years agoDiscover primary service by UUID for PTS tests (1/4)
Jakub Pawlowski [Tue, 16 May 2017 17:47:54 +0000 (10:47 -0700)]
Discover primary service by UUID for PTS tests (1/4)

Bug: 38123054
Test: manual
Change-Id: Ic97a964ca2a25a84c6abcf41acb0f3fb583488a2
(cherry picked from commit 45aebe75f75c1f93c396118bc39748fc0f4054c7)

7 years agoFix crash on GATT service unregistration
Jakub Pawlowski [Mon, 15 May 2017 07:58:07 +0000 (00:58 -0700)]
Fix crash on GATT service unregistration

When SDP_MAX_RECORDS were reached in SDP db, which usually happen by
registering big number of GATT services, unregistration of a service was
causing a crash. This was because we moved from memory after the array
into last element.

Bug: 38265174
Test: manual
Change-Id: I7b0235213fb07c85dcc1245f1c840b41267521d5
(cherry picked from commit 0d892120359af4cd1af7f9c13897c1002eac59f3)

7 years agoDon't ignore the A2DP Sink preferred SBC codec config
Pavlin Radoslavov [Fri, 12 May 2017 10:02:08 +0000 (03:02 -0700)]
Don't ignore the A2DP Sink preferred SBC codec config

If the A2DP Sink device sends "Set Configuration" with its preferred
SBC configuration, try using that configuration when selecting
the codec parameters instead of the A2DP Sink SBC capability.

Test: A2DP streaming, PTS AVDTP Tests: TC_ACP_SRC_SIG_SMG_BV_18_C,
      TC_ACP_SRC_SIG_SMG_BV_20_C, TC_ACP_SRC_SIG_SMG_BV_22_C
      PTS A2DP Tests: A2DP/SRC/SET/BV-04-I, A2DP/SRC/SET/BV-06-I
Bug: 37723311
Bug: 35664023
Change-Id: I48e2aa664b899c1cda5df4d1f86f9cfa3a9a67f6
(cherry picked from commit d62e522131e8646830f846fdcb292870d7fb9d7b)

7 years agoSet the RTP Header Marker bit selectively per A2DP codec
Pavlin Radoslavov [Fri, 12 May 2017 08:16:10 +0000 (01:16 -0700)]
Set the RTP Header Marker bit selectively per A2DP codec

Add a mechanism to set the RTP Header Marker bit per codec.
Currently, the Marker bit is set only for AAC.

Test: A2DP streaming, PTS AVDTP tests: TC_ACP_SRC_TRA_BTR_BV_01_C,
      TC_INT_SRC_SIG_SMG_BV_17_C, TC_INT_SRC_TRA_BTR_BV_01_C
Bug: 37723283
Change-Id: I9b8e77d44c750746c169df9628d5539ad2406b92
(cherry picked from commit 3b8391cd47dd0ea3e399f99a888f029de8c7d8c8)

7 years agoMerge changes I1620be68,Ide2c2110 into oc-dev
TreeHugger Robot [Fri, 12 May 2017 20:03:14 +0000 (20:03 +0000)]
Merge changes I1620be68,Ide2c2110 into oc-dev

* changes:
  Improve GATT Server database handling.
  GATT Server: check UUID

7 years agoMerge "Disable output_sample.pcm" into oc-dev
TreeHugger Robot [Fri, 12 May 2017 18:50:35 +0000 (18:50 +0000)]
Merge "Disable output_sample.pcm" into oc-dev

7 years agoImprove GATT Server database handling.
Jakub Pawlowski [Tue, 9 May 2017 12:02:38 +0000 (05:02 -0700)]
Improve GATT Server database handling.

- use references instead of pointers where possible. Thanks to it we can
  remove some reduntant null checks and simplify the code.
- use directly allocated memory instead of own buffers. Thanks to it the
  stack uses around 12kb less of memory after startup.
- use list and vector from std library, instead of some hand-written
  implementations.

This patch is a prerequisite for further server refactoring, that will
further reduce the space used, make unit-testing possible, and enable
proper handling of PTS GATT tests.

Test: sl4a GattReadTest
Bug: 38225928
Change-Id: I1620be682259ccb8f0c02754806e355e3f1ad0c1
(cherry picked from commit 6395f1547ed6179dcdeed392bd9909d18772fb25)

7 years agoGATT Server: check UUID
Jakub Pawlowski [Wed, 10 May 2017 11:39:26 +0000 (04:39 -0700)]
GATT Server: check UUID

Characteristic and descriptor can't use UUID equal to GATT Attribute
Types. Using such UUID would result in invalid GATT database, and
crashes during service discovery.

Test: manual
Bug: 38134693
Change-Id: Ide2c21109f885cbc79287452b1dabd3f532de385
(cherry picked from commit 671ad6679ce4b8edcdb7eaaee96bc5c66b557441)

7 years agoDisable output_sample.pcm
Joseph Pirozzo [Thu, 11 May 2017 16:36:47 +0000 (09:36 -0700)]
Disable output_sample.pcm

Update include files to include bt_target.h as it has the necessary
defines to correctly allow bdroid_buildcfg.h to enable and disable
dumping to output_sample.pcm.

Bug: 38180732
Test: Stream Bluetooth audio to device and observe that
output_sample.pcm does not get written or appended to.

Change-Id: Ia7926f93a47489686d315e3c9abd1618cb8adda3

7 years agoDO NOT MERGE ANYWHERE Check ACL link on non-opportunistic connection creation am...
Jacky Cheung [Thu, 11 May 2017 23:24:02 +0000 (23:24 +0000)]
DO NOT MERGE ANYWHERE Check ACL link on non-opportunistic connection creation am: 0ce25115e9  -s ours
am: 6ba79a8618  -s ours

Change-Id: Ibc77d01e1b480d60b04da5355242ba4071a9b064

7 years agoDO NOT MERGE ANYWHERE Check ACL link on non-opportunistic connection creation
Jacky Cheung [Thu, 11 May 2017 23:19:01 +0000 (23:19 +0000)]
DO NOT MERGE ANYWHERE Check ACL link on non-opportunistic connection creation
am: 0ce25115e9  -s ours

Change-Id: I105198593ba9994002205567038778162dc9e6d0

7 years agoDO NOT MERGE ANYWHERE Check ACL link on non-opportunistic connection creation
Jacky Cheung [Wed, 10 May 2017 21:23:06 +0000 (14:23 -0700)]
DO NOT MERGE ANYWHERE Check ACL link on non-opportunistic connection creation

At the time of connection, the idle timeout could have been set to a fixed
value, which is likely to be related to the completion of service discovery
after bonding.  A check on ACL link allows the idle timeout to be reset to no
timeout, which would eliminate local host disconnections observed due to
idle timeouts.

Bug: 37352720
Test: manual
Change-Id: Ie0b24b83020d502cf7c55421a27659215253b4d2

7 years agoMerge "btif: GetItemAttributes can return no attributes" into oc-dev
TreeHugger Robot [Thu, 11 May 2017 01:03:30 +0000 (01:03 +0000)]
Merge "btif: GetItemAttributes can return no attributes" into oc-dev

7 years agoReject LE COC if cid is duplicated
Jaganath Kanakkassery [Tue, 2 May 2017 10:54:16 +0000 (16:24 +0530)]
Reject LE COC if cid is duplicated

This is for PTS test TP/LE/CFC/BV-20-C.

The scenario is there is already one COC between DUT and PTS.
Then PTS tries to establish one more COC with same cid which
should be rejected.

Test: PTS test TP/LE/CFC/BV-20-C done by Intel (originator
of this change).

Change-Id: I094a4058ac0e7bb9d7344e66d9feafee17bc3d53
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
(cherry picked from commit a252e78152f27ed07285ecf187ace83a12bca06b)

7 years agoFix broken linux build
Jack He [Thu, 4 May 2017 20:27:25 +0000 (13:27 -0700)]
Fix broken linux build

* Generic linux does not have property_get_int32. Instead,
  osi_property_get_int32() is created to handle OS_GENERIC cases
* Some linux header have sigevent.sigev_notify_attributes typed as
  (pthread_attr_t *) whereas others typed it as (void *), as any pointer
  can be implicitly casted to (void *), the current casting to (void *)
  is unncessary and will break build on systems using (pthread_attr_t *)

Test: make, unit test, no user visible effect
Change-Id: I24b33da453dc9d40656168a3bcd900d9c99219ce
(cherry picked from commit 2b59c4a0843c9f2782cf4163f921eddb31dd6ff9)

7 years agobtif: GetItemAttributes can return no attributes
Marie Janssen [Fri, 14 Apr 2017 21:07:19 +0000 (14:07 -0700)]
btif: GetItemAttributes can return no attributes

If there are no attributes available, it's possible to return zero
attributes from a GetItemAttributes request.

This is triggered by some carkits who are unhappy when they only get
titles back (the only required item) and ask for the rest of the
attributes (which we don't have).

Test: connect to honda carkit and get snoop logs to confirm
Bug: 36055995
Bug: 35956792
Change-Id: I5a31e206565d212e456111d8c6b542c7a1569e5a
(cherry picked from commit 840f4f3de98c7d6c83abae89f0b41990bc56fef4)

7 years agoRemove include for log/log.h in l2c_main.cc
Jack He [Wed, 10 May 2017 19:05:25 +0000 (12:05 -0700)]
Remove include for log/log.h in l2c_main.cc

* log/log.h is not supported by linux build and is handled by
  osi/include/log.h
* Thus, it shouldn't be included in l2c_main.cc, which breaks the linux
  build

Test: make on both linux and Android, no functional effect
Change-Id: I0c974b754b43d7b73adea2a91078b85e22b3b14e

7 years agoLE advertise data parsing refactor
Jakub Pawlowski [Fri, 28 Apr 2017 21:59:46 +0000 (14:59 -0700)]
LE advertise data parsing refactor

* merge BTM_CheckAdvData and BTM_CheckEirData into GetFieldByType
* check wether AD data is properly formatted when the packet is
  received. Some controllers were returning malformed data that
  resulted in stack crashes for BT5 packets.
* add tests to verify the helpers work as expected

Test: added net_test_stack_ad_parser
Bug: 37671082
Change-Id: I49e43d7cf7d0a8ace1ee45d9b14b2b8440096b05
(cherry picked from commit 103b2c44d3db6172a2dc9319e215eeece504316e)

7 years agoCheck device name length
Jakub Pawlowski [Fri, 28 Apr 2017 12:15:16 +0000 (05:15 -0700)]
Check device name length

BT spec limits the length of device name to 248 bytes. With the new
LE advertising packets, that can go up to 1650 bytes long, we must check
the length of device name received.

Bug: 37671082
Test: manual
Change-Id: Iad309d638003c2391014c9764605d84ed5717cb1
(cherry picked from commit 3a4e7622ff07772a512052c23cada59f5830941f)

7 years agoMerge "Revert "Revert "Make Bluetooth audio threads use RT scheduling""" into oc-dev
TreeHugger Robot [Fri, 5 May 2017 22:17:39 +0000 (22:17 +0000)]
Merge "Revert "Revert "Make Bluetooth audio threads use RT scheduling""" into oc-dev

7 years agoMove hci_thread to a message loop and prevent thread from spinning
Ajay Panicker [Fri, 28 Apr 2017 22:26:38 +0000 (15:26 -0700)]
Move hci_thread to a message loop and prevent thread from spinning

Before this patch, if there was a message on the command queue and
there were no command credits, the thread reactor would spin trying
to process the message on the command queue and would continue until
a credit was received. This led to a bug where upon switching users,
hci_thread would spin and try to use 100% of the CPU. This is fixed
by moving over to a message loop and queue system. The message loop
processes all the messages. If there aren't enough command credits,
command messages are deferred to the command queue and popped off
whenever more credits are aquired. The deferred queue has priority
to credits over recently posted messages.

Bug: 37733903
Test: Swap users with the real time scheduling patch applied, and
      general Bluetooth usage.
      TestTracker: 86249
Change-Id: Ib775e47f6d4810d3d7d8af5b3ba84adc4ada3da5

7 years agoDO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links. am: 7d3de37da0 ...
Sridhar Vashist [Fri, 5 May 2017 01:21:52 +0000 (01:21 +0000)]
DO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links. am: 7d3de37da0  -s ours
am: 6c0de854a3  -s ours

Change-Id: I1461d75a0cdf2fb5a209b094df02830092c05141

7 years agoDO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links.
Sridhar Vashist [Fri, 5 May 2017 01:17:20 +0000 (01:17 +0000)]
DO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links.
am: 7d3de37da0  -s ours

Change-Id: I90f535c99d45ebf0def0b2b08031a21f998c1c2e

7 years agoDO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links.
Sridhar Vashist [Fri, 28 Oct 2016 18:37:49 +0000 (13:37 -0500)]
DO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links.

3DH packets have a lower tolerance to background noise. A2DP requiring higher
bandwidth & realtime playback is especially suscepitble in this scenario.

Bug: 37515006
Test: oem manual
Change-Id: Id4d7452a86fe864eceb88a9fb16a40dc921a1e13

7 years agoMerge "Limit btsnoop file size (5/9)" into oc-dev
Ajay Panicker [Thu, 4 May 2017 22:56:16 +0000 (22:56 +0000)]
Merge "Limit btsnoop file size (5/9)" into oc-dev

7 years agoMerge "Add supervision timeout workaround for Nexus Remote" into oc-dev
Jakub Pawlowski [Thu, 4 May 2017 20:22:57 +0000 (20:22 +0000)]
Merge "Add supervision timeout workaround for Nexus Remote" into oc-dev

7 years agoAdd supervision timeout workaround for Nexus Remote
Jakub Pawlowski [Tue, 28 Mar 2017 19:58:34 +0000 (12:58 -0700)]
Add supervision timeout workaround for Nexus Remote

The Nexus Remote would report 100ms supervision timeout in its preferred
connection parameters. In some noisy environments, this might cause
connection to be dropped. As a workaround, set the timeout to 3s for the
remote.

Test: manual
Bug: 36645397
Bug: 37717216
Change-Id: I665a854e9d55067ec1aca273c31d06c6114c48be
(cherry picked from commit 9e6747537a4a2c0143c26ab31e4597a017372e5f)

7 years agoRemove 96.0 and 88.2 kHz sample rate from A2DP AAC capability
Pavlin Radoslavov [Thu, 4 May 2017 05:48:28 +0000 (22:48 -0700)]
Remove 96.0 and 88.2 kHz sample rate from A2DP AAC capability

The A2DP AAC Source capabilty should not include 96.0 and 88.2 kHz
sample rate - those were included unintentionally without being tested.

Bug: 37968743
Test: A2DP AAC streaming
Change-Id: Ia3228d4d14d3288acfda42fbaf8ab248ae530b48
(cherry picked from commit 4b93aeb450c4e42a80d8519528dc8fcfacc1d964)

7 years agoRevert "Revert "Make Bluetooth audio threads use RT scheduling""
Philip Cuadra [Wed, 3 May 2017 04:00:02 +0000 (21:00 -0700)]
Revert "Revert "Make Bluetooth audio threads use RT scheduling""

This reverts commit feb2d84f4b69392b5f37ae1ec9d53ac728514275.

Bluetooth threads that are used in audio have deadline
requirements for glitchless playback.  Those threads need to be
scheduled as RT tasks to ensure that they can meet the deadline even if
there is high system load.

Bug 37518404

Test:  play Bluetooth audio, check for RT with systrace
(cherry picked from commit 96c42e70f5c6a74a737739aa9c297cd93540f43e)

7 years agoaudio_a2dp_hw: fix fd leak on open
Andy Hung [Mon, 1 May 2017 22:04:57 +0000 (15:04 -0700)]
audio_a2dp_hw: fix fd leak on open

Open hal fds can be checked by

adb shell lsof | grep audio@2. | grep socket | wc

Test: connect and disconnect BT, check open fd.
Bug: 37726871

Change-Id: Id446c43515eceb0828cfb33807a4c0b4c6145a6d

7 years agoDo not GATT_ERROR on MTU change
Jacky Cheung [Mon, 17 Apr 2017 20:38:39 +0000 (13:38 -0700)]
Do not GATT_ERROR on MTU change

Bug: 37305498
Test: manual on MSM8909
Change-Id: I07389620efc914d0ece52262edc2c35b498d5564
(cherry picked from commit f271c9109e5608acb393c9bef0bca9d2b0177f5d)

7 years agoMerge "Move ad2p back to system." into oc-dev
TreeHugger Robot [Sat, 29 Apr 2017 21:06:54 +0000 (21:06 +0000)]
Merge "Move ad2p back to system." into oc-dev

7 years agoMerge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f...
Jacky Cheung [Sat, 29 Apr 2017 03:55:00 +0000 (03:55 +0000)]
Merge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f-dev am: b055f8b68a  -s ours
am: f67b6bfa1b  -s ours

Change-Id: I94a81ea270037bd5fc7420a52819421125fc5b5b

7 years agoMerge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f-dev
Jacky Cheung [Sat, 29 Apr 2017 03:52:59 +0000 (03:52 +0000)]
Merge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f-dev
am: b055f8b68a  -s ours

Change-Id: I7b31a9bb0a09d3e7bbb2b666331f4ac47a93efff

7 years agoMerge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f-dev
Jacky Cheung [Sat, 29 Apr 2017 03:48:18 +0000 (03:48 +0000)]
Merge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f-dev

7 years agoDO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing
Jakub Pawlowski [Thu, 27 Apr 2017 11:52:34 +0000 (04:52 -0700)]
DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing

When a device connect to android over LE, the default policy is to keep
this connection. If any app "claims" this connnection, and then stop
using it, we'll disconnect from the device after a short timeout.

If pairing is triggered to such device, that is connected but not used
by any app, it will cause disconnect after the pairing is finished. This
is because using SMP over fixed LE L2CAP channel is conseidered as
connecting, using, and disconnecting a channel by the stack. This is
obvious logic error - using fixed channels should not require
"connecting" to them.

As a temporary workaround, do not trigger a timeout when a fixed SMP
channel is closed over LE.

For LE only devices, this means they will stay connected after the
pairing until some app starts using them or they disconnect. For dual
mode devices, Classic connection will be established and SDP will be
performed. The classic connection will be disconnected if no app will
use it, and the LE connection to the device will stay up.

Bug: 37352720
Test: manual
Change-Id: Ic9d688aacf84e0267277b12b28dfa7cc57fdcea6
(cherry picked from commit 7c8bab231328956d3b7569280cb162be4e345422)

7 years agoMove ad2p back to system.
Steven Moreland [Thu, 27 Apr 2017 21:14:35 +0000 (14:14 -0700)]
Move ad2p back to system.

Test: built to vendor
Fixes: 37681782
Change-Id: I08542090d6b371e3c6de2e65d5c68d0f14c76737

7 years agoMerge "Revert "Make Bluetooth audio threads use RT scheduling"" into oc-dev
Philip Cuadra [Fri, 28 Apr 2017 01:31:47 +0000 (01:31 +0000)]
Merge "Revert "Make Bluetooth audio threads use RT scheduling"" into oc-dev

7 years agoRevert "Make Bluetooth audio threads use RT scheduling"
Philip Cuadra [Fri, 28 Apr 2017 01:27:09 +0000 (01:27 +0000)]
Revert "Make Bluetooth audio threads use RT scheduling"

This reverts commit eaa42774f393eb3ccaee91a958e8df6a8fb09b91.

http://b/37733903
Test:  confirmed switching users does not hang.

Change-Id: Ic54e4ed2dda057e681df225a37a574c221cd8fc3

7 years agoMerge changes from topic 'bt5-cherry-pickerry-3' into oc-dev
Jakub Pawlowski [Thu, 27 Apr 2017 22:20:37 +0000 (22:20 +0000)]
Merge changes from topic 'bt5-cherry-pickerry-3' into oc-dev

* changes:
  Fix LE disconnecting right after pairing
  Handle remote not supporting LL_SLAVE_FEATURE_REQ
  Expose LE advertiser address for easier PTS tests (4/6)
  Read by UUID for PTS tests (4/5)

7 years agoLimit btsnoop file size (5/9)
Ajay Panicker [Tue, 18 Apr 2017 03:53:24 +0000 (20:53 -0700)]
Limit btsnoop file size (5/9)

Limit btsnoop file size by rotating between snoop files. The rotation occurrs
when a fixed number of packets have been logged and will start overwriting
the older file.

Bug: 35998031
Test: Enable snoop logs from developer options and let logs get large
Merged-In: Ia8741223cb31b2c20d9ef5607e9204cc3946b165
Change-Id: Ia8741223cb31b2c20d9ef5607e9204cc3946b165

7 years agoFix issue with BLE advertising not started when local privacy is not enabled
Jacky Cheung [Wed, 26 Apr 2017 17:27:41 +0000 (10:27 -0700)]
Fix issue with BLE advertising not started when local privacy is not enabled

Bug: 37282500
Test: manual
Change-Id: I44657d0b3315bc241373c8cbaf6a2b6a6e49f31d

7 years agoFix LE disconnecting right after pairing
Jakub Pawlowski [Thu, 27 Apr 2017 11:52:34 +0000 (04:52 -0700)]
Fix LE disconnecting right after pairing

When a device connect to android over LE, the default policy is to keep
this connection. If any app "claims" this connnection, and then stop
using it, we'll disconnect from the device after a short timeout.

If pairing is triggered to such device, that is connected but not used
by any app, it will cause disconnect after the pairing is finished. This
is because using SMP over fixed LE L2CAP channel is conseidered as
connecting, using, and disconnecting a channel by the stack. This is
obvious logic error - using fixed channels should not require
"connecting" to them.

As a temporary workaround, do not trigger a timeout when a fixed SMP
channel is closed over LE.

For LE only devices, this means they will stay connected after the
pairing until some app starts using them or they disconnect. For dual
mode devices, Classic connection will be established and SDP will be
performed. The classic connection will be disconnected if no app will
use it, and the LE connection to the device will stay up.

Bug: 37352720
Test: manual
Change-Id: Ic9d688aacf84e0267277b12b28dfa7cc57fdcea6
(cherry picked from commit 7c8bab231328956d3b7569280cb162be4e345422)

7 years agoHandle remote not supporting LL_SLAVE_FEATURE_REQ
Jakub Pawlowski [Mon, 24 Apr 2017 13:34:11 +0000 (06:34 -0700)]
Handle remote not supporting LL_SLAVE_FEATURE_REQ

Test: for PTS
Change-Id: I3030a068c1c4980fa7cbb23b478afbe441584869
(cherry picked from commit 341b6db90d67e76ea9262c5e9f3ba5063cb93598)

7 years agoExpose LE advertiser address for easier PTS tests (4/6)
Jakub Pawlowski [Wed, 19 Apr 2017 14:05:00 +0000 (07:05 -0700)]
Expose LE advertiser address for easier PTS tests (4/6)

This patchset adds a hidden method getOwnAddress, that lets app with
BLUETOOTH_PRIVILEGED permission to lear their own addreess. This is done
exclusively for PTS tests.

Bug: 35147497
Test: manual
Change-Id: I5ad554d872f2b772f2bf91642a9648c4018d935c
(cherry picked from commit 779b4fd786c571cb8013f4d94ddacfe7116fb05f)

7 years agoRead by UUID for PTS tests (4/5)
Jakub Pawlowski [Fri, 14 Apr 2017 14:27:49 +0000 (07:27 -0700)]
Read by UUID for PTS tests (4/5)

Add a hidden api for reading characteristic by UUID for PTS.

Bug: 35150313
Test: sl4a GattReadTest.byUuid
Change-Id: I072473c5f7b761707774efd89f8a22bfdf012135
(cherry picked from commit 7dd34f52bc950bae2fb1b30b17da0ff34ee016aa)

7 years agoMake Bluetooth audio threads use RT scheduling
Philip Cuadra [Thu, 23 Mar 2017 17:10:34 +0000 (10:10 -0700)]
Make Bluetooth audio threads use RT scheduling

Bluetooth threads that are used in audio have deadline
requirements for glitchless playback.  Those threads need to be
scheduled as RT tasks to ensure that they can meet the deadline even if
there is high system load.

Bug 37518404

Test:  play Bluetooth audio, check for RT with systrace
Merged-In: I4505fbce55e5a4fe18d00dbda23646a60e482efd
Change-Id: I4505fbce55e5a4fe18d00dbda23646a60e482efd
(cherry picked from commit 96c42e70f5c6a74a737739aa9c297cd93540f43e)

7 years agoMerge "Add missing library dependency when compiling the unit tests" into oc-dev
TreeHugger Robot [Tue, 25 Apr 2017 17:39:47 +0000 (17:39 +0000)]
Merge "Add missing library dependency when compiling the unit tests" into oc-dev

7 years agoAdd missing library dependency when compiling the unit tests
Pavlin Radoslavov [Tue, 25 Apr 2017 00:37:20 +0000 (17:37 -0700)]
Add missing library dependency when compiling the unit tests

This fixes a compilation issue when compiling with ASAN enabled.

Bug: 37624756
Test: make -j 40  SANITIZE_TARGET='address coverage' tests
Change-Id: I9caa3d404e60ee105435539744ed2b8ccf353700
(cherry picked from commit 044921b223868595a6f96709020b46349b05fa45)

7 years agoAVRCP 1.6: Limit GetFolderItemResponse
Hemant Gupta [Wed, 12 Apr 2017 18:26:15 +0000 (23:56 +0530)]
AVRCP 1.6: Limit GetFolderItemResponse

Usecase:
1) Connect from AVRCP Controller supporting browsing
   having low L2CAP MTU eg 672.
2) Request for get folder items with large request items,
   response for which will exceed MTU size.

Expected Result:
As per AVRCP 1.6 Spec, section 29.20 pg 178, response should be
limited to number of completed get folder items that can fit in
single AVCTP Browsing channel MTU even if the completed items
are less than actually requested by AVRCP Controller.

Observation:
DUT responding with Internal Error.

Root Cause:
When there is no space to fill complete Get Folder Item response
within MTU size, DUT was returning error.

Fix:
Send max completed items which can fit in single MTU packet.

Test: Checked if the remote device can receive the truncated
response and get folder items succeeds when remote device
reissues get folder item request with updated start list count.

Frequency: 5/5

Bug: 37304477
Change-Id: I1963f97075382fc8333038e3efffaf61a9d84a28
(cherry picked from commit a7c7437bbffe133f9192b9ca82b5b4e1f6d9835a)

7 years agoAllow the Bluetooth MAC address to be updated asynchronously (3/3)
Stanley Tng [Tue, 18 Apr 2017 05:38:38 +0000 (22:38 -0700)]
Allow the Bluetooth MAC address to be updated asynchronously (3/3)

There are intermittent issues where either the returned Bluetooth
MAC address to Java framework is uninitialized or this address update
arrives too late. This fix will do 2 things:
(1) Returns error when MAC address is unavailable in the native code.
(2) Updates the MAC address later by adding a new broadcast event.

Test: Check address for these cases: factory reset, system reboot, and
Bluetooth re-enable.
Bug: 36709382

Change-Id: I7b1c526ee227897c003ac921078f317f96b92604
(cherry picked from commit 7dc0525365025e17e289869288b1b7d5146306cc)

7 years agoMerge "DO NOT MERGE ANYWHERE Allow blocking AG SCO connects by policy" into cw-f...
Zach Johnson [Fri, 21 Apr 2017 21:07:06 +0000 (21:07 +0000)]
Merge "DO NOT MERGE ANYWHERE Allow blocking AG SCO connects by policy" into cw-f-dev am: b53535d61b  -s ours
am: 1238329f28  -s ours

Change-Id: I5995614654f92977a6118ea365f1575e97acfbc1

7 years agoDO NOT MERGE ANYWHERE Allow blocking AG SCO connects by policy am: c61ef79a79 -s...
Zach Johnson [Fri, 21 Apr 2017 21:06:23 +0000 (21:06 +0000)]
DO NOT MERGE ANYWHERE Allow blocking AG SCO connects by policy am: c61ef79a79  -s ours
am: 31dfa53ba0  -s ours

Change-Id: Ic94d0bb3152b25c3d4c4b4d033c9a80a358727f3

7 years agoMerge "DO NOT MERGE ANYWHERE Allow blocking AG SCO connects by policy" into cw-f-dev
Zach Johnson [Fri, 21 Apr 2017 21:04:06 +0000 (21:04 +0000)]
Merge "DO NOT MERGE ANYWHERE Allow blocking AG SCO connects by policy" into cw-f-dev
am: b53535d61b  -s ours

Change-Id: I2399d1832fe643ef0057c2c4d0b0fa4bf860e760

7 years agoDO NOT MERGE ANYWHERE Allow blocking AG SCO connects by policy
Zach Johnson [Fri, 21 Apr 2017 21:03:23 +0000 (21:03 +0000)]
DO NOT MERGE ANYWHERE Allow blocking AG SCO connects by policy
am: c61ef79a79  -s ours

Change-Id: I9704dd064ab5f37ca0ecb310be1cf73826737665

7 years agoMerge "DO NOT MERGE ANYWHERE Allow blocking AG SCO connects by policy" into cw-f-dev
Zach Johnson [Fri, 21 Apr 2017 20:58:11 +0000 (20:58 +0000)]
Merge "DO NOT MERGE ANYWHERE Allow blocking AG SCO connects by policy" into cw-f-dev

7 years agoDO NOT MERGE ANYWHERE Allow blocking AG SCO connects by policy
Zach Johnson [Wed, 19 Apr 2017 04:03:07 +0000 (21:03 -0700)]
DO NOT MERGE ANYWHERE Allow blocking AG SCO connects by policy

Needed for devices that support both HFP AG and HFP HF.

btsnoop logs show the sequence of events leading to failure:
(corroborated by bt logcat)

1. ACL connection with remote phone established on handle 0x01
2. ACL connection with remote headset established on handle 0x02
3. Incoming call in HF role from phone
4. Phone call locally published to telecom
5. Answer incoming call
6. SCO connection established with phone in HF role
7. AG role with headset picks up on call state change to answered
   via BTA_AG_IN_CALL_CONN_RES
8. Inside handler for BTA_AG_IN_CALL_CONN_RES, bta_ag_sco_open called
   to establish the SCO connection in the AG role with the headset,
   stomping on the previous (wanted) SCO connection with the phone.

Fix is to publish the SCO audio route policy to fluoride, so we can
stop 8 from happening.

Bug: 32958838
Test: manual:
      received incoming call in HF role, audio worked both ways;
      recieved incoming MT call, headset audio in AG role worked both ways
Change-Id: I12961598e8200bd1d5adb46ee8ec3a802114b80a

7 years agoMerge "AVRC: Configure absolute volume to false if remove device not support it"...
TreeHugger Robot [Thu, 20 Apr 2017 01:47:33 +0000 (01:47 +0000)]
Merge "AVRC: Configure absolute volume to false if remove device not support it" into oc-dev

7 years agoMerge "Add default AVRCP version to prevent confusing log message" into oc-dev
TreeHugger Robot [Thu, 20 Apr 2017 00:07:09 +0000 (00:07 +0000)]
Merge "Add default AVRCP version to prevent confusing log message" into oc-dev

7 years agoAVRC: Configure absolute volume to false if remove device not support it
Tsuyoshi Kamata [Tue, 7 Mar 2017 06:46:34 +0000 (15:46 +0900)]
AVRC: Configure absolute volume to false if remove device not support it

Some AVRCP(ver>1.4) devices don't support absolute volume, when connected
to such device, volume control doesn't work properly on phone.

This patch fix the problem as bellow:
 - check category of remote device
     when add absolute volume feature flag.
 - remove absolute volume feature flag
     if remote device responses REJECT or NOT_IMPLEMENT.

Bug: 33441894
Test: manual
Change-Id: Icfd6f61699490efd937fa6d2383f333eb0f0144a
(cherry picked from commit a4fcd238aedee87384fa164e9465302aa4b69035)

7 years agoMerge "test_vendor: Remove unused libbt-vendor files" into oc-dev
TreeHugger Robot [Wed, 19 Apr 2017 22:40:13 +0000 (22:40 +0000)]
Merge "test_vendor: Remove unused libbt-vendor files" into oc-dev

7 years agoAdd default AVRCP version to prevent confusing log message
Ajay Panicker [Fri, 31 Mar 2017 16:53:12 +0000 (09:53 -0700)]
Add default AVRCP version to prevent confusing log message

Bug: 37509042
Test: Log message shows more info
Change-Id: Ic042d1cf1489e391fe6e9cc3d6239acb79917b01

7 years agoDo not GATT_ERROR on MTU change am: a365626943
Jacky Cheung [Wed, 19 Apr 2017 21:40:33 +0000 (21:40 +0000)]
Do not GATT_ERROR on MTU change am: a365626943
am: f21c3dede7  -s ours

Change-Id: I34f636613c211a859da4e2a095e02ca801944b61

7 years agoDo not GATT_ERROR on MTU change
Jacky Cheung [Wed, 19 Apr 2017 21:35:03 +0000 (21:35 +0000)]
Do not GATT_ERROR on MTU change
am: a365626943

Change-Id: I956c4ca2e31d5c98e986738be0890c17e21b1186