OSDN Git Service

android-x86/system-bt.git
5 years agoMerge "Add DataElementReader for SDP" am: 424e80f892 am: 0de376458f
Ajay Panicker [Tue, 9 Oct 2018 19:40:59 +0000 (12:40 -0700)]
Merge "Add DataElementReader for SDP" am: 424e80f892 am: 0de376458f
am: b6fa541dcd

Change-Id: Ib61600480e5d9c4eedf1d7633dce42652f81b7ab

5 years agoMerge "Add DataElementReader for SDP" am: 424e80f892
Ajay Panicker [Tue, 9 Oct 2018 19:24:32 +0000 (12:24 -0700)]
Merge "Add DataElementReader for SDP" am: 424e80f892
am: 0de376458f

Change-Id: Icaf2dadd9abb8e93bf704fd4abc383a1d96b3b72

5 years agoMerge "Add DataElementReader for SDP"
Ajay Panicker [Tue, 9 Oct 2018 19:12:14 +0000 (12:12 -0700)]
Merge "Add DataElementReader for SDP"
am: 424e80f892

Change-Id: I625dabfb5d1c0cf18a58550b6ea35b902cf716e0

5 years agoMerge "Add DataElementReader for SDP"
Ajay Panicker [Tue, 9 Oct 2018 18:53:02 +0000 (18:53 +0000)]
Merge "Add DataElementReader for SDP"

5 years agoFix Timer unittest am: 4d0a9b422d am: 652e4d91a0
Hansong Zhang [Tue, 9 Oct 2018 02:55:18 +0000 (19:55 -0700)]
Fix Timer unittest am: 4d0a9b422d am: 652e4d91a0
am: c01f2a4313

Change-Id: Ic969ccc31d6111d11e79ebf4cc38e3bb977a7735

5 years agoFix Timer unittest am: 4d0a9b422d
Hansong Zhang [Tue, 9 Oct 2018 02:51:07 +0000 (19:51 -0700)]
Fix Timer unittest am: 4d0a9b422d
am: 652e4d91a0

Change-Id: I00c5e2617f83eacf97e8c488914c758bd250f760

5 years agoFix Timer unittest
Hansong Zhang [Tue, 9 Oct 2018 02:47:01 +0000 (19:47 -0700)]
Fix Timer unittest
am: 4d0a9b422d

Change-Id: I6a96c10e941e9cb8c055f6256bdd06da423176e7

5 years agoFix Timer unittest
Hansong Zhang [Sun, 7 Oct 2018 20:31:01 +0000 (13:31 -0700)]
Fix Timer unittest

* Never set promise more than once
* To verify running task cannot be cancelled, make sure Cancel() is
  called after callback starts
* Remove a stress test case. Sometimes there is unexpected event causing
  deviation.

Test: run Timer test for 5000 times
Bug: 116081383
Change-Id: If99e4958289e9b6aaabc51b15ce4ac035a3ff1e9

5 years agoMerge "Replace A2DP source osi/alarm with common/Timer" am: 82c49d533a am: dba0ca5648
Hansong Zhang [Tue, 9 Oct 2018 00:09:45 +0000 (17:09 -0700)]
Merge "Replace A2DP source osi/alarm with common/Timer" am: 82c49d533a am: dba0ca5648
am: cf6a69715a

Change-Id: I490d43a41eb76ce2ca2fc776e797d09d36821a67

5 years agoMerge "Move btif_state_machine to common/StateMachine" am: 062b311bc3 am: 60594a984d
Hansong Zhang [Tue, 9 Oct 2018 00:07:24 +0000 (17:07 -0700)]
Merge "Move btif_state_machine to common/StateMachine" am: 062b311bc3 am: 60594a984d
am: 15c1a0b0bc

Change-Id: I08202ae48b6ee16405968c2822e08410dac7cc79

5 years agoMerge "Replace A2DP source osi/alarm with common/Timer" am: 82c49d533a
Hansong Zhang [Mon, 8 Oct 2018 23:57:38 +0000 (16:57 -0700)]
Merge "Replace A2DP source osi/alarm with common/Timer" am: 82c49d533a
am: dba0ca5648

Change-Id: I78109393be0978b047559c75240a14b9902ed646

5 years agoMerge "Replace A2DP source osi/alarm with common/Timer"
Hansong Zhang [Mon, 8 Oct 2018 23:53:36 +0000 (16:53 -0700)]
Merge "Replace A2DP source osi/alarm with common/Timer"
am: 82c49d533a

Change-Id: I914cc4e97ba1978dfeb0af0e1e9327eb8e44bbd1

5 years agoMerge "Replace A2DP source osi/alarm with common/Timer"
Treehugger Robot [Mon, 8 Oct 2018 23:38:02 +0000 (23:38 +0000)]
Merge "Replace A2DP source osi/alarm with common/Timer"

5 years agoMerge "Move btif_state_machine to common/StateMachine" am: 062b311bc3
Hansong Zhang [Mon, 8 Oct 2018 23:33:26 +0000 (16:33 -0700)]
Merge "Move btif_state_machine to common/StateMachine" am: 062b311bc3
am: 60594a984d

