OSDN Git Service

android-x86/system-bt.git
8 years agoDO NOT MERGE ANYWHERE Spoof response to AT+CNUM if we don\'t get a reply from the...
Sharvil Nanavati [Thu, 28 Jan 2016 18:03:57 +0000 (18:03 +0000)]
DO NOT MERGE ANYWHERE Spoof response to AT+CNUM if we don\'t get a reply from the audio gateway.
am: 529a69c8e8  -s ours

* commit '529a69c8e83d843c683b99e32f8990c217f96c79':
  DO NOT MERGE ANYWHERE Spoof response to AT+CNUM if we don't get a reply from the audio gateway.

8 years agoDO NOT MERGE ANYWHERE Spoof response to AT+CNUM if we don't get a reply from the...
Sharvil Nanavati [Wed, 27 Jan 2016 17:43:16 +0000 (09:43 -0800)]
DO NOT MERGE ANYWHERE Spoof response to AT+CNUM if we don't get a reply from the audio gateway.

The Huawei Honor 4X CHE1-CL10 phone doesn't reply to AT+CNUM so
we end up disconnecting the service level connection. In this CL,
I'm spoofing an OK response to AT+CNUM in case we time out waiting
for a reply.

Bug: 26504036
Change-Id: I91d5ab4ea91fd67b3f6c6f796c39fd0091bff5cf

8 years agoMerge "DO NOT MERGE ANYWHERE Fix return value for HAL function config_clear." into...
Sharvil Nanavati [Wed, 27 Jan 2016 16:23:58 +0000 (16:23 +0000)]
Merge "DO NOT MERGE ANYWHERE Fix return value for HAL function config_clear." into cw-e-dev
am: f1f9523db0  -s ours

* commit 'f1f9523db05854aa4dc5c44087b1e4228ae87ab6':
  DO NOT MERGE ANYWHERE Fix return value for HAL function config_clear.

8 years agoMerge "DO NOT MERGE ANYWHERE Fix return value for HAL function config_clear." into...
Sharvil Nanavati [Wed, 27 Jan 2016 16:22:58 +0000 (16:22 +0000)]
Merge "DO NOT MERGE ANYWHERE Fix return value for HAL function config_clear." into cw-e-dev

8 years agoDO NOT MERGE ANYWHERE Fix return value for HAL function config_clear.
Sharvil Nanavati [Tue, 26 Jan 2016 21:09:22 +0000 (13:09 -0800)]
DO NOT MERGE ANYWHERE Fix return value for HAL function config_clear.

Change-Id: I75712f721f7031705d0accb4ffe89467d52d7aa3

8 years agoMerge "DO NOT MERGE ANYWHERE Update GKI_freebuf to gracefully handle NULL." into...
Sharvil Nanavati [Tue, 26 Jan 2016 13:31:04 +0000 (13:31 +0000)]
Merge "DO NOT MERGE ANYWHERE Update GKI_freebuf to gracefully handle NULL." into cw-e-dev
am: e3aabcbbf5  -s ours

* commit 'e3aabcbbf5b9c3108b980ec161b2cef614416138':
  DO NOT MERGE ANYWHERE Update GKI_freebuf to gracefully handle NULL.

8 years agoMerge "DO NOT MERGE ANYWHERE Update GKI_freebuf to gracefully handle NULL." into...
Sharvil Nanavati [Tue, 26 Jan 2016 13:29:32 +0000 (13:29 +0000)]
Merge "DO NOT MERGE ANYWHERE Update GKI_freebuf to gracefully handle NULL." into cw-e-dev

8 years agoMerge "Additional headsets blacklisted for absolute volume" into mnc-dr1.5-dev
Andre Eisenbach [Mon, 25 Jan 2016 13:41:05 +0000 (13:41 +0000)]
Merge "Additional headsets blacklisted for absolute volume" into mnc-dr1.5-dev

8 years agoRemove unused definition BOARD_HAVE_BLUETOOTH_BCM.
Sharvil Nanavati [Sat, 23 Jan 2016 01:47:23 +0000 (01:47 +0000)]
Remove unused definition BOARD_HAVE_BLUETOOTH_BCM.
am: ad46ee235f

* commit 'ad46ee235fa0828ebf4042d84f646424ffeadc31':
  Remove unused definition BOARD_HAVE_BLUETOOTH_BCM.

8 years agoRemove unused definition BOARD_HAVE_BLUETOOTH_BCM.
Sharvil Nanavati [Sat, 23 Jan 2016 00:54:33 +0000 (16:54 -0800)]
Remove unused definition BOARD_HAVE_BLUETOOTH_BCM.

Change-Id: I4f47ffbec067ad1d7b4db0269cd5f7ee21ae7861

8 years agoDO NOT MERGE ANYWHERE Update GKI_freebuf to gracefully handle NULL.
Sharvil Nanavati [Sat, 23 Jan 2016 01:35:07 +0000 (17:35 -0800)]
DO NOT MERGE ANYWHERE Update GKI_freebuf to gracefully handle NULL.

Change-Id: I45a3100c7d5c7a343996559c36f053881d333e5e

8 years agoAdditional headsets blacklisted for absolute volume
tturney [Thu, 21 Jan 2016 18:19:22 +0000 (10:19 -0800)]
Additional headsets blacklisted for absolute volume

Devices blacklisted:
Bluebuds Freedom
iKross
Jabra
Swage Rokitboost HS

Bug:26070064
Change-Id: Ic27d225718b84234541bf1b170f94dea0bc4463c

