OSDN Git Service

android-x86/system-bt.git
8 years agoAdd BT_HCI_TIMEOUT and BT_CONFIG_SOURCE log events.
Jacky Cheung [Wed, 29 Jun 2016 01:15:04 +0000 (01:15 +0000)]
Add BT_HCI_TIMEOUT and BT_CONFIG_SOURCE log events.
am: e909ff50ff

Change-Id: Iafd1759f79364e80101344f5023726feb146ff53

8 years agoAdd BT_HCI_TIMEOUT and BT_CONFIG_SOURCE log events.
Jacky Cheung [Mon, 23 May 2016 19:39:01 +0000 (12:39 -0700)]
Add BT_HCI_TIMEOUT and BT_CONFIG_SOURCE log events.

These events are used to track HCI timeout and configuration file
usage respectively.

Change-Id: I5c8b6ef20b61f03b9ccb74f3b1c9784e4653b770

8 years agoSimplify GATT characteristic read memory handling
Jakub Pawlowski [Tue, 28 Jun 2016 19:01:08 +0000 (19:01 +0000)]
Simplify GATT characteristic read memory handling
am: 3c5451da9d

Change-Id: I988d7eefcb9a0856ef61496610eac26b29aefa7d

8 years agoSimplify GATT characteristic read memory handling
Jakub Pawlowski [Sat, 25 Jun 2016 00:06:41 +0000 (17:06 -0700)]
Simplify GATT characteristic read memory handling

Pass read result in a fixed sized array instead of a pointer.
This eliminates the need for any special memory management in btif.

Change-Id: I2a33d74b12f3059050855c9fc90fff785cc985ba

8 years agoAdd Subaru and Nissan car kits to auto pair blacklist
Andre Eisenbach [Mon, 27 Jun 2016 23:53:23 +0000 (23:53 +0000)]
Add Subaru and Nissan car kits to auto pair blacklist
am: d13870072e

Change-Id: I753967a57a3e460638ab904ad987beda96399975

8 years agoMatch socket buffer sizes between audio HAL and BT server am: 3d02215979
Andy Hung [Mon, 27 Jun 2016 23:30:03 +0000 (23:30 +0000)]
Match socket buffer sizes between audio HAL and BT server am: 3d02215979
am: 753ef725b9

Change-Id: Ibb2fd3f2ac5b07c61f03f5fd8b649f22ca48b688

8 years agoMatch socket buffer sizes between audio HAL and BT server
Andy Hung [Mon, 27 Jun 2016 23:24:38 +0000 (23:24 +0000)]
Match socket buffer sizes between audio HAL and BT server
am: 3d02215979

Change-Id: Id4e09877ebba3a3096bde0a59e8c4c5dc7a26051

8 years agoAdd Subaru and Nissan car kits to auto pair blacklist
Andre Eisenbach [Mon, 27 Jun 2016 22:49:53 +0000 (15:49 -0700)]
Add Subaru and Nissan car kits to auto pair blacklist

Bug: 29157087
Change-Id: If227963b939a9b0ed55e6d900364c71932d3cfe8

8 years agoMatch socket buffer sizes between audio HAL and BT server
Andy Hung [Wed, 4 May 2016 22:47:05 +0000 (15:47 -0700)]
Match socket buffer sizes between audio HAL and BT server

Adjust our mixer buffer size to be one quarter that of
the socket buffer size for quadruple buffering.

Increase socket buffer size from 20*512 to 28*512 to
smooth out variability in data draw from AudioFlinger.

Bug: 28286313
Change-Id: I8a9ca9e1f4639a0724cfe126acc670c2058cb0fb
(cherry picked from commit e97d975cce213b8c6e4f69bc3fc75411a1743647)

8 years agoA2DP media task: Flush full TX queue on congestion
Andre Eisenbach [Fri, 24 Jun 2016 23:54:36 +0000 (23:54 +0000)]
A2DP media task: Flush full TX queue on congestion
am: d881c4b467

Change-Id: I4e15610487705635ece8fb6bd727c320dfaacd7a

8 years agoA2DP media task: Flush full TX queue on congestion
Andre Eisenbach [Thu, 23 Jun 2016 23:14:53 +0000 (16:14 -0700)]
A2DP media task: Flush full TX queue on congestion

Currently, our TX queue does not allow for quick recovery of minor
congestion. As we only clear as much room in the queue as is needed to
fix the news frames needed for a given timer tick, any minor congestion
on the TX path can result in single frames to be dropped over an
excessively long amount of time.

From the "just rip the band-aid off" school of thought, drop the whole
queue instead to cause a single drop-out on congestion and catch up to
the live stream immediately, hoping that the stream recovers...

Bug: 29601962
Change-Id: I482c3cfef6d8b51143e54733eb2da5f70663636f

