OSDN Git Service

android-x86/system-bt.git
6 years agoRemoved alarm callback execution statistics
Pavlin Radoslavov [Mon, 8 Jan 2018 19:37:05 +0000 (11:37 -0800)]
Removed alarm callback execution statistics

Updating the alarm state after the callback returns can be problematic
in case the callback itself deleted the alarm.

Bug: 67110137
Test: Manual
Change-Id: Id4de06eebedb792cadd63d09efb68672e9bddc69
Merged-In: Id4de06eebedb792cadd63d09efb68672e9bddc69
(cherry picked from commit 04574e1cde3b0d46b59b4b6ebab935ac60af9f97)

6 years agoDO NOT MERGE ANYWHERE: Disable the use of GATT cache by default. am: b050cd5d9a ...
Jacky Cheung [Fri, 1 Dec 2017 22:55:37 +0000 (22:55 +0000)]
DO NOT MERGE ANYWHERE: Disable the use of GATT cache by default. am: b050cd5d9a  -s ours am: 148f6d31a0  -s ours am: fab8ca8793  -s ours
am: 3ed011da88  -s ours

Change-Id: Ibe322547dff301c4c0e48420cbed243a0f826741

6 years agoDO NOT MERGE ANYWHERE: Disable the use of GATT cache by default. am: b050cd5d9a ...
Jacky Cheung [Fri, 1 Dec 2017 22:53:37 +0000 (22:53 +0000)]
DO NOT MERGE ANYWHERE: Disable the use of GATT cache by default. am: b050cd5d9a  -s ours am: 148f6d31a0  -s ours
am: fab8ca8793  -s ours

Change-Id: If61e7c4dd96815a9d423ea7d0f778573f13f2b78

6 years agoDO NOT MERGE ANYWHERE: Disable the use of GATT cache by default. am: b050cd5d9a ...
Jacky Cheung [Fri, 1 Dec 2017 22:51:36 +0000 (22:51 +0000)]
DO NOT MERGE ANYWHERE: Disable the use of GATT cache by default. am: b050cd5d9a  -s ours
am: 148f6d31a0  -s ours

Change-Id: I9393ade6467b657ac813666d9f0e1a1937575024

6 years agoDO NOT MERGE ANYWHERE: Disable the use of GATT cache by default.
Jacky Cheung [Fri, 1 Dec 2017 22:49:36 +0000 (22:49 +0000)]
DO NOT MERGE ANYWHERE: Disable the use of GATT cache by default.
am: b050cd5d9a  -s ours

Change-Id: Iaf10a993829cebefecbf49290dd0db345cd71dde

6 years agoDO NOT MERGE ANYWHERE: Disable the use of GATT cache by default.
Jacky Cheung [Tue, 7 Nov 2017 19:17:38 +0000 (11:17 -0800)]
DO NOT MERGE ANYWHERE: Disable the use of GATT cache by default.

When a set of GATT services of a bonded device is cached locally,
an application needs to call BluetoothGatt.refresh() to clear it out
and to trigger a new service discovery.  By disabling local caching,
a service discovery is performed on every connection and that prevents
an application from getting staled GATT services.

bug: 68954828
Change-Id: I2c07404c3d56a5c8a0ffc86bc65d36480f3c46f2

6 years agoFix crash in l2cble_start_conn_update
Jakub Pawlowski [Fri, 13 Oct 2017 16:51:06 +0000 (09:51 -0700)]
Fix crash in l2cble_start_conn_update

Bug: 67774334
Test: compilation
Change-Id: I42ec986c6c5f3fe81f507596bf1df05dcf3ec0ba
(cherry picked from 5e8d54e6c26c3bc8ced932bb9c455bbbad57a9db)

6 years agoRead the correct amount of attributes am: 4d1470eb54 am: 48e5396b99 am: 57f958e7e3...
Scott Bauer [Thu, 12 Oct 2017 00:26:02 +0000 (00:26 +0000)]
Read the correct amount of attributes am: 4d1470eb54 am: 48e5396b99 am: 57f958e7e3 am: e69e6e0fab am: 1e67cf4b2e am: 930d16464f
am: 4010328f80

Change-Id: Ic069690e99651d756f923f6b276f0de85c2ac2c8