8 years agoMerge "DO NOT MERGE ANYWHERE" into cw-e-dev
Sharvil Nanavati [Wed, 20 Jan 2016 21:10:25 +0000 (21:10 +0000)]
Merge "DO NOT MERGE ANYWHERE" into cw-e-dev
am: 560033035b  -s ours

* commit '560033035b58014aed67701cb3b94b0a98f5c958':
  DO NOT MERGE ANYWHERE

8 years agoMerge "DO NOT MERGE ANYWHERE Disconnect the AVDT connection for A2DP SRC device....
Chenjie Luo [Wed, 20 Jan 2016 21:10:20 +0000 (21:10 +0000)]
Merge "DO NOT MERGE ANYWHERE Disconnect the AVDT connection for A2DP SRC device." into cw-e-dev
am: 5084f0166e  -s ours

* commit '5084f0166ee0ee20608413a79c88332275b61943':
  DO NOT MERGE ANYWHERE Disconnect the AVDT connection for A2DP SRC device.

8 years agoMerge "DO NOT MERGE ANYWHERE" into cw-e-dev
Sharvil Nanavati [Wed, 20 Jan 2016 21:07:26 +0000 (21:07 +0000)]
Merge "DO NOT MERGE ANYWHERE" into cw-e-dev

8 years agoMerge "DO NOT MERGE ANYWHERE Disconnect the AVDT connection for A2DP SRC device....
Chenjie Luo [Wed, 20 Jan 2016 21:04:30 +0000 (21:04 +0000)]
Merge "DO NOT MERGE ANYWHERE Disconnect the AVDT connection for A2DP SRC device." into cw-e-dev

8 years agoDO NOT MERGE ANYWHERE Disconnect the AVDT connection for A2DP SRC device.
WANG XING [Wed, 20 Jan 2016 09:20:39 +0000 (17:20 +0800)]
DO NOT MERGE ANYWHERE Disconnect the AVDT connection for A2DP SRC device.

If phone send A2DP connection request to device, the
device will start 2 seconds timer loop to check the
connection status of A2DP, bluetooth wake
lock will not be released. If the remote device is A2DP
source device, disconnect the AVDT connection.

BUG=26274393

Change-Id: I3a419e9e3dd613f20c973638b166d2a6012c45f7
Signed-off-by: m00182044 <m00182044@notesmail.huawei.com>
8 years agoDO NOT MERGE ANYWHERE
Sharvil Nanavati [Wed, 20 Jan 2016 17:14:47 +0000 (09:14 -0800)]
DO NOT MERGE ANYWHERE

Move btsnooz.py script from Android Wear to the BT stack project.

Change-Id: I8368820b5ed9325d2c3b82885b9fe934c6bc87ca

8 years agoDO NOT MERGE ANYWHERE
Sharvil Nanavati [Wed, 20 Jan 2016 04:31:38 +0000 (04:31 +0000)]
DO NOT MERGE ANYWHERE
am: 95f816945a  -s ours

* commit '95f816945a174f890b960330445087c3409f3327':
  DO NOT MERGE ANYWHERE

8 years agoDO NOT MERGE ANYWHERE
Sharvil Nanavati [Fri, 15 Jan 2016 21:41:56 +0000 (13:41 -0800)]
DO NOT MERGE ANYWHERE

Update btsnooz log file format to log ACL and SCO headers.

Change-Id: I72db1769197150f34ebba6fcb9c0e3db2404f342

8 years agoDo not send AT+CHLD=? if the 3-way call feature is not supported
Devin Kim [Fri, 15 Jan 2016 18:05:14 +0000 (18:05 +0000)]
Do not send AT+CHLD=? if the 3-way call feature is not supported
am: 79dc36d01a

* commit '79dc36d01aaab9a29cd70a0ff40463102505da4b':
  Do not send AT+CHLD=? if the 3-way call feature is not supported

8 years agoDo not send AT+CHLD=? if the 3-way call feature is not supported
Devin Kim [Thu, 14 Jan 2016 01:37:57 +0000 (10:37 +0900)]
Do not send AT+CHLD=? if the 3-way call feature is not supported

The HF shall not issue the AT+CHLD=? test command in case
either the HF or the AG does not support the Three-way calling feature.
Currently HF sends AT+CHLD=? to AG device when SLC sequence on going.
It affects to SCO statemachine so that after going out of range and
coming back in range while active call alives, SCO state goes bad and
never comes back. This is out of specification of HFP and it should be
fixed by checking peer and local 3way call capability check.

Bug: 25703926
Change-Id: I66adac2345c6fb0df6741fdbfa67d9483fc38a00

8 years agoDO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links
Sathya Kumar [Fri, 15 Jan 2016 01:45:17 +0000 (01:45 +0000)]
DO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links
am: a8bb3ae08b  -s ours

* commit 'a8bb3ae08b6696e7931c903bf11f54b743d37acf':
  DO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links

8 years agoDO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links
Sathya Kumar [Thu, 7 Jan 2016 16:04:56 +0000 (10:04 -0600)]
DO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links

BUG=25909971 Xtreme music playback stuttering

Change-Id: I49a2daeb169e7e346d6eb1ede38e6aeb72ed7639

8 years agoresolve merge conflicts of 7408acb7be to mnc-dr1.5-dev.
Sharvil Nanavati [Thu, 14 Jan 2016 19:59:33 +0000 (11:59 -0800)]
resolve merge conflicts of 7408acb7be to mnc-dr1.5-dev.

Change-Id: I5f00746e95c703da91838395aa0c85a660cef2b1

