OSDN Git Service

android-x86/system-bt.git
6 years agoMerge changes from topic "am-d37d37956b3e49d89a31faaa131fd1fc" into oc-mr1-dev-plus...
Android Build Merger (Role) [Sat, 16 Sep 2017 15:31:08 +0000 (15:31 +0000)]
Merge changes from topic "am-d37d37956b3e49d89a31faaa131fd1fc" into oc-mr1-dev-plus-aosp

* changes:
  Fix build error for AVRCP13 compat fix am: ab0fec08a4  -s ours am: 9e79daa051  -s ours
  Change our AVRCP capabilities if the remote device only supports 1.3 am: ff2d86ed3a  -s ours am: 69bd4978f2  -s ours

6 years agoFix build error for AVRCP13 compat fix am: ab0fec08a4 -s ours
Andre Eisenbach [Sat, 16 Sep 2017 15:30:13 +0000 (15:30 +0000)]
Fix build error for AVRCP13 compat fix am: ab0fec08a4  -s ours
am: 9e79daa051  -s ours

Change-Id: Ic1b532f896c2abf5de35b5f8f80a779da698513b

6 years agoFix build error for AVRCP13 compat fix am: ab0fec08a4
Andre Eisenbach [Sat, 16 Sep 2017 15:30:12 +0000 (15:30 +0000)]
Fix build error for AVRCP13 compat fix am: ab0fec08a4
am: b2fbd7e3d0  -s ours

Change-Id: I48fcc51377ff162a80251aedbd77d100030c4669

6 years agoChange our AVRCP capabilities if the remote device only supports 1.3 am: ff2d86ed3a...
Ajay Panicker [Sat, 16 Sep 2017 15:30:08 +0000 (15:30 +0000)]
Change our AVRCP capabilities if the remote device only supports 1.3 am: ff2d86ed3a  -s ours
am: 69bd4978f2  -s ours

Change-Id: I0ad2524f46de7fe5c9298b143319b711308e35ba

6 years agoChange our AVRCP capabilities if the remote device only supports 1.3 am: ff2d86ed3a
Ajay Panicker [Sat, 16 Sep 2017 15:30:08 +0000 (15:30 +0000)]
Change our AVRCP capabilities if the remote device only supports 1.3 am: ff2d86ed3a
am: f2ea7f1799  -s ours

Change-Id: I3e19e99676645942fa16c79dbf89ec220c83bdb4

6 years agoFix build error for AVRCP13 compat fix
Andre Eisenbach [Sat, 16 Sep 2017 15:27:43 +0000 (15:27 +0000)]
Fix build error for AVRCP13 compat fix
am: ab0fec08a4

Change-Id: Ia47840da1e2536eb5a8d226771a9baff8c0a277a

6 years agoFix build error for AVRCP13 compat fix
Andre Eisenbach [Sat, 16 Sep 2017 15:27:42 +0000 (15:27 +0000)]
Fix build error for AVRCP13 compat fix
am: ab0fec08a4  -s ours

Change-Id: I6b0837dbb37dc51267ec5eb6955ba7c6facca53c

6 years agoChange our AVRCP capabilities if the remote device only supports 1.3
Ajay Panicker [Sat, 16 Sep 2017 15:27:38 +0000 (15:27 +0000)]
Change our AVRCP capabilities if the remote device only supports 1.3
am: ff2d86ed3a

Change-Id: I8787fd127a2e02c195d76d4d6c60756c4b16dfd4

6 years agoChange our AVRCP capabilities if the remote device only supports 1.3
Ajay Panicker [Sat, 16 Sep 2017 15:27:37 +0000 (15:27 +0000)]
Change our AVRCP capabilities if the remote device only supports 1.3
am: ff2d86ed3a  -s ours

Change-Id: I8edbd554ec49ed2d05f747664c538a54bbad74ed

6 years agoFix build error for AVRCP13 compat fix
Andre Eisenbach [Sat, 16 Sep 2017 07:22:10 +0000 (00:22 -0700)]
Fix build error for AVRCP13 compat fix

Bug: 37943083
Test: manual
Change-Id: I3974192dd007804f90f35a724a39824ed093a633
Merged-In: I6d041590dc51d7e8711b17fb1cb9c880b640052a

6 years agoChange our AVRCP capabilities if the remote device only supports 1.3
Ajay Panicker [Wed, 6 Sep 2017 16:59:51 +0000 (09:59 -0700)]
Change our AVRCP capabilities if the remote device only supports 1.3

This prevents issues with devices that only support 1.3 but can not
handle forward compatability like some Alpine Carkits.

Bug: 37943083
Test: Connect to Alpine carkit that only supports 1.3 and see new features
      are used.

Change-Id: I6d041590dc51d7e8711b17fb1cb9c880b640052a
Merged-In: I6d041590dc51d7e8711b17fb1cb9c880b640052a
(cherry picked from commit f9f1c8b449efb9cb7894a64fe2977f875679ba52)

6 years agoMerge "Clean-up BTIF profile queue on profile shutdown" am: 643c869ca2 am: 0ee292a4d0
Jack He [Sat, 16 Sep 2017 06:33:07 +0000 (06:33 +0000)]
Merge "Clean-up BTIF profile queue on profile shutdown" am: 643c869ca2 am: 0ee292a4d0
am: 839f75226d

Change-Id: Ie78edfdf34c4f4a79918c9a5859c6f2c58a1639c