6 years agoRead the correct amount of attributes am: 636b754cfa am: 5ec93991d7 am: 6e7c360c85...
Scott Bauer [Thu, 12 Oct 2017 00:25:25 +0000 (00:25 +0000)]
Read the correct amount of attributes am: 636b754cfa am: 5ec93991d7 am: 6e7c360c85 am: a51aaf2366
am: 15ce434f4b

Change-Id: Ib890b147a7bd77c4987503d8b62400a5735ad036

6 years agoRead the correct amount of attributes am: 8eb6493ad5 -s ours am: 95b2e35d5d
Scott Bauer [Thu, 12 Oct 2017 00:25:01 +0000 (00:25 +0000)]
Read the correct amount of attributes am: 8eb6493ad5  -s ours am: 95b2e35d5d
am: f00207c227

Change-Id: I4128915b2b6e914a7798c9e4fa885cddce4d28a1

6 years agoRead the correct amount of attributes am: 4d1470eb54 am: 48e5396b99 am: 57f958e7e3...
Scott Bauer [Thu, 12 Oct 2017 00:24:24 +0000 (00:24 +0000)]
Read the correct amount of attributes am: 4d1470eb54 am: 48e5396b99 am: 57f958e7e3 am: e69e6e0fab am: 1e67cf4b2e
am: 930d16464f

Change-Id: I99851e43afe1fa26d9efa4eccea583250586dc0d

6 years agoRead the correct amount of attributes am: 636b754cfa am: 5ec93991d7 am: 6e7c360c85
Scott Bauer [Thu, 12 Oct 2017 00:21:50 +0000 (00:21 +0000)]
Read the correct amount of attributes am: 636b754cfa am: 5ec93991d7 am: 6e7c360c85
am: a51aaf2366

Change-Id: Ie8dfa4cff72aef91a87b4dbbc5b82f88213994e2

6 years agoRead the correct amount of attributes am: 8eb6493ad5 -s ours
Scott Bauer [Thu, 12 Oct 2017 00:21:26 +0000 (00:21 +0000)]
Read the correct amount of attributes am: 8eb6493ad5  -s ours
am: 95b2e35d5d

Change-Id: I0956d72a77cfd13dd6dca526cad54c402991ab44

6 years agoRead the correct amount of attributes am: 4d1470eb54 am: 48e5396b99 am: 57f958e7e3...
Scott Bauer [Thu, 12 Oct 2017 00:20:01 +0000 (00:20 +0000)]
Read the correct amount of attributes am: 4d1470eb54 am: 48e5396b99 am: 57f958e7e3 am: e69e6e0fab
am: 1e67cf4b2e

Change-Id: Ic0858b82dd5c15b824a74e53817e42e1945d1a7d

6 years agoRead the correct amount of attributes am: 636b754cfa am: 5ec93991d7
Scott Bauer [Thu, 12 Oct 2017 00:19:36 +0000 (00:19 +0000)]
Read the correct amount of attributes am: 636b754cfa am: 5ec93991d7
am: 6e7c360c85

Change-Id: Icb1240a22b2cfc7fa32b3ab23652fa1510b3c590

6 years agoRead the correct amount of attributes
Scott Bauer [Thu, 12 Oct 2017 00:18:39 +0000 (00:18 +0000)]
Read the correct amount of attributes
am: 8eb6493ad5  -s ours

Change-Id: I73a8ff63af23863be10d8cdd4da73234fcd25e3d

6 years agoMerge "Read the correct amount of attributes" into oc-dev am: 83aee7b3ba
Scott Bauer [Wed, 11 Oct 2017 23:30:54 +0000 (23:30 +0000)]
Merge "Read the correct amount of attributes" into oc-dev am: 83aee7b3ba
am: c7706eef3e

Change-Id: Icede213590da36c16291cfa0fd001265f2728da4

6 years agoMerge "Read the correct amount of attributes" into oc-dev
Scott Bauer [Wed, 11 Oct 2017 23:23:47 +0000 (23:23 +0000)]
Merge "Read the correct amount of attributes" into oc-dev
am: 83aee7b3ba

Change-Id: I633e4d7fbcb48387ca092e5e19a6f5c0ba015072

6 years agoMerge "Read the correct amount of attributes" into oc-dev
TreeHugger Robot [Wed, 11 Oct 2017 23:11:13 +0000 (23:11 +0000)]
Merge "Read the correct amount of attributes" into oc-dev