Change-Id: I29998335ab874c2fa6be0018db7b14c57f6edb46

5 years agoMerge "Fix race condition around Le Start Encryption handling." am: f67a4f54b3 am...
Jakub Pawlowski [Mon, 8 Oct 2018 23:26:29 +0000 (16:26 -0700)]
Merge "Fix race condition around Le Start Encryption handling." am: f67a4f54b3 am: c6c8c6e561
am: 1c4420b71b

Change-Id: I97e8708505996758096a3385baa56bc00031b98d

5 years agoMerge "Fix race condition around Le Start Encryption handling." am: f67a4f54b3
Jakub Pawlowski [Mon, 8 Oct 2018 23:18:11 +0000 (16:18 -0700)]
Merge "Fix race condition around Le Start Encryption handling." am: f67a4f54b3
am: c6c8c6e561

Change-Id: Ic4be975e54ff87651b37b1ba4147bc1299f9e532

5 years agoMerge "Move btif_state_machine to common/StateMachine"
Hansong Zhang [Mon, 8 Oct 2018 23:10:21 +0000 (16:10 -0700)]
Merge "Move btif_state_machine to common/StateMachine"
am: 062b311bc3

Change-Id: I2fd18ccf848c6c04af0520e1e57b023eec84b297

5 years agoMerge "Fix race condition around Le Start Encryption handling."
Jakub Pawlowski [Mon, 8 Oct 2018 23:09:40 +0000 (16:09 -0700)]
Merge "Fix race condition around Le Start Encryption handling."
am: f67a4f54b3

Change-Id: Ic343e34c18dd0ce8ef0fdbf8a23037e3bcb24878

5 years agoMerge "Move btif_state_machine to common/StateMachine"
Treehugger Robot [Mon, 8 Oct 2018 22:34:10 +0000 (22:34 +0000)]
Merge "Move btif_state_machine to common/StateMachine"

5 years agoMerge "Fix race condition around Le Start Encryption handling."
Treehugger Robot [Mon, 8 Oct 2018 22:17:28 +0000 (22:17 +0000)]
Merge "Fix race condition around Le Start Encryption handling."

5 years agoReplace A2DP source osi/alarm with common/Timer
Hansong Zhang [Thu, 23 Aug 2018 22:17:10 +0000 (15:17 -0700)]
Replace A2DP source osi/alarm with common/Timer

Test: A2DP stream music
Change-Id: I4f7325b3eb3be07eca6c599c7f6f5e037b8e7a64

5 years agoFix race condition around Le Start Encryption handling.
Jakub Pawlowski [Mon, 1 Oct 2018 11:25:11 +0000 (13:25 +0200)]
Fix race condition around Le Start Encryption handling.

When sending Le Start Encryption, it's possible that at the same exact
moment the connection was disconnected, and there is an incoming
"Disconnection Complete Event". The controller would send error 0x02
"unknown connection identifier" in such case. This can happen
sporadically when reconnecting device multiple times.

Currently, we don't handle this error code. This lead to the timeout
when waiting for "Encryption Complete", and unbonding of the device.

From now on, if 0x02 error code is returned, we'll cancel current SMP
operation, which is the "LE Start Encryption". This will stop the SMP
timer, and make sure the bond to remote device is not lost.

Test: Manual test reconnecting with HID device multiple time in a row,
causing the link drop right after connection, by removing battery, or
closing the shield box.
Bug: 113652889
Change-Id: I2ff9c13dbc8e7b71505908996e26b89fa1ea6a42

5 years agoAdd DataElementReader for SDP
Ajay Panicker [Fri, 14 Sep 2018 22:10:13 +0000 (15:10 -0700)]
Add DataElementReader for SDP

DataElementReader extracts DataElement's from packets which are the
basic container for all data in the SDP protocol.

Bug: 114751344
Test: run host test bluetooth_test_sdp
Change-Id: If01f22d81af1b80e7c9ac8993ee161eba779bfa3

5 years agoMerge "Stop A2DP stream when shutting down A2DP source." am: 90942c06f2 am: 30eed705e5
weichinweng [Mon, 8 Oct 2018 11:34:50 +0000 (04:34 -0700)]
Merge "Stop A2DP stream when shutting down A2DP source." am: 90942c06f2 am: 30eed705e5
am: 6afb46e11f

Change-Id: I511faca95b09110c76b7b2003b09458c39698ce1

5 years agoMerge "Stop A2DP stream when shutting down A2DP source." am: 90942c06f2
weichinweng [Mon, 8 Oct 2018 11:26:43 +0000 (04:26 -0700)]
Merge "Stop A2DP stream when shutting down A2DP source." am: 90942c06f2
am: 30eed705e5

Change-Id: Ia92bd09915113b91fdb91b967b86b82ad80e29cd

5 years agoMerge "Stop A2DP stream when shutting down A2DP source."
weichinweng [Mon, 8 Oct 2018 11:18:40 +0000 (04:18 -0700)]
Merge "Stop A2DP stream when shutting down A2DP source."
am: 90942c06f2