6 years agoMerge "Clean-up BTIF profile queue on profile shutdown" am: 643c869ca2
Jack He [Sat, 16 Sep 2017 06:30:37 +0000 (06:30 +0000)]
Merge "Clean-up BTIF profile queue on profile shutdown" am: 643c869ca2
am: 0ee292a4d0

Change-Id: I9fdffd82475266ea2fae4fb65f039ec81775e521

6 years agoDO NOT MERGE Fix unknown type issue in unit tests am: 9b4aebb1ba -s ours
Jack He [Sat, 16 Sep 2017 06:27:42 +0000 (06:27 +0000)]
DO NOT MERGE Fix unknown type issue in unit tests am: 9b4aebb1ba  -s ours
am: 55e7146aa8  -s ours

Change-Id: If80dde750d1a3e38a41dd9a4d49dfcf7bb71143a

6 years agoMerge "Clean-up BTIF profile queue on profile shutdown"
Jack He [Sat, 16 Sep 2017 06:27:37 +0000 (06:27 +0000)]
Merge "Clean-up BTIF profile queue on profile shutdown"
am: 643c869ca2

Change-Id: I7c22ae8dd883edacbe532f93d9e6a279f168d5ac

6 years agoClean-up BTIF profile queue on profile shutdown am: a2d0cbc35a
Jack He [Sat, 16 Sep 2017 06:27:37 +0000 (06:27 +0000)]
Clean-up BTIF profile queue on profile shutdown am: a2d0cbc35a
am: 88e62568fb  -s ours

Change-Id: I47dbb5c523b99c4b8e853bf353c29cd4c514a17c

6 years agoDO NOT MERGE Fix unknown type issue in unit tests
Jack He [Sat, 16 Sep 2017 06:25:13 +0000 (06:25 +0000)]
DO NOT MERGE Fix unknown type issue in unit tests
am: 9b4aebb1ba  -s ours

Change-Id: Ief005c60c2372c1b8fa95a3a4459147f6e2009b0

6 years agoClean-up BTIF profile queue on profile shutdown
Jack He [Sat, 16 Sep 2017 06:25:07 +0000 (06:25 +0000)]
Clean-up BTIF profile queue on profile shutdown
am: a2d0cbc35a

Change-Id: I42e2f4d5e273c83c4e935b0263b707b5442ec619

6 years agoMerge "Clean-up BTIF profile queue on profile shutdown"
Treehugger Robot [Sat, 16 Sep 2017 06:24:09 +0000 (06:24 +0000)]
Merge "Clean-up BTIF profile queue on profile shutdown"

6 years agoDO NOT MERGE Fix unknown type issue in unit tests am: 9b4aebb1ba -s ours
Jack He [Sat, 16 Sep 2017 06:14:42 +0000 (06:14 +0000)]
DO NOT MERGE Fix unknown type issue in unit tests am: 9b4aebb1ba  -s ours
am: 877bc67b60  -s ours

Change-Id: Ie4af9ab59c59fcd8b0e4362ffd6d51381a9fe18c

6 years agoClean-up BTIF profile queue on profile shutdown am: a2d0cbc35a -s ours
Jack He [Sat, 16 Sep 2017 06:14:36 +0000 (06:14 +0000)]
Clean-up BTIF profile queue on profile shutdown am: a2d0cbc35a  -s ours
am: 951eeba315  -s ours

Change-Id: I17cfff2d7983301ffa2be630a4985aa743061c94

6 years agoDO NOT MERGE Fix unknown type issue in unit tests
Jack He [Sat, 16 Sep 2017 06:12:11 +0000 (06:12 +0000)]
DO NOT MERGE Fix unknown type issue in unit tests
am: 9b4aebb1ba  -s ours

Change-Id: I8fe51a6c113e8dd94e7822cd45548043baddfb51

6 years agoClean-up BTIF profile queue on profile shutdown
Jack He [Sat, 16 Sep 2017 06:12:05 +0000 (06:12 +0000)]
Clean-up BTIF profile queue on profile shutdown
am: a2d0cbc35a  -s ours

Change-Id: I25dae768d2fb38d1b8b0747bba8cf46300838530

6 years agoDO NOT MERGE Fix unknown type issue in unit tests
Jack He [Sat, 16 Sep 2017 01:03:29 +0000 (18:03 -0700)]
DO NOT MERGE Fix unknown type issue in unit tests

Bug: 63790458
Test: build, unit test
Change-Id: If5e403907292aa25c8d39b17f2f1818d493433e6
Merged-In: I28288c295b7ca0259b2112c11b4e5a81d6f2e33c

6 years agoMerge "Clean-up BTIF profile queue on profile shutdown" into oc-mr1-dev
Jack He [Sat, 16 Sep 2017 01:28:14 +0000 (01:28 +0000)]
Merge "Clean-up BTIF profile queue on profile shutdown" into oc-mr1-dev
am: 11dc2c883b

Change-Id: Iaee55739cbdb395ab6fdf37d004f2b0cd7374d68

6 years agoMerge "Clean-up BTIF profile queue on profile shutdown" into oc-mr1-dev
TreeHugger Robot [Sat, 16 Sep 2017 01:24:29 +0000 (01:24 +0000)]
Merge "Clean-up BTIF profile queue on profile shutdown" into oc-mr1-dev