8 years agoMerge "Per Motorola, we're going to revert this change and submit Moto-specific code...
Sharvil Nanavati [Thu, 14 Jan 2016 18:23:08 +0000 (18:23 +0000)]
Merge "Per Motorola, we're going to revert this change and submit Moto-specific code for this." into cw-e-dev

8 years agoMerge "Offload config save functionality to BTIF thread" into mnc-dr1.5-dev
Pankaj Kanwar [Wed, 13 Jan 2016 22:33:01 +0000 (22:33 +0000)]
Merge "Offload config save functionality to BTIF thread" into mnc-dr1.5-dev

8 years agoPer Motorola, we're going to revert this change and submit Moto-specific code for...
Sharvil Nanavati [Wed, 13 Jan 2016 18:13:39 +0000 (18:13 +0000)]
Per Motorola, we're going to revert this change and submit Moto-specific code for this.

Revert "Disable 3Mbps packets for AVDT ACL links"

This reverts commit 26bb30842b6c64821c2a6c4a515f290140017105.

Change-Id: Iced6b38189b3ef27a6b520bd0af6dd0960e2eb16

8 years agoOffload config save functionality to BTIF thread
Srinu Jella [Thu, 24 Dec 2015 12:10:52 +0000 (17:40 +0530)]
Offload config save functionality to BTIF thread

Offload config save functionality to btif thread from
timer thread as timer callback thread is critical in
a2dp playback case.

If the timer callback thread is busy in config save due
to IO operations, it may lead to a2dp audio choppy.

Fix to avoid the "bt_config.conf" file corruption from
the file system. This will avoid losing the paired
information in some corner case, such as abrupt power
off and on. This patch will ensure bt_config is saved to
NVRAM.

Bug: 24875861
CRs-Fixed: 953993
Change-Id: I893e9afefa89cbab6e7ddd8835ca77d3e316874c

8 years agoMerge "Additional headsets blacklisted for absolute volume" into mnc-dr1.5-dev
Andre Eisenbach [Tue, 12 Jan 2016 19:30:55 +0000 (19:30 +0000)]
Merge "Additional headsets blacklisted for absolute volume" into mnc-dr1.5-dev

8 years agoFix crashes with lots of discovered LE devices am: 05419c8b96 am: 7a5fa57019
Marie Janssen [Tue, 12 Jan 2016 18:56:56 +0000 (18:56 +0000)]
Fix crashes with lots of discovered LE devices am: 05419c8b96 am: 7a5fa57019
am: 0ff343e006

* commit '0ff343e0067c77341a86b0cd4491081cb66657cd':
  Fix crashes with lots of discovered LE devices

8 years agoFix crashes with lots of discovered LE devices am: 05419c8b96
Marie Janssen [Tue, 12 Jan 2016 18:53:06 +0000 (18:53 +0000)]
Fix crashes with lots of discovered LE devices am: 05419c8b96
am: 7a5fa57019

* commit '7a5fa57019c1a0b175adeaa76f7548f6c4a9df6f':
  Fix crashes with lots of discovered LE devices

8 years agoFix crashes with lots of discovered LE devices
Marie Janssen [Tue, 12 Jan 2016 18:47:46 +0000 (18:47 +0000)]
Fix crashes with lots of discovered LE devices
am: 05419c8b96

* commit '05419c8b96ff9cf61c257aec6ae0aeabcfcc2636':
  Fix crashes with lots of discovered LE devices

8 years agoAdditional headsets blacklisted for absolute volume
Andre Eisenbach [Tue, 12 Jan 2016 02:06:44 +0000 (18:06 -0800)]
Additional headsets blacklisted for absolute volume

Bug: 26070064
Change-Id: Ida1faec964982a4630f42ab378fe5b6dd6e21c16

8 years agoresolve merge conflicts of 26bb30842b to mnc-dr1.5-dev.
Sharvil Nanavati [Fri, 8 Jan 2016 02:40:35 +0000 (18:40 -0800)]
resolve merge conflicts of 26bb30842b to mnc-dr1.5-dev.

Change-Id: I52d08551a1d62fbd56bc6b14d98ccbc31f294484

8 years agoDisable 3Mbps packets for AVDT ACL links
Sathya Kumar [Thu, 7 Jan 2016 23:26:05 +0000 (17:26 -0600)]
Disable 3Mbps packets for AVDT ACL links

Change-Id: I4b1b52ec8aeaf5eab0672231889e0ea6f23aa852

8 years agoA2DP task media alarm non-null protection
Ajay Panicker [Wed, 6 Jan 2016 20:11:05 +0000 (12:11 -0800)]
A2DP task media alarm non-null protection

Prevent the alarm from being started multiple times.

Bug: 26277592
Change-Id: I764f93bab5490bf5f3942a1beb706457197d3ec1

8 years agoFix bug where a bonded device could enter BONDING and BONDED states again.
Sharvil Nanavati [Wed, 6 Jan 2016 17:28:51 +0000 (17:28 +0000)]
Fix bug where a bonded device could enter BONDING and BONDED states again.
am: b32b3d7c1b

* commit 'b32b3d7c1b99adb760cc7013a545af2140e34dcc':
  Fix bug where a bonded device could enter BONDING and BONDED states again.

8 years agoFix bug where a bonded device could enter BONDING and BONDED states again.
Sharvil Nanavati [Wed, 6 Jan 2016 00:23:02 +0000 (16:23 -0800)]
Fix bug where a bonded device could enter BONDING and BONDED states again.

The following sequence of events was observed:
- start bonding with device A
- bond state for A goes from 10 -> 11 -> 12
- everyone's happy
- start bonding with device B
- bond state for B goes from 10 -> 11
- bond state for A goes from 12 -> 11 -> 12