6 years agoRead the correct amount of attributes am: 4d1470eb54 am: 48e5396b99 am: 57f958e7e3
Scott Bauer [Wed, 11 Oct 2017 22:38:19 +0000 (22:38 +0000)]
Read the correct amount of attributes am: 4d1470eb54 am: 48e5396b99 am: 57f958e7e3
am: e69e6e0fab

Change-Id: I4a4802e3bf181f09d8de652d991cc26686e467e4

6 years agoRead the correct amount of attributes am: 636b754cfa
Scott Bauer [Wed, 11 Oct 2017 22:37:12 +0000 (22:37 +0000)]
Read the correct amount of attributes am: 636b754cfa
am: 5ec93991d7

Change-Id: I69bd3d4e294765feade3840d9f1710cfa1cdc69b

6 years agoRead the correct amount of attributes am: 4d1470eb54 am: 48e5396b99
Scott Bauer [Wed, 11 Oct 2017 22:34:23 +0000 (22:34 +0000)]
Read the correct amount of attributes am: 4d1470eb54 am: 48e5396b99
am: 57f958e7e3

Change-Id: I3a664ecfa9eebde0459f299fa3a26c70c528e3b8

6 years agoRead the correct amount of attributes
Scott Bauer [Wed, 11 Oct 2017 22:33:55 +0000 (22:33 +0000)]
Read the correct amount of attributes
am: 636b754cfa

Change-Id: I43948bbb53b3075e7e7b016b9127f38245a8f9da

6 years agoRead the correct amount of attributes am: 4d1470eb54
Scott Bauer [Wed, 11 Oct 2017 22:28:54 +0000 (22:28 +0000)]
Read the correct amount of attributes am: 4d1470eb54
am: 48e5396b99

Change-Id: I93404b4895d4609e9f0afbc9d020cfae20f4f820

6 years agoRead the correct amount of attributes
Scott Bauer [Wed, 11 Oct 2017 22:26:14 +0000 (22:26 +0000)]
Read the correct amount of attributes
am: 4d1470eb54

Change-Id: I153a91a1aba1a78837c397d4ee01bea2d1696e4e

6 years agoHCI: Restart 5 seconds after an HCI timeout
Myles Watson [Fri, 6 Oct 2017 18:22:51 +0000 (11:22 -0700)]
HCI: Restart 5 seconds after an HCI timeout

Bug: 67209266
Test: build
Change-Id: I69a4a17382742327268a80dbc5c5be49059ecb3c
(cherry picked from commit d48d32d04ae9f4d81012f2146f8e746c4a05a0f9)
Merged-In: I69a4a17382742327268a80dbc5c5be49059ecb3c

6 years agoA2DP: Advance btif profile queue on OPENING->other_state transition
Jack He [Mon, 2 Oct 2017 21:07:33 +0000 (14:07 -0700)]
A2DP: Advance btif profile queue on OPENING->other_state transition

* Entering BTIF_AV_STATE_OPENING is only possible through
  BTIF_AV_CONNECT_REQ_EVT (initiated by us) OR
  BTA_AV_PENDING_EVT (initiated by remote)
  from BTIF_AV_STATE_IDLE
* If we go from BTIF_AV_CONNECT_REQ_EVT, we must have a pending
  connection request in btif_profile_queue that should be advanced when
  we quit BTIF_AV_STATE_OPENING state
* This CL adds a flag to indicate whether an AV connection is initiated
  by us and only advance queue when it is
* Also add queue advancement in BTA_AV_REJECT_EVT and BTA_AV_CLOSE_EVT

Bug: 67317954
Test: make
Change-Id: I16dc8ebf76c6edaacb1f7a4a44e604170ff9a8b0
(cherry picked from commit a3626477587e99347dcf966087497e9a1c4732a4)

6 years agoHandle Disconnect request in AV Opening State handler
c_sdamga [Mon, 20 Jul 2015 13:47:04 +0000 (19:17 +0530)]
Handle Disconnect request in AV Opening State handler

Usecase:
1. Uncheck media from settings UI
2. initiate A2dp connection from remote, send AVRCP play from remote

Failure:
A2dp connection stuck in opening state.

Rootcause:
When A2dp is unchecked from settings UI and remote initiated
a2dp connection and AVRCP play, music starts streaming on DUT
since A2dp connection disconnected. As A2dp connection was not
completed, btif state stuck in opening state.