8 years agoGet rid of unused BTA_DYNAMIC_MEMORY am: 25984b0d22
Jakub Pawlowski [Fri, 24 Jun 2016 22:56:10 +0000 (22:56 +0000)]
Get rid of unused BTA_DYNAMIC_MEMORY am: 25984b0d22
am: 88eb96fd30

Change-Id: Idcbb1232a2fbd1b253ad9d5daeea990ff21dea3c

8 years agoGet rid of unused BTA_DYNAMIC_MEMORY
Jakub Pawlowski [Fri, 24 Jun 2016 22:54:19 +0000 (22:54 +0000)]
Get rid of unused BTA_DYNAMIC_MEMORY
am: 25984b0d22

Change-Id: I182b5b707f6537c8c50cb5cac794ecedebc45b4d

8 years agoresolve merge conflicts of 6b142ed to nyc-dev-plus-aosp
Andre Eisenbach [Fri, 24 Jun 2016 21:53:22 +0000 (14:53 -0700)]
resolve merge conflicts of 6b142ed to nyc-dev-plus-aosp

Change-Id: I222ff056f7ba91903a60f1ef6958b6e4ec6f7f79

8 years agoUse bta_gattc_cb directly, not through aliases am: a05734c69c
Jakub Pawlowski [Fri, 24 Jun 2016 21:39:28 +0000 (21:39 +0000)]
Use bta_gattc_cb directly, not through aliases am: a05734c69c
am: de22f90d28

Change-Id: I210d6bdb64a073a61c82420bb995cec88d1e2ccf

8 years agoUse bta_gattc_cb directly, not through aliases
Jakub Pawlowski [Fri, 24 Jun 2016 21:37:32 +0000 (21:37 +0000)]
Use bta_gattc_cb directly, not through aliases
am: a05734c69c

Change-Id: Iefcdc6e3ea4504e859464e778e6ca88222fc379b

8 years agoRemove log spam in btif_gattc_update_properties
Andre Eisenbach [Fri, 24 Jun 2016 21:15:01 +0000 (21:15 +0000)]
Remove log spam in btif_gattc_update_properties
am: ffdb33b5fc  -s ours

Change-Id: I4ec69857999b0d7c89596a02386f796f50388ba7

8 years agoGet rid of unused BTA_DYNAMIC_MEMORY
Jakub Pawlowski [Fri, 24 Jun 2016 21:05:58 +0000 (14:05 -0700)]
Get rid of unused BTA_DYNAMIC_MEMORY

Change-Id: Idc7fcddfecac9ab7d9800b496e2380ae277f357f

8 years agoUse bta_gattc_cb directly, not through aliases
Jakub Pawlowski [Fri, 24 Jun 2016 20:36:01 +0000 (13:36 -0700)]
Use bta_gattc_cb directly, not through aliases

Right now, bta_gattc_cb is not used directly, instead it's passed as
argument to methods that can use it directly.

Change-Id: I54fef4b8b1e11b3289e7961f70bea187173e9804

8 years agoMerge "Remove SBC frame scrambling" into nyc-dev
Andre Eisenbach [Fri, 24 Jun 2016 17:16:52 +0000 (17:16 +0000)]
Merge "Remove SBC frame scrambling" into nyc-dev

8 years agoRemove SBC frame scrambling
Andre Eisenbach [Thu, 23 Jun 2016 22:25:44 +0000 (15:25 -0700)]
Remove SBC frame scrambling

Bug: 29601962
Change-Id: I30ce09f1c7550a1be9fd1c8ed70745f9aa0cdb44

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

Bug: 29601962
Change-Id: I4a86b786609b0203a72b750a1c4a38c82fcc5f97

8 years agoresolve merge conflicts of b7f64bc to stage-aosp-master
Marie Janssen [Wed, 22 Jun 2016 22:39:47 +0000 (22:39 +0000)]
resolve merge conflicts of b7f64bc to stage-aosp-master
am: 649e13fbfb

Change-Id: I74fb93559793619a604f7ab442b0274ed3e3fd27

8 years agoresolve merge conflicts of b7f64bc to stage-aosp-master
Marie Janssen [Wed, 22 Jun 2016 22:24:37 +0000 (15:24 -0700)]
resolve merge conflicts of b7f64bc to stage-aosp-master

Change-Id: I8359cd1895d6a0e49e834a8f45823865617a207d

8 years agobtif: standardize types, #ifs
Marie Janssen [Wed, 22 Jun 2016 19:52:19 +0000 (12:52 -0700)]
btif: standardize types, #ifs

Use standard types everywhere.
Use standard style for #if statements:
 - #if (VAR_NAME == TRUE)
 - #if (VAR_NAME1 == TRUE && VAR_NAME2 == TRUE)
Use __func__ instead of __FUNCTION__

Change-Id: Ic29d1d0b32c3ca9953752a4e5da6c28f45ec8895