The bond state for A should not have been changed in the last step
since it was not participating in any bonding procedure at the time.

The above sequence can be reproduced if a device D bonds with
A and takes on the slave role and then D bonds with B and switches
to a master role. When D performs the role switch, it receives an
updated link key from A.

Since the link key update procedure is tied in with the pairing flow,
we see spurious bond state changes. This CL checks the pairing control
block to see if D is, in fact, pairing with A and if not, it skips the
bond state updates.

Bug: 25870383
Change-Id: Ic6ff548dbe4e960c965bdc9ef5c50a263b9b3b22

8 years agoMerge "Fix crash in HFP client\'s +COPS parsing code." into cw-e-dev
Sharvil Nanavati [Tue, 5 Jan 2016 01:37:57 +0000 (01:37 +0000)]
Merge "Fix crash in HFP client\'s +COPS parsing code." into cw-e-dev
am: bf8d17ddbb

* commit 'bf8d17ddbb64fdc6c252c63f6b9078987f871ba6':
  Fix crash in HFP client's +COPS parsing code.

8 years agoOnly send first 16 characters of operator name in +COPS.
Sharvil Nanavati [Tue, 5 Jan 2016 01:37:53 +0000 (01:37 +0000)]
Only send first 16 characters of operator name in +COPS.
am: 61b8ebf698

* commit '61b8ebf698c87a3beb2ebb18ee633b121a78e29e':
  Only send first 16 characters of operator name in +COPS.

8 years agoMerge "Fix crash in HFP client's +COPS parsing code." into cw-e-dev
Sharvil Nanavati [Tue, 5 Jan 2016 01:36:43 +0000 (01:36 +0000)]
Merge "Fix crash in HFP client's +COPS parsing code." into cw-e-dev

8 years agoFix crash in HFP client's +COPS parsing code.
Sharvil Nanavati [Tue, 5 Jan 2016 01:21:05 +0000 (17:21 -0800)]
Fix crash in HFP client's +COPS parsing code.

If the Audio Gateway sends a malformed +COPS message (an operator
name > 16 characters) then the %n in sscanf format specifier is
ignored and sscanf will not assign a value to the appropriate
argument.

In such a case, the existing code will perform pointer arithmetic
using an uninitialized stack variable as an offset which may result
in pointing to an invalid memory address. When that memory is
subsequently dereferenced, we observe a crash.

This change ensures that the stack does not crash even if an invalid
+COPS message is sent from the Audio Gateway.

Bug: 24871011
Change-Id: I9bb42c75bcd90487831fc6950c571c87098559e7

8 years agoOnly send first 16 characters of operator name in +COPS.
Sharvil Nanavati [Tue, 5 Jan 2016 01:15:18 +0000 (17:15 -0800)]
Only send first 16 characters of operator name in +COPS.

According to the HFP spec, the operator name is required to be at
most 16 characters long.

Bug: 24871011
Change-Id: I9987de57a327348fc2203b9502e9df446a87793f

8 years agoFix crashes with lots of discovered LE devices
Marie Janssen [Wed, 9 Dec 2015 18:08:25 +0000 (10:08 -0800)]
Fix crashes with lots of discovered LE devices

When loads of devices are discovered a config file which is too large
can be written out, which causes the BT daemon to crash on startup.

This limits the number of config entries for unpaired devices which
are initialized, and prevents a large number from being saved to the
filesystem.

Bug: 26071376
Change-Id: I4a74094f57a82b17f94e99a819974b8bc8082184
(cherry picked from commit d77f1999ecece56c1cbb333f4ddc26f0b5bac2c5)

8 years agoFix crashes with lots of discovered LE devices
Marie Janssen [Wed, 9 Dec 2015 18:08:25 +0000 (10:08 -0800)]
Fix crashes with lots of discovered LE devices

When loads of devices are discovered a config file which is too large
can be written out, which causes the BT daemon to crash on startup.

This limits the number of config entries for unpaired devices which
are initialized, and prevents a large number from being saved to the
filesystem.

Bug: 26071376
Change-Id: I4a74094f57a82b17f94e99a819974b8bc8082184
(cherry picked from commit d77f1999ecece56c1cbb333f4ddc26f0b5bac2c5)

8 years agoDO NOT MERGE Blacklist devices for absolute volume control
Andre Eisenbach [Fri, 11 Dec 2015 20:32:21 +0000 (12:32 -0800)]
DO NOT MERGE Blacklist devices for absolute volume control

Some devices do not play well with absolute volume control. They either
play back music at unacceptably loud volume levels or provide
insufficiently granular volume control where a single "step" of volume
change results in unexpectedly large jumps in volume.

Now with 100% less build errors ;)

Bug: 2607006426060431
Change-Id: Ibe46c4997bc1ca9e6f78cafb3b434309d8511fcb

8 years agoRevert "Blacklist devices for absolute volume control"
Ian Pedowitz [Wed, 23 Dec 2015 05:13:22 +0000 (05:13 +0000)]
Revert "Blacklist devices for absolute volume control"

This reverts commit 2c8897ca35a93148619d662df03bd9da1b73679a.

Change-Id: Ia184c82fda022b3592753872a86be12a1cefc7d0

8 years agoBlacklist devices for absolute volume control
Andre Eisenbach [Fri, 11 Dec 2015 20:32:21 +0000 (12:32 -0800)]
Blacklist devices for absolute volume control

Some devices do not play well with absolute volume control. They either
play back music at unacceptably loud volume levels or provide
insufficiently granular volume control where a single "step" of volume
change results in unexpectedly large jumps in volume.