6 years agoClean-up BTIF profile queue on profile shutdown
Jack He [Fri, 15 Sep 2017 00:13:19 +0000 (17:13 -0700)]
Clean-up BTIF profile queue on profile shutdown

* Add btif_profile_cleanup(uuid) method to remove pending connection
  requests for individual UUIDs
* Call the above method in each profile's clean-up method
* Add unit tests for btif_profile_queue

Bug: 63790458
Test: make, unit tests, pair and connect car kits
Change-Id: I28288c295b7ca0259b2112c11b4e5a81d6f2e33c
Merged-In: I28288c295b7ca0259b2112c11b4e5a81d6f2e33c
(cherry picked from commit d366807102bce97e494e83570d757ebcb6a33b3c)

6 years agoSetPreferredPhy/ReadPhy callback fix am: d08d44e09b am: 6891e6f7c8
Jakub Pawlowski [Sat, 16 Sep 2017 00:28:43 +0000 (00:28 +0000)]
SetPreferredPhy/ReadPhy callback fix am: d08d44e09b am: 6891e6f7c8
am: 7e1effb961

Change-Id: Ide2e1fb84bcf375b0a31ba133e91ae102ae765f7

6 years agoSetPreferredPhy/ReadPhy callback fix am: d08d44e09b
Jakub Pawlowski [Sat, 16 Sep 2017 00:26:42 +0000 (00:26 +0000)]
SetPreferredPhy/ReadPhy callback fix am: d08d44e09b
am: 6891e6f7c8

Change-Id: I07157be624a2b5aac9dcd7862cbffa4ba19a278d

6 years agoSetPreferredPhy/ReadPhy callback fix
Jakub Pawlowski [Sat, 16 Sep 2017 00:24:11 +0000 (00:24 +0000)]
SetPreferredPhy/ReadPhy callback fix
am: d08d44e09b

Change-Id: I81698e198eb7be1e4b11efb16f8c43311ed4a029

6 years agoMerge "Merge "Don't reject notifications and wait until new addressed player is ready...
Android Build Merger (Role) [Sat, 16 Sep 2017 00:17:25 +0000 (00:17 +0000)]
Merge "Merge "Don't reject notifications and wait until new addressed player is ready (2/2)" into oc-dr1-dev am: 7fba61cf06 am: e46b0613f6  -s ours" into oc-mr1-dev-plus-aosp

6 years agoMerge "Don't reject notifications and wait until new addressed player is ready (2...
Ajay Panicker [Sat, 16 Sep 2017 00:16:48 +0000 (00:16 +0000)]
Merge "Don't reject notifications and wait until new addressed player is ready (2/2)" into oc-dr1-dev am: 7fba61cf06  -s ours
am: 4b8ab1844a  -s ours

Change-Id: I2746fe0ed3cc634f21b59bc91a357f48dd0621f9

6 years agoMerge "Don't reject notifications and wait until new addressed player is ready (2...
Ajay Panicker [Sat, 16 Sep 2017 00:16:48 +0000 (00:16 +0000)]
Merge "Don't reject notifications and wait until new addressed player is ready (2/2)" into oc-dr1-dev am: 7fba61cf06
am: e46b0613f6  -s ours

Change-Id: I911c98e4b025c3f122ccd5c25d28c8bcf429a685

6 years agoMerge "Don't reject notifications and wait until new addressed player is ready (2...
Ajay Panicker [Sat, 16 Sep 2017 00:14:27 +0000 (00:14 +0000)]
Merge "Don't reject notifications and wait until new addressed player is ready (2/2)" into oc-dr1-dev
am: 7fba61cf06

Change-Id: I26368f08958d60e52a6e6cf22b6bd88ddd902682

6 years agoMerge "Don't reject notifications and wait until new addressed player is ready (2...
Ajay Panicker [Sat, 16 Sep 2017 00:14:14 +0000 (00:14 +0000)]
Merge "Don't reject notifications and wait until new addressed player is ready (2/2)" into oc-dr1-dev
am: 7fba61cf06  -s ours

Change-Id: Ibbe07200a10dcbd5a2aa189a4d1e95fab9912a3c

6 years agoMerge "Don't reject notifications and wait until new addressed player is ready (2...
TreeHugger Robot [Sat, 16 Sep 2017 00:10:43 +0000 (00:10 +0000)]
Merge "Don't reject notifications and wait until new addressed player is ready (2/2)" into oc-dr1-dev

6 years agoMerge "GAP: Set service_id before calling gap_release_ccb am: f606990828 -s ours...
Android Build Merger (Role) [Fri, 15 Sep 2017 23:40:08 +0000 (23:40 +0000)]
Merge "GAP: Set service_id before calling gap_release_ccb am: f606990828  -s ours am: 9a1b87c3bc  -s ours" into oc-mr1-dev-plus-aosp

6 years agoGAP: Set service_id before calling gap_release_ccb am: f606990828 -s ours
Myles Watson [Fri, 15 Sep 2017 23:39:54 +0000 (23:39 +0000)]
GAP: Set service_id before calling gap_release_ccb am: f606990828  -s ours
am: a8f5269b23  -s ours

Change-Id: I0e7f54c446ff22b24db2dc9e2d21b996168010f5

6 years agoGAP: Set service_id before calling gap_release_ccb am: f606990828 -s ours
Myles Watson [Fri, 15 Sep 2017 23:39:52 +0000 (23:39 +0000)]
GAP: Set service_id before calling gap_release_ccb am: f606990828  -s ours
am: 9a1b87c3bc  -s ours