Change-Id: If18e665cdda1e69aca48cd31bc1a44d5c4d3a237

5 years agoMerge "Stop A2DP stream when shutting down A2DP source."
Treehugger Robot [Mon, 8 Oct 2018 11:06:32 +0000 (11:06 +0000)]
Merge "Stop A2DP stream when shutting down A2DP source."

5 years ago[automerger skipped] Merge "HIDD: Check descriptor length and increase buffer" into...
Hansong Zhang [Fri, 5 Oct 2018 18:49:55 +0000 (11:49 -0700)]
[automerger skipped] Merge "HIDD: Check descriptor length and increase buffer" into pi-dev am: 9499309599
am: 0fe2038f08  -s ours

Change-Id: I3a489c705c64e333add1bb83953edc702e791907

5 years agoMerge "HIDD: Check descriptor length and increase buffer" into pi-dev
Hansong Zhang [Fri, 5 Oct 2018 18:42:06 +0000 (11:42 -0700)]
Merge "HIDD: Check descriptor length and increase buffer" into pi-dev
am: 9499309599

Change-Id: Idbf1f9a6064b68a0579f985aecb08a5945b9086b

5 years agoMerge "HIDD: Check descriptor length and increase buffer" into pi-dev
TreeHugger Robot [Fri, 5 Oct 2018 18:02:40 +0000 (18:02 +0000)]
Merge "HIDD: Check descriptor length and increase buffer" into pi-dev

5 years agoMove btif_state_machine to common/StateMachine
Hansong Zhang [Thu, 4 Oct 2018 22:04:18 +0000 (15:04 -0700)]
Move btif_state_machine to common/StateMachine

In Bluetooth native infrastructure refactor plan, we need a state
machine class for entire stack

Test: manual
Change-Id: I0e6671e42570482d9a9466b117054b3aadb3e9cc

5 years agoStop A2DP stream when shutting down A2DP source.
weichinweng [Wed, 3 Oct 2018 07:08:54 +0000 (15:08 +0800)]
Stop A2DP stream when shutting down A2DP source.

When shutting down a2dp source,
A2DP source set StateShuttingDown state too fast cause the A2DP doesn’t stop stream.
Will try to stop A2DP when doing A2DP source end session.

Bug: 112279820
Test: Build Pass, BT off/on when play A2DP
Change-Id: I6bfb5c235da1ff4a7e6814bae3a98ae7dd1788aa

5 years agoMerge "MessageLoopThread: Release lock during blocked StartUp/ShutDown" am: 9a6d43062...
Hansong Zhang [Thu, 4 Oct 2018 06:35:31 +0000 (23:35 -0700)]
Merge "MessageLoopThread: Release lock during blocked StartUp/ShutDown" am: 9a6d430622 am: a9ddafe66f
am: 2483b4879d

Change-Id: I0410017456eea900c0b74d3f1a07f61c742bc13e

5 years agoMerge "MessageLoopThread: Release lock during blocked StartUp/ShutDown" am: 9a6d430622
Hansong Zhang [Thu, 4 Oct 2018 06:30:33 +0000 (23:30 -0700)]
Merge "MessageLoopThread: Release lock during blocked StartUp/ShutDown" am: 9a6d430622
am: a9ddafe66f

Change-Id: If8d3cc3a0445176fba6e1cd0d99d491ea9889726

5 years agoMerge "MessageLoopThread: Release lock during blocked StartUp/ShutDown"
Hansong Zhang [Thu, 4 Oct 2018 06:23:11 +0000 (23:23 -0700)]
Merge "MessageLoopThread: Release lock during blocked StartUp/ShutDown"
am: 9a6d430622

Change-Id: I8edb2ee00ed78e5f27d91dc23e4cd6a8563c6bc8

5 years agoMerge "MessageLoopThread: Release lock during blocked StartUp/ShutDown"
Treehugger Robot [Thu, 4 Oct 2018 06:10:47 +0000 (06:10 +0000)]
Merge "MessageLoopThread: Release lock during blocked StartUp/ShutDown"

5 years agoHIDD: Check descriptor length and increase buffer
Hansong Zhang [Tue, 2 Oct 2018 23:26:38 +0000 (16:26 -0700)]
HIDD: Check descriptor length and increase buffer

Since maximum descriptor length is 2048, we need to assign 2054 bytes of
buffer for another 6 bytes of data. Also added a const for maximum
descriptor length.

Bug: 113572366
Test: manual
Change-Id: Ie2b25c9e1a9f2019cbc7e6fbecbb08b643c87946
Merged-In: Ie2b25c9e1a9f2019cbc7e6fbecbb08b643c87946

5 years agoMerge "HIDD: Check descriptor length and increase buffer"
TreeHugger Robot [Thu, 4 Oct 2018 00:17:41 +0000 (00:17 +0000)]
Merge "HIDD: Check descriptor length and increase buffer"