8 years agoresolve merge conflicts of 1f433cb to mnc-dr-dev am: f15ca6d21d -s ours am: 8e80a260...
Sharvil Nanavati [Wed, 22 Jun 2016 01:26:32 +0000 (01:26 +0000)]
resolve merge conflicts of 1f433cb to mnc-dr-dev am: f15ca6d21d  -s ours am: 8e80a26078 am: edb7ce120e
am: c4bc5d2c5a

Change-Id: Idc155f2aaaf932a64da86c9c82c9a787ac460807

8 years agoresolve merge conflicts of 1f433cb to mnc-dr-dev am: f15ca6d21d -s ours am: 8e80a26078
Sharvil Nanavati [Wed, 22 Jun 2016 01:19:12 +0000 (01:19 +0000)]
resolve merge conflicts of 1f433cb to mnc-dr-dev am: f15ca6d21d  -s ours am: 8e80a26078
am: edb7ce120e

Change-Id: Ie7ea41474e11479b54ba526294977dfaa60c8cd7

8 years agoresolve merge conflicts of 1f433cb to mnc-dr-dev am: f15ca6d21d -s ours
Sharvil Nanavati [Wed, 22 Jun 2016 01:16:24 +0000 (01:16 +0000)]
resolve merge conflicts of 1f433cb to mnc-dr-dev am: f15ca6d21d  -s ours
am: 8e80a26078

Change-Id: I54a690024ccd316058d9d59ff7b16206f7fcd543

8 years agoresolve merge conflicts of 1f433cb to mnc-dr-dev
Sharvil Nanavati [Wed, 22 Jun 2016 01:13:44 +0000 (01:13 +0000)]
resolve merge conflicts of 1f433cb to mnc-dr-dev
am: f15ca6d21d  -s ours

Change-Id: Ic1a23e2c6d0284b9fdf346a681f59cdcbaa599e0

8 years agoGATT: use one type for all server attributes am: c88b20a599
Jakub Pawlowski [Wed, 22 Jun 2016 00:58:05 +0000 (00:58 +0000)]
GATT: use one type for all server attributes am: c88b20a599
am: a8fac50181

Change-Id: I123297945ebe03d7f139b51437a16909d984b44b

8 years agoGATT: use one type for all server attributes
Jakub Pawlowski [Wed, 22 Jun 2016 00:55:55 +0000 (00:55 +0000)]
GATT: use one type for all server attributes
am: c88b20a599

Change-Id: I56b557fa9e13ca95e375ead0ad298357f6e5f564

8 years agoGATT: use one type for all server attributes
Jakub Pawlowski [Tue, 21 Jun 2016 23:16:09 +0000 (16:16 -0700)]
GATT: use one type for all server attributes

Right now we have three types, for attributes depending on how long
the uuid is. Instead, use one type.

Change-Id: I33bb4f3c57b7b1516eda871a77b71661b7ba39ce

8 years agoresolve merge conflicts of 1f433cb to mnc-dr-dev
Sharvil Nanavati [Tue, 21 Jun 2016 22:56:42 +0000 (15:56 -0700)]
resolve merge conflicts of 1f433cb to mnc-dr-dev

Change-Id: I7278875d21c59316217cb1b99d902f4fc248ca06

8 years agoDO NOT MERGE Fix potential DoS caused by delivering signal to BT process
Sharvil Nanavati [Tue, 21 Jun 2016 02:16:12 +0000 (19:16 -0700)]
DO NOT MERGE Fix potential DoS caused by delivering signal to BT process

Bug: 28885210
Change-Id: I63866d894bfca47464d6e42e3fb0357c4f94d360

8 years agoMerge \\"Remove unused \\"cmn_ble_vsc_cb\\"; causing extended scan to not start\...
IHLHO KIM [Mon, 20 Jun 2016 22:59:19 +0000 (22:59 +0000)]
Merge \\"Remove unused \\"cmn_ble_vsc_cb\\"; causing extended scan to not start\\" am: 844c999757
am: 68d7b7d1cc

Change-Id: I85c6c8799ef589841fdee9885740994d6a2ec4d1

8 years agoMerge \"Remove unused \"cmn_ble_vsc_cb\"; causing extended scan to not start\"
IHLHO KIM [Mon, 20 Jun 2016 22:56:34 +0000 (22:56 +0000)]
Merge \"Remove unused \"cmn_ble_vsc_cb\"; causing extended scan to not start\"
am: 844c999757

Change-Id: Id948c9a86af0dab86fd936753df5ea4172fe77cb

8 years agoMerge "Remove unused "cmn_ble_vsc_cb"; causing extended scan to not start"
Treehugger Robot [Mon, 20 Jun 2016 22:53:14 +0000 (22:53 +0000)]
Merge "Remove unused "cmn_ble_vsc_cb"; causing extended scan to not start"

8 years agoVectors as parameters to GATT (1/3) am: 16102de086
Jakub Pawlowski [Mon, 20 Jun 2016 22:42:48 +0000 (22:42 +0000)]
Vectors as parameters to GATT (1/3) am: 16102de086
am: 8350568c63