Fix:
Handled the disconnection request in the opening state
so that AV state machine moves to proper state before
processing AVRCP Play.

Test: 1. Uncheck media from settings UI
2. initiate A2dp connection from remote, send AVRCP play

Bug: 35415160
Change-Id: If1cda5b78100419fdc60c97349efafdd4a18d40c
(cherry picked from commit ff1b9d26ca9a5a25d45bab09df1c0346104051a9)

6 years agoFix adv instance validity check during suspend and resume of resolving list
Subramanian Srinivasan [Fri, 29 Sep 2017 01:41:03 +0000 (18:41 -0700)]
Fix adv instance validity check during suspend and resume of resolving list

When BT is shutdown, multi advertisement instance pointer is made
null by BleAdvertisingManager::CleanUp function.
Any subsequent BleAdvertisingManager::Get function call made at
this point(eg during suspension and resumption of resolving list
activity)leads to a crash as the instance pointer is null.
Hence, use BleAdvertisingManager::IsInitialized function instead
of BleAdvertisingManager::Get function to check the validity of
multi advertisement instance.

Bug: 67325491
Change-Id: Ibbae7fa546bb52494be78eaff6d4b7b15614ab15

6 years agoMerge "Added extra A2DP logging when there is an error" into oc-mr1-dev
TreeHugger Robot [Wed, 4 Oct 2017 23:21:12 +0000 (23:21 +0000)]
Merge "Added extra A2DP logging when there is an error" into oc-mr1-dev

6 years agoAdded extra A2DP logging when there is an error
Pavlin Radoslavov [Wed, 4 Oct 2017 12:36:25 +0000 (05:36 -0700)]
Added extra A2DP logging when there is an error

Bug: 64159791
Test: Manual
Change-Id: Ic1001892b7abc9784a21a183d141df51b1b92fc0

6 years agoDecrese the default verbosity for A2DP codec info logs
Pavlin Radoslavov [Wed, 4 Oct 2017 18:26:04 +0000 (11:26 -0700)]
Decrese the default verbosity for A2DP codec info logs

Bug: 64159791
Test: Manual
Change-Id: Ida10f5d2aa6643df136a41891d7775e175c06570

6 years agoRemove casts to (tBTA_GATTC*) unions to avoid unaligned accesses
Pavlin Radoslavov [Fri, 29 Sep 2017 01:11:06 +0000 (18:11 -0700)]
Remove casts to (tBTA_GATTC*) unions to avoid unaligned accesses

Bug: 65381426
Test: unit tests
Change-Id: I37e89ec7187ab1c61be4c736385a9fc5ec88d737
(cherry picked from commit b147c652e90c60daa7113933c48a465491707213)

6 years agoFixed the implementation of std::equal_to<bt_bdaddr_t> am: 181144a501
Pavlin Radoslavov [Tue, 3 Oct 2017 14:28:01 +0000 (14:28 +0000)]
Fixed the implementation of std::equal_to<bt_bdaddr_t> am: 181144a501
am: eb9ba99523  -s ours

Change-Id: Ib581c7f9b6474c68956de8a41efadff9f8572545

6 years agoFixed the implementation of std::equal_to<bt_bdaddr_t>
Pavlin Radoslavov [Tue, 3 Oct 2017 05:15:41 +0000 (05:15 +0000)]
Fixed the implementation of std::equal_to<bt_bdaddr_t>
am: 181144a501

Change-Id: Ic8e35d75ebe14eccd7fd169572fe5bff39d150f6

6 years agoFixed the implementation of std::equal_to<bt_bdaddr_t>
Pavlin Radoslavov [Wed, 30 Aug 2017 00:03:21 +0000 (17:03 -0700)]
Fixed the implementation of std::equal_to<bt_bdaddr_t>

Now we correctly suppress the processing of repetitive
BLE scan results.

Test: Manual with extra log messages
Bug: 65174158
Bug: 64975965
Change-Id: Ic4386c5e2fbabdc218f6ec675c5b298a7af41e5a
Merged-In: Ie0694843ad5fbd2a80b310c5f532e5e5a9548043

6 years agoRemove casts to unions to avoid unaligned accesses
Myles Watson [Tue, 19 Sep 2017 17:01:28 +0000 (10:01 -0700)]
Remove casts to unions to avoid unaligned accesses