5 years agoTimer: Set data member before scheduling task am: 1773dd8d82 am: 04d345f0a5
Hansong Zhang [Wed, 3 Oct 2018 23:15:49 +0000 (16:15 -0700)]
Timer: Set data member before scheduling task am: 1773dd8d82 am: 04d345f0a5
am: 3a0e088e7d

Change-Id: Idb6fed0dd23945ed45b4c91d59c7c31038bddde2

5 years agoTimer: Set data member before scheduling task am: 1773dd8d82
Hansong Zhang [Wed, 3 Oct 2018 23:08:39 +0000 (16:08 -0700)]
Timer: Set data member before scheduling task am: 1773dd8d82
am: 04d345f0a5

Change-Id: Idc1c6806f74ddf5412c278707404b643f07a7f01

5 years agoMessageLoopThread: Release lock during blocked StartUp/ShutDown
Hansong Zhang [Sat, 29 Sep 2018 21:23:31 +0000 (14:23 -0700)]
MessageLoopThread: Release lock during blocked StartUp/ShutDown

During StartUp/ShutDown(), if another running task in message loop needs
api_lock, then it will deadlock. Release api_lock in StartUp and
ShutDown when current thread is blocked by another task

Bug: 116081383
Test: run unit test
Change-Id: Ic34406d0cfc6364ac965c4f1aa917a5ccaf6b373

5 years agoTimer: Set data member before scheduling task
Hansong Zhang [Wed, 3 Oct 2018 23:01:34 +0000 (16:01 -0700)]
Timer: Set data member before scheduling task
am: 1773dd8d82

Change-Id: I6c6c82ec7a58e429778116d064cc1ac4d825fd6b

5 years agoRun the wakelock JNI callbacks on the JNI thread am: f918ab9ff8
Pavlin Radoslavov [Wed, 3 Oct 2018 22:07:06 +0000 (15:07 -0700)]
Run the wakelock JNI callbacks on the JNI thread am: f918ab9ff8
am: 33588933db

Change-Id: Iae8269c230c8d56affca63bb914986e6f8ec215b

5 years agoRun the wakelock JNI callbacks on the JNI thread
Pavlin Radoslavov [Wed, 3 Oct 2018 21:59:21 +0000 (14:59 -0700)]
Run the wakelock JNI callbacks on the JNI thread
am: f918ab9ff8

Change-Id: I995d08242e3899e8ae42a4f0a9fe68f84ffda610

5 years agoHIDD: Check descriptor length and increase buffer
Hansong Zhang [Tue, 2 Oct 2018 23:26:38 +0000 (16:26 -0700)]
HIDD: Check descriptor length and increase buffer

Since maximum descriptor length is 2048, we need to assign 2054 bytes of
buffer for another 6 bytes of data. Also added a const for maximum
descriptor length.

Bug: 113572366
Test: manual
Change-Id: Ie2b25c9e1a9f2019cbc7e6fbecbb08b643c87946

5 years agoTimer: Set data member before scheduling task
Hansong Zhang [Fri, 28 Sep 2018 19:10:15 +0000 (12:10 -0700)]
Timer: Set data member before scheduling task

Also increase tolerance for unit tests

Bug: 116081383
Test: Run unit test
Change-Id: I5531c2259cbbc58b6ee7527813e8d5c4164e94c5

5 years agoRun the wakelock JNI callbacks on the JNI thread
Pavlin Radoslavov [Sat, 25 Aug 2018 01:45:16 +0000 (18:45 -0700)]
Run the wakelock JNI callbacks on the JNI thread

All JNI callbacks must be on the JNI thread, otherwise this could
impact the threads' operation.

Bug: 111277984
Test: A2DP streaming
Change-Id: I94fa4500aea62a574c80749e904434e46eb4e942
(cherry picked from commit c788ad703836f6ac0f63e47b20f27b41dcce9353)

5 years agoHearing Aid: use correct Data Length and MediaType am: 51a9bba709 am: 530a90b15d
Stanley Tng [Tue, 2 Oct 2018 20:28:41 +0000 (13:28 -0700)]
Hearing Aid: use correct Data Length and MediaType am: 51a9bba709 am: 530a90b15d
am: 67869dea57

Change-Id: I634d7c4a09007007969d25f233fba862949f22be

5 years agoHearing Aid: use correct Data Length and MediaType am: 51a9bba709
Stanley Tng [Tue, 2 Oct 2018 20:09:10 +0000 (13:09 -0700)]
Hearing Aid: use correct Data Length and MediaType am: 51a9bba709
am: 530a90b15d

Change-Id: I37e35cf75577a7e07ce9745bea237095a62da304

5 years agoHearing Aid: use correct Data Length and MediaType
Stanley Tng [Tue, 2 Oct 2018 19:45:20 +0000 (12:45 -0700)]
Hearing Aid: use correct Data Length and MediaType
am: 51a9bba709

Change-Id: I1be9f73bec94680634e7022ca023a5b9f9219a87

5 years ago[automerger skipped] Revert "DO NOT MERGE Hearing Aid: Add JNI API for add/remove...
Andrew Lewis [Tue, 2 Oct 2018 12:23:21 +0000 (05:23 -0700)]
[automerger skipped] Revert "DO NOT MERGE Hearing Aid: Add JNI API for add/remove whitelist"
am: 3959ce85d7  -s ours