Change-Id: I9022867786932320f775a1adfa00efbe90f0fa84

8 years agoVectors as parameters to GATT (1/3)
Jakub Pawlowski [Mon, 20 Jun 2016 22:37:32 +0000 (22:37 +0000)]
Vectors as parameters to GATT (1/3)
am: 16102de086

Change-Id: Iddbc25e849a4c53c608694dab06ffd48a3fb01e3

8 years agoVectors as parameters to GATT (1/3)
Jakub Pawlowski [Tue, 31 May 2016 20:14:13 +0000 (13:14 -0700)]
Vectors as parameters to GATT (1/3)

Bug: 29005882
Bug: 28485365
Change-Id: I0a5041073a39977c4fbc29879c383fa6720da641

8 years agoRemove unused "cmn_ble_vsc_cb"; causing extended scan to not start
IHLHO KIM [Wed, 15 Jun 2016 05:27:53 +0000 (05:27 +0000)]
Remove unused "cmn_ble_vsc_cb"; causing extended scan to not start

The local variable "cmn_ble_vsc_cb" is referenced instead of btm_cb.
This causes generic LE scans to be used even though the controller
supports extended scans.

Change-Id: I8b1d817d4d04ee3a8db4285998b5a1916d046ccc

8 years agobta: use standard types am: e9e58ced19
Marie Janssen [Mon, 20 Jun 2016 20:52:01 +0000 (20:52 +0000)]
bta: use standard types am: e9e58ced19
am: 04c2ce1d6e

Change-Id: I975fd04d3fb7645c16aa94e9280c4f2b13727c44

8 years agobta: use standard types
Marie Janssen [Mon, 20 Jun 2016 20:50:11 +0000 (20:50 +0000)]
bta: use standard types
am: e9e58ced19

Change-Id: Ie6be3d3ca5b0995c85becd1ef351d11deb773169

8 years agobta: use standard types
Marie Janssen [Fri, 17 Jun 2016 21:12:17 +0000 (14:12 -0700)]
bta: use standard types

Use standard types everywhere.
Use standard style for #if statements:
 - #if (VAR_NAME == TRUE)
 - #if (VAR_NAME1 == TRUE && VAR_NAME2 == TRUE)
Use __func__ instead of __FUNCTION__
Fix some debug statements to use __func__

Change-Id: Ib86de4de9f14529ecaa4f71597260e3b5785360b

8 years agoVectors as parameters to GATT write/indicate (1/3) am: ec79baaaed
Jakub Pawlowski [Mon, 20 Jun 2016 18:11:41 +0000 (18:11 +0000)]
Vectors as parameters to GATT write/indicate (1/3) am: ec79baaaed
am: 7e485025df

Change-Id: Icb9765a7a4ef16f96da32fdc37a8388cf3aee75d

8 years agoUse vector instead of C arrays in bta_gatt_api am: 26ecec06be
Jakub Pawlowski [Mon, 20 Jun 2016 18:10:57 +0000 (18:10 +0000)]
Use vector instead of C arrays in bta_gatt_api am: 26ecec06be
am: 7d1f7ebf01

Change-Id: Idf14b331605f790ac470097506197165d1bf034a

8 years agoVectors as parameters to GATT write/indicate (1/3)
Jakub Pawlowski [Mon, 20 Jun 2016 18:05:39 +0000 (18:05 +0000)]
Vectors as parameters to GATT write/indicate (1/3)
am: ec79baaaed

Change-Id: I5a9e1abb17e06945a13c4afd883f439befc64424

8 years agoUse vector instead of C arrays in bta_gatt_api
Jakub Pawlowski [Mon, 20 Jun 2016 18:05:38 +0000 (18:05 +0000)]
Use vector instead of C arrays in bta_gatt_api
am: 26ecec06be

Change-Id: I04cb40c4ae5c61f548a4878cee6a3084950392a3

8 years agoL2CAP: Handle invalid HCI packets
Matadeen Mishra [Mon, 20 Jun 2016 18:05:13 +0000 (18:05 +0000)]
L2CAP: Handle invalid HCI packets
am: 92e0f19ff0

Change-Id: Ib7ffac0632de84d8f0099eeef3dabbb94a101b7f

8 years agoVectors as parameters to GATT write/indicate (1/3)
Jakub Pawlowski [Fri, 27 May 2016 22:48:03 +0000 (15:48 -0700)]
Vectors as parameters to GATT write/indicate (1/3)

This changes are covered in test cases:
GattReadTest.*
GattWriteTest.*

Bug: 29005882
Bug: 28485365
Change-Id: I1409e6ead22ff691190f9ea4c3ffe2267bd3bf33

8 years agoUse vector instead of C arrays in bta_gatt_api
Jakub Pawlowski [Fri, 27 May 2016 16:42:21 +0000 (09:42 -0700)]
Use vector instead of C arrays in bta_gatt_api