Change-Id: I73be3630c2664c99a9493b479a02e15869cc1c43

6 years agoGAP: Set service_id before calling gap_release_ccb
Myles Watson [Fri, 15 Sep 2017 23:37:42 +0000 (23:37 +0000)]
GAP: Set service_id before calling gap_release_ccb
am: f606990828  -s ours

Change-Id: I673dd88b298cb58b94bbd8326066af93e5a2e2f4

6 years agoGAP: Set service_id before calling gap_release_ccb
Myles Watson [Fri, 15 Sep 2017 23:37:23 +0000 (23:37 +0000)]
GAP: Set service_id before calling gap_release_ccb
am: f606990828  -s ours

Change-Id: I5d2b91b2f343491ef4ad1654f30eab118b173a52

6 years agoClean-up BTIF profile queue on profile shutdown
Jack He [Fri, 15 Sep 2017 00:13:19 +0000 (17:13 -0700)]
Clean-up BTIF profile queue on profile shutdown

* Add btif_profile_cleanup(uuid) method to remove pending connection
  requests for individual UUIDs
* Call the above method in each profile's clean-up method
* Add unit tests for btif_profile_queue

Bug: 63790458
Test: make, unit tests, pair and connect car kits
Change-Id: I28288c295b7ca0259b2112c11b4e5a81d6f2e33c
(cherry picked from commit d366807102bce97e494e83570d757ebcb6a33b3c)

6 years agoGAP: Set service_id before calling gap_release_ccb
Myles Watson [Thu, 14 Sep 2017 21:13:44 +0000 (14:13 -0700)]
GAP: Set service_id before calling gap_release_ccb

Calling gap_release_ccb with a service_id == 0, which in turn
calls BTM_SecClrService with an ID of 0.

From the documentation for BTM_SecClrService:

  Service ID - Id of the service to remove. '0' removes all
               service records (except SDP).

Bug: 6569576965223508
Test: BLE connection and characteristic read
Change-Id: Icf309807f02e1faa273cf9bad9c09d9221a8bbfd
Merged-In: Icf309807f02e1faa273cf9bad9c09d9221a8bbfd
(cherry picked from commit 5c5c10683e2a11162838297fc8054b15837c4f32)
(cherry picked from commit 4023c6731d5e991c6202d4e499b9dd43d642fb3c)

6 years agoDon't reject notifications and wait until new addressed player is ready (2/2)
Ajay Panicker [Wed, 30 Aug 2017 01:30:43 +0000 (18:30 -0700)]
Don't reject notifications and wait until new addressed player is ready (2/2)

There are some carkits like the ones found in the 2016 Honda CRZ and some
Audi's that do not follow the spec and do not honor reject pending notification
messages after switching players. This causes an issue whenever you switch
players, the metadata freezes due to the fact that the carkit never re-registers
for new track changed notifications. This patch removes the reject notification
and reorders the current notifications.

Bug: 64142363
Test: Test with Audi S7 and 2016 Honda CRZ and see that switching players works
      TestTracker: 105391/3975
Change-Id: Iaec70863594e13217916ab740d529f526d27c2d1
Merged-In: Iaec70863594e13217916ab740d529f526d27c2d1
(cherry picked from commit dd535e70c767fe214c1634b46618d0fb5ed4385d)

6 years agoClean-up BTIF profile queue on profile shutdown
Jack He [Fri, 15 Sep 2017 00:13:19 +0000 (17:13 -0700)]
Clean-up BTIF profile queue on profile shutdown

* Add btif_profile_cleanup(uuid) method to remove pending connection
  requests for individual UUIDs
* Call the above method in each profile's clean-up method
* Add unit tests for btif_profile_queue

Bug: 63790458
Test: make, unit tests, pair and connect car kits
Change-Id: I28288c295b7ca0259b2112c11b4e5a81d6f2e33c

6 years agoSetPreferredPhy/ReadPhy callback fix
Jakub Pawlowski [Fri, 15 Sep 2017 20:43:40 +0000 (13:43 -0700)]
SetPreferredPhy/ReadPhy callback fix

Bug: 65746728
Test: manual
Change-Id: Ifdd8e7051c953aa1c006abecd62d1af196619d98

6 years agoGAP: Set service_id before calling gap_release_ccb
Myles Watson [Fri, 15 Sep 2017 19:30:14 +0000 (19:30 +0000)]
GAP: Set service_id before calling gap_release_ccb
am: 4023c6731d

Change-Id: I11dd49418bd28925f13ef94c37bb0fb2c38a84d5

6 years agoGAP: Set service_id before calling gap_release_ccb
Myles Watson [Thu, 14 Sep 2017 21:13:44 +0000 (14:13 -0700)]
GAP: Set service_id before calling gap_release_ccb

Calling gap_release_ccb with a service_id == 0, which in turn
calls BTM_SecClrService with an ID of 0.

From the documentation for BTM_SecClrService:

  Service ID - Id of the service to remove. '0' removes all
               service records (except SDP).

Bug: 6569576965223508
Test: BLE connection and characteristic read
Change-Id: Icf309807f02e1faa273cf9bad9c09d9221a8bbfd
(cherry picked from commit 5c5c10683e2a11162838297fc8054b15837c4f32)

