OSDN Git Service

android-x86/system-bt.git
5 years ago[automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205...
Xin Li [Thu, 13 Dec 2018 21:31:02 +0000 (13:31 -0800)]
[automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master" am: cb7dcad70d  -s ours
am: 2f24d9ccc9  -s ours

Change-Id: Ifcdb0d9bc09fe02a35d7a21f2a6a612c392e4741

5 years ago[automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205...
Xin Li [Thu, 13 Dec 2018 21:27:59 +0000 (13:27 -0800)]
[automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master"
am: cb7dcad70d  -s ours

Change-Id: I3937cd25882e43468acb0d0192a5ccd34aa59091

5 years ago[automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001)...
Xin Li [Thu, 13 Dec 2018 20:20:55 +0000 (12:20 -0800)]
[automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master am: 1083b621e4  -s ours
am: 193454c2f5  -s ours

Change-Id: I9220d2fbd647f37883e3fae57dddccb57660990a

5 years ago[automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001)...
Xin Li [Thu, 13 Dec 2018 19:25:51 +0000 (11:25 -0800)]
[automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
am: 1083b621e4  -s ours

Change-Id: I050265331bd4a18405f7d6f93b03125a1fc659ae

5 years agoFix performance-for-range-copy warnings am: 01a40403d7
Chih-Hung Hsieh [Thu, 13 Dec 2018 19:08:56 +0000 (11:08 -0800)]
Fix performance-for-range-copy warnings am: 01a40403d7
am: 864618752b

Change-Id: I4d306d3f51fe634e5e638423400870b158098633

5 years agoFix performance-for-range-copy warnings
Chih-Hung Hsieh [Thu, 13 Dec 2018 18:48:26 +0000 (10:48 -0800)]
Fix performance-for-range-copy warnings
am: 01a40403d7

Change-Id: Ife0d8af7af4a5ac26dfe7d735bbc65460d1beb70

5 years agoMerge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master"
Treehugger Robot [Thu, 13 Dec 2018 05:45:20 +0000 (05:45 +0000)]
Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master"

5 years agoFix performance-for-range-copy warnings
Chih-Hung Hsieh [Wed, 12 Dec 2018 22:30:52 +0000 (14:30 -0800)]
Fix performance-for-range-copy warnings

Bug: 30413223
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,performance*
Change-Id: I7d5537c24c39d5c42ac17c8a67646e4b9321d6bb

5 years agoTurn stack/gatt/conneciton_manager.cc into text file am: fef2539cd2
Jakub Pawlowski [Wed, 12 Dec 2018 08:40:10 +0000 (00:40 -0800)]
Turn stack/gatt/conneciton_manager.cc into text file am: fef2539cd2
am: 534edf6f31

Change-Id: Ic61487b61dfa98f725f321c19f4818597c217079

5 years agoTurn stack/gatt/conneciton_manager.cc into text file
Jakub Pawlowski [Wed, 12 Dec 2018 08:30:59 +0000 (00:30 -0800)]
Turn stack/gatt/conneciton_manager.cc into text file
am: fef2539cd2

Change-Id: I95b2a8c2136819491f4aafc38e6fb0a782e898ec

5 years agoTurn stack/gatt/conneciton_manager.cc into text file
Jakub Pawlowski [Tue, 11 Dec 2018 20:53:58 +0000 (21:53 +0100)]
Turn stack/gatt/conneciton_manager.cc into text file

Change-Id: I031bfaa1745de55aeb0a0dbde3a7a67be0f9c982

5 years agoMerge changes I7f8b5cfd,I68d65028 am: 1b29fe6e18
Myles Watson [Wed, 12 Dec 2018 05:23:28 +0000 (21:23 -0800)]
Merge changes I7f8b5cfd,I68d65028 am: 1b29fe6e18
am: b54f76358d

Change-Id: I7246bf57da0ff7de9a9b05b8907a83529f22add7

5 years agoMerge changes I7f8b5cfd,I68d65028
Myles Watson [Wed, 12 Dec 2018 05:14:36 +0000 (21:14 -0800)]
Merge changes I7f8b5cfd,I68d65028
am: 1b29fe6e18

Change-Id: I00f505eb8b71e21e6a2bc778e41ee9a0f8e35fc3

5 years agoMerge changes I7f8b5cfd,I68d65028
Treehugger Robot [Wed, 12 Dec 2018 05:05:27 +0000 (05:05 +0000)]
Merge changes I7f8b5cfd,I68d65028

* changes:
  test_vendor: Add PacketBuilder classes
  test_vendor: Add PacketView for copyless parsing

5 years ago[automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205...
Xin Li [Wed, 12 Dec 2018 00:40:56 +0000 (16:40 -0800)]
[automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master" into stage-aosp-master
am: 42d037fe36  -s ours

Change-Id: Icaaa381f61330253cd78482818f27b8dfaebea9c

5 years ago[automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001)...
Xin Li [Tue, 11 Dec 2018 23:09:05 +0000 (15:09 -0800)]
[automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master
am: 79a563ab36  -s ours

Change-Id: I2a2a30bf46dbee8548e7196b98d7fad714f1b3b6

5 years agoDO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Xin Li [Tue, 11 Dec 2018 22:45:08 +0000 (14:45 -0800)]
DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master

Bug: 120502534
Change-Id: Icdcf2220fd28f92b182da73bee207151e80db295

5 years agoMerge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp...
TreeHugger Robot [Tue, 11 Dec 2018 21:49:24 +0000 (21:49 +0000)]
Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master" into stage-aosp-master

5 years agoMerge "OWNERS -eisenbach, +zachoverflow" am: 55c7b8ba5d
Zach Johnson [Tue, 11 Dec 2018 08:53:35 +0000 (00:53 -0800)]
Merge "OWNERS -eisenbach, +zachoverflow" am: 55c7b8ba5d
am: b7d3381e10

Change-Id: I61b86d30c6ebd0f2941292c5e42c6b2b84932688

5 years agoMerge "OWNERS -eisenbach, +zachoverflow"
Zach Johnson [Tue, 11 Dec 2018 08:26:18 +0000 (00:26 -0800)]
Merge "OWNERS -eisenbach, +zachoverflow"
am: 55c7b8ba5d

Change-Id: Ib3b6c7398a8a749ab6e19d202cde14250d3024dd

5 years agoMerge "OWNERS -eisenbach, +zachoverflow"
Zach Johnson [Tue, 11 Dec 2018 04:21:52 +0000 (04:21 +0000)]
Merge "OWNERS -eisenbach, +zachoverflow"

5 years agoFix GATT not working due to address mismatch am: f4b2f61690
Jakub Pawlowski [Tue, 11 Dec 2018 00:30:08 +0000 (16:30 -0800)]
Fix GATT not working due to address mismatch am: f4b2f61690
am: aa88d9c532

Change-Id: Ifdf1d94dfb8553a371224520ffd87d3eade06011

5 years agoDO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master
Xin Li [Mon, 10 Dec 2018 22:22:38 +0000 (14:22 -0800)]
DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master

Bug: 120502534
Change-Id: I71b31fb1bf8a4c2b2f471b54b5a74bc2191c9693

5 years agoFix GATT not working due to address mismatch
Jakub Pawlowski [Tue, 11 Dec 2018 00:20:46 +0000 (16:20 -0800)]
Fix GATT not working due to address mismatch
am: f4b2f61690

Change-Id: Id435aecebda5a8cb5195353616bbfeb8ec9a87ec

5 years agotest_vendor: Add PacketBuilder classes
Myles Watson [Wed, 14 Nov 2018 00:56:38 +0000 (16:56 -0800)]
test_vendor: Add PacketBuilder classes

Templated PacketBuilder class for inserting fixed width
types with the correct endianness.

Test: rootcanal-packets_test_host --gtest_filter=*PacketBuilderEndian*
Change-Id: I7f8b5cfd225ebae35f310b44fc0782b940a23007

5 years agotest_vendor: Add PacketView for copyless parsing
Myles Watson [Wed, 7 Nov 2018 20:10:46 +0000 (12:10 -0800)]
test_vendor: Add PacketView for copyless parsing

A View is holds bounds and a shared pointer.
A PacketView is a forward list of View, templated for endianness.
A BaseIterator iterates over PacketViews.
An Iterator is a BaseIterator with extract, which is templated for endianness.

Test: rootcanal-packets_test_host
Change-Id: I68d6502861be61f411c0f5f2da33ead3d2392694

5 years agoOWNERS -eisenbach, +zachoverflow
Andre Eisenbach [Tue, 4 Sep 2018 17:17:20 +0000 (10:17 -0700)]
OWNERS -eisenbach, +zachoverflow

5 years agoFix GATT not working due to address mismatch
Jakub Pawlowski [Thu, 6 Dec 2018 18:32:37 +0000 (19:32 +0100)]
Fix GATT not working due to address mismatch

If the initial connection is established when using RPA, device can
later decide to use it's Identity Address for reconnections, if it
doesn't care about privacy.
When we receive such Identity Address, we must translate it into pseudo
address before passing it further down the stack.

Test: Connect to device using RPA, try to reconnect when it advertise
      it's Public address
Change-Id: Icb8eed25e1aad7003f1a3e0fed684168a8344544

5 years agoConfig: Reduce LOG(WARNING) to VLOG(1) when config key is not found am: fe8658175f
Jack He [Mon, 10 Dec 2018 00:20:37 +0000 (16:20 -0800)]
Config: Reduce LOG(WARNING) to VLOG(1) when config key is not found am: fe8658175f
am: 8034cb69c9

Change-Id: I0eabf65ac402c88d4d1b45f1e1afe751039619b6

5 years agoConfig: Reduce LOG(WARNING) to VLOG(1) when config key is not found
Jack He [Mon, 10 Dec 2018 00:15:32 +0000 (16:15 -0800)]
Config: Reduce LOG(WARNING) to VLOG(1) when config key is not found
am: fe8658175f

Change-Id: I87fd172353352e4ad79fcf801ebdcfcf7eefebbb

5 years agoConfig: Reduce LOG(WARNING) to VLOG(1) when config key is not found
Jack He [Fri, 7 Dec 2018 21:58:12 +0000 (13:58 -0800)]
Config: Reduce LOG(WARNING) to VLOG(1) when config key is not found

Fixes: 120495903
Test: make
Change-Id: I724b8883ea400ed3c79fe31b75f1e2aa65b45b4d

5 years agoMerge "Preserve x18 while calling aptX encoder libraries." am: b1db2b8792
Peter Collingbourne [Fri, 7 Dec 2018 01:16:55 +0000 (17:16 -0800)]
Merge "Preserve x18 while calling aptX encoder libraries." am: b1db2b8792
am: 77abe93228

Change-Id: I85f99e6ebec86f0e682efc2ce105209f65406ae0

5 years agoMerge "Preserve x18 while calling aptX encoder libraries."
Peter Collingbourne [Fri, 7 Dec 2018 00:54:19 +0000 (16:54 -0800)]
Merge "Preserve x18 while calling aptX encoder libraries."
am: b1db2b8792

Change-Id: Ie19afe9335e95128fa4f0411e2c6e1f9758a9791

5 years agoMerge "Preserve x18 while calling aptX encoder libraries."
Peter Collingbourne [Fri, 7 Dec 2018 00:47:06 +0000 (00:47 +0000)]
Merge "Preserve x18 while calling aptX encoder libraries."

5 years agoPreserve x18 while calling aptX encoder libraries.
Peter Collingbourne [Mon, 19 Nov 2018 20:58:18 +0000 (12:58 -0800)]
Preserve x18 while calling aptX encoder libraries.

Shadow call stack (SCS) is a security mitigation that uses a
separate stack (the SCS) for return addresses. In versions of
Android newer than P, the compiler normally cooperates with the
system to ensure that the SCS address is always stored in register
x18. This requires that everything in a process that uses SCS is
built with -ffixed-x18. However, two libraries (libaptX_encoder.so
and libaptXHD_encoder.so) are supplied in binary format and were
not compiled with -ffixed-x18. We are working with the vendor to get
these libraries rebuilt with -ffixed-x18, but until then, we need to
prevent this library from clobbering x18 so that we can turn on SCS
in the Bluetooth process.

Bug: 112907825
Bug: 120621517
Change-Id: Id27829ed5696903c42b4aeb75c3b3880c97a3a36

5 years agoMerge "Hearing Aid: Add clear conn_id and close ctrl UIPC when BT turn off" am: b946c...
weichinweng [Thu, 6 Dec 2018 03:15:34 +0000 (19:15 -0800)]
Merge "Hearing Aid: Add clear conn_id and close ctrl UIPC when BT turn off" am: b946c2690a
am: 7f9d9ee31a

Change-Id: I90ac257edb6cb5a2fa1618f6b6b877d68ccd1237

5 years agoMerge "Hearing Aid: Add clear conn_id and close ctrl UIPC when BT turn off"
weichinweng [Thu, 6 Dec 2018 03:07:23 +0000 (19:07 -0800)]
Merge "Hearing Aid: Add clear conn_id and close ctrl UIPC when BT turn off"
am: b946c2690a

Change-Id: Ied576f7bc2ba217facb6a2d16ccd4e2734b57a3f

5 years agoMerge "Hearing Aid: Add clear conn_id and close ctrl UIPC when BT turn off"
Treehugger Robot [Thu, 6 Dec 2018 02:43:24 +0000 (02:43 +0000)]
Merge "Hearing Aid: Add clear conn_id and close ctrl UIPC when BT turn off"

5 years agoMerge "Enable bounds sanitization in Bluetooth." am: ec74937aa0
Ivan Lozano [Thu, 6 Dec 2018 00:11:43 +0000 (16:11 -0800)]
Merge "Enable bounds sanitization in Bluetooth." am: ec74937aa0
am: ffd2e4684b

Change-Id: I0ab2bdd59ac82843e4e807e91e5237c905dce99a

5 years agoMerge "Enable bounds sanitization in Bluetooth."
Ivan Lozano [Wed, 5 Dec 2018 23:58:50 +0000 (15:58 -0800)]
Merge "Enable bounds sanitization in Bluetooth."
am: ec74937aa0

Change-Id: Ie1a58ea6002a2ce5ba36d9a5ca870a6db1fc4614

5 years agoMerge "Enable bounds sanitization in Bluetooth."
Ivan Lozano [Wed, 5 Dec 2018 23:38:16 +0000 (23:38 +0000)]
Merge "Enable bounds sanitization in Bluetooth."

5 years agoMerge "Group BR-EDR related SDP variables under transport" am: 1068f028e1
Srinu Jella [Wed, 5 Dec 2018 22:39:14 +0000 (14:39 -0800)]
Merge "Group BR-EDR related SDP variables under transport" am: 1068f028e1
am: 080e937008

Change-Id: I34def9279e8d4ca4d20e054387bd67ba772cd481

5 years agoMerge "Group BR-EDR related SDP variables under transport"
Srinu Jella [Wed, 5 Dec 2018 22:30:51 +0000 (14:30 -0800)]
Merge "Group BR-EDR related SDP variables under transport"
am: 1068f028e1

Change-Id: Idb6f348ffea7350cbc6ae8e9fbf24938d8f6a2c9

5 years agoMerge "Group BR-EDR related SDP variables under transport"
Treehugger Robot [Wed, 5 Dec 2018 22:04:09 +0000 (22:04 +0000)]
Merge "Group BR-EDR related SDP variables under transport"

5 years agoMetrics: Fix a typo in log am: 015dd9392f
Jack He [Wed, 5 Dec 2018 02:20:56 +0000 (18:20 -0800)]
Metrics: Fix a typo in log am: 015dd9392f
am: ff61d33a86

Change-Id: Ie893a70b38dd8a26e25190c694bf5b205cff64e1

5 years agoMetrics: Fix a typo in log
Jack He [Wed, 5 Dec 2018 02:15:51 +0000 (18:15 -0800)]
Metrics: Fix a typo in log
am: 015dd9392f

Change-Id: Ib15c2fad51eb1569dfa9589fc39bb7595ed2c5bc

5 years agoMetrics: Fix a typo in log
Jack He [Tue, 4 Dec 2018 22:30:28 +0000 (14:30 -0800)]
Metrics: Fix a typo in log

Test: make
Change-Id: I92a49c62ebf13d8da7f13b39c426d0eb14a83db6

5 years agoMerge PQ1A.181205.006 from Pi-QPR1-Release into ToT for Pi-Platform release.\n\nBUG...
Bill Rassieur [Tue, 4 Dec 2018 17:00:02 +0000 (17:00 +0000)]
Merge PQ1A.181205.006 from Pi-QPR1-Release into ToT for Pi-Platform release.\n\nBUG: 120448245

Change-Id: I39b32c98eac813e96ba19087a27c97d0da02ab5e

5 years agoGroup BR-EDR related SDP variables under transport
Srinu Jella [Thu, 11 Feb 2016 14:17:39 +0000 (19:47 +0530)]
Group BR-EDR related SDP variables under transport

Use Case: Random RNR initiated after HOGP Keyboard disconnection

steps:
1. keep madcatz in advertisement mode and scan, pair from DUT.
2. keep dailog Keyboard in advertisement mode and scan, pair from DUT.
3. Take Keyboard out of range to initiate disconnection from remote
or initiate disconnection from remote.

Failure: DUT trying to do RNR to random device.

Root Cause: when the disconnection happened for LE device, it sets
the wait_disc to true, that is causing random RNR to go for BR-EDR
device.

Fix: Group all BR-EDR related SDP variables under transport check
so that if some other operation on LE will not corrupt these BR-EDR
variables to mislead.

Test: code compilation.
Bug: 69031582
Change-Id: Ic9003f2b85bbaaa30b201b8a639a9d9b52055ac5

5 years agoSplit Timer into OnceTimer and RepeatingTimer am: 5cf0304979
Jakub Pawlowski [Tue, 4 Dec 2018 10:55:54 +0000 (02:55 -0800)]
Split Timer into OnceTimer and RepeatingTimer am: 5cf0304979
am: 51de60ce31

Change-Id: I90fa25a2d9bae98429a8486e5b74799d6b2537d5

5 years agoSplit Timer into OnceTimer and RepeatingTimer
Jakub Pawlowski [Tue, 4 Dec 2018 10:42:23 +0000 (02:42 -0800)]
Split Timer into OnceTimer and RepeatingTimer
am: 5cf0304979

Change-Id: Ie3d704b95231953a8cb602cc0b279a94a6f8081a

5 years agoSplit Timer into OnceTimer and RepeatingTimer
Jakub Pawlowski [Mon, 3 Dec 2018 15:50:40 +0000 (16:50 +0100)]
Split Timer into OnceTimer and RepeatingTimer

Follow the naming convention in libbase, where Callback was split into
OnceCallback, and RepeatingCallback, to make it obvious how many times
callback is expected to be called.

Test: unit tests were split from TimerTest into OnceTimerTest and
RepeatingTimerTest
Bug: 110303473
Change-Id: Ibbb9bb74a2e6e1a0f0f74c6ec44f63c5a4a1537f

5 years agoHearing Aid: Add clear conn_id and close ctrl UIPC when BT turn off
weichinweng [Tue, 27 Nov 2018 05:47:25 +0000 (13:47 +0800)]
Hearing Aid: Add clear conn_id and close ctrl UIPC when BT turn off

* On some condition, BT will stay on BLE_ON state when BT turn off. For
the case, Hearing Aid should be correctly disconnected and ctrl UIPC
close until next BT turn on.
* This CL add clear BtaGATTQueue and Close GATTC to make sure Queue
clean and HA enter disconnected state. And don't restart ctrl UIPC if
HearingAid is shutdown.

Bug: 118803637
Test: make, BT off/on when play A2DP and an app registered.
Change-Id: I1c52307637ee6b34222de9308dcfe1392ad170e8

5 years agoTest: Save SSR dump after test am: 268b88c948
Jack He [Sat, 1 Dec 2018 00:20:25 +0000 (16:20 -0800)]
Test: Save SSR dump after test am: 268b88c948
am: 6e814aaa7d

Change-Id: I8f482dd5e4a97779b64b23c22bfa14fe05617978

5 years agoTest: Save SSR dump after test
Jack He [Sat, 1 Dec 2018 00:17:05 +0000 (16:17 -0800)]
Test: Save SSR dump after test
am: 268b88c948

Change-Id: I34ae79fdf0fcdb246d8be40970b785d9dee92e9b

5 years agoAdd OOB check in avrc_pars_browse_rsp am: f44cbb20e7 am: 45a3f8a6fd am: 845fc7c234
Ugo Yu [Fri, 30 Nov 2018 21:39:23 +0000 (13:39 -0800)]
Add OOB check in avrc_pars_browse_rsp am: f44cbb20e7 am: 45a3f8a6fd am: 845fc7c234
am: f7d26fe477

Change-Id: I18e346ddf845ea055610457effb51437b6bb8fec

5 years agoAdd OOB check in avrc_pars_browse_rsp am: f44cbb20e7 am: 45a3f8a6fd
Ugo Yu [Fri, 30 Nov 2018 21:27:11 +0000 (13:27 -0800)]
Add OOB check in avrc_pars_browse_rsp am: f44cbb20e7 am: 45a3f8a6fd
am: 845fc7c234

Change-Id: I4e6e5da28d3aaa25c9f5522385ae098b4c8362cc

5 years agoAdd OOB check in avrc_pars_browse_rsp am: f44cbb20e7
Ugo Yu [Fri, 30 Nov 2018 21:23:05 +0000 (13:23 -0800)]
Add OOB check in avrc_pars_browse_rsp am: f44cbb20e7
am: 45a3f8a6fd

Change-Id: Ibb3ff9d8915ab9129e890b04848dd78891262e28

5 years agoAdd OOB check in avrc_pars_browse_rsp
Ugo Yu [Fri, 30 Nov 2018 21:13:52 +0000 (13:13 -0800)]
Add OOB check in avrc_pars_browse_rsp
am: f44cbb20e7

Change-Id: Ieabff141ded21319a946fa0829bdb60cdedd8e9b

5 years agoTest: Save SSR dump after test
Jack He [Fri, 30 Nov 2018 00:51:22 +0000 (16:51 -0800)]
Test: Save SSR dump after test

* Save SSR dump from /data/vendor/ssrdump after test invocation

Bug: 120098494
Test: atest :postsubmit
Change-Id: Iafc1666c8cc9fbc7f69b909be630b3d0c1445fe4

5 years agoAdd OOB check in avrc_pars_browse_rsp
Ugo Yu [Tue, 13 Nov 2018 12:03:28 +0000 (20:03 +0800)]
Add OOB check in avrc_pars_browse_rsp

Bug: 111451066
Test: Manully
Change-Id: I068d218b8957bb8f053148d252a9119a8def28cc

5 years agoMerge "Metrics: Add Bluetooth address obfuscator" am: 17d56d8962
Jack He [Fri, 30 Nov 2018 08:56:45 +0000 (00:56 -0800)]
Merge "Metrics: Add Bluetooth address obfuscator" am: 17d56d8962
am: 14b03ef16c

Change-Id: Ib9300993c257b2b8814dbab3aa476af40da9941e

5 years agoMerge "Assert if alarm callback is null" am: dec5621902
Stanley Tng [Fri, 30 Nov 2018 08:39:02 +0000 (00:39 -0800)]
Merge "Assert if alarm callback is null" am: dec5621902
am: 14f7e98eeb

Change-Id: I46dbff26e2c350adeb19eb4efce36feed78d0b7f

5 years agoMerge "Metrics: Add Bluetooth address obfuscator"
Jack He [Fri, 30 Nov 2018 08:37:43 +0000 (00:37 -0800)]
Merge "Metrics: Add Bluetooth address obfuscator"
am: 17d56d8962

Change-Id: I02e0c1a734e55ead434c7e0b3a1696a03eaa027d

5 years agoMerge "Assert if alarm callback is null"
Stanley Tng [Fri, 30 Nov 2018 08:19:30 +0000 (00:19 -0800)]
Merge "Assert if alarm callback is null"
am: dec5621902

Change-Id: I4241a172b6245bd7fdb4837c494882b8ea03416f

5 years agoMerge "Metrics: Add Bluetooth address obfuscator"
Treehugger Robot [Fri, 30 Nov 2018 07:59:20 +0000 (07:59 +0000)]
Merge "Metrics: Add Bluetooth address obfuscator"

5 years agoMerge "Assert if alarm callback is null"
Treehugger Robot [Fri, 30 Nov 2018 01:58:17 +0000 (01:58 +0000)]
Merge "Assert if alarm callback is null"

5 years agoMetrics: Add Bluetooth address obfuscator
Jack He [Fri, 16 Nov 2018 10:59:43 +0000 (02:59 -0800)]
Metrics: Add Bluetooth address obfuscator

* Add an address obfuscator that takes a 256-bit randomly generated
  salt and hashes a Bluetooth MAC address using HMAC-SHA256 algorithm
* The salt is generated per Android device during the first time
  Fluoride native layer is initialized after a connectivity reset
* The output of the above operation is an unique identifier for a
  Bluetooth device on the same Android device, but yet remains
  anonymous across different Android devices.
* Add a logging method loghex(std::array) that allows dumping integral
  arrays into a hex string
* Add more error logging to btif_config_get_bin() so that we know why it
  fails in the future
* Change mutex in btif_config to recursive_mutex to avoid deadlock when
  calling btif_config API functions with API function

Bug: 112969790
Test: mm -j40, bluetooth_test_common
Change-Id: I11f01cc82fe805c97fd7c86ad83b3d324ee5af53

5 years agoAssert if alarm callback is null
Stanley Tng [Mon, 26 Nov 2018 22:44:38 +0000 (14:44 -0800)]
Assert if alarm callback is null

Crash the system when callback is null. This will help to identify and debug the problem. Previously, we got a CFI crash which is hard to isolate.

Test: Run with Hearing Aids but did not simulate the error condition
Bug: 119533256
Change-Id: I9bc2af7c3c405bea3a57c5feb9b213614484507f

5 years ago[automerger skipped] [automerger] Fix buffer overflow in btif_dm_data_copy am: d11797...
Jakub Pawlowski [Thu, 29 Nov 2018 13:49:26 +0000 (05:49 -0800)]
[automerger skipped] [automerger] Fix buffer overflow in btif_dm_data_copy am: d117975904 am: 12d8535d0f am: 98ced409a5 am: c75667da96 skipped: 89e9bbb83c am: 2f53d6ce3c  -s ours am: 9eac53f263  -s ours am: 8e403606f1  -s ours
am: 6b408d20b7  -s ours

Change-Id: Ia9b372bba8528c6c9f34b6d5fc5a3bec900f4c98

5 years ago[automerger skipped] [automerger] Fix buffer overflow in btif_dm_data_copy am: d11797...
Jakub Pawlowski [Thu, 29 Nov 2018 13:41:21 +0000 (05:41 -0800)]
[automerger skipped] [automerger] Fix buffer overflow in btif_dm_data_copy am: d117975904 am: 12d8535d0f am: 98ced409a5 am: c75667da96 skipped: 89e9bbb83c am: 2f53d6ce3c  -s ours am: 9eac53f263  -s ours
am: 8e403606f1  -s ours

Change-Id: Ie3788a8388c6a2fb00969e3b56c0637be82dc092

5 years ago[automerger skipped] [automerger] Fix buffer overflow in btif_dm_data_copy am: d11797...
Jakub Pawlowski [Thu, 29 Nov 2018 13:35:18 +0000 (05:35 -0800)]
[automerger skipped] [automerger] Fix buffer overflow in btif_dm_data_copy am: d117975904 am: 12d8535d0f am: 98ced409a5 am: c75667da96 skipped: 89e9bbb83c am: 2f53d6ce3c  -s ours
am: 9eac53f263  -s ours

Change-Id: I2eed02578d152324e7aa9281e55c3066a4645b33

5 years ago[automerger skipped] [automerger] Fix buffer overflow in btif_dm_data_copy am: d11797...
Jakub Pawlowski [Thu, 29 Nov 2018 13:31:11 +0000 (05:31 -0800)]
[automerger skipped] [automerger] Fix buffer overflow in btif_dm_data_copy am: d117975904 am: 12d8535d0f am: 98ced409a5 am: c75667da96 skipped: 89e9bbb83c
am: 2f53d6ce3c  -s ours

Change-Id: If82ef8a6331a62d932eeb3dffaee577ee7d7ea25

5 years ago[automerger] Fix buffer overflow in btif_dm_data_copy am: d117975904 am: 12d8535d0f...
Android Build Merger (Role) [Thu, 29 Nov 2018 11:52:36 +0000 (11:52 +0000)]
[automerger] Fix buffer overflow in btif_dm_data_copy am: d117975904 am: 12d8535d0f am: 98ced409a5 am: c75667da96 skipped: 89e9bbb83c

Change-Id: Ia431ddd5ad1d6ee86bd6edd1057372b8dbf51d3b

5 years ago[automerger] Fix buffer overflow in btif_dm_data_copy am: d117975904 am: 12d8535d0f...
Android Build Merger (Role) [Thu, 29 Nov 2018 11:51:42 +0000 (11:51 +0000)]
[automerger] Fix buffer overflow in btif_dm_data_copy am: d117975904 am: 12d8535d0f am: 98ced409a5 am: c75667da96

Change-Id: I0e5f1348f27f0d9981f99cc0897f9dcc9f443bf3

5 years ago[automerger] Fix buffer overflow in btif_dm_data_copy am: d117975904 am: 12d8535d0f...
Android Build Merger (Role) [Thu, 29 Nov 2018 11:51:39 +0000 (11:51 +0000)]
[automerger] Fix buffer overflow in btif_dm_data_copy am: d117975904 am: 12d8535d0f am: 98ced409a5

Change-Id: I258a6e883061d68b24b30e17e03f72d2000e5f3f

5 years ago[automerger] Fix buffer overflow in btif_dm_data_copy am: d117975904 am: 12d8535d0f
Android Build Merger (Role) [Thu, 29 Nov 2018 11:51:37 +0000 (11:51 +0000)]
[automerger] Fix buffer overflow in btif_dm_data_copy am: d117975904 am: 12d8535d0f

Change-Id: I22ea297e564616790fd7e916747cdcea25d2b068

5 years ago[automerger] Fix buffer overflow in btif_dm_data_copy am: d117975904
Android Build Merger (Role) [Thu, 29 Nov 2018 11:51:34 +0000 (11:51 +0000)]
[automerger] Fix buffer overflow in btif_dm_data_copy am: d117975904

Change-Id: Icbd5b31039dbf3016575f9d6d69b216d76564c96

5 years agoFix buffer overflow in btif_dm_data_copy
Jakub Pawlowski [Tue, 27 Nov 2018 16:59:57 +0000 (17:59 +0100)]
Fix buffer overflow in btif_dm_data_copy

When we use a union, we should always define variables as the union type,
not as one of the field subtypes. If the latter is cast to the union type,
buffer overflow can happen.

Bug: 110166268
Test: compilation
Change-Id: I473c03b099ad5a326e7a3739f65efd33cf4775bd
Merged-In: I473c03b099ad5a326e7a3739f65efd33cf4775bd

5 years ago[automerger skipped] Fix buffer overflow in btif_dm_data_copy am: 969b2df3a0 am:...
Jakub Pawlowski [Thu, 29 Nov 2018 09:54:13 +0000 (01:54 -0800)]
[automerger skipped] Fix buffer overflow in btif_dm_data_copy am: 969b2df3a0 am: 1087c5291a  -s ours am: 0dce8b5287  -s ours
am: 469606d73e  -s ours

Change-Id: Ibb7aa6995d609a1393d83dff1fe3692d1352d5a6

5 years ago[automerger skipped] Fix buffer overflow in btif_dm_data_copy am: 969b2df3a0 am:...
Jakub Pawlowski [Thu, 29 Nov 2018 09:46:06 +0000 (01:46 -0800)]
[automerger skipped] Fix buffer overflow in btif_dm_data_copy am: 969b2df3a0 am: 1087c5291a  -s ours
am: 0dce8b5287  -s ours

Change-Id: Ie4a34e3043f232105344fbe6060d175d502f92ee

5 years ago[automerger skipped] Fix buffer overflow in btif_dm_data_copy am: 969b2df3a0
Jakub Pawlowski [Thu, 29 Nov 2018 09:39:01 +0000 (01:39 -0800)]
[automerger skipped] Fix buffer overflow in btif_dm_data_copy am: 969b2df3a0
am: 1087c5291a  -s ours

Change-Id: I40657cf9ce6ae8ffe3d2d568aaeb34668da84292

5 years agoFix buffer overflow in btif_dm_data_copy
Jakub Pawlowski [Thu, 29 Nov 2018 09:33:56 +0000 (01:33 -0800)]
Fix buffer overflow in btif_dm_data_copy
am: 969b2df3a0

Change-Id: Icc0b739672cf0683edf9bfc5d8244b1ceb87a1b6

5 years agoFix buffer overflow in btif_dm_data_copy
Jakub Pawlowski [Tue, 27 Nov 2018 17:22:22 +0000 (18:22 +0100)]
Fix buffer overflow in btif_dm_data_copy

When we use a union, we should always define variables as the union type,
not as one of the field subtypes. If the latter is cast to the union type,
buffer overflow can happen.

Bug: 110166268
Test: compilation
Change-Id: I473c03b099ad5a326e7a3739f65efd33cf4775bd
Merged-In: I473c03b099ad5a326e7a3739f65efd33cf4775bd

5 years agoMerge pi-qpr1-release PQ1A.181105.017.A1 to pi-platform-release
Bill Yi [Thu, 29 Nov 2018 02:35:03 +0000 (18:35 -0800)]
Merge pi-qpr1-release PQ1A.181105.017.A1 to pi-platform-release

Change-Id: I2a349df7ad02b6b57044fe77d92b329e1a5afda0

5 years ago[automerger skipped] Fix buffer overflow in btif_dm_data_copy am: 64c6f33e7e -s...
Jakub Pawlowski [Thu, 29 Nov 2018 01:00:42 +0000 (17:00 -0800)]
[automerger skipped] Fix buffer overflow in btif_dm_data_copy am: 64c6f33e7e  -s ours
am: 941cd93604  -s ours

Change-Id: Ie589ca00cc181e250c563760f5b20803169b832c

5 years ago[automerger skipped] Fix buffer overflow in btif_dm_data_copy
Jakub Pawlowski [Thu, 29 Nov 2018 00:47:17 +0000 (16:47 -0800)]
[automerger skipped] Fix buffer overflow in btif_dm_data_copy
am: 64c6f33e7e  -s ours

Change-Id: I9e2836c4af3225954fc27961431fcc79f96db072

5 years ago[automerger skipped] Fix buffer overflow in btif_dm_data_copy
Jakub Pawlowski [Wed, 28 Nov 2018 22:30:47 +0000 (14:30 -0800)]
[automerger skipped] Fix buffer overflow in btif_dm_data_copy
am: ea90417d99  -s ours

Change-Id: Idf41fde0fc9fd67066c05f22f70493035b63fef0

5 years agoFix buffer overflow in btif_dm_data_copy
Jakub Pawlowski [Tue, 27 Nov 2018 17:22:22 +0000 (18:22 +0100)]
Fix buffer overflow in btif_dm_data_copy

When we use a union, we should always define variables as the union type,
not as one of the field subtypes. If the latter is cast to the union type,
buffer overflow can happen.

Bug: 110166268
Test: compilation
Change-Id: I473c03b099ad5a326e7a3739f65efd33cf4775bd
Merged-In: I473c03b099ad5a326e7a3739f65efd33cf4775bd

5 years agoAllow Resolvable Private Address into LE White List am: eb976adf47
Jakub Pawlowski [Wed, 28 Nov 2018 21:41:52 +0000 (13:41 -0800)]
Allow Resolvable Private Address into LE White List am: eb976adf47
am: c360868622

Change-Id: If05792fff362c7d4e79db45ff83d62a9c4939a59

5 years agoAllow Resolvable Private Address into LE White List
Jakub Pawlowski [Wed, 28 Nov 2018 21:31:27 +0000 (13:31 -0800)]
Allow Resolvable Private Address into LE White List
am: eb976adf47

Change-Id: I701e05e417ae2c30491660faaf9de97c3c07beb7

5 years agoFix buffer overflow in btif_dm_data_copy
Jakub Pawlowski [Tue, 27 Nov 2018 17:22:22 +0000 (18:22 +0100)]
Fix buffer overflow in btif_dm_data_copy

When we use a union, we should always define variables as the union type,
not as one of the field subtypes. If the latter is cast to the union type,
buffer overflow can happen.

Bug: 110166268
Test: compilation
Change-Id: I473c03b099ad5a326e7a3739f65efd33cf4775bd
Merged-In: I473c03b099ad5a326e7a3739f65efd33cf4775bd

5 years agoCentralize call to gatt_update_app_use_link_flag for GATT_Connect am: 8c2f8384a8
Jakub Pawlowski [Wed, 28 Nov 2018 20:13:42 +0000 (12:13 -0800)]
Centralize call to gatt_update_app_use_link_flag for GATT_Connect am: 8c2f8384a8
am: 0ed98b36cb

Change-Id: Ie6014af62b987ffbdf71bc8a2bb34fe3b3cfdca4

5 years agoCentralize call to gatt_update_app_use_link_flag for GATT_Connect
Jakub Pawlowski [Wed, 28 Nov 2018 19:55:18 +0000 (11:55 -0800)]
Centralize call to gatt_update_app_use_link_flag for GATT_Connect
am: 8c2f8384a8

Change-Id: Icb9fd21e6af43dc4d31afba64bd58655a8f6ff5a

5 years agoAllow Resolvable Private Address into LE White List
Jakub Pawlowski [Thu, 15 Nov 2018 22:22:21 +0000 (23:22 +0100)]
Allow Resolvable Private Address into LE White List

When doing background connection, we don't want to put RPA into the
white list, as it might expire in 15 minutes.
For direct connect procedure, RPA is ok - the request times out after 30
seconds.

This patch moves address type check from the White List to the background
connection procedure. It is prepearation for handling direct connect
with white list.

Bug: 112827989
Test: sl4a GattConnectTest
Change-Id: I907ad44d1d255c9212ed58112bb8b99464e46f43

5 years agoCentralize call to gatt_update_app_use_link_flag for GATT_Connect
Jakub Pawlowski [Tue, 13 Nov 2018 17:31:08 +0000 (18:31 +0100)]
Centralize call to gatt_update_app_use_link_flag for GATT_Connect

Currently both code paths, doing direct and background connection, call
gatt_update_app_use_link_flag. Move this call to common code.

Bug: 112827989
Test: sl4a GattConnectTest
Change-Id: I5d55f6467ffca78ff785ecdad02dd049ea5481bf

5 years ago[automerger skipped] [automerger] Fix potential usage of freed memory in btif_hl_proc...
Jakub Pawlowski [Tue, 27 Nov 2018 21:37:02 +0000 (13:37 -0800)]
[automerger skipped] [automerger] Fix potential usage of freed memory in btif_hl_proc_sdp_query_cfm am: 78508d2c2c am: a236f16071 am: 3f5af0aa65 am: 12557bb999 skipped: 2470706409 am: d2dd0bacbc  -s ours am: 1062b94226  -s ours am: 54f6c84dfd  -s ours
am: 4f54a847d5  -s ours

Change-Id: I25fd7b09fed990b9178205bd013e2886d78889ca

5 years ago[automerger skipped] [automerger] Fix potential usage of freed memory in btif_hl_proc...
Jakub Pawlowski [Tue, 27 Nov 2018 21:29:49 +0000 (13:29 -0800)]
[automerger skipped] [automerger] Fix potential usage of freed memory in btif_hl_proc_sdp_query_cfm am: 78508d2c2c am: a236f16071 am: 3f5af0aa65 am: 12557bb999 skipped: 2470706409 am: d2dd0bacbc  -s ours am: 1062b94226  -s ours
am: 54f6c84dfd  -s ours

Change-Id: I4cb634d3c98dabfdc6f1d95f6c1ff348f954ddd4

5 years ago[automerger skipped] [automerger] Fix potential usage of freed memory in btif_hl_proc...
Jakub Pawlowski [Tue, 27 Nov 2018 21:24:43 +0000 (13:24 -0800)]
[automerger skipped] [automerger] Fix potential usage of freed memory in btif_hl_proc_sdp_query_cfm am: 78508d2c2c am: a236f16071 am: 3f5af0aa65 am: 12557bb999 skipped: 2470706409 am: d2dd0bacbc  -s ours
am: 1062b94226  -s ours

Change-Id: Ic8bab7e79d802eca8efda8a613f83e465e2a4e81

5 years ago[automerger skipped] [automerger] Fix potential usage of freed memory in btif_hl_proc...
Jakub Pawlowski [Tue, 27 Nov 2018 21:14:37 +0000 (13:14 -0800)]
[automerger skipped] [automerger] Fix potential usage of freed memory in btif_hl_proc_sdp_query_cfm am: 78508d2c2c am: a236f16071 am: 3f5af0aa65 am: 12557bb999 skipped: 2470706409
am: d2dd0bacbc  -s ours

Change-Id: If276bb160498a352e02bdb6231ac8fed8142aec4