This changes are covered in test cases:
GattReadTest.*
GattWriteTest.*

Bug: 28485365
Change-Id: I0bb098b4d5e991ed53d3276ac6f7174723c59444

8 years agoL2CAP: Handle invalid HCI packets
Matadeen Mishra [Wed, 3 Feb 2016 12:43:39 +0000 (18:13 +0530)]
L2CAP: Handle invalid HCI packets

- Handled Buffer over flow for uint16_t
- Discard invalid HCI packets from Codenomican test
  tool as data length and actual data not matching
  during reassembly

Use case:
Execute L2CAP test suit from Defensics Codenomican

Steps:
1. Pair and connect DUT to Codenomican tool
2. Execute L2CAP test suit from Defensics Codenomican

Failure:
Crash observed on DUT and Codenomican tool stuck in execution.

Root cause:
Codenomican tool sending invalid HCI packets to DUT and
there are no checks to handle buffer over flow and other invalid data
from Codenomican tool.

Bug: 29498064
Change-Id: I6f93c80244fc39d607ad285185136bbbca83d7ae

8 years agoAVRCP: rename constant AVRC_CTLR_INCLUDED am: c6d93ada03
Marie Janssen [Fri, 17 Jun 2016 21:56:30 +0000 (21:56 +0000)]
AVRCP: rename constant AVRC_CTLR_INCLUDED am: c6d93ada03
am: da9427f3a4

Change-Id: I45edc918060b1fe487af35b54837168b038c3a15

8 years agoAVRCP: rename constant AVRC_CTLR_INCLUDED
Marie Janssen [Fri, 17 Jun 2016 21:53:41 +0000 (21:53 +0000)]
AVRCP: rename constant AVRC_CTLR_INCLUDED
am: c6d93ada03

Change-Id: I11790e7488120b63a9c2080f5db358a099194ff9

8 years agoAVRCP: rename constant AVRC_CTLR_INCLUDED
Marie Janssen [Fri, 17 Jun 2016 20:13:21 +0000 (13:13 -0700)]
AVRCP: rename constant AVRC_CTLR_INCLUDED

Typo fixed to AVRC_CTRL_INCLUDED

Change-Id: Ib0ac11916bf6e856ae2d3cfb842bd0b8fef56008

8 years agoHOGP: Clear pending operations for a given device on connect am: 7c172b7df7
Jakub Pawlowski [Fri, 17 Jun 2016 19:30:27 +0000 (19:30 +0000)]
HOGP: Clear pending operations for a given device on connect am: 7c172b7df7
am: 5669f33732

Change-Id: I9c13ef059566a0ed0200059ceedb5c699173e5dd

8 years agoHOGP: Preffer write command over write requests am: 4f76028680
Jakub Pawlowski [Fri, 17 Jun 2016 19:30:27 +0000 (19:30 +0000)]
HOGP: Preffer write command over write requests am: 4f76028680
am: 0b116c357d

Change-Id: Ib561afa96ec1925a578c500b6046d3471c45f5c4

8 years agoHOGP: Clear pending operations for a given device on connect
Jakub Pawlowski [Fri, 17 Jun 2016 19:27:24 +0000 (19:27 +0000)]
HOGP: Clear pending operations for a given device on connect
am: 7c172b7df7

Change-Id: I53fc3a6b886fa522c7b2495fbf3b66e8f7f43751

8 years agoHOGP: Preffer write command over write requests
Jakub Pawlowski [Fri, 17 Jun 2016 19:27:24 +0000 (19:27 +0000)]
HOGP: Preffer write command over write requests
am: 4f76028680

Change-Id: Ia836d6252e7bfdbadcebcc46655eb50e68e4eb8d

8 years agoMerge \\"BTIF: remove unnecessary \\'extern \\"C\\"\\'\\" am: 7732b1b052
Jakub Pawlowski [Fri, 17 Jun 2016 19:25:17 +0000 (19:25 +0000)]
Merge \\"BTIF: remove unnecessary \\'extern \\"C\\"\\'\\" am: 7732b1b052
am: 93cafa4469

Change-Id: I18529dde68abc8aac21fcb7fa048af559351c3c9

8 years agoMerge \"BTIF: remove unnecessary \'extern \"C\"\'\"
Jakub Pawlowski [Fri, 17 Jun 2016 19:22:33 +0000 (19:22 +0000)]
Merge \"BTIF: remove unnecessary \'extern \"C\"\'\"
am: 7732b1b052

Change-Id: I934149b72980ceb2e024e77f02163fe977571a4e

8 years agoHOGP: Clear pending operations for a given device on connect
Jakub Pawlowski [Mon, 13 Jun 2016 17:30:17 +0000 (10:30 -0700)]
HOGP: Clear pending operations for a given device on connect

If there are any HID operations scheduled after disconnect, mark the
device as no longer executing after establishing connection. Otherwise
we'll be unable to send any HID commands to it.