6 years agoMerge "GAP: Set service_id before calling gap_release_ccb" am: 57c849d1e5 am: 237c160b0f
Myles Watson [Fri, 15 Sep 2017 03:34:41 +0000 (03:34 +0000)]
Merge "GAP: Set service_id before calling gap_release_ccb" am: 57c849d1e5 am: 237c160b0f
am: 0c187327d3

Change-Id: I3e0149a7cc1b8695123704257f1bf945c2bb51eb

6 years agoEnsure that services are cleaned from the GattServer HandleMap. am: eb215402e3 am...
Jeremy Klein [Fri, 15 Sep 2017 02:58:55 +0000 (02:58 +0000)]
Ensure that services are cleaned from the GattServer HandleMap. am: eb215402e3 am: 04dd67f8e2
am: a099ab188b

Change-Id: I445d85325c87c8aa67795a6771e6825df27f5ab1

6 years agoFix included service parsing (1/3) am: fae9b2fae0 am: bd349a88b8
Jakub Pawlowski [Fri, 15 Sep 2017 02:38:19 +0000 (02:38 +0000)]
Fix included service parsing (1/3) am: fae9b2fae0 am: bd349a88b8
am: d91df3675b

Change-Id: Ib872faaabcaeeedfdf58d24bb1fa0dfd3d95d873

6 years agoEnsure that services are cleaned from the GattServer HandleMap. am: eb215402e3 am...
Jeremy Klein [Fri, 15 Sep 2017 02:26:25 +0000 (02:26 +0000)]
Ensure that services are cleaned from the GattServer HandleMap. am: eb215402e3 am: 04dd67f8e2
am: 5d5250f9b1

Change-Id: I7a6bca21ddc0ce9ca8fcf5198d5af317421c5834

6 years agoMerge "GAP: Set service_id before calling gap_release_ccb" am: 57c849d1e5
Myles Watson [Fri, 15 Sep 2017 02:07:17 +0000 (02:07 +0000)]
Merge "GAP: Set service_id before calling gap_release_ccb" am: 57c849d1e5
am: 237c160b0f

Change-Id: I7be10eec1e5ab580dc0154b05bfac2f19c271d52

6 years agoMerge "GAP: Set service_id before calling gap_release_ccb"
Myles Watson [Fri, 15 Sep 2017 01:31:08 +0000 (01:31 +0000)]
Merge "GAP: Set service_id before calling gap_release_ccb"
am: 57c849d1e5

Change-Id: I9f3a6f08ab43b124d947355e158ee437fdea3bd8

6 years agoFix included service parsing (1/3) am: fae9b2fae0
Jakub Pawlowski [Fri, 15 Sep 2017 00:02:07 +0000 (00:02 +0000)]
Fix included service parsing (1/3) am: fae9b2fae0
am: bd349a88b8

Change-Id: Ibff59691dedd9797a8ace2a9585a7a1f8a2a7e3e

6 years agoMerge "GAP: Set service_id before calling gap_release_ccb"
Treehugger Robot [Thu, 14 Sep 2017 23:45:01 +0000 (23:45 +0000)]
Merge "GAP: Set service_id before calling gap_release_ccb"

6 years agoEnsure that services are cleaned from the GattServer HandleMap. am: eb215402e3
Jeremy Klein [Thu, 14 Sep 2017 23:43:55 +0000 (23:43 +0000)]
Ensure that services are cleaned from the GattServer HandleMap. am: eb215402e3
am: 04dd67f8e2

Change-Id: I12d8826369233a50bfeca51d2ae8aa8732ab35ed

6 years agoEnsure that services are cleaned from the GattServer HandleMap. am: eb215402e3
Jeremy Klein [Thu, 14 Sep 2017 23:43:55 +0000 (23:43 +0000)]
Ensure that services are cleaned from the GattServer HandleMap. am: eb215402e3
am: 04dd67f8e2

Change-Id: Ib881154009e22bd2e26806a3e4433401afc4d548

6 years agoEnsure that services are cleaned from the GattServer HandleMap.
Jeremy Klein [Thu, 14 Sep 2017 23:38:53 +0000 (23:38 +0000)]
Ensure that services are cleaned from the GattServer HandleMap.
am: eb215402e3

Change-Id: Ic509b64189fccf8c48afaf947d625a8998b389af

6 years agoFix included service parsing (1/3)
Jakub Pawlowski [Thu, 14 Sep 2017 23:36:09 +0000 (23:36 +0000)]
Fix included service parsing (1/3)
am: fae9b2fae0

Change-Id: I0c331c732ad09f3cf06ecaefbc6c5255f82f5b35

6 years agoGAP: Set service_id before calling gap_release_ccb
Myles Watson [Thu, 14 Sep 2017 21:13:44 +0000 (14:13 -0700)]
GAP: Set service_id before calling gap_release_ccb

Calling gap_release_ccb with a service_id == 0, which in turn
calls BTM_SecClrService with an ID of 0.

From the documentation for BTM_SecClrService:

  Service ID - Id of the service to remove. '0' removes all
               service records (except SDP).

Test: BLE connection and characteristic read
Change-Id: Icf309807f02e1faa273cf9bad9c09d9221a8bbfd

6 years agoEnsure that services are cleaned from the GattServer HandleMap.
Jeremy Klein [Fri, 8 Sep 2017 21:04:39 +0000 (14:04 -0700)]
Ensure that services are cleaned from the GattServer HandleMap.