Change-Id: I0d79117d483ad2cf7601bcf4e614ebd690eaff12

5 years agoRevert "DO NOT MERGE Hearing Aid: Add JNI API for add/remove whitelist"
Andrew Lewis [Tue, 2 Oct 2018 12:01:24 +0000 (12:01 +0000)]
Revert "DO NOT MERGE Hearing Aid: Add JNI API for add/remove whitelist"

This reverts commit d65f697c011cc6e5eaad767de3ec726cfd25b27f.

Reason for revert: broken pi-dev-plus-aosp

Change-Id: Iab11567fa326b6837a621c1edc93e0eceb04ec43

5 years ago[automerger skipped] DO NOT MERGE Hearing Aid: Add JNI API for add/remove whitelist...
Hansong Zhang [Tue, 2 Oct 2018 11:24:18 +0000 (04:24 -0700)]
[automerger skipped] DO NOT MERGE Hearing Aid: Add JNI API for add/remove whitelist am: d65f697c01
am: c4776fee1d  -s ours

Change-Id: I99d0e526992bafdd37a2c4313f2ae8b3ac535614

5 years agoHearing Aid: Clean up GATT on disconnect am: 1746ffd2e0
Hansong Zhang [Tue, 2 Oct 2018 11:24:08 +0000 (04:24 -0700)]
Hearing Aid: Clean up GATT on disconnect am: 1746ffd2e0
am: 1b93f6442e

Change-Id: Ia5e5f55bbb41dd340b0f2e093d17dcb468de4be7

5 years ago[automerger skipped] Send volume just once when starting the stream. am: 53fdcf8645
Jakub Pawlowski [Tue, 2 Oct 2018 11:23:49 +0000 (04:23 -0700)]
[automerger skipped] Send volume just once when starting the stream. am: 53fdcf8645
am: 53f1461c7d  -s ours

Change-Id: Ia24f220f06f6dc5c6fe84e77fc1fe8d121bd29e8

5 years ago[automerger skipped] Clear connection update pending flag when disconnected am: 5b114...
Stanley Tng [Tue, 2 Oct 2018 11:23:27 +0000 (04:23 -0700)]
[automerger skipped] Clear connection update pending flag when disconnected am: 5b114433af  -s ours
am: 5318f4a009  -s ours

Change-Id: Ie9e4173a0c94eb4a6546830d789058cabf444ef7

5 years ago[automerger skipped] Hearing Aid: codec and connection interval switching am: bd592d5...
Stanley Tng [Tue, 2 Oct 2018 11:23:05 +0000 (04:23 -0700)]
[automerger skipped] Hearing Aid: codec and connection interval switching am: bd592d5c16  -s ours
am: 7bd444b8b0  -s ours

Change-Id: I453297f16ee9454b3b3251dec520164de5edc2be

5 years ago[automerger skipped] Hearing Aid - codec switching am: 1934566cba -s ours
Jakub Pawlowski [Tue, 2 Oct 2018 11:22:43 +0000 (04:22 -0700)]
[automerger skipped] Hearing Aid - codec switching am: 1934566cba  -s ours
am: d2c619c37d  -s ours

Change-Id: If01c338553d98c2d50f748d3c83febb6b29da535

5 years agoDO NOT MERGE Hearing Aid: Add JNI API for add/remove whitelist
Hansong Zhang [Tue, 2 Oct 2018 10:55:56 +0000 (03:55 -0700)]
DO NOT MERGE Hearing Aid: Add JNI API for add/remove whitelist
am: d65f697c01

Change-Id: I02aca3c8b20df345b01e1e35bb690803c3c56554

5 years agoHearing Aid: Clean up GATT on disconnect
Hansong Zhang [Tue, 2 Oct 2018 10:55:44 +0000 (03:55 -0700)]
Hearing Aid: Clean up GATT on disconnect
am: 1746ffd2e0

Change-Id: Ide9eff1e203c4a21aaca375edc71d1de51eb98b6

5 years agoSend volume just once when starting the stream.
Jakub Pawlowski [Tue, 2 Oct 2018 10:55:32 +0000 (03:55 -0700)]
Send volume just once when starting the stream.
am: 53fdcf8645

Change-Id: I1e6523b50fa8c98355e948bf1be1f8080ec7745d

5 years ago[automerger skipped] Clear connection update pending flag when disconnected
Stanley Tng [Tue, 2 Oct 2018 10:55:18 +0000 (03:55 -0700)]
[automerger skipped] Clear connection update pending flag when disconnected
am: 5b114433af  -s ours

Change-Id: I8929d1e4f3b61e75590ccd7944a3332771d92e7c

5 years ago[automerger skipped] Hearing Aid: codec and connection interval switching
Stanley Tng [Tue, 2 Oct 2018 10:55:04 +0000 (03:55 -0700)]
[automerger skipped] Hearing Aid: codec and connection interval switching
am: bd592d5c16  -s ours