Bug: 65392204
Test: sanity
Change-Id: I2886cc02289b68710e83147ba4d7715a32a4fc55
(cherry picked from commit 8d749047a084b2d8a18fcaaac5c585e97a16f58d)
Merged-In: I2886cc02289b68710e83147ba4d7715a32a4fc55

6 years agoHID: Free process_repage_timer to prevent leak
Hemant Gupta [Wed, 13 Sep 2017 12:05:03 +0000 (17:35 +0530)]
HID: Free process_repage_timer to prevent leak

Usecase:
1) Perform BT on/off stress test
2) Check for memory leakage in code in subsequent BT on/off usecase

Expectation
No memory leak during BT on/off stress test

Observed result
Memory leakage in hid code where alarm process_repage_timer is not freed
and only cancelled

Fix:
Free alarm process_repage_timer during HID Host deregstration

Test: Checked with BT on/off usecase, and alarm process_repage_timer is now
freed in every BT on/off usecase.

Bug: 65657207
Change-Id: Iccecd126716a5660f4c37ddc917bacee84342297
(cherry picked from commit e6b15cf8251643aced0baf716939a6d0857fccfb)

6 years agoRead the correct amount of attributes
Scott Bauer [Fri, 7 Apr 2017 00:35:40 +0000 (18:35 -0600)]
Read the correct amount of attributes

bta_gattc_cache_load currently attempts to read 0xFF attributes into an
allocation sized to num_attr attributes, which can be smaller than 0xFF.

There aren't more than num_attr bytes in correct data, but this breaks
with dynamic buffer overflow checking in CopperheadOS for the read
system call since fread ends up calling read, which obtains the size of
the allocation from the malloc implementation and then aborts due to the
(potential) overflow.

This would also fail with the default enabled _FORTIFY_SOURCE=2 feature
in the Android Open Source Project if osi_malloc was marked with the
alloc_size attribute. The way it wraps malloc loses that information so
fortify checks aren't done for calls like this.

Bug: 37160362
Change-Id: I68bd170d5378c9d9d21cbda376083bc0b857e15c
Signed-off-by: Scott Bauer <sbauer@plzdonthack.me>
[migrated to C++ file, added 0xFFFF limit and wrote commit message]
Signed-off-by: Daniel Micay <danielmicay@gmail.com>
6 years agoRead the correct amount of attributes
Scott Bauer [Fri, 7 Apr 2017 00:35:40 +0000 (18:35 -0600)]
Read the correct amount of attributes

bta_gattc_cache_load currently attempts to read 0xFF attributes into an
allocation sized to num_attr attributes, which can be smaller than 0xFF.

There aren't more than num_attr bytes in correct data, but this breaks
with dynamic buffer overflow checking in CopperheadOS for the read
system call since fread ends up calling read, which obtains the size of
the allocation from the malloc implementation and then aborts due to the
(potential) overflow.

This would also fail with the default enabled _FORTIFY_SOURCE=2 feature
in the Android Open Source Project if osi_malloc was marked with the
alloc_size attribute. The way it wraps malloc loses that information so
fortify checks aren't done for calls like this.

Bug: 37160362
Change-Id: I68bd170d5378c9d9d21cbda376083bc0b857e15c
Signed-off-by: Scott Bauer <sbauer@plzdonthack.me>
[migrated to C++ file, added 0xFFFF limit and wrote commit message]
Signed-off-by: Daniel Micay <danielmicay@gmail.com>
6 years agoRead the correct amount of attributes
Scott Bauer [Fri, 7 Apr 2017 00:35:40 +0000 (18:35 -0600)]
Read the correct amount of attributes

bta_gattc_cache_load currently attempts to read 0xFF attributes into an
allocation sized to num_attr attributes, which can be smaller than 0xFF.

There aren't more than num_attr bytes in correct data, but this breaks
with dynamic buffer overflow checking in CopperheadOS for the read
system call since fread ends up calling read, which obtains the size of
the allocation from the malloc implementation and then aborts due to the
(potential) overflow.

This would also fail with the default enabled _FORTIFY_SOURCE=2 feature
in the Android Open Source Project if osi_malloc was marked with the
alloc_size attribute. The way it wraps malloc loses that information so
fortify checks aren't done for calls like this.