The incorrect service handle was being plumbed up to onServiceDeleted.
This was causing stale entries to stick around forever in the HandleMap,
which could later cause failures to find callback references in
ContextMap if the connection ID changed for a given device.

Bug: 65463237
Test: unit tests modified and run
Change-Id: I2e22858b447f4e6b5a4fbceee4c406191c84a67d
(cherry picked from commit e631789075f5625fd79c774678f4af0bf102c7d1)

6 years agoFix included service parsing (1/3)
Jakub Pawlowski [Thu, 14 Sep 2017 18:40:32 +0000 (11:40 -0700)]
Fix included service parsing (1/3)

Bug: 65637368
Test: sl4a GattIncludedServiceTest
Change-Id: Icb882d411a75a91e3fea050f00c40e76de3539de

6 years agoMerge "Add Suspend/Resume for advertising" into oc-mr1-dev
Jakub Pawlowski [Thu, 14 Sep 2017 03:36:13 +0000 (03:36 +0000)]
Merge "Add Suspend/Resume for advertising" into oc-mr1-dev
am: 29fbe19168

Change-Id: Ic5a439f97f827f36969763b927f6d57a06c1e63a

6 years agoMerge changes from topics "bt-asan-tBTA_AV-copy-crash", "bt-bta-av-role-res-error...
Pavlin Radoslavov [Thu, 14 Sep 2017 03:35:49 +0000 (03:35 +0000)]
Merge changes from topics "bt-asan-tBTA_AV-copy-crash", "bt-bta-av-role-res-error" into oc-mr1-dev
am: 238df4bccb

Change-Id: I6998b3d071fa89976e85522ae360f9bc06401cd8

6 years agoMerge "Fix crash during derigister GATT server" into oc-mr1-dev
Chao Quan [Thu, 14 Sep 2017 03:35:27 +0000 (03:35 +0000)]
Merge "Fix crash during derigister GATT server" into oc-mr1-dev
am: b93d3a28ba  -s ours

Change-Id: I574217c412cceb204badafdadcaf5adf1f023975

6 years agobtm: Clear LINK_KEY_KNOWN flag for temporary connections
Myles Watson [Thu, 14 Sep 2017 03:35:04 +0000 (03:35 +0000)]
btm: Clear LINK_KEY_KNOWN flag for temporary connections
am: a6fae17164

Change-Id: I8fd7fe79edf340fc7694b16c4337b54046727c70

6 years agoAdd Suspend/Resume for advertising am: 757e9b24ed am: 577f0a8c9d
Jakub Pawlowski [Thu, 14 Sep 2017 00:47:52 +0000 (00:47 +0000)]
Add Suspend/Resume for advertising am: 757e9b24ed am: 577f0a8c9d
am: aab035d79d

Change-Id: Ide4d3d2e6bb9d66dca44779d91e99823202cafaf

6 years agoAdd Suspend/Resume for advertising am: 757e9b24ed
Jakub Pawlowski [Wed, 13 Sep 2017 23:09:29 +0000 (23:09 +0000)]
Add Suspend/Resume for advertising am: 757e9b24ed
am: 577f0a8c9d

Change-Id: Id5af50fd5fdf9f3d019b60047f6607a1cfe684ac

6 years agoAdd Suspend/Resume for advertising
Jakub Pawlowski [Wed, 13 Sep 2017 22:44:15 +0000 (22:44 +0000)]
Add Suspend/Resume for advertising
am: 757e9b24ed

Change-Id: I11faa51795bc58831781bb229d22b35717018d6c

6 years agoMerge "Add Suspend/Resume for advertising" into oc-mr1-dev
TreeHugger Robot [Wed, 13 Sep 2017 21:49:20 +0000 (21:49 +0000)]
Merge "Add Suspend/Resume for advertising" into oc-mr1-dev

6 years agoMerge changes from topics "bt-asan-tBTA_AV-copy-crash", "bt-bta-av-role-res-error...
TreeHugger Robot [Wed, 13 Sep 2017 19:30:30 +0000 (19:30 +0000)]
Merge changes from topics "bt-asan-tBTA_AV-copy-crash", "bt-bta-av-role-res-error" into oc-mr1-dev

* changes:
  Fix ASAN crash inside btif_av_event_deep_copy()
  Return the correct status when BTA_AV Open failed because of role switch

6 years agoAdd Suspend/Resume for advertising
Jakub Pawlowski [Mon, 28 Aug 2017 16:56:13 +0000 (09:56 -0700)]
Add Suspend/Resume for advertising

This is needed for resolving list handling.

Bug: 64846264
Test: updated unit tests
Change-Id: I3d9c7b90d3b69d459d33c4ca7a9849ca3a7abc40

6 years agoMerge "Fix crash during derigister GATT server" into oc-mr1-dev
TreeHugger Robot [Wed, 13 Sep 2017 17:47:47 +0000 (17:47 +0000)]
Merge "Fix crash during derigister GATT server" into oc-mr1-dev

6 years agoFix crash during derigister GATT server
Chao Quan [Mon, 24 Jul 2017 11:46:53 +0000 (19:46 +0800)]
Fix crash during derigister GATT server

When deregister a gatt server, GATT_deregister
will use a loop to stop service one by one and
call std::list::erase in GATTS_StopService to
remove service info. But erase makes iterator lose
efficacy. If the iterator is operated after that,
Bluetooth will crash.