Bug: 2607006426060431
Change-Id: I5a336fba87119325b47a5ad385e9c48a631f2121

8 years agoMerge "Fix absolute volume reporting if AVRC_ADV_CTRL_INCLUDED is false" into cw...
Sharvil Nanavati [Fri, 18 Dec 2015 18:37:06 +0000 (18:37 +0000)]
Merge "Fix absolute volume reporting if AVRC_ADV_CTRL_INCLUDED is false" into cw-e-dev
am: 3c8de06896

* commit '3c8de068964457fbc7625ca5d8d6fbe85e416c40':
  Fix absolute volume reporting if AVRC_ADV_CTRL_INCLUDED is false

8 years agoMerge "Fix absolute volume reporting if AVRC_ADV_CTRL_INCLUDED is false" into cw...
Sharvil Nanavati [Fri, 18 Dec 2015 01:58:36 +0000 (01:58 +0000)]
Merge "Fix absolute volume reporting if AVRC_ADV_CTRL_INCLUDED is false" into cw-e-dev

8 years agoDO NOT MERGE ANYWHERE net_test_bluetooth: replace with gtest variant
Scott James Remnant [Thu, 17 Dec 2015 23:09:59 +0000 (23:09 +0000)]
DO NOT MERGE ANYWHERE net_test_bluetooth: replace with gtest variant
am: 786a7e5941  -s ours

* commit '786a7e5941b7826a3b19d042aaba2763a103284e':
  DO NOT MERGE ANYWHERE net_test_bluetooth: replace with gtest variant

8 years agoDO NOT MERGE ANYWHERE net_test_bluetooth: replace with gtest variant
Scott James Remnant [Wed, 11 Nov 2015 19:51:20 +0000 (11:51 -0800)]
DO NOT MERGE ANYWHERE net_test_bluetooth: replace with gtest variant

Bug: 25385380
Change-Id: Ia719363823d8d538caa6b42f076d5d6d737ae036

8 years agoMerge "DO NOT MERGE ANYWHERE Rename gtest_net_test_bluedroid to gtest_net_test_blueto...
Joshua Schwarz [Thu, 17 Dec 2015 22:50:16 +0000 (14:50 -0800)]
Merge "DO NOT MERGE ANYWHERE Rename gtest_net_test_bluedroid to gtest_net_test_bluetooth." into cw-e-dev
am: 78ec0dc441  -s ours

* commit '78ec0dc4419004fc4851850ba3c289e9eb4592c3':
  DO NOT MERGE ANYWHERE Rename gtest_net_test_bluedroid to gtest_net_test_bluetooth.

8 years agoMerge "DO NOT MERGE ANYWHERE Rename gtest_net_test_bluedroid to gtest_net_test_blueto...
Joshua Schwarz [Thu, 17 Dec 2015 22:47:38 +0000 (22:47 +0000)]
Merge "DO NOT MERGE ANYWHERE Rename gtest_net_test_bluedroid to gtest_net_test_bluetooth." into cw-e-dev

8 years agoFix absolute volume reporting if AVRC_ADV_CTRL_INCLUDED is false
Sharvil Nanavati [Thu, 17 Dec 2015 14:23:19 +0000 (06:23 -0800)]
Fix absolute volume reporting if AVRC_ADV_CTRL_INCLUDED is false

Without this change, setting AVRC_ADV_CTRL_INCLUDED to false would
result in the native code reporting the remote device supports
absolute volume even though we don't.

Bug: 26070064
Change-Id: I5b88fa0adb89983de28a216898a1d8957fa454a1

8 years agoFix BT connection failures
Devin Kim [Wed, 16 Dec 2015 00:11:09 +0000 (00:11 +0000)]
Fix BT connection failures
am: 198abcd704

* commit '198abcd7048fc98d78a7b264dcaa1923fe968614':
  Fix BT connection failures

8 years agoFix BT connection failures
Devin Kim [Thu, 3 Dec 2015 21:19:20 +0000 (13:19 -0800)]
Fix BT connection failures

When HFP connection failed establishing between phone and watch, it can't
recover RFCOMM status which causes that HFP connection will not be made
unless BT radio goes off and comes back on. RFCOMM and HFP both trying to
open RFCOMM control channel at nearly same time, at some point, there's
a possibility that SABM packet didn't reach out to BT controller to connect
to phone from watch with HFP while phone tries to connect to watch with
AW RFCOMM.

This will take care of pending SABM packet to reach out to controller
properly so that RFCOMM status will not be messed.

Bug: 24285000
Bug: 25579482
Bug: 25579423
Bug: 25578997
Change-Id: Icc26b86c644ebd8d1c12a2fb4e94d04ba16cc2dd

8 years agoDO NOT MERGE ANYWHERE: osi: Remove error_fclose goto and redundant fflush.
Alain Vongsouvanh [Wed, 9 Dec 2015 23:39:55 +0000 (15:39 -0800)]
DO NOT MERGE ANYWHERE: osi: Remove error_fclose goto and redundant fflush.
am: e52633cecf  -s ours

* commit 'e52633cecfe6358ba2e7f38bd52339330505a02b':
  DO NOT MERGE ANYWHERE: osi: Remove error_fclose goto and redundant fflush.

8 years agoDO NOT MERGE ANYWHERE: osi: Remove error_fclose goto and redundant fflush.
Alain Vongsouvanh [Wed, 9 Dec 2015 16:57:38 +0000 (08:57 -0800)]
DO NOT MERGE ANYWHERE: osi: Remove error_fclose goto and redundant fflush.