Change-Id: I0554002f4166303db4ef7f0074ab5406b30bbbef

5 years ago[automerger skipped] Hearing Aid - codec switching
Jakub Pawlowski [Tue, 2 Oct 2018 10:54:50 +0000 (03:54 -0700)]
[automerger skipped] Hearing Aid - codec switching
am: 1934566cba  -s ours

Change-Id: I0fc8abbd0af75ab8980c479d82971dda73ed5130

5 years agoHearing Aid: use correct Data Length and MediaType
Stanley Tng [Tue, 25 Sep 2018 18:15:24 +0000 (11:15 -0700)]
Hearing Aid: use correct Data Length and MediaType

Adjusted the requested data length to the BT Controller from 168 to 167.
Also, change the default media type during playback to unknown.

Test: Manual testing with Hearing Aids and verifying with OTA logs
Change-Id: Ic4e934729a98bef5c10ebca64093d8a192e79a01

5 years agoDO NOT MERGE Hearing Aid: Add JNI API for add/remove whitelist
Hansong Zhang [Mon, 24 Sep 2018 22:03:09 +0000 (15:03 -0700)]
DO NOT MERGE Hearing Aid: Add JNI API for add/remove whitelist

Allow Java layer to add a hearing aid device to white list or remove
from white list

Bug: 116317072
Bug: 115365334
Test: connect to a pair with one device off
Change-Id: Iac5df8f371fb39fade4493d2da8226f026545fb3

5 years agoMerge "Hearing Aid: Clean up GATT on disconnect" am: 36f0889fc6 am: 3174bf630d
Hansong Zhang [Fri, 28 Sep 2018 20:13:16 +0000 (13:13 -0700)]
Merge "Hearing Aid: Clean up GATT on disconnect" am: 36f0889fc6 am: 3174bf630d
am: 315194340f

Change-Id: Iaf271c78cadf7325ef43cc32026bb220b0d35f40

5 years agoMerge "Hearing Aid: Clean up GATT on disconnect" am: 36f0889fc6
Hansong Zhang [Fri, 28 Sep 2018 19:48:43 +0000 (12:48 -0700)]
Merge "Hearing Aid: Clean up GATT on disconnect" am: 36f0889fc6
am: 3174bf630d

Change-Id: I3809c6886d18a4c6024ed83255c466c6d9f028d9

5 years agoMerge "Hearing Aid: Clean up GATT on disconnect"
Hansong Zhang [Fri, 28 Sep 2018 19:35:53 +0000 (12:35 -0700)]
Merge "Hearing Aid: Clean up GATT on disconnect"
am: 36f0889fc6

Change-Id: I6caf6bc8bef9324f1675f5aa62024b97c6f6b5de

5 years agoHearing Aid: Clean up GATT on disconnect
Hansong Zhang [Thu, 27 Sep 2018 05:02:38 +0000 (22:02 -0700)]
Hearing Aid: Clean up GATT on disconnect

When user requests Disconnect(), after disconnecting GATT,
OnGattDisconnected() never cleans up GATT queue, because the
corresponding device is already removed from HearingDevices. We need to
clean up the queue before connecting the same device again. Without the
fix, sometimes ACL is connected, but the host failed to read GATT
characteristic to open COC. Also clean up connection update status
during disconnect

Bug: 116317072
Bug: 115365334
Test: connect to both devices -> disconnect -> connect, and repeat
Change-Id: I158b19b3d1f2cb2123ec554eb1ffe8c842df998e

5 years agoMerge "Hearing Aid: Clean up GATT on disconnect"
Treehugger Robot [Fri, 28 Sep 2018 19:08:21 +0000 (19:08 +0000)]
Merge "Hearing Aid: Clean up GATT on disconnect"

5 years agoMerge "Rename functions related to BLE scan cache" am: 68e05e155e am: d57ba35091
Jakub Pawlowski [Fri, 28 Sep 2018 14:58:13 +0000 (07:58 -0700)]
Merge "Rename functions related to BLE scan cache" am: 68e05e155e am: d57ba35091
am: 94d84c02f5

Change-Id: I14a298abb5eb7662d0c9f4fcb6ca99dafd452f19

5 years agoMerge "Rename functions related to BLE scan cache" am: 68e05e155e
Jakub Pawlowski [Fri, 28 Sep 2018 14:47:38 +0000 (07:47 -0700)]
Merge "Rename functions related to BLE scan cache" am: 68e05e155e
am: d57ba35091

Change-Id: Iaee049d1d210546e5c4f93066cf55d746a1190b7

5 years agoMerge "Rename functions related to BLE scan cache"
Jakub Pawlowski [Fri, 28 Sep 2018 14:43:31 +0000 (07:43 -0700)]
Merge "Rename functions related to BLE scan cache"
am: 68e05e155e

Change-Id: I55adaa8067a2ae50682d3c53814720128a0f1b2e

5 years agoMerge "Rename functions related to BLE scan cache"
Treehugger Robot [Fri, 28 Sep 2018 14:22:08 +0000 (14:22 +0000)]
Merge "Rename functions related to BLE scan cache"