Add the iterator before erase.

Test: manual
Bug: 65632336
Change-Id: I10f9351a95ab4922553d8a77663a0212407607aa
Merged-In: I10f9351a95ab4922553d8a77663a0212407607aa
(cherry picked from commit a5aca8f6de825252b5bb72f5d1d8ff7dd1b5247a)

6 years agoAdd Suspend/Resume for advertising
Jakub Pawlowski [Mon, 28 Aug 2017 16:56:13 +0000 (09:56 -0700)]
Add Suspend/Resume for advertising

This is needed for resolving list handling.

Bug: 64846264
Test: updated unit tests
Change-Id: I3d9c7b90d3b69d459d33c4ca7a9849ca3a7abc40

6 years agoFix ASAN crash inside btif_av_event_deep_copy()
Pavlin Radoslavov [Tue, 12 Sep 2017 19:08:49 +0000 (12:08 -0700)]
Fix ASAN crash inside btif_av_event_deep_copy()

Allocate sufficient data on the stack that can be safely copied inside
btif_av_event_deep_copy()

Bug: 65524264
Test: Run Bluetooth on ASAN enabled build
Change-Id: Ie6d4a28933302131c58eb4aee34161e435634377
(cherry picked from commit 6d07e45b9ad1ae32ffe70a0bcc7736719ba973e5)

6 years agoReturn the correct status when BTA_AV Open failed because of role switch
Pavlin Radoslavov [Tue, 12 Sep 2017 18:51:21 +0000 (11:51 -0700)]
Return the correct status when BTA_AV Open failed because of role switch

Bug: 65588660
Test: Code compilation
Change-Id: I705ec28c76f2342e18bece193005c962b9febac8
(cherry picked from commit 54bdc23b0452c356204379a2ce30c78fbf213461)

6 years agoMerge "btm: Clear LINK_KEY_KNOWN flag for temporary connections" am: e5ed4dcc90 am...
Myles Watson [Tue, 12 Sep 2017 22:23:44 +0000 (22:23 +0000)]
Merge "btm: Clear LINK_KEY_KNOWN flag for temporary connections" am: e5ed4dcc90 am: d1bed4781d
am: bb6c37ffb3

Change-Id: Ia3d17a8997e6dce54091b73e62850f0f226c6bfb

6 years agoFix ASAN crash inside btif_av_event_deep_copy() am: 6d07e45b9a am: b4051180e9
Pavlin Radoslavov [Tue, 12 Sep 2017 22:23:21 +0000 (22:23 +0000)]
Fix ASAN crash inside btif_av_event_deep_copy() am: 6d07e45b9a am: b4051180e9
am: e28cf0d62e

Change-Id: I4d57494da915671a9f110bf5e07784a9cd6b2b94

6 years agoReturn the correct status when BTA_AV Open failed because of role switch am: 54bdc23b...
Pavlin Radoslavov [Tue, 12 Sep 2017 22:22:59 +0000 (22:22 +0000)]
Return the correct status when BTA_AV Open failed because of role switch am: 54bdc23b04 am: d2e2f4a8c7
am: 5f61da2242

Change-Id: Id2e78dd1ddac899924ab7aa84bb6abbf33d99aeb

6 years agoFix MAC address byte ordering in the uniq field am: 7bc0edda0f am: ca395d2933
Kim Low [Tue, 12 Sep 2017 22:22:41 +0000 (22:22 +0000)]
Fix MAC address byte ordering in the uniq field am: 7bc0edda0f am: ca395d2933
am: 0cf6a6be9b

Change-Id: I4202a91447f092202f437ccbb7b373f8c9b9a9ae

6 years agoMerge "btm: Clear LINK_KEY_KNOWN flag for temporary connections" am: e5ed4dcc90
Myles Watson [Tue, 12 Sep 2017 22:08:59 +0000 (22:08 +0000)]
Merge "btm: Clear LINK_KEY_KNOWN flag for temporary connections" am: e5ed4dcc90
am: d1bed4781d

Change-Id: Id9f61a171f8095c43d0802a404c9133f7539a9b1

6 years agoMerge "btm: Clear LINK_KEY_KNOWN flag for temporary connections"
Myles Watson [Tue, 12 Sep 2017 22:01:28 +0000 (22:01 +0000)]
Merge "btm: Clear LINK_KEY_KNOWN flag for temporary connections"
am: e5ed4dcc90

Change-Id: I2f01c85dcb9af27ff13d6e129ceb64d62e06774e

6 years agobtm: Clear LINK_KEY_KNOWN flag for temporary connections
Myles Watson [Tue, 12 Sep 2017 15:23:23 +0000 (08:23 -0700)]
btm: Clear LINK_KEY_KNOWN flag for temporary connections

Bug: 62561154
Test: Smart Setup, erase target, Smart Setup
Change-Id: Icba672a38772dc99a74f351301c81d66f37ee929

6 years agoMerge "btm: Clear LINK_KEY_KNOWN flag for temporary connections"
Treehugger Robot [Tue, 12 Sep 2017 21:50:08 +0000 (21:50 +0000)]
Merge "btm: Clear LINK_KEY_KNOWN flag for temporary connections"

6 years agoFix ASAN crash inside btif_av_event_deep_copy() am: 6d07e45b9a
Pavlin Radoslavov [Tue, 12 Sep 2017 21:17:19 +0000 (21:17 +0000)]
Fix ASAN crash inside btif_av_event_deep_copy() am: 6d07e45b9a
am: b4051180e9