Bug: 37160362
Change-Id: I68bd170d5378c9d9d21cbda376083bc0b857e15c
Signed-off-by: Scott Bauer <sbauer@plzdonthack.me>
[migrated to C++ file, added 0xFFFF limit and wrote commit message]
Signed-off-by: Daniel Micay <danielmicay@gmail.com>
6 years agoRead the correct amount of attributes
Scott Bauer [Fri, 7 Apr 2017 00:35:40 +0000 (18:35 -0600)]
Read the correct amount of attributes

bta_gattc_cache_load currently attempts to read 0xFF attributes into an
allocation sized to num_attr attributes, which can be smaller than 0xFF.

There aren't more than num_attr bytes in correct data, but this breaks
with dynamic buffer overflow checking in CopperheadOS for the read
system call since fread ends up calling read, which obtains the size of
the allocation from the malloc implementation and then aborts due to the
(potential) overflow.

This would also fail with the default enabled _FORTIFY_SOURCE=2 feature
in the Android Open Source Project if osi_malloc was marked with the
alloc_size attribute. The way it wraps malloc loses that information so
fortify checks aren't done for calls like this.

Bug: 37160362
Change-Id: I68bd170d5378c9d9d21cbda376083bc0b857e15c
Signed-off-by: Scott Bauer <sbauer@plzdonthack.me>
[migrated to C++ file, added 0xFFFF limit and wrote commit message]
Signed-off-by: Daniel Micay <danielmicay@gmail.com>
6 years agoDon't set CT2 bit when talking to pre-5.0 devices
Jakub Pawlowski [Wed, 27 Sep 2017 22:41:13 +0000 (15:41 -0700)]
Don't set CT2 bit when talking to pre-5.0 devices

Prior to 5.0 spec, CT2 bit in AuthReq was reserved. Setting it cause
bonding failure with devices that handle it incorrectly.

Bug: 66179701
Bug: 66931978
Test: Bond with device that have 4.2 chip
Change-Id: Idbbf2c39c499698844218059a35cb686996c136a

6 years agoFix build error for AVRCP13 compat fix am: 544f7e1be9
Andre Eisenbach [Fri, 22 Sep 2017 20:19:48 +0000 (20:19 +0000)]
Fix build error for AVRCP13 compat fix am: 544f7e1be9
am: 7b1e826e9c

Change-Id: I5813e2869be1b9ef4e1e36b92a6da96a38948fd9

6 years agoChange our AVRCP capabilities if the remote device only supports 1.3 am: c8ab11a06a
Ajay Panicker [Fri, 22 Sep 2017 20:19:43 +0000 (20:19 +0000)]
Change our AVRCP capabilities if the remote device only supports 1.3 am: c8ab11a06a
am: 38cb8be9c3

Change-Id: I4951d1ba9a0e086b89340cf3cf00bcaf66b084ad

6 years agoFix build error for AVRCP13 compat fix
Andre Eisenbach [Fri, 22 Sep 2017 20:15:26 +0000 (20:15 +0000)]
Fix build error for AVRCP13 compat fix
am: 544f7e1be9

Change-Id: I4acd192aea9c8c72d3ad1ab6c7b3f3ccf9bb868f

6 years agoChange our AVRCP capabilities if the remote device only supports 1.3
Ajay Panicker [Fri, 22 Sep 2017 20:15:23 +0000 (20:15 +0000)]
Change our AVRCP capabilities if the remote device only supports 1.3
am: c8ab11a06a

Change-Id: I0aee338bc6c387ea6060637c74d89fa0745c40e5

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)
(cherry picked from commit ff2d86ed3af91099597d033a76a143437543d6fd)

6 years agoGAP: Set service_id before calling gap_release_ccb am: 4c6208fd2d
Myles Watson [Thu, 21 Sep 2017 22:01:26 +0000 (22:01 +0000)]
GAP: Set service_id before calling gap_release_ccb am: 4c6208fd2d
am: acf7e8e1ac

Change-Id: Ie4e81653a6a05a050f2c369cafc02ff4cb41da3e

6 years agoGAP: Set service_id before calling gap_release_ccb
Myles Watson [Thu, 21 Sep 2017 21:52:54 +0000 (21:52 +0000)]
GAP: Set service_id before calling gap_release_ccb
am: 4c6208fd2d

Change-Id: I705d78e301414308a7150a20576f61a9e95f35c3

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)
(cherry picked from commit 4023c6731d5e991c6202d4e499b9dd43d642fb3c)