Change-Id: I327f9ce696bb68eb3b89b4a8b15dba189e027970

8 years agoDO NOT MERGE ANYWHERE: Add file write error checks to config_save
Amadeusz Slawinski [Tue, 8 Dec 2015 19:05:39 +0000 (11:05 -0800)]
DO NOT MERGE ANYWHERE: Add file write error checks to config_save
am: 02f35e6a36  -s ours

* commit '02f35e6a3633f81cbcf0f3be4e68b79b496fb354':
  DO NOT MERGE ANYWHERE: Add file write error checks to config_save

8 years agoDO NOT MERGE ANYWHERE: Add file write error checks to config_save
Amadeusz Slawinski [Tue, 3 Nov 2015 15:09:57 +0000 (16:09 +0100)]
DO NOT MERGE ANYWHERE: Add file write error checks to config_save

It's better to leave old config file instead of
overwriting with broken one.

Fixes problem when disk is full and we can't write
more data to it.

(Change amended to use "old" style LOG_ERROR macro)

Issue: KIONE-3099
Change-Id: Ifdb641ba7f3140655f9ec371e53b11a17484f27a

8 years agoDO NOT MERGE ANYWHERE Rename gtest_net_test_bluedroid to gtest_net_test_bluetooth.
Joshua Schwarz [Mon, 30 Nov 2015 16:44:26 +0000 (08:44 -0800)]
DO NOT MERGE ANYWHERE Rename gtest_net_test_bluedroid to gtest_net_test_bluetooth.

Change-Id: I73105164c04701aade27638ffdc5c3281a2585a2

8 years agoMerge "DO NOT MERGE Revert "A2DP SRC offload support"" into mnc-dr1.5-dev
Chris Elliott [Wed, 2 Dec 2015 21:52:14 +0000 (21:52 +0000)]
Merge "DO NOT MERGE Revert "A2DP SRC offload support"" into mnc-dr1.5-dev

8 years agoDO NOT MERGE Revert "A2DP SRC offload support"
Chris Elliott [Wed, 2 Dec 2015 20:59:58 +0000 (12:59 -0800)]
DO NOT MERGE Revert "A2DP SRC offload support"

This reverts commit 6ff83ab9dd38bdefc5d252325f0cfbd3f1754d78.

8 years agoDO NOT MERGE Revert "Make default SBC bitrate configurable by device."
Chris Elliott [Wed, 2 Dec 2015 20:56:55 +0000 (12:56 -0800)]
DO NOT MERGE Revert "Make default SBC bitrate configurable by device."

This reverts commit 5f308397b7fe8a8da3f88b0f8910c3863ed1ec0b.

8 years agoDO NOT MERGE Revert "Always send a SUSPEND_CFM event when suspended due to A2DP RECON...
Chris Elliott [Wed, 2 Dec 2015 20:55:59 +0000 (12:55 -0800)]
DO NOT MERGE Revert "Always send a SUSPEND_CFM event when suspended due to A2DP RECONFIGURE."

This reverts commit 8b1c7af03a2a8eedd1efd2eddca3ecd4b61bfd95.

8 years agoMerge "Mark secure link as authenticated for LE" into cw-e-dev
Zach Johnson [Wed, 2 Dec 2015 18:24:58 +0000 (18:24 +0000)]
Merge "Mark secure link as authenticated for LE" into cw-e-dev
am: e6242fcf30

* commit 'e6242fcf303f195d31eaaca97146e341b2b49e70':
  Mark secure link as authenticated for LE

8 years agoMerge "Mark secure link as authenticated for LE" into cw-e-dev
Zach Johnson [Wed, 2 Dec 2015 18:20:03 +0000 (18:20 +0000)]
Merge "Mark secure link as authenticated for LE" into cw-e-dev

8 years agoMark secure link as authenticated for LE
Andre Eisenbach [Sat, 14 Nov 2015 00:48:53 +0000 (16:48 -0800)]
Mark secure link as authenticated for LE

Without this change, reading an authenticated GATT characteristic using
BR/EDR  would fail with an insufficient authentication error.

Change-Id: I02f44cdf90635b470b21e8aad8240993cb0e8e42

8 years agoAlways send a SUSPEND_CFM event when suspended due to A2DP RECONFIGURE.
Sridhar Vashist [Tue, 1 Dec 2015 21:27:00 +0000 (21:27 +0000)]
Always send a SUSPEND_CFM event when suspended due to A2DP RECONFIGURE.
am: 8b1c7af03a

* commit '8b1c7af03a2a8eedd1efd2eddca3ecd4b61bfd95':
  Always send a SUSPEND_CFM event when suspended due to A2DP RECONFIGURE.

8 years agoMake default SBC bitrate configurable by device.
Sridhar Vashist [Tue, 1 Dec 2015 21:26:57 +0000 (21:26 +0000)]
Make default SBC bitrate configurable by device.
am: 5f308397b7

* commit '5f308397b7fe8a8da3f88b0f8910c3863ed1ec0b':
  Make default SBC bitrate configurable by device.

8 years agoAlways send a SUSPEND_CFM event when suspended due to A2DP RECONFIGURE.
Sridhar Vashist [Fri, 7 Aug 2015 00:40:24 +0000 (19:40 -0500)]
Always send a SUSPEND_CFM event when suspended due to A2DP RECONFIGURE.

There appear to be race cases where the peer sends a START before
we reconfigure the stream. Avoid btif_av state from getting
mismatched by always sending out the SUSPEND_CFM during RECONFIGURE.