5 years agoRename functions related to BLE scan cache
Jakub Pawlowski [Wed, 8 Aug 2018 13:19:58 +0000 (15:19 +0200)]
Rename functions related to BLE scan cache

They are not related to GATT, update naming.

Test: compilation
Bug: 67058417
Change-Id: Ia84ed98e02fbc04ecfde979f860b8766b0018218

5 years agoHearing Aid: Clean up GATT on disconnect
Hansong Zhang [Thu, 27 Sep 2018 05:02:38 +0000 (22:02 -0700)]
Hearing Aid: Clean up GATT on disconnect

When user requests Disconnect(), after disconnecting GATT,
OnGattDisconnected() never cleans up GATT queue, because the
corresponding device is already removed from HearingDevices. We need to
clean up the queue before connecting the same device again. Without the
fix, sometimes ACL is connected, but the host failed to read GATT
characteristic to open COC. Also clean up connection update status
during disconnect

Bug: 115365334
Test: connect to both devices -> disconnect -> connect, and repeat
Change-Id: I158b19b3d1f2cb2123ec554eb1ffe8c842df998e

5 years agoAdd TEST_MAPPING to system/bt am: 37b717c612 am: 5756b395a5
Jack He [Fri, 28 Sep 2018 00:54:51 +0000 (17:54 -0700)]
Add TEST_MAPPING to system/bt am: 37b717c612 am: 5756b395a5
am: 3433d9b40a

Change-Id: I83c2708458c60c6bde9b2eaed8150a138a14e470

5 years agoAdd TEST_MAPPING to system/bt am: 37b717c612
Jack He [Fri, 28 Sep 2018 00:48:20 +0000 (17:48 -0700)]
Add TEST_MAPPING to system/bt am: 37b717c612
am: 5756b395a5

Change-Id: I7bf8295c1a69946d1426243633d22403140e177b

5 years agoAdd TEST_MAPPING to system/bt
Jack He [Fri, 28 Sep 2018 00:44:09 +0000 (17:44 -0700)]
Add TEST_MAPPING to system/bt
am: 37b717c612

Change-Id: Iae641e8d55d26577491853eca958347744638ba9

5 years agoMerge "GATTC: Use hex for conn_id in log" am: 71113b44c3 am: 2a6c1cbbe5
Hansong Zhang [Thu, 27 Sep 2018 22:44:34 +0000 (15:44 -0700)]
Merge "GATTC: Use hex for conn_id in log" am: 71113b44c3 am: 2a6c1cbbe5
am: 1f655d9fd1

Change-Id: I4e58073cc0eab511947d3365061936a14a98a9e7

5 years agoMerge "GATTC: Use hex for conn_id in log" am: 71113b44c3
Hansong Zhang [Thu, 27 Sep 2018 22:35:19 +0000 (15:35 -0700)]
Merge "GATTC: Use hex for conn_id in log" am: 71113b44c3
am: 2a6c1cbbe5

Change-Id: If3fec0b9b153f907039e67c5f0a24652c3674d51

5 years agoMerge "GATTC: Use hex for conn_id in log"
Hansong Zhang [Thu, 27 Sep 2018 22:27:41 +0000 (15:27 -0700)]
Merge "GATTC: Use hex for conn_id in log"
am: 71113b44c3

Change-Id: Iabf9065e751f4090bf676fe109ef23a4310b29d6

5 years agoAdd TEST_MAPPING to system/bt
Jack He [Wed, 29 Aug 2018 01:28:55 +0000 (18:28 -0700)]
Add TEST_MAPPING to system/bt

* Add "postsubmit" test group to TEST_MAPPING in system/bt
* Developer can run tests mannually in system/bt via:
  system/bt$ atest :postsubmit
* Remove legacy configuration files spread across system/bt
* Created unified configuration file system/bt/AndroidTestTemplate.xml
  and add it to the default build config so that developers don't have
  to configure it

Bug: 113359343
Test: atest :postsubmit
Change-Id: I0fdd55b47ef176b5c4ce3d2cd217ffa67cf9bc23

5 years agoMerge "GATTC: Use hex for conn_id in log"
Treehugger Robot [Thu, 27 Sep 2018 22:16:39 +0000 (22:16 +0000)]
Merge "GATTC: Use hex for conn_id in log"

5 years agoMerge "HID: Free timer after removing device" am: 1de8ba51e1 am: b914f16c28
Hemant Gupta [Thu, 27 Sep 2018 21:15:20 +0000 (14:15 -0700)]
Merge "HID: Free timer after removing device" am: 1de8ba51e1 am: b914f16c28
am: afc61f661d

Change-Id: I72edaa52710a018eb028e93ab12bee717c3ad2b2

5 years agoMerge "HID: Free timer after removing device" am: 1de8ba51e1
Hemant Gupta [Thu, 27 Sep 2018 21:10:34 +0000 (14:10 -0700)]
Merge "HID: Free timer after removing device" am: 1de8ba51e1
am: b914f16c28

Change-Id: I187ba7b73e0f8961e1f83dbb754c87a6236329c3