6 years agoEnable extra A2DP control log messages
Pavlin Radoslavov [Wed, 20 Sep 2017 03:29:33 +0000 (20:29 -0700)]
Enable extra A2DP control log messages

Also, fixed a log message when failed to accept the
corresponding socket socket.

Test: manual
Bug: 63949429
Change-Id: I6d9af32f61974a739d179c37da36c360aefcca79
(cherry picked from commit 7b67302a28019468ae6df9cdb7f9085c6579b859)

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: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 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
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 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 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 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 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.
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 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 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 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 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 alarms being posted on wrong thread
Jakub Pawlowski [Fri, 8 Sep 2017 18:26:25 +0000 (11:26 -0700)]
Fix alarms being posted on wrong thread

Alarms from btu_bta_alarm_queue and btu_generic_alarm_queue should be
processed on the main MessageLoop thread.
Replaced obsoleted alarm_set_on_queue() alarm API with the new
alarm_set_on_mloop() API

Test: manual
Bug: 65078753
Change-Id: I54b472b39b44a6c541dbdcdad7414056d0dd4163
Merged-In: I54b472b39b44a6c541dbdcdad7414056d0dd4163
(cherry picked from commit be8bbd7a83ec8bc900fac58a03010fbcb74956c9)

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

6 years agoRead the Tx Power level when flushing the A2DP Tx queue
Pavlin Radoslavov [Fri, 1 Sep 2017 23:40:59 +0000 (16:40 -0700)]
Read the Tx Power level when flushing the A2DP Tx queue

Also, minor renaming and cleanup (for consistency).

Test: Streaming A2DP headset and trigger audio stutter
Bug: 64038257
Change-Id: Id722342b596e0bf3c9c7664272b6d3e311bb82e9
(cherry picked from commit c7bf47cefc5446e99ff12b6cae45a0984e0b9999)

6 years agoImplement HCI_Read_Automatic_Flush_Timeout mechanism
Pavlin Radoslavov [Fri, 1 Sep 2017 23:09:27 +0000 (16:09 -0700)]
Implement HCI_Read_Automatic_Flush_Timeout mechanism

Also, read the Automatic Flush Timeout when flushing the A2DP Tx queue

Test: Streaming A2DP headset and trigger audio stutter
Bug: 64038257
Change-Id: Ic49b5236328ddacde1d7f2aee131e35e317a14ef
(cherry picked from commit b8568ae0e198a84225c9fdef1e715dc4d45565c9)

6 years agoFix GATT log spam
Jakub Pawlowski [Wed, 6 Sep 2017 15:41:46 +0000 (08:41 -0700)]
Fix GATT log spam

Bug: 65255942
Test: manual
Change-Id: I212bc93149dc514517f409edc36f74e1c2895d96

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

6 years agoMerge "Implement HCI_Read_Failed_Contact_Counter mechanism" into oc-mr1-dev
TreeHugger Robot [Sat, 2 Sep 2017 02:46:29 +0000 (02:46 +0000)]
Merge "Implement HCI_Read_Failed_Contact_Counter mechanism" into oc-mr1-dev

6 years agoMerge "Bluetooth: Add AVRCP 1.3 as a developer option for AVRCP version (2/2)" into...
TreeHugger Robot [Sat, 2 Sep 2017 00:32:33 +0000 (00:32 +0000)]
Merge "Bluetooth: Add AVRCP 1.3 as a developer option for AVRCP version (2/2)" into oc-mr1-dev

6 years agoBluetooth: Add AVRCP 1.3 as a developer option for AVRCP version (2/2)
Ajay Panicker [Fri, 1 Sep 2017 19:07:42 +0000 (12:07 -0700)]
Bluetooth: Add AVRCP 1.3 as a developer option for AVRCP version (2/2)

This is requied for the 2012 Mazda 3 carkit as the carkit refuses to send
AVRCP commands other than passthrough commands when the version is anything
else. AVRCP 1.3 is compatible with most carkits on the market and can be
used to get most carkits working at the cost of losing many features.

Bug: 37943083
Test: Set AVRCP 1.3 in developer options and see that SDP and the AVRCP
      capabilites have updated to reflect this.
      TestTracker: 105915/3975

Change-Id: Iffc7ed1dd91eecb699153125b25451de5826f202