Change-Id: I2034cd111466f792233cedb60a3a0df11d055962
Signed-off-by: Sridhar Vashist <svashist@motorola.com>
8 years agoMake default SBC bitrate configurable by device.
Sridhar Vashist [Wed, 14 Oct 2015 22:47:02 +0000 (17:47 -0500)]
Make default SBC bitrate configurable by device.

Configurable default SBC bitrate so that audio quality can be maintained
for sampling rates other than 44.1kHz

Change-Id: Ia4197c0a500088cfa48a8ba821e9738a16c3fc6e
Signed-off-by: Sridhar Vashist <svashist@motorola.com>
8 years agoMerge "A2DP SRC offload support" into cw-e-dev
Chris Elliott [Tue, 1 Dec 2015 21:15:38 +0000 (21:15 +0000)]
Merge "A2DP SRC offload support" into cw-e-dev
am: ffdfe1d26d

* commit 'ffdfe1d26d43a2f80a845be84b669520edc55fbb':
  A2DP SRC offload support

8 years agoMerge "A2DP SRC offload support" into cw-e-dev
Chris Elliott [Tue, 1 Dec 2015 21:09:52 +0000 (21:09 +0000)]
Merge "A2DP SRC offload support" into cw-e-dev

8 years agoA2DP SRC offload support
Abhijit Adsule [Tue, 19 May 2015 07:44:26 +0000 (02:44 -0500)]
A2DP SRC offload support

bluedroid changes to support A2DP SRC offload to BT FW.
add functionality to relay a2dp offload requests and responses
between AudioHAL & the BT vendor library.

Change-Id: Ie4e5992c48e95b0efb372a405e8537e4fd3ea071
Signed-off-by: Sridhar Vashist <svashist@motorola.com>
Conflicts:
audio_a2dp_hw/audio_a2dp_hw.h
bta/Android.mk
bta/av/bta_av_aact.c
btif/include/btif_media.h
btif/src/btif_av.c
btif/src/btif_media_task.c
hci/Android.mk
hci/src/vendor.c
include/bt_target.h
stack/include/l2c_api.h

8 years agoOnly initiate codec negotiation if feature is supported
Chenjie Luo [Mon, 30 Nov 2015 21:27:10 +0000 (21:27 +0000)]
Only initiate codec negotiation if feature is supported
am: ecb3b8386f

* commit 'ecb3b8386f4acf6a6e9b401fdd561349ccd6c435':
  Only initiate codec negotiation if feature is supported

8 years agoOnly initiate codec negotiation if feature is supported
Chenjie Luo [Fri, 20 Nov 2015 19:18:42 +0000 (11:18 -0800)]
Only initiate codec negotiation if feature is supported

Bug: 25634250
Change-Id: I97330c853f6cf90673b4ff28c72645f9d1c8ff9d

8 years agokeep history after reset to mnc-dr-dev(03d171170c7ad4e40454a9575cfd4919d2e1ef2f)
Baligh Uddin [Sun, 15 Nov 2015 17:27:19 +0000 (09:27 -0800)]
keep history after reset to mnc-dr-dev(03d171170c7ad4e40454a9575cfd4919d2e1ef2f)

8 years agoMerge "Fix broken test caused by misordered callback arguments." into cw-e-dev
Sharvil Nanavati [Mon, 9 Nov 2015 17:11:12 +0000 (17:11 +0000)]
Merge "Fix broken test caused by misordered callback arguments." into cw-e-dev

8 years agoFix broken test caused by misordered callback arguments.
Sharvil Nanavati [Sat, 7 Nov 2015 10:12:16 +0000 (02:12 -0800)]
Fix broken test caused by misordered callback arguments.

Change-Id: I16976a2a680eab76af31090548c2efc53bebaa60

8 years agoAlways update remote address type during LE scan
Andre Eisenbach [Fri, 6 Nov 2015 00:59:44 +0000 (00:59 +0000)]
Always update remote address type during LE scan
am: 03d171170c

* commit '03d171170c7ad4e40454a9575cfd4919d2e1ef2f':
  Always update remote address type during LE scan

8 years agoAlways update remote address type during LE scan
Andre Eisenbach [Thu, 5 Nov 2015 23:38:36 +0000 (15:38 -0800)]
Always update remote address type during LE scan

This will ensure that devices which do not contain a device name in the
advertising record are stored with the correct address type to ensure
re-connection to the device succeeds.

Bug: 25499163
Change-Id: I85f18ce2de267844c5d5ed49beeb448b9b074d74

8 years agoMerge "Do not mask out secure connections (SC) bit for BT <4.2" into mnc-dr-dev
Andre Eisenbach [Thu, 5 Nov 2015 01:27:19 +0000 (01:27 +0000)]
Merge "Do not mask out secure connections (SC) bit for BT <4.2" into mnc-dr-dev
am: 15c1f685db

* commit '15c1f685db0453a3e20f81de94fca7040a52a39a':
  Do not mask out secure connections (SC) bit for BT <4.2

8 years agoFix bug in SDP 128-bit UUID lookup
Andre Eisenbach [Thu, 5 Nov 2015 01:27:14 +0000 (01:27 +0000)]
Fix bug in SDP 128-bit UUID lookup
am: 7312c6d913

* commit '7312c6d91376e533914eb2a108b65699ca54353a':
  Fix bug in SDP 128-bit UUID lookup

8 years agoMerge "Do not mask out secure connections (SC) bit for BT <4.2" into mnc-dr-dev
Andre Eisenbach [Wed, 4 Nov 2015 17:32:48 +0000 (17:32 +0000)]
Merge "Do not mask out secure connections (SC) bit for BT <4.2" into mnc-dr-dev