5 years agoMerge "HID: Free timer after removing device"
Hemant Gupta [Thu, 27 Sep 2018 21:03:24 +0000 (14:03 -0700)]
Merge "HID: Free timer after removing device"
am: 1de8ba51e1

Change-Id: Ib99739a3e08926b91e0df57564e690eb1604f05c

5 years agoMerge "HID: Free timer after removing device"
Treehugger Robot [Thu, 27 Sep 2018 20:47:50 +0000 (20:47 +0000)]
Merge "HID: Free timer after removing device"

5 years agoMove Bluetooth to using C++17 am: 96bcf14a65 am: 6b3ecc5ff1
Ajay Panicker [Thu, 27 Sep 2018 19:51:26 +0000 (12:51 -0700)]
Move Bluetooth to using C++17 am: 96bcf14a65 am: 6b3ecc5ff1
am: 1137f972c4

Change-Id: I0786f258c9bcacea0e15f808e6e7933a8cab20d5

5 years agoMove Bluetooth to using C++17 am: 96bcf14a65
Ajay Panicker [Thu, 27 Sep 2018 19:45:34 +0000 (12:45 -0700)]
Move Bluetooth to using C++17 am: 96bcf14a65
am: 6b3ecc5ff1

Change-Id: I2995e17b065557f7d5571955cec1b0443fff8ddc

5 years agoMove Bluetooth to using C++17
Ajay Panicker [Thu, 27 Sep 2018 19:37:16 +0000 (12:37 -0700)]
Move Bluetooth to using C++17
am: 96bcf14a65

Change-Id: I0cd45059f7e3befa275b25be65ea88947c08b3b5

5 years agoGATTC: Use hex for conn_id in log
Hansong Zhang [Thu, 27 Sep 2018 00:42:40 +0000 (17:42 -0700)]
GATTC: Use hex for conn_id in log

For host conn_id, use hex format

Test: manual
Change-Id: I7d7e690a1dbe0665b827c59d104540eafa45d426

5 years agoHID: Free timer after removing device
Hemant Gupta [Thu, 27 Sep 2018 16:05:46 +0000 (21:35 +0530)]
HID: Free timer after removing device

Timer conn.process_repage_timer is being freed in HID_HostDeregister
which causes use after free condition in HID_HostRemoveDev->
HID_HostCloseDev.

Fix:
Call alarm_free after HID_HostRemoveDev in HID_HostDeregister

Test:
Code analysis

Bug: 116774368
Change-Id: Iddecd126716a5660f4c37ddc917bacee84342297

5 years agoMove Bluetooth to using C++17
Ajay Panicker [Mon, 17 Sep 2018 18:35:24 +0000 (11:35 -0700)]
Move Bluetooth to using C++17

C++ 17 has a bunch of features that will help us refactor the Bluetooth
stack to be much more safe and stable.

Bug: 115895445
Test: Compile and testtracker/201115
Change-Id: Ia1e8e179fa1df116969606d119cb8abe11f44761

5 years agoMerge "Add noexcept to move constructors and assignment operators." am: 2e3fa05261...
Chih-hung Hsieh [Thu, 27 Sep 2018 04:56:20 +0000 (21:56 -0700)]
Merge "Add noexcept to move constructors and assignment operators." am: 2e3fa05261 am: 6901c69166
am: 5b2a470647

Change-Id: I5234c656ca138a8135fec0419c01dab95de651e0

5 years agoMerge "Add noexcept to move constructors and assignment operators." am: 2e3fa05261
Chih-hung Hsieh [Thu, 27 Sep 2018 04:51:42 +0000 (21:51 -0700)]
Merge "Add noexcept to move constructors and assignment operators." am: 2e3fa05261
am: 6901c69166

Change-Id: I8a77d6538f8e41e5a81358548d92b02e0544f3a8

5 years agoMerge "Use maximum SSR timeout value when A2DP is streaming" am: 3dd799fd1a am: 3a0bc...
Ugo Yu [Thu, 27 Sep 2018 04:51:01 +0000 (21:51 -0700)]
Merge "Use maximum SSR timeout value when A2DP is streaming" am: 3dd799fd1a am: 3a0bcd481f
am: d3914cf727

Change-Id: Ia4eced63da15480ddb3bdb3044bf5407226577eb

5 years agoMerge "Add noexcept to move constructors and assignment operators."
Chih-hung Hsieh [Thu, 27 Sep 2018 04:44:30 +0000 (21:44 -0700)]
Merge "Add noexcept to move constructors and assignment operators."
am: 2e3fa05261

Change-Id: Ief6685c41f95433dfa2ac1acd75f18b8895b5da1

5 years agoMerge "Use maximum SSR timeout value when A2DP is streaming" am: 3dd799fd1a
Ugo Yu [Thu, 27 Sep 2018 04:35:42 +0000 (21:35 -0700)]
Merge "Use maximum SSR timeout value when A2DP is streaming" am: 3dd799fd1a
am: 3a0bcd481f

Change-Id: Ia03c912910f08fa13c1cb90f3ed3eafe81c155f8