Change-Id: Ie1bb622388a3bcb574dec3dde76ef4518ee1102f
(cherry picked from commit 4362b8c559575a83897a5af55202ce2c1d19925c)

8 years agoHOGP: Preffer write command over write requests
Jakub Pawlowski [Tue, 14 Jun 2016 21:40:51 +0000 (14:40 -0700)]
HOGP: Preffer write command over write requests

Some HID devices will accept both write request and write command.
Prefer write commands when possible.

This is due to bug in some hardware, that will not send write response
when too many commands are queued.

Bug: 29184976
Change-Id: I5bafc067f044a48f152c60b8e17722067bc1453e
(cherry picked from commit af77225c0d7bec06d2417b0305ebcbab04144caa)

8 years agoMerge "BTIF: remove unnecessary 'extern "C"'"
Jakub Pawlowski [Fri, 17 Jun 2016 19:12:36 +0000 (19:12 +0000)]
Merge "BTIF: remove unnecessary 'extern "C"'"

8 years agoMerge \\"test_vendor_lib: refactor packet constructors\\" am: 9e08f85c9b
Myles Watson [Fri, 17 Jun 2016 01:49:09 +0000 (01:49 +0000)]
Merge \\"test_vendor_lib: refactor packet constructors\\" am: 9e08f85c9b
am: c853d7a455

Change-Id: I47da0fd502f7774c4ab45d05986bc6c73e64757a

8 years agoAdd missing NULL pointers assignments am: 8cbc291080
Pavlin Radoslavov [Fri, 17 Jun 2016 01:49:09 +0000 (01:49 +0000)]
Add missing NULL pointers assignments am: 8cbc291080
am: deb7d2446c

Change-Id: Icae63f38c6196c52ca317634aba25b1aefe77456

8 years agoAdd missing NULL pointers assignments
Pavlin Radoslavov [Fri, 17 Jun 2016 01:48:40 +0000 (01:48 +0000)]
Add missing NULL pointers assignments
am: ba64c39c8c

Change-Id: I8657b04da33177dcb714eebc1a8ad17f9510113f

8 years agoMerge \"test_vendor_lib: refactor packet constructors\"
Myles Watson [Fri, 17 Jun 2016 01:46:22 +0000 (01:46 +0000)]
Merge \"test_vendor_lib: refactor packet constructors\"
am: 9e08f85c9b

Change-Id: I8b09b5ca2dd28d2b4ce1343b4cffefe9d5f943d9

8 years agoAdd missing NULL pointers assignments
Pavlin Radoslavov [Fri, 17 Jun 2016 01:46:22 +0000 (01:46 +0000)]
Add missing NULL pointers assignments
am: 8cbc291080

Change-Id: I0f0d5791508bfc635f8713f85ddfc71e282f606e

8 years agoMerge "test_vendor_lib: refactor packet constructors"
Treehugger Robot [Fri, 17 Jun 2016 01:13:14 +0000 (01:13 +0000)]
Merge "test_vendor_lib: refactor packet constructors"

8 years agoAdd missing NULL pointers assignments
Pavlin Radoslavov [Thu, 16 Jun 2016 23:37:57 +0000 (16:37 -0700)]
Add missing NULL pointers assignments

Each pointer that was freed by one of the following functions should
be reset to NULL:
 - config_free()
 - data_dispatcher_free()
 - fixed_queue_free()
 - list_free()

Bug: 29421693
Change-Id: Ie55a04ed986393994564edcf872d7413b0767a85
(cherry picked from commit 8cbc291080730cd7d04990a8fc0e11249b06aa08)

8 years agoAdd missing NULL pointers assignments
Pavlin Radoslavov [Thu, 16 Jun 2016 23:37:57 +0000 (16:37 -0700)]
Add missing NULL pointers assignments

Each pointer that was freed by one of the following functions should
be reset to NULL:
 - config_free()
 - data_dispatcher_free()
 - fixed_queue_free()
 - list_free()

Bug: 29421693
Change-Id: Ie55a04ed986393994564edcf872d7413b0767a85

8 years agoBTIF: remove unnecessary 'extern "C"'
Jakub Pawlowski [Thu, 16 Jun 2016 00:15:42 +0000 (17:15 -0700)]
BTIF: remove unnecessary 'extern "C"'

btif is all cpp now, with execption to uuid_to_string_legacy
and few methods imported/exported for main module.
There is no need to have c linkage for the rest of it.

Change-Id: I5e7079e1269dc6461b14b665587592270cdf3140

8 years agotest_vendor_lib: refactor packet constructors
Myles Watson [Thu, 26 May 2016 21:13:42 +0000 (14:13 -0700)]
test_vendor_lib: refactor packet constructors

Make it simpler to append bytes to payloads, since that's a common
operation.