6 years agoImplement HCI_Read_Failed_Contact_Counter mechanism
Pavlin Radoslavov [Fri, 1 Sep 2017 05:06:11 +0000 (22:06 -0700)]
Implement HCI_Read_Failed_Contact_Counter mechanism

Also, read the Failed Contact Counter when flushing the A2DP Tx queue

Test: Streaming A2DP headset and trigger audio stutter
Bug: 64038257
Change-Id: I8ff72560e3840c5c22cfac9613c4be670b8a4cf1
(cherry picked from commit 6ab749f3cfd9c7660bb245764fcd01dcff51dbe9)

6 years agoMerge "BTIF: Add meaningful logging to btif_profile_queue" into oc-mr1-dev
TreeHugger Robot [Fri, 1 Sep 2017 18:13:27 +0000 (18:13 +0000)]
Merge "BTIF: Add meaningful logging to btif_profile_queue" into oc-mr1-dev

6 years agoMerge "RFCOMM: Add more logging during port close" into oc-mr1-dev
TreeHugger Robot [Fri, 1 Sep 2017 18:10:20 +0000 (18:10 +0000)]
Merge "RFCOMM: Add more logging during port close" into oc-mr1-dev

6 years agoBTIF: Add meaningful logging to btif_profile_queue
Jack He [Wed, 30 Aug 2017 18:13:08 +0000 (11:13 -0700)]
BTIF: Add meaningful logging to btif_profile_queue

* Add INFO logging to add/advance/execute functions in
  btif_profile_queue
* Add ERROR logging to add failures

Bug: 65051171
Test: Try connection to multiple profiles
Change-Id: I058ad06a45eeceb4d160af472f317d08843ca6bf
(cherry picked from commit f42cf2b48f4c73fa2e6e6511b20d98a9ab665a7e)

6 years agoMerge "Don't reject notifications and wait until new addressed player is ready (2...
Ajay Panicker [Fri, 1 Sep 2017 16:15:13 +0000 (16:15 +0000)]
Merge "Don't reject notifications and wait until new addressed player is ready (2/2)" into oc-mr1-dev

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

6 years agoRFCOMM: Add more logging during port close
Jack He [Wed, 30 Aug 2017 19:00:41 +0000 (12:00 -0700)]
RFCOMM: Add more logging during port close

* Log MAC address and UUIDs of closed connections
* Log reasons for RFCOMM closure when generic CLOSE is used
  as reason

Bug: 65080465
Test: Use profiles that use RFCOMM
Change-Id: Iff9f7537989e51d7b98f7cf1241db3f196f501d7
(cherry picked from commit 074867d4c7c966758eddbe30294c4a9b6459c8dd)

6 years agoMerge "Limit the maximum number of entries in the remote bdaddr cache to 1024" into...
TreeHugger Robot [Thu, 31 Aug 2017 21:16:24 +0000 (21:16 +0000)]
Merge "Limit the maximum number of entries in the remote bdaddr cache to 1024" into oc-mr1-dev

6 years agoMerge "Add / update log messages during stack startup / shutdown" into oc-mr1-dev
TreeHugger Robot [Thu, 31 Aug 2017 21:12:29 +0000 (21:12 +0000)]
Merge "Add / update log messages during stack startup / shutdown" into oc-mr1-dev

6 years agoAdd / update log messages during stack startup / shutdown
Pavlin Radoslavov [Tue, 29 Aug 2017 17:00:21 +0000 (10:00 -0700)]
Add / update log messages during stack startup / shutdown

Test: manual
Bug: 64975965
Change-Id: I22ae7cad3b0ef3b7eb7ea2b7b6f93449a6363070
(cherry picked from commit 303ff4cee3830fa9c1f9f8f30ca1b7a9dd95fe0d)

6 years agoLimit the maximum number of entries in the remote bdaddr cache to 1024
Pavlin Radoslavov [Tue, 29 Aug 2017 00:42:46 +0000 (17:42 -0700)]
Limit the maximum number of entries in the remote bdaddr cache to 1024

Also, renamed p_dev_cb to remote_bdaddr_cache.

Bug: 64975965
Test: BLE scanning
Change-Id: I518390c53c5ff2a24ac9f010464225d763b33228
(cherry picked from commit a375c31ae34dd49c48f12a15d4af003a864bd979)