Change-Id: I6733ac9351963ce46cb5cf1f2d2aea8b6e57b3c2

6 years agoReturn the correct status when BTA_AV Open failed because of role switch am: 54bdc23b04
Pavlin Radoslavov [Tue, 12 Sep 2017 21:16:55 +0000 (21:16 +0000)]
Return the correct status when BTA_AV Open failed because of role switch am: 54bdc23b04
am: d2e2f4a8c7

Change-Id: I118084987a3911b2d49af89beb1c6611931a6380

6 years agoFix ASAN crash inside btif_av_event_deep_copy()
Pavlin Radoslavov [Tue, 12 Sep 2017 21:11:46 +0000 (21:11 +0000)]
Fix ASAN crash inside btif_av_event_deep_copy()
am: 6d07e45b9a

Change-Id: I67be39dfaa463b7d2ab8124001f8edb342a338e6

6 years agoReturn the correct status when BTA_AV Open failed because of role switch
Pavlin Radoslavov [Tue, 12 Sep 2017 21:11:25 +0000 (21:11 +0000)]
Return the correct status when BTA_AV Open failed because of role switch
am: 54bdc23b04

Change-Id: I8ad18c4488fbe5c33aaea72b5b113270c974aef3

6 years agobtm: Clear LINK_KEY_KNOWN flag for temporary connections
Myles Watson [Tue, 12 Sep 2017 15:23:23 +0000 (08:23 -0700)]
btm: Clear LINK_KEY_KNOWN flag for temporary connections

Bug: 62561154
Test: Smart Setup, erase target, Smart Setup
Change-Id: Icba672a38772dc99a74f351301c81d66f37ee929

6 years agoFix ASAN crash inside btif_av_event_deep_copy()
Pavlin Radoslavov [Tue, 12 Sep 2017 19:08:49 +0000 (12:08 -0700)]
Fix ASAN crash inside btif_av_event_deep_copy()

Allocate sufficient data on the stack that can be safely copied inside
btif_av_event_deep_copy()

Bug: 65524264
Test: Run Bluetooth on ASAN enabled build
Change-Id: Ie6d4a28933302131c58eb4aee34161e435634377

6 years agoReturn the correct status when BTA_AV Open failed because of role switch
Pavlin Radoslavov [Tue, 12 Sep 2017 18:51:21 +0000 (11:51 -0700)]
Return the correct status when BTA_AV Open failed because of role switch

Bug: 65588660
Test: Code compilation
Change-Id: I705ec28c76f2342e18bece193005c962b9febac8

6 years agoFix MAC address byte ordering in the uniq field am: 7bc0edda0f
Kim Low [Tue, 12 Sep 2017 19:07:02 +0000 (19:07 +0000)]
Fix MAC address byte ordering in the uniq field am: 7bc0edda0f
am: ca395d2933

Change-Id: I8612b828de29fe173194d881a4da65c14ccb468e

6 years agoFix MAC address byte ordering in the uniq field
Kim Low [Tue, 12 Sep 2017 19:03:32 +0000 (19:03 +0000)]
Fix MAC address byte ordering in the uniq field
am: 7bc0edda0f

Change-Id: I3696cff5ff5d233823c102024aa1ea34449008c3

6 years agoFix MAC address byte ordering in the uniq field
Kim Low [Thu, 6 Apr 2017 01:01:34 +0000 (18:01 -0700)]
Fix MAC address byte ordering in the uniq field

The UNIQ field can be used in the driver to detect duplicate devices.
For example, if a controller is connected via both Bluetooth and USB,
the driver can use the UNIQ field, which typically contains the unique
MAC address to identify that it's the same device.

Test: Connect a Bluetooth device and check its MAC address using
      ioctl(EVIOCGUNIQ) call.
Change-Id: I458608e845fcb24c0d615f6aef8d92ccb08d08ec

6 years agostack: Fix btm_send_link_key_notif comment am: 8c75f731fe am: 20430874dc
Myles Watson [Tue, 12 Sep 2017 16:08:51 +0000 (16:08 +0000)]
stack: Fix btm_send_link_key_notif comment am: 8c75f731fe am: 20430874dc
am: 5976f2e37b

Change-Id: I2e289b4c6d17fbc73460c348cc326852535fb874

6 years agostack: Fix btm_send_link_key_notif comment am: 8c75f731fe
Myles Watson [Tue, 12 Sep 2017 16:06:20 +0000 (16:06 +0000)]
stack: Fix btm_send_link_key_notif comment am: 8c75f731fe
am: 20430874dc

Change-Id: If2dc23ac6d0c5e54ddf8c71be1fb287cc662792b

6 years agostack: Fix btm_send_link_key_notif comment
Myles Watson [Tue, 12 Sep 2017 16:03:49 +0000 (16:03 +0000)]
stack: Fix btm_send_link_key_notif comment
am: 8c75f731fe

Change-Id: I578ce4ed7eebb86daf7dc4b3e02a03507e3aae7c

6 years agostack: Fix btm_send_link_key_notif comment
Myles Watson [Tue, 12 Sep 2017 14:08:13 +0000 (07:08 -0700)]
stack: Fix btm_send_link_key_notif comment

Test: build
Change-Id: I212ac76af9fab7b11d02120cae5f6eeec14baf69