Change-Id: I7fc975fb999add8e1a360b91bdae869d6d7d2029
Signed-off-by: Myles Watson <mylesgw@google.com>
8 years agoGATT: don\\'t update link status for apps that were never connected am: a62adcab30
Jakub Pawlowski [Thu, 16 Jun 2016 19:15:00 +0000 (19:15 +0000)]
GATT: don\\'t update link status for apps that were never connected am: a62adcab30
am: a26d811fd9

Change-Id: I7c6fd1d6b1b23a7c3f7153f5e52b93efb5dda959

8 years agoGATT: don\'t update link status for apps that were never connected
Jakub Pawlowski [Thu, 16 Jun 2016 19:12:20 +0000 (19:12 +0000)]
GATT: don\'t update link status for apps that were never connected
am: a62adcab30

Change-Id: I084130c52f82ca960badeea1da6573e929cb85ff

8 years agoGATT: don't update link status for apps that were never connected
Jakub Pawlowski [Thu, 16 Jun 2016 15:16:48 +0000 (08:16 -0700)]
GATT: don't update link status for apps that were never connected

Right now, in GATT_Deregister we make a call to
gatt_update_app_use_link_flag, which might result in a call to
GATT_SetIddleTimeout on links that this client was never connected to.

In order to fix that, we must check if gatt_update_app_hold_link_status
made any changes to p_tcb->app_hold_link. If not, then skip updating
the timer.

Change-Id: I6f18ec7fe4e80e048adc9e360cae703b7d64d62a

8 years agoConvert HID and Device Manager BTA code to C++ am: b7938c1866
Jakub Pawlowski [Thu, 16 Jun 2016 17:37:43 +0000 (17:37 +0000)]
Convert HID and Device Manager BTA code to C++ am: b7938c1866
am: e61ca65604

Change-Id: I989305f991be9497f8b8ca0ea47ed1f1d9ec1a79

8 years agoConvert HID and Device Manager BTA code to C++
Jakub Pawlowski [Thu, 16 Jun 2016 17:35:26 +0000 (17:35 +0000)]
Convert HID and Device Manager BTA code to C++
am: b7938c1866

Change-Id: I9ddcdc2683d63ba84cd5f8e9de044dc78b0d6521

8 years agoConvert HID and Device Manager BTA code to C++
Jakub Pawlowski [Fri, 27 May 2016 00:57:22 +0000 (17:57 -0700)]
Convert HID and Device Manager BTA code to C++

These are the only places that use BTA GATTC API. After this change it's
possible to change GATT API to use C++ types as arguments.

Bug: 28485365
Change-Id: Idf83396f4bc3a2cc8a9b41f69da5d033af1be678

8 years agoFix unused source warning am: b172552537
Dan Willemsen [Thu, 16 Jun 2016 00:10:10 +0000 (00:10 +0000)]
Fix unused source warning am: b172552537
am: 407b1ca7c9

Change-Id: Ia10d88250882be35325ce989234f1bce92593166

8 years agoFix unused source warning
Dan Willemsen [Thu, 16 Jun 2016 00:03:00 +0000 (00:03 +0000)]
Fix unused source warning
am: b172552537

Change-Id: I2c2191358dd60a087cb1d39fa22dd65ab2eb7371

8 years agoFix unused source warning
Dan Willemsen [Wed, 15 Jun 2016 22:46:15 +0000 (15:46 -0700)]
Fix unused source warning

These were using the wrong c++ extension, so the build system was not
picking them up.

Change-Id: I3a767a236bca05f04dd069bb1f40796f41cb8b60

8 years agoImprove BT HAL write response to BT server reads
Andy Hung [Wed, 15 Jun 2016 21:03:06 +0000 (21:03 +0000)]
Improve BT HAL write response to BT server reads
am: 5952e40bef

Change-Id: I135acb67ba2228cdfc002fa79fd615f1c20d817d

8 years agoImprove BT HAL write response to BT server reads
Andy Hung [Wed, 15 Jun 2016 02:58:58 +0000 (19:58 -0700)]
Improve BT HAL write response to BT server reads

By polling, we ensure the socket buffer is nearly always full,
as blocking socket writes may not wake in time to avoid underflow.

Bug: 28286313
Change-Id: I056768dbd860993c41d44c33a4846d62c50db933

8 years agoFix missing GATT Characteristic from last service am: 6c81482c2d
Jakub Pawlowski [Wed, 15 Jun 2016 00:33:18 +0000 (00:33 +0000)]
Fix missing GATT Characteristic from last service am: 6c81482c2d
am: 13e3c509be

Change-Id: I51b9ab591f6ff57bb7025f1f92457c33e2f0f9b2

8 years agoMerge "Use UINT16 for GATT attribute id field am: d407e1afca am: 889db4490c" into...
Android Build Merger (Role) [Wed, 15 Jun 2016 00:33:09 +0000 (00:33 +0000)]
Merge "Use UINT16 for GATT attribute id field am: d407e1afca am: 889db4490c" into nyc-dev-plus-aosp