8 years agoFix bug in SDP 128-bit UUID lookup
Andre Eisenbach [Wed, 4 Nov 2015 16:28:30 +0000 (08:28 -0800)]
Fix bug in SDP 128-bit UUID lookup

Bug: 24344122
Change-Id: I7b7ed4459c4f377d97b608bfe2e0c13aac31680e

8 years agoDo not mask out secure connections (SC) bit for BT <4.2
Andre Eisenbach [Wed, 4 Nov 2015 16:20:22 +0000 (08:20 -0800)]
Do not mask out secure connections (SC) bit for BT <4.2

Bug: 25467621
Change-Id: Ifdb52295fa5b8c5a39524a722dc044227c735240

8 years agoSerialize remote version query over LE
Andre Eisenbach [Fri, 30 Oct 2015 02:18:32 +0000 (02:18 +0000)]
Serialize remote version query over LE
am: 864e7734f2

* commit '864e7734f21d7ebe3f3a6840d187a2696498e9f4':
  Serialize remote version query over LE

8 years agoSerialize remote version query over LE
Andre Eisenbach [Thu, 29 Oct 2015 22:48:06 +0000 (15:48 -0700)]
Serialize remote version query over LE

Some devices (ex. Nexus Player remote) do not take well to having the
remote version queried while a remote feature request is also sent and
subsequently fail encryption.

This patch serializes the query of the remote version and requires both
remote features and the remote version to be read before calling a
connection established.

Bug: 25357767
Change-Id: Ie70eea241b47b81778d8e0df47f3a8f376316932

8 years agoCheck remote LMP version before enabling secure connections
Andre Eisenbach [Tue, 27 Oct 2015 20:30:54 +0000 (20:30 +0000)]
Check remote LMP version before enabling secure connections
am: 4f7c4f6732

* commit '4f7c4f67320bbb35c85b478d2ac7aa29d732acca':
  Check remote LMP version before enabling secure connections

8 years agoCheck remote LMP version before enabling secure connections
Andre Eisenbach [Mon, 26 Oct 2015 20:49:17 +0000 (13:49 -0700)]
Check remote LMP version before enabling secure connections

Request remote version information for LE links when connecting and
ensure LMP version is >= 8 (Bluetooth 4.2) before setting the LinkKey
bits in the pairing request.

This is to ensure older remote devices do not get confused by the
additional bit(s) in the pairing request.

Bug: 25277879
Change-Id: I25424e541fa5244d8f522dffc62cdedc24f4f35b

8 years agoPrevent integer overflows during GATT signing
Ajay Panicker [Tue, 27 Oct 2015 19:07:55 +0000 (19:07 +0000)]
Prevent integer overflows during GATT signing
am: b335ee9496

* commit 'b335ee9496e671bf0ef0ab28a5990c9a024ac06b':
  Prevent integer overflows during GATT signing

8 years agoPrevent integer overflows during GATT signing
Ajay Panicker [Fri, 23 Oct 2015 23:49:11 +0000 (16:49 -0700)]
Prevent integer overflows during GATT signing

Bug: 17901099
Change-Id: Ib61113b19c9c9798b9ea992fad0ce997dcc2e2f8

8 years agoMerge "Raise alarm callback thread priority" into mnc-dr-dev
Andre Eisenbach [Fri, 23 Oct 2015 23:52:57 +0000 (23:52 +0000)]
Merge "Raise alarm callback thread priority" into mnc-dr-dev
am: 2c8802ab5f

* commit '2c8802ab5f4f73afe2a8b722d3b1bbd8e106fa24':
  Raise alarm callback thread priority

8 years agoReduce persistence on aquiring master role
Mattias Agren [Fri, 23 Oct 2015 23:52:49 +0000 (23:52 +0000)]
Reduce persistence on aquiring master role
am: 59d9673187

* commit '59d9673187a50c259b42e5a71482304ab850a809':
  Reduce persistence on aquiring master role

8 years agoMerge "Raise alarm callback thread priority" into mnc-dr-dev
Andre Eisenbach [Fri, 23 Oct 2015 23:51:19 +0000 (23:51 +0000)]
Merge "Raise alarm callback thread priority" into mnc-dr-dev

8 years agoReduce persistence on aquiring master role
Mattias Agren [Wed, 14 Oct 2015 15:05:58 +0000 (17:05 +0200)]
Reduce persistence on aquiring master role

Whenever a device has more than 1 ACL link active and transferring
data on one of its links via PAN, HH or JV (RFCOMM) the sys busy/idle
state toggles frequently. To avoid triggering role switches for each
of these events we filter this out and let the other SYS events handle
it in combination with other role policy management code. Ideally we
should revert the toggling to properly reflect the busy/idle state of
each profile but to limit risk of side effects at this stage we will
make this intermittent change.

This also affects audio streaming in certain cases.

Bug: 2457095925129209
Change-Id: I141e17ee069c82624e153fd8de5db90ae93724b9

8 years agoRaise alarm callback thread priority
Andre Eisenbach [Fri, 23 Oct 2015 17:40:36 +0000 (10:40 -0700)]
Raise alarm callback thread priority

Since alarms [/callbacks] are used in the critical audio path, raising
the thread priority is required to ensure timely encoding/transmission
of audio packets and avoiding thread pre-emption.

This patch indiscriminatly raises the (single) callback thread priority,
affecting all alarm callbacks. In the future, thread priotiry should be
adjusted based on the alarms pending in the queue.

Bug: 24570959
Change-Id: I64928fd7325f1d6f76815a185dbccf1e01ae30d2