OSDN Git Service

android-x86/system-bt.git
8 years agoClear remote BD address if SDP search fails
Satish Kodishala [Mon, 28 Mar 2016 04:58:31 +0000 (04:58 +0000)]
Clear remote BD address if SDP search fails
am: 9d3ef5e

* commit '9d3ef5ea53a3209881d2bf67342977bee7ceffc7':
  Clear remote BD address if SDP search fails

8 years agoDo not reset Sniff Subrating parameters on SCO link
Satish Kodishala [Mon, 28 Mar 2016 04:58:31 +0000 (04:58 +0000)]
Do not reset Sniff Subrating parameters on SCO link
am: af3e647

* commit 'af3e647479dcf27e17516b6cd2b853c453a1a01c':
  Do not reset Sniff Subrating parameters on SCO link

8 years agoUpdate the sniff policy when SCO is active
Mallikarjuna GB [Mon, 28 Mar 2016 04:58:31 +0000 (04:58 +0000)]
Update the sniff policy when SCO is active
am: ba22a41

* commit 'ba22a417d0700715872391ffad79058fe79fbec5':
  Update the sniff policy when SCO is active

8 years agoFix broken formatting in README.md
Jakub Pawlowski [Mon, 28 Mar 2016 04:58:31 +0000 (04:58 +0000)]
Fix broken formatting in README.md
am: 4b5a5fc

* commit '4b5a5fcbf08475a87c6af3030e0d9b7e89d297c5':
  Fix broken formatting in README.md

8 years agoBuild on linux: final changes and instructions.
Jakub Pawlowski [Mon, 28 Mar 2016 04:58:31 +0000 (04:58 +0000)]
Build on linux: final changes and instructions.
am: 5caf67e  -s ours

* commit '5caf67e0f604c407a8b9b4987b0a161165feb90b':
  Build on linux: final changes and instructions.

8 years agoMove properties get/set code to osi
Jakub Pawlowski [Mon, 28 Mar 2016 04:55:25 +0000 (04:55 +0000)]
Move properties get/set code to osi
am: 2998946  -s ours

* commit '2998946db9b820806d4a3e6decf1d01f090a8031':
  Move properties get/set code to osi

8 years agoAdd missing file to BUILD.gn
Jakub Pawlowski [Mon, 28 Mar 2016 04:52:22 +0000 (04:52 +0000)]
Add missing file to BUILD.gn
am: 41c155c

* commit '41c155cbfd43c99fed14d3d9b7c277679ade69a5':
  Add missing file to BUILD.gn

8 years agoUpdate build files for Fluoride on Linux
Jakub Pawlowski [Mon, 28 Mar 2016 04:52:22 +0000 (04:52 +0000)]
Update build files for Fluoride on Linux
am: 107588a  -s ours

* commit '107588ab3e5af9f5df68815d5fe52b0c53e0e089':
  Update build files for Fluoride on Linux

8 years agoAdd Linux-specific version of metrics.
Jakub Pawlowski [Mon, 28 Mar 2016 04:30:21 +0000 (04:30 +0000)]
Add Linux-specific version of metrics.
am: e4bc35b

* commit 'e4bc35bf8bfe06ea174607fde3b645f5f6e9b941':
  Add Linux-specific version of metrics.

8 years agolinux build fix
Jakub Pawlowski [Sat, 26 Mar 2016 05:39:45 +0000 (05:39 +0000)]
linux build fix
am: 815a8d4

* commit '815a8d41cae1a01abdbeb6586c4365d33fa3bbb0':
  linux build fix

8 years agolinux build fix
Jakub Pawlowski [Sat, 26 Mar 2016 05:31:41 +0000 (22:31 -0700)]
linux build fix

Change-Id: Ibec71d18e664f575f73a472b7a522e87c3a1efa8

8 years agoClear remote BD address if SDP search fails
Satish Kodishala [Thu, 25 Jun 2015 08:53:17 +0000 (14:23 +0530)]
Clear remote BD address if SDP search fails

Use case:
1. Enable multi hf.
2. Pair and connect to a headset.
3. Turn off headset and try connecting to headset from AG.
4. After the connection fails, turn on headset.
5. Make sure headset initiates HF connection to AG.
6. Make MO/MT call, switch from headset to AG, vice versa using headset.

Failure:
When call is transferred from AG to headset, headset initiated
SCO connection request is rejected by AG.

Root cause:
For outgoing connection in step 3, SDP search fails. BD address of
remote headset is stored in scb[0]. BD address of headset with which
we tried to connect is not cleared in scb[0].

When incoming HF connection request is accepted in step 5, BD address
of headset is stored in scb[1]. Now, BD address of the same headset is
stored in both scb[0], scb[1].

When SCO connection request is received from headset, we get scb
information using BD address. However, since BD address in scb[0]
is not cleared, we end up selecting scb[0] for which there is no
headset connected. This makes us think that remote is initiating
SCO connection without SLC and we reject the SCO connection.

Fix:
Clear the BD address of remote when SDP search fails.

Bug: 27852645
Change-Id: I21a0b83fcd47fed91e28fe27bdfd6d541b6a527c

8 years agoDo not reset Sniff Subrating parameters on SCO link
Satish Kodishala [Tue, 2 Feb 2016 11:52:15 +0000 (17:22 +0530)]
Do not reset Sniff Subrating parameters on SCO link

Usecase:
1. Pair and connect to BT headset
2. Pair and connect to a watch
3. Pair and connect a LE device
4. Make a call and reset BT on phone
5. Verify devices connect back and SCO is established

Failure:
After BT reset, devices connect and SCO is up. After some time,
SCO and ACL link disconnects due to connection timeout.