8 years agoUse UINT16 for GATT attribute id field am: d407e1afca
Jakub Pawlowski [Wed, 15 Jun 2016 00:32:47 +0000 (00:32 +0000)]
Use UINT16 for GATT attribute id field am: d407e1afca
am: 889db4490c

Change-Id: Idf4905c3aebb7cca12c6c6c8bdfc63a456ae3b68

8 years agoMerge \"HOGP: Clear pending operations for a given device on connect\" into nyc-dev
Jakub Pawlowski [Wed, 15 Jun 2016 00:32:44 +0000 (00:32 +0000)]
Merge \"HOGP: Clear pending operations for a given device on connect\" into nyc-dev
am: bfbda174b5

Change-Id: Ia026605f6083ad56f0974e092014bbe95a182d7d

8 years agoFix missing GATT Characteristic from last service
Jakub Pawlowski [Wed, 15 Jun 2016 00:30:02 +0000 (00:30 +0000)]
Fix missing GATT Characteristic from last service
am: 6c81482c2d

Change-Id: I1f103942867c539eb97ce4768812558cf3bf9844

8 years agoMerge "HOGP: Clear pending operations for a given device on connect" into nyc-dev
TreeHugger Robot [Wed, 15 Jun 2016 00:28:58 +0000 (00:28 +0000)]
Merge "HOGP: Clear pending operations for a given device on connect" into nyc-dev

8 years agoUse UINT16 for GATT attribute id field
Jakub Pawlowski [Wed, 15 Jun 2016 00:26:43 +0000 (00:26 +0000)]
Use UINT16 for GATT attribute id field
am: d407e1afca

Change-Id: I890bc4f7bde854578c837dcc3fb0eaace92e411c

8 years agoMerge \"HOGP: Preffer write command over write requests\" into nyc-dev
Jakub Pawlowski [Tue, 14 Jun 2016 23:32:10 +0000 (23:32 +0000)]
Merge \"HOGP: Preffer write command over write requests\" into nyc-dev
am: 8577ffca06

Change-Id: I226da0773982a88f030ce29ede2545bab2687ce3

8 years agoMerge "HOGP: Preffer write command over write requests" into nyc-dev
TreeHugger Robot [Tue, 14 Jun 2016 23:28:20 +0000 (23:28 +0000)]
Merge "HOGP: Preffer write command over write requests" into nyc-dev

8 years agoMerge \"Use UINT16 for GATT attribute id field\" into nyc-dev
Jakub Pawlowski [Tue, 14 Jun 2016 23:14:15 +0000 (23:14 +0000)]
Merge \"Use UINT16 for GATT attribute id field\" into nyc-dev
am: a1d6772787

Change-Id: I1e55b63eb9203b5560fc049f97d6c5f2f2e2d250

8 years agoFix missing GATT Characteristic from last service
Jakub Pawlowski [Tue, 14 Jun 2016 23:12:49 +0000 (23:12 +0000)]
Fix missing GATT Characteristic from last service
am: 552e630435  -s ours

Change-Id: Iae9ab73966cd2f1965343f44ae4d2409161f71a0

8 years agoFix missing GATT Characteristic from last service
Jakub Pawlowski [Tue, 14 Jun 2016 19:23:44 +0000 (12:23 -0700)]
Fix missing GATT Characteristic from last service

GATT Service is contained between start and end handle. If
characteristic definition is at end handle, and it's value definition is
after end handle, it will not be properly discovered. That's because we
use value_handle instead of attribute_handle to identify
characteristics.

As a workaround, increase service boundary if value is defined after
it's definition.

Bug: 29253825
Change-Id: Ib145aea4f5cf38a1fbb977c301136e16f8f900f7
(chery picked from commit 552e630435a68d8f51d458dccf8697c625cf1510)

8 years agoAdd missing curly braces in clear notification am: 82e2fa17b4
Jakub Pawlowski [Tue, 14 Jun 2016 22:33:55 +0000 (22:33 +0000)]
Add missing curly braces in clear notification am: 82e2fa17b4
am: c0ee74dc9a

Change-Id: Ic413e57a60173ca1cb8d9e3390f3b22d4d45e08f

8 years agoAdd missing curly braces in clear notification
Jakub Pawlowski [Tue, 14 Jun 2016 22:31:06 +0000 (22:31 +0000)]
Add missing curly braces in clear notification
am: 82e2fa17b4

Change-Id: I4185c983b253dcd06dade4e762b304e2594984f0

8 years agoUse UINT16 for GATT attribute id field
Jakub Pawlowski [Tue, 14 Jun 2016 19:47:52 +0000 (12:47 -0700)]
Use UINT16 for GATT attribute id field

Id field is equal to attribute handle, so it must be 16bits.
Otherwise only piece of GATT database can be used.

Bug: 29253825
Change-Id: Ia88e3ad3eb96ca8e97349aa5e852e66c57072b49
(cherry picked from commit e6b1cb43525e27f95de85dc43150d7368b9d4c35)