Rootcause:
When Headset is connected during active call, HFP is connected
first. Due to active call, SCO is also established. When SCO is
established, we disable sniff subrating(SSR). When A2DP is
connected after SCO connection, it enables SSR. This enabling
of SSR is causing ACL disconnect.

Fix:
When there is new profile connection for the same device which
has SCO, we should not enable SSR. It should be enabled only
when there is no SCO.

Bug: 27852645
Change-Id: I7815dba90851366ecc0523447c2394631c10ede1

8 years agoUpdate the sniff policy when SCO is active
Mallikarjuna GB [Tue, 23 Jun 2015 09:49:29 +0000 (15:19 +0530)]
Update the sniff policy when SCO is active

Use case:
1. Connect BT headset.
2. Make an outgoing call or receive a call on BT headset.
3. Check if sniff parameters are taking affect when SCO is active.

Failure:
Sniff parameters when SCO is active are not taking affect.

Root cause:
SCO link was not checked when updating power manager(PM)
about idle or busy states.

Fix:
During AG tx/rx activity, update PM based on SCO state.

Bug: 27852645
Change-Id: I4c09406395998bacf13471a273402a60f3b77f89

8 years agoFix broken formatting in README.md
Jakub Pawlowski [Fri, 26 Feb 2016 00:13:31 +0000 (16:13 -0800)]
Fix broken formatting in README.md

Markdown formatter at:
https://android.googlesource.com/platform/system/bt/
interpret some things differently than other formatters.
This patch fixes badly formatted parts.

Change-Id: Ibe8a9c159d9d47396ef073f6555f06720bc3e661

8 years agoBuild on linux: final changes and instructions.
Jakub Pawlowski [Thu, 25 Feb 2016 20:16:31 +0000 (12:16 -0800)]
Build on linux: final changes and instructions.

After this patch anyone should be able to build Fluoride on Linux.

Bug: 27324453
Change-Id: I7776be12591b8fed6d38fc0375019606d311ddb9

8 years agoMove properties get/set code to osi
Jakub Pawlowski [Wed, 24 Feb 2016 18:39:46 +0000 (10:39 -0800)]
Move properties get/set code to osi

Currently we use Android-specific property_get and property_set
through the code. This patch adds osi_property_get and osi_property_set
that is encapsulating all external dependencies. This is step further
for errorless compilation on linux.

Bug: 27324453
Change-Id: I97c34344617a5855b683328bcd196a21a2fae6f9

8 years agoAdd missing file to BUILD.gn
Jakub Pawlowski [Wed, 24 Feb 2016 23:40:27 +0000 (15:40 -0800)]
Add missing file to BUILD.gn

This patch adds missing osi_module.c file. Without it Fluoride
on Linux compiles, but fails to run.

Bug: 27324453
Change-Id: I08eb6bc55149d1b70580643fdf131b197c027caf

8 years agoUpdate build files for Fluoride on Linux
Jakub Pawlowski [Tue, 23 Feb 2016 02:04:24 +0000 (18:04 -0800)]
Update build files for Fluoride on Linux

uprev build/secondary/third_party/**/BUILD.gn"
Other BUILD.gn files were updated to match current state of project.

Change-Id: Ie895d25680d510f5e69e6f15553311f6671cdce3

8 years agoAdd Linux-specific version of metrics.
Jakub Pawlowski [Tue, 23 Feb 2016 23:28:35 +0000 (15:28 -0800)]
Add Linux-specific version of metrics.

This patch adds empty metrics implementation for Linux in
order to fix build errors.

Bug: 27324453
Change-Id: I2f45db6147689bf295176b7ad30a613a7f5a8d9f

8 years agoBluetooth: Fix the issue that peer A2DP SNK device can not auto-reconnect.
Zhao Xuewen [Thu, 24 Mar 2016 23:45:11 +0000 (23:45 +0000)]
Bluetooth: Fix the issue that peer A2DP SNK device can not auto-reconnect.
am: 5bd9ffb

* commit '5bd9ffbe6fbf22b7072bc1a63e3152a916276ddf':
  Bluetooth: Fix the issue that peer A2DP SNK device can not auto-reconnect.

8 years agoTurn down excess logging in bt hci
Joe Onorato [Thu, 24 Mar 2016 23:31:33 +0000 (23:31 +0000)]
Turn down excess logging in bt hci
am: 11cfdf3

* commit '11cfdf303c420d14e6cf3e4d2ca856b827ba44cf':
  Turn down excess logging in bt hci

8 years agoBluetooth: Fix the issue that peer A2DP SNK device can not auto-reconnect.
Zhao Xuewen [Thu, 4 Feb 2016 03:20:14 +0000 (11:20 +0800)]
Bluetooth: Fix the issue that peer A2DP SNK device can not auto-reconnect.

If peer A2DP SNK disconnected by some reason, the device will reject reconnection request from peer.
This CL will judge the peer device is A2DP SRC, will reject the reconnection request.
So if peer device is A2DP SNK, will accept the reconnection request.

BUG:26274393

Change-Id: Idecef527a763693f08d76d90512546f013312aa1
Signed-off-by: z00184990 <z00184990@notesmail.huawei.com>
Signed-off-by: Zhao Xuewen <zhaoxuewen@huawei.com>
8 years agoTurn down excess logging in bt hci
Joe Onorato [Fri, 18 Mar 2016 20:38:44 +0000 (13:38 -0700)]
Turn down excess logging in bt hci

Bug: 27744135
Change-Id: I30c975ceac7b4f7d74ab77e2279b080b049ece1b

8 years agoStop turning on SCO audio automatically during call
Hall Liu [Thu, 24 Mar 2016 18:14:29 +0000 (18:14 +0000)]
Stop turning on SCO audio automatically during call
am: d22226b

* commit 'd22226b58bc753808f4b5c06c695773669493b41':
  Stop turning on SCO audio automatically during call

8 years agoStop turning on SCO audio automatically during call
Hall Liu [Sat, 20 Feb 2016 01:20:08 +0000 (17:20 -0800)]
Stop turning on SCO audio automatically during call

Remove some code that turns on SCO audio automatically when a device
connects, since Telecom should be responsible for routing audio to
bluetooth during a call.

Bug: 22507913
Change-Id: Iabf9cb8dd77d47505e87d865f8208268d9b417b7

8 years agoservice: use AIDL
Jakub Pawlowski [Wed, 23 Mar 2016 21:43:40 +0000 (21:43 +0000)]
service: use AIDL
am: a4bd0d2

* commit 'a4bd0d2370bd469942e92e724cfc9c7c01d3da74':
  service: use AIDL

8 years agoservice: use Parcelable instead of helpers
Jakub Pawlowski [Wed, 23 Mar 2016 21:43:40 +0000 (21:43 +0000)]
service: use Parcelable instead of helpers
am: 9bceebb

* commit '9bceebb4a441ef7f3c5d9ad2e9b84ec7e1974007':
  service: use Parcelable instead of helpers

8 years agoservice: use AIDL
Jakub Pawlowski [Tue, 16 Feb 2016 19:53:14 +0000 (11:53 -0800)]
service: use AIDL

Change-Id: Ic6261a9bafc65a5534f4e580ef9cae1fa82b4086

8 years agoTell the build system this is a host module.
Ying Wang [Wed, 23 Mar 2016 20:48:41 +0000 (20:48 +0000)]
Tell the build system this is a host module.
am: df515a4

* commit 'df515a46dd4fe27040c39d35b14b3e071319156d':
  Tell the build system this is a host module.

8 years agoservice: use Parcelable instead of helpers
Jakub Pawlowski [Tue, 16 Feb 2016 04:18:19 +0000 (20:18 -0800)]
service: use Parcelable instead of helpers

In order to user .aidl in the future, all types will have to be
parcelable. We don't add Parcelable to base types, as they might
be also used with other transports than binder in future.

Change-Id: I88e6961e69ac0e5d04bd4b6fe3cd7d79bd6f73ba

8 years agoTell the build system this is a host module.
Ying Wang [Wed, 23 Mar 2016 19:53:20 +0000 (19:53 +0000)]
Tell the build system this is a host module.
am: 06b3a57

* commit '06b3a5741afa443966ec1268241c98b8549f8c44':
  Tell the build system this is a host module.

8 years agoTell the build system this is a host module.
Ying Wang [Wed, 23 Mar 2016 18:41:15 +0000 (11:41 -0700)]
Tell the build system this is a host module.

We need to tell the build system this is a host module before calling
local-generated-sources-dir.

Change-Id: Ie36ad938c0c7124865148f20fcb70d5187f158b8
(cherry-pick from commit df515a46dd4fe27040c39d35b14b3e071319156d)

8 years agoTell the build system this is a host module.
Ying Wang [Wed, 23 Mar 2016 18:41:15 +0000 (11:41 -0700)]
Tell the build system this is a host module.

We need to tell the build system this is a host module before calling
local-generated-sources-dir.

Change-Id: Ie36ad938c0c7124865148f20fcb70d5187f158b8

8 years agoHID: Fix to show mouse pointer movements on UI
Nitin Shivpure [Wed, 23 Mar 2016 17:58:51 +0000 (17:58 +0000)]
HID: Fix to show mouse pointer movements on UI
am: 5e8b724

* commit '5e8b7245ae98436b34ecce6dc7b45d7f7dba74d7':
  HID: Fix to show mouse pointer movements on UI

8 years agoInitiate SCO after Mode change event
Mallikarjuna GB [Wed, 23 Mar 2016 17:58:51 +0000 (17:58 +0000)]
Initiate SCO after Mode change event
am: 8847ff1

* commit '8847ff137b311a37c57366ac8d138b605397dce1':
  Initiate SCO after Mode change event

8 years agoAvoid sending SCO disconnect when power mode is processing
Mallikarjuna GB [Wed, 23 Mar 2016 17:54:52 +0000 (17:54 +0000)]
Avoid sending SCO disconnect when power mode is processing
am: 9ab2a9d

* commit '9ab2a9d97f4e0c4b3cd76416e3d6ed03b610ec6f':
  Avoid sending SCO disconnect when power mode is processing

8 years agoHID: Fix to show mouse pointer movements on UI
Nitin Shivpure [Fri, 15 Jan 2016 11:04:37 +0000 (16:34 +0530)]
HID: Fix to show mouse pointer movements on UI

As per the UHID implementation, UHID_OPEN & UHID_CLOSE
can be ignored, but it is useful for power-management.
Since these events are handled on hid host, ready_for_data
needs to be set to TRUE. Previously the hid reports were not
sent to kernel UHID driver leading to no mouse pointer movement
on UI of DUT.

Change-Id: I708f5be4240f07826c6eefc5404af3e42f80cfa4

8 years agoInitiate SCO after Mode change event
Mallikarjuna GB [Mon, 1 Jun 2015 07:28:38 +0000 (12:58 +0530)]
Initiate SCO after Mode change event

Use case:
1. Connect a headset to AG.
2. Make an outgoing call using headset.

Failure:
SCO connection request is rejected by headset.

Root cause:
AG initiated SCO connection when mode change is pending
on headset. Remote is coming out of sniff and rejected
SCO connection request.

Fix:
AG initiates SCO connection request once AG receives mode
change event. It resolves a corner case where remote failed
to accept SCO connection when initiated in between unsniff
LMP request. Issue is seen with WEP301 headset.

Change-Id: I4ea5d073630320b30f90e6141f4daf25943cca0b

8 years agoAvoid sending SCO disconnect when power mode is processing
Mallikarjuna GB [Sat, 30 May 2015 18:03:58 +0000 (23:33 +0530)]
Avoid sending SCO disconnect when power mode is processing

Use case:
1. Pair and connect with Mercedes car kit.
2. Answer incoming call by phone or car kit.
3. Switch audio between car kit and phone.
4. Repease 1-3 steps.

Failure:
Car kit is going into bad state and not accepting SCO disconnect.

Root cause:
Phone has sent SCO disconnect command to car kit when
power mode command(sniff/unsniff) is in the processing
on the ACL where SCO is active. Car kit didn't accept
remove SCO request command and gone into bad state.

Fix:
AG should send sco disconnect once power mode change is completed
to avoid this failure.

Change-Id: I7eba162a8fd9615795009ab26005535a3e5c7e86

8 years agoProcess complete AT cmd response.
Satish Kodishala [Wed, 23 Mar 2016 17:42:59 +0000 (17:42 +0000)]
Process complete AT cmd response.
am: 8c10b05

* commit '8c10b05eda5f1676668cb1504e976f4437851032':
  Process complete AT cmd response.

8 years agoAbort parsing in case of format error
Satish Kodishala [Wed, 23 Mar 2016 17:42:59 +0000 (17:42 +0000)]
Abort parsing in case of format error
am: e77ecc5

* commit 'e77ecc51ba21ebcaba74fb8c890bffba14d652bb':
  Abort parsing in case of format error

8 years agoProcess complete AT cmd response.
Satish Kodishala [Thu, 11 Feb 2016 17:05:40 +0000 (22:35 +0530)]
Process complete AT cmd response.

Usecase:
1. Enable hf client role and connect with AG.
2. Receive an incoming call and accept from hf client.
3. End call from hf client.
4. Repeat the steps few times.

Failure:
UI is not updated with proper call status although
call is active.

Root cause:
When OK is received as part of AT command response,
application is not updated for it. This caused response
state mismatch in application and hence queue was not
cleared properly.

Fix:
Parse complete AT command response and update application
accordingly.

Change-Id: I8cb2362369b209903700e87330ed2a3e3052b188

8 years agoAbort parsing in case of format error
Satish Kodishala [Thu, 11 Feb 2016 14:32:08 +0000 (20:02 +0530)]
Abort parsing in case of format error

Usecase:
1. Enable hf client and connect to AG.
2. Send +COPS with length more than allowed 16 characters.

Failure:
Crash might be seen while parsing +COPS response from AG.

Root cause:
sscanf used for parsing the AT commands does not update
the characters scanned when there is format error.

Fix:
Abort the processing in case of format error.

Change-Id: Id3ca80712df3d0251cf9ffb04d9c766be809ae84

8 years agoMove to idle when remote disconnects during connection.
Ayan Ghosh [Wed, 23 Mar 2016 17:26:58 +0000 (17:26 +0000)]
Move to idle when remote disconnects during connection.
am: 4d10d7f

* commit '4d10d7f5a0bb9444867b2f77b3e92725a851f8ac':
  Move to idle when remote disconnects during connection.

8 years agoAllocate buffer for AV SDP in Stack
Ayan Ghosh [Wed, 23 Mar 2016 17:26:58 +0000 (17:26 +0000)]
Allocate buffer for AV SDP in Stack
am: a986d61

* commit 'a986d610aa91222b3387497705aa12ccebe3835b':
  Allocate buffer for AV SDP in Stack

8 years agoMove to idle when remote disconnects during connection.
Ayan Ghosh [Tue, 7 Jan 2014 11:17:19 +0000 (16:47 +0530)]
Move to idle when remote disconnects during connection.

Chrysler Uconnect Touch initiates disconnect for a2dp on
l2cap just after discovery on AVDTP channel, stack does not
send any message to BTIF layer for disconnection, this
causes btif getting stuck in opening state and later no stable
connection update is sent to app. Since it is intermediate
state all subsequent connection trials fails.

Send disconnect event from incoming state to closing state
and then closing state will send proper msg to btif layer. Add
closing msg handling in btif layer so that we can update app
for connection disconnect when initiated from remote and move to
proper stable state for accepting/initiating connection.

Change-Id: I011d9ffe9d721235217320c1e5281f70328c7f13

8 years agoDo not initiate SDP for incoming AVDTP connection
Ayan Ghosh [Wed, 23 Mar 2016 17:18:34 +0000 (17:18 +0000)]
Do not initiate SDP for incoming AVDTP connection
am: c90c0d4

* commit 'c90c0d48e2adfaf42908177ea7eeab85787d84fc':
  Do not initiate SDP for incoming AVDTP connection

8 years agoAllocate buffer for AV SDP in Stack
Ayan Ghosh [Thu, 3 Mar 2016 10:37:38 +0000 (16:07 +0530)]
Allocate buffer for AV SDP in Stack

Remove buffer allocation in BTA while going for SDP before triggering
A2DP connection. This strategy is followed to address memory corruption
issues due to freeing of BTA buffer before SDP RSP call back is
triggered and access the freed buffer from there, leads to crash when
running Codemonicom tests.

The change allocates and frees buffer in stack.

Change-Id: If6d60d2aa60d19ce5120dd38c2f365d70943db81

8 years agoProcess AV HAL start only when previous instance is cleaned up
Ayan Ghosh [Wed, 23 Mar 2016 17:11:17 +0000 (17:11 +0000)]
Process AV HAL start only when previous instance is cleaned up
am: 59e97c2

* commit '59e97c20314b51cf0c2854e4d2aa889e7137207e':
  Process AV HAL start only when previous instance is cleaned up

8 years agoRestrict DUT supported SBC configuration in GET_CAP response
Ayan Ghosh [Wed, 23 Mar 2016 17:11:16 +0000 (17:11 +0000)]
Restrict DUT supported SBC configuration in GET_CAP response
am: d565837

* commit 'd56583705e63a8a508b908d2a0c62003834accae':
  Restrict DUT supported SBC configuration in GET_CAP response

8 years agoDo not initiate SDP for incoming AVDTP connection
Ayan Ghosh [Thu, 11 Dec 2014 12:26:02 +0000 (17:56 +0530)]
Do not initiate SDP for incoming AVDTP connection

There are few instances when remote initiates L2CAP
channel for AVDTP signaling but keeps quite after that,
and later on timeout DUT goes for rest of the signalling
procedure but does sdp prior to the same.Few peer
devices deletes a2dp sink sdp record when there is an
ongoing connection, as a result sdp request fails and
DUT fails to proceed with signalling procedure and
connection setup fails.

This patch makes sure that DUT does not go for redundant
sdp request for AVDTP, provided remote has already
established L2cap connection for the same. SDP is done
explicitly only incase of outgoing AV connection.

This issue is seen with Nokia Es headset.

Change-Id: Id44368687d5b3f97bf0258f8d4ff75f185db23af

8 years agoProcess AV HAL start only when previous instance is cleaned up
Ayan Ghosh [Thu, 3 Mar 2016 13:28:24 +0000 (18:58 +0530)]
Process AV HAL start only when previous instance is cleaned up

Change-Id: Iee232dacd3b79e6e94d26c73fb3e563fddced75c

8 years agoRestrict DUT supported SBC configuration in GET_CAP response
Ayan Ghosh [Thu, 17 Mar 2016 09:29:06 +0000 (14:59 +0530)]
Restrict DUT supported SBC configuration in GET_CAP response

DUT shows all possible SBC configurations as supported
as part of GET_CAP response and also allows AV SINK to
opt for any of these values from that set as part of
SET_CONFIG request, but later opts for only recommended
figures while streaming so that leads to mismatch in
configuration between the config values SINK sets during
SET_CONFIG and config values DUT chooses for streaming
and hence it causes PTS (version 6.4 onwards) certification
failure for below A2DP and AVDTP cases:

A2DP:
TC_SRC_SET_BV_04_I
TC_SRC_SET_BV_06_I

AVDTP:
TC_ACP_SRC_SIG_SMG_BV_18_C
TC_ACP_SRC_SIG_SMG_BV_20_C
TC_ACP_SRC_SIG_SMG_BV_22_C

Restricting DUT supported SBC configurations to reflect only
the configuration DUT opts for during streaming makes sure
remote also opts for those config values during SET_CONFIG
and later there is no mismatch.

Change-Id: I13dbe94e0ca52708fc62c6db7513f7985237c18c

8 years agoUse handles to identify GATT attributes (1/4)
Jakub Pawlowski [Tue, 22 Mar 2016 03:44:36 +0000 (03:44 +0000)]
Use handles to identify GATT attributes (1/4)
am: 26f8828

* commit '26f8828cdb5f02b0b01bafaccd4ad0b0ba9d57ab':
  Use handles to identify GATT attributes (1/4)

8 years agoHID service discovery refactor
Jakub Pawlowski [Tue, 22 Mar 2016 03:44:36 +0000 (03:44 +0000)]
HID service discovery refactor
am: 0673013  -s ours

* commit '06730134eb2d99cc1abb0e648bbff19641adc1ab':
  HID service discovery refactor

8 years agoRestructure GATTC
Jakub Pawlowski [Tue, 22 Mar 2016 03:41:57 +0000 (03:41 +0000)]
Restructure GATTC
am: 36b6707  -s ours

* commit '36b67072266468e4b4becc76c0ddbff6154bb12c':
  Restructure GATTC

8 years agoMerge changes from topic \'bug-27455533-to-nyc-dev-merge-1\' into nyc-dev
Jakub Pawlowski [Tue, 22 Mar 2016 03:39:19 +0000 (03:39 +0000)]
Merge changes from topic \'bug-27455533-to-nyc-dev-merge-1\' into nyc-dev
am: 1af9063  -s ours

* commit '1af906353999b8f25ddd1030803292a4c84087f6':
  Remove bta_gattc_id2handle
  Use attribute handle instead of id in GATT cache
  HID multi-device refactoring
  GATT cache storage refactoring
  Remove dead methods and callbacks
  Simplify UUID handling in GATT cache

8 years agoUse handles to identify GATT attributes (1/4)
Jakub Pawlowski [Thu, 17 Mar 2016 19:05:54 +0000 (12:05 -0700)]
Use handles to identify GATT attributes (1/4)

Bug: 27778668
Change-Id: Id7454450c1ce2164001a1f9ca0b91f18d84e3fd6

8 years agoHID service discovery refactor
Jakub Pawlowski [Tue, 15 Mar 2016 22:35:38 +0000 (15:35 -0700)]
HID service discovery refactor

This patch changes how HID is initialized.
Up till now, HID discovery was intricately chained,
to make sure two operations are not scheduled at same time.
From now on, all discovery is done and all operations are
scheduled for execution right away. There is separate set
of functions making sure all operations will be executed
without collisions.

This patch also removes BTA_HH_SCPP_INST_DEF, which was
used as hardcoded service id.

Bug: 27698756
Change-Id: I30a7388e129844c5e4727b2ed2b7c05867cc73a8

8 years agoRestructure GATTC
Jakub Pawlowski [Tue, 15 Mar 2016 22:35:00 +0000 (15:35 -0700)]
Restructure GATTC

This patch changes how GATTC is structured. Up till now, it
contained tBTA_GATTC_CACHE and tBTA_GATTC_CACHE_ATTR. Those
structures were so ugly, someone hide them inside internal
header, to make sure noone would ever access them from outside
GATTC. They are now replaced with:
tBTA_GATTC_SERVICE,
tBTA_GATTC_CHARACTERISTIC,
tBTA_GATTC_DESCRIPTOR and
tBTA_GATTC_INCLUDED_SVC.

Those looks much better, and were made globally avaliable.
Thanks to way they're build, we no longer need set of access
methods, which were also very ugly:
BTA_GATTC_GetFirstChar
BTA_GATTC_GetNextChar
BTA_GATTC_GetFirstIncludedService
etc.

This patch breaks HID, DO NOT SUBMIT without HID refactor.

Bug: 27455533
Change-Id: Ic42cfff175e0cc1a0d8e1a1216e2b4b756cbf77d

8 years agoMerge changes from topic 'bug-27455533-to-nyc-dev-merge-1' into nyc-dev
Andre Eisenbach [Tue, 22 Mar 2016 02:55:32 +0000 (02:55 +0000)]
Merge changes from topic 'bug-27455533-to-nyc-dev-merge-1' into nyc-dev

* changes:
  Remove bta_gattc_id2handle
  Use attribute handle instead of id in GATT cache
  HID multi-device refactoring
  GATT cache storage refactoring
  Remove dead methods and callbacks
  Simplify UUID handling in GATT cache

8 years agoUse handles to identify GATT attributes (1/4)
Jakub Pawlowski [Tue, 22 Mar 2016 02:47:26 +0000 (02:47 +0000)]
Use handles to identify GATT attributes (1/4)
am: 9dc9985

* commit '9dc998503590163068845827d951fc2f05a17bda':
  Use handles to identify GATT attributes (1/4)

8 years agoUse handles to identify GATT attributes (1/4)
Jakub Pawlowski [Thu, 17 Mar 2016 19:05:54 +0000 (12:05 -0700)]
Use handles to identify GATT attributes (1/4)

Bug: 27778668
Change-Id: Id7454450c1ce2164001a1f9ca0b91f18d84e3fd6

8 years agoCleanup after p_mcb if L2CA_ConnectReq() failed
Pavlin Radoslavov [Tue, 22 Mar 2016 02:30:36 +0000 (02:30 +0000)]
Cleanup after p_mcb if L2CA_ConnectReq() failed
am: d212571

* commit 'd2125712aa0988434d7809e8497f49525a9eae9b':
  Cleanup after p_mcb if L2CA_ConnectReq() failed

8 years agoAdd missing initialization of queue btm_cb.sec_pending_q
Pavlin Radoslavov [Tue, 22 Mar 2016 02:30:36 +0000 (02:30 +0000)]
Add missing initialization of queue btm_cb.sec_pending_q
am: 16c97b9

* commit '16c97b9a1732558868901f4315f4f0b3850be2a1':
  Add missing initialization of queue btm_cb.sec_pending_q

8 years agoCleanup after p_mcb if L2CA_ConnectReq() failed
Pavlin Radoslavov [Fri, 18 Mar 2016 08:02:45 +0000 (01:02 -0700)]
Cleanup after p_mcb if L2CA_ConnectReq() failed

If L2CA_ConnectReq() failed, make sure that
we cleanup the lcid cache state after the
affected p_mcb.

Also, extra check and a log message inside function
rfc_check_send_cmd().

Bug: 27334916
Change-Id: Ib2950d12ce456d74355f4bcc0e3c4d87603f8f91

8 years agoAdd missing initialization of queue btm_cb.sec_pending_q
Pavlin Radoslavov [Tue, 22 Mar 2016 01:47:09 +0000 (01:47 +0000)]
Add missing initialization of queue btm_cb.sec_pending_q
am: 6aef394

* commit '6aef394995e2c99bb29be05fa63298ea56ea3f60':
  Add missing initialization of queue btm_cb.sec_pending_q

8 years agoAdd missing initialization of queue btm_cb.sec_pending_q
Pavlin Radoslavov [Mon, 21 Mar 2016 23:35:41 +0000 (16:35 -0700)]
Add missing initialization of queue btm_cb.sec_pending_q

Bug: 27763878
Change-Id: I93001a679e22b744c3feafda1997e5f7e707db4e

8 years agoLog error code on wakelock acquisition/release failure
Andre Eisenbach [Tue, 22 Mar 2016 01:17:45 +0000 (01:17 +0000)]
Log error code on wakelock acquisition/release failure
am: b71bdd6

* commit 'b71bdd6f5bef9514eb358c4279dca57ae8c1df70':
  Log error code on wakelock acquisition/release failure

8 years agoLog error code on wakelock acquisition/release failure
Andre Eisenbach [Thu, 17 Mar 2016 23:51:36 +0000 (16:51 -0700)]
Log error code on wakelock acquisition/release failure

Bug: 27721443
Change-Id: I8ac9e738d916bfdcf125e33c0e09f90cc8d26d55

8 years agoCleanup after p_mcb if L2CA_ConnectReq() failed
Pavlin Radoslavov [Tue, 22 Mar 2016 00:37:31 +0000 (00:37 +0000)]
Cleanup after p_mcb if L2CA_ConnectReq() failed
am: 757047a

* commit '757047a147582d6c5be22f0fb5148005f345fc9b':
  Cleanup after p_mcb if L2CA_ConnectReq() failed

8 years agoAdd missing initialization of queue btm_cb.sec_pending_q
Pavlin Radoslavov [Mon, 21 Mar 2016 23:35:41 +0000 (16:35 -0700)]
Add missing initialization of queue btm_cb.sec_pending_q

Bug: 27763878
Change-Id: I93001a679e22b744c3feafda1997e5f7e707db4e

8 years agoCleanup after p_mcb if L2CA_ConnectReq() failed
Pavlin Radoslavov [Fri, 18 Mar 2016 08:02:45 +0000 (01:02 -0700)]
Cleanup after p_mcb if L2CA_ConnectReq() failed

If L2CA_ConnectReq() failed, make sure that
we cleanup the lcid cache state after the
affected p_mcb.

Also, extra check and a log message inside function
rfc_check_send_cmd().

Bug: 27334916
Change-Id: Ib2950d12ce456d74355f4bcc0e3c4d87603f8f91

8 years agoDon\'t clear the btsnoop log ringbuffer on compress.
Sharvil Nanavati [Mon, 21 Mar 2016 23:31:23 +0000 (23:31 +0000)]
Don\'t clear the btsnoop log ringbuffer on compress.
am: b35c234

* commit 'b35c23483633826617d2312be805df93aeb9d8ca':
  Don't clear the btsnoop log ringbuffer on compress.

8 years agoAdd config source to dumpsys output
Ajay Panicker [Mon, 21 Mar 2016 23:28:55 +0000 (23:28 +0000)]
Add config source to dumpsys output
am: 63ddbe8

* commit '63ddbe8813aac242071dffc0bd413ba60e6dd7bf':
  Add config source to dumpsys output

8 years agoDon't clear the btsnoop log ringbuffer on compress.
Sharvil Nanavati [Mon, 29 Feb 2016 23:50:49 +0000 (15:50 -0800)]
Don't clear the btsnoop log ringbuffer on compress.

Change-Id: I0bf4279104e87b151553eba913491d934f3cde41

8 years agoAdd config source to dumpsys output
Ajay Panicker [Mon, 21 Mar 2016 18:23:09 +0000 (11:23 -0700)]
Add config source to dumpsys output

This logs where the config file was loaded from in the Bluetooth
Manager dumpsys output.

Bug: 27354612
Change-Id: I50d4aaa0be4f4d1d890580b03742713f4345c80f

8 years agoAdd config source to dumpsys output
Ajay Panicker [Mon, 21 Mar 2016 23:23:17 +0000 (23:23 +0000)]
Add config source to dumpsys output
am: 190cf46

* commit '190cf46ff6937bceff146aec026cf9f53c40e84d':
  Add config source to dumpsys output

8 years agoAdd config source to dumpsys output
Ajay Panicker [Mon, 21 Mar 2016 18:23:09 +0000 (11:23 -0700)]
Add config source to dumpsys output

This logs where the config file was loaded from in the Bluetooth
Manager dumpsys output.

Bug: 27354612
Change-Id: I50d4aaa0be4f4d1d890580b03742713f4345c80f

8 years agoDo not leak eventfd\'s for RFCOMM/AVDT/L2CAP
Andre Eisenbach [Mon, 21 Mar 2016 16:21:31 +0000 (16:21 +0000)]
Do not leak eventfd\'s for RFCOMM/AVDT/L2CAP
am: 072bd75

* commit '072bd753e6ac2a011421cd7e4a2e622ee7d052fc':
  Do not leak eventfd's for RFCOMM/AVDT/L2CAP

8 years agoDo not leak eventfd\'s for RFCOMM/AVDT/L2CAP
Andre Eisenbach [Mon, 21 Mar 2016 16:11:58 +0000 (16:11 +0000)]
Do not leak eventfd\'s for RFCOMM/AVDT/L2CAP
am: 9ccca2b

* commit '9ccca2b5937ec42409d8b6354884f1f4b6d524f7':
  Do not leak eventfd's for RFCOMM/AVDT/L2CAP

8 years agoDo not leak eventfd's for RFCOMM/AVDT/L2CAP
Andre Eisenbach [Fri, 18 Mar 2016 09:09:58 +0000 (02:09 -0700)]
Do not leak eventfd's for RFCOMM/AVDT/L2CAP

Various users of fixed_queue's do not free the lists properly after
using them. As a result two event fd's leak for each fixed_queue that
is not free'd, as fixed_queue contains two semaphores.

This can lead to run-away file descriptor allocation and an eventual
hard limit leading to various undefined behaviours.

Bug: 27731859
Change-Id: If9ce64b711083bf474d217aa537220065722ad3a

8 years agoDo not leak eventfd's for RFCOMM/AVDT/L2CAP
Andre Eisenbach [Fri, 18 Mar 2016 09:09:58 +0000 (02:09 -0700)]
Do not leak eventfd's for RFCOMM/AVDT/L2CAP

Various users of fixed_queue's do not free the lists properly after
using them. As a result two event fd's leak for each fixed_queue that
is not free'd, as fixed_queue contains two semaphores.

This can lead to run-away file descriptor allocation and an eventual
hard limit leading to various undefined behaviours.

Bug: 27731859
Change-Id: If9ce64b711083bf474d217aa537220065722ad3a

8 years agoLog error code on wakelock acquisition/release failure
Andre Eisenbach [Fri, 18 Mar 2016 01:36:28 +0000 (01:36 +0000)]
Log error code on wakelock acquisition/release failure
am: f4f3b60

* commit 'f4f3b602395c8961fce5937f8e97a57db276b978':
  Log error code on wakelock acquisition/release failure

8 years agoLog error code on wakelock acquisition/release failure
Andre Eisenbach [Thu, 17 Mar 2016 23:51:36 +0000 (16:51 -0700)]
Log error code on wakelock acquisition/release failure

Bug: 27721443
Change-Id: I8ac9e738d916bfdcf125e33c0e09f90cc8d26d55

8 years agoMerge "Use audio_session_t consistently" into nyc-dev
Glenn Kasten [Thu, 17 Mar 2016 18:21:08 +0000 (18:21 +0000)]
Merge "Use audio_session_t consistently" into nyc-dev
am: 1b1bcbb

* commit '1b1bcbb3b0bc812410a3ee4f798570d40e0463bc':
  Use audio_session_t consistently

8 years agoDO NOT MERGE Check size of pin before replying
Marie Janssen [Thu, 17 Mar 2016 18:21:07 +0000 (18:21 +0000)]
DO NOT MERGE Check size of pin before replying
am: fcc536a

* commit 'fcc536af189dfe534e5e7c6b352ee114de71b3a1':
  DO NOT MERGE Check size of pin before replying

8 years agoMerge "Use audio_session_t consistently" into nyc-dev
Glenn Kasten [Thu, 17 Mar 2016 14:22:50 +0000 (14:22 +0000)]
Merge "Use audio_session_t consistently" into nyc-dev

8 years agoMerge "Wait for UHID interface on boot"
Warren Rehman [Thu, 17 Mar 2016 04:32:13 +0000 (04:32 +0000)]
Merge "Wait for UHID interface on boot"
am: 1302ca7

* commit '1302ca714a1fc812c392ab841253b5731e3c110b':
  Wait for UHID interface on boot

8 years agoMerge "Wait for UHID interface on boot"
wrehman [Thu, 17 Mar 2016 04:24:35 +0000 (04:24 +0000)]
Merge "Wait for UHID interface on boot"

8 years agoDon\'t send AT+BCC if local device doesn\'t support codec negotiation.
Sharvil Nanavati [Thu, 17 Mar 2016 00:22:39 +0000 (00:22 +0000)]
Don\'t send AT+BCC if local device doesn\'t support codec negotiation.
am: e79eaef

* commit 'e79eaef05e0778917dcc77d95292370d5aa4491e':
  Don't send AT+BCC if local device doesn't support codec negotiation.

8 years agoDon't send AT+BCC if local device doesn't support codec negotiation.
Sharvil Nanavati [Tue, 15 Mar 2016 20:13:45 +0000 (13:13 -0700)]
Don't send AT+BCC if local device doesn't support codec negotiation.

The current code only checked if the peer supported codec negotiation
before sending AT+BCC. But if codec negotation is disabled on the
local device, we should definitely not send AT+BCC.

Bug: 27213013
Change-Id: Id372a32a61a3d96d5c093bc50594ef0b8c2eff2e

8 years agoHID service discovery refactor
Jakub Pawlowski [Wed, 16 Mar 2016 19:27:22 +0000 (19:27 +0000)]
HID service discovery refactor
am: e8187e5

* commit 'e8187e565382ae9afb52a7992e9a6ab1e3108999':
  HID service discovery refactor

8 years agoRestructure GATTC
Jakub Pawlowski [Wed, 16 Mar 2016 19:27:22 +0000 (19:27 +0000)]
Restructure GATTC
am: 5204fd7

* commit '5204fd71b3ca799942c45a36548faeba4d89477d':
  Restructure GATTC

8 years agoHID service discovery refactor
Jakub Pawlowski [Tue, 15 Mar 2016 22:35:38 +0000 (15:35 -0700)]
HID service discovery refactor

This patch changes how HID is initialized.
Up till now, HID discovery was intricately chained,
to make sure two operations are not scheduled at same time.
From now on, all discovery is done and all operations are
scheduled for execution right away. There is separate set
of functions making sure all operations will be executed
without collisions.

This patch also removes BTA_HH_SCPP_INST_DEF, which was
used as hardcoded service id.

Bug: 27698756
Change-Id: I30a7388e129844c5e4727b2ed2b7c05867cc73a8

8 years agoRestructure GATTC
Jakub Pawlowski [Tue, 15 Mar 2016 22:35:00 +0000 (15:35 -0700)]
Restructure GATTC

This patch changes how GATTC is structured. Up till now, it
contained tBTA_GATTC_CACHE and tBTA_GATTC_CACHE_ATTR. Those
structures were so ugly, someone hide them inside internal
header, to make sure noone would ever access them from outside
GATTC. They are now replaced with:
tBTA_GATTC_SERVICE,
tBTA_GATTC_CHARACTERISTIC,
tBTA_GATTC_DESCRIPTOR and
tBTA_GATTC_INCLUDED_SVC.

Those looks much better, and were made globally avaliable.
Thanks to way they're build, we no longer need set of access
methods, which were also very ugly:
BTA_GATTC_GetFirstChar
BTA_GATTC_GetNextChar
BTA_GATTC_GetFirstIncludedService
etc.

This patch breaks HID, DO NOT SUBMIT without HID refactor.

Bug: 27455533
Change-Id: Ic42cfff175e0cc1a0d8e1a1216e2b4b756cbf77d

8 years agoAdd LE L2CAP Connection Oriented Channel
Navin Kochar [Wed, 16 Mar 2016 18:59:34 +0000 (18:59 +0000)]
Add LE L2CAP Connection Oriented Channel
am: 6721232

* commit '6721232129f137ab024d9b95fc1094a714bc4c01':
  Add LE L2CAP Connection Oriented Channel

8 years agoStart listener thread only after successful open call
Srinu Jella [Wed, 16 Mar 2016 18:59:34 +0000 (18:59 +0000)]
Start listener thread only after successful open call
am: 95b9bc0

* commit '95b9bc0e533545a14cf12877c72e0d96ab4370fd':
  Start listener thread only after successful open call

8 years agoDO NOT MERGE Check size of pin before replying
Marie Janssen [Wed, 9 Mar 2016 23:31:48 +0000 (15:31 -0800)]
DO NOT MERGE Check size of pin before replying

If a malicious client set a pin that was too long it would overflow
the pin code memory.

Bug: 27411268
Change-Id: I9197ac6fdaa92a4799dacb6364e04671a39450cc