OSDN Git Service
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
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
Jakub Pawlowski [Thu, 7 Sep 2017 17:39:09 +0000 (17:39 +0000)]
Merge "Fix GATT log spam"
Jaekyun Seok [Wed, 30 Aug 2017 02:17:08 +0000 (11:17 +0900)]
Add 'vendor.' prefix to a vendor HAL service name
To prevent property name collisions between properties of system and
vendor, 'vendor.' prefix must be added to a vendor HAL service name.
You can see the details in http://go/treble-sysprop-compatibility.
Test: succeeded building gce_x86_phone-userdebug and confirmed that
service names were renamed correctly.
Bug:
36796459
Change-Id: Iedcb3a01e00e80c58dc76653784a3c353f34ce0a
Michael Spang [Wed, 6 Sep 2017 15:44:33 +0000 (11:44 -0400)]
Fix stack-buffer-overflow in bluetooth service GATT client
Use the tBTA_GATTC union for |notify| in bta_gattc_process_indicate() to
avoid a stack-buffer-overflow in btif_transfer_context.
==1410==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x0077c8c0c066 at pc 0x0077e50c9ae0 bp 0x0077c8c0bcd0 sp 0x0077c8c0b460
READ of size 616 at 0x0077c8c0c066 thread T38 (btu message loo)
#0 0x77e50c9adf in __interceptor_memcpy external/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:701:5
#1 0x77ca1e838f in memcpy(void*, void const* pass_object_size0, unsigned long) bionic/libc/include/string.h:173:12
#2 0x77ca1e838f in btif_transfer_context(void (*)(unsigned short, char*), unsigned short, char*, int, void (*)(unsigned short, char*, char*)) system/bt/btif/src/btif_core.cc:208:0
#3 0x77ca209853 in (anonymous namespace)::bta_gattc_cback(unsigned char, tBTA_GATTC*) system/bt/btif/src/btif_gatt_client.cc:204:7
#4 0x77ca11455b in bta_gattc_process_indicate(unsigned short, unsigned char, tGATT_CL_COMPLETE*) system/bt/bta/gatt/bta_gattc_act.cc:1596:9
#5 0x77ca40b4b7 in gatt_process_notification(tGATT_TCB&, unsigned char, unsigned short, unsigned char*) system/bt/stack/gatt/gatt_cl.cc:664:7
#6 0x77ca40d78f in gatt_client_handle_server_rsp(tGATT_TCB&, unsigned char, unsigned short, unsigned char*) system/bt/stack/gatt/gatt_cl.cc:1119:9
#7 0x77ca414447 in gatt_le_data_ind(unsigned short, unsigned char*, BT_HDR*) system/bt/stack/gatt/gatt_main.cc:576:7
#8 0x77ca47665b in l2c_rcv_acl_data(BT_HDR*) system/bt/stack/l2cap/l2c_main.cc:211:9
#9 0x77c9da50eb in base::Callback<void (), (base::internal::CopyMode)1>::Run() const external/libchrome/base/callback.h:389:12
#10 0x77c9da50eb in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask const&) external/libchrome/base/debug/task_annotator.cc:51:0
#11 0x77c9df75e3 in base::MessageLoop::RunTask(base::PendingTask const&) external/libchrome/base/message_loop/message_loop.cc:494:19
#12 0x77c9df80b7 in base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) external/libchrome/base/message_loop/message_loop.cc:503:5
#13 0x77c9df8fb7 in base::MessageLoop::DoWork() external/libchrome/base/message_loop/message_loop.cc:627:13
#14 0x77c9dfd33b in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) external/libchrome/base/message_loop/message_pump_default.cc:35:31
#15 0x77c9e4e327 in base::RunLoop::Run() external/libchrome/base/run_loop.cc:35:10
#16 0x77ca3e97ab in btu_message_loop_run(void*) system/bt/stack/btu/btu_task.cc:98:14
#17 0x77ca52ad3b in work_queue_read_cb(void*) system/bt/osi/src/thread.cc:251:3
#18 0x77ca52489b in run_reactor(reactor_t*, int) system/bt/osi/src/reactor.cc:282:11
#19 0x77ca524413 in reactor_start(reactor_t*) system/bt/osi/src/reactor.cc:125:10
#20 0x77ca529c6f in run_thread(void*) system/bt/osi/src/thread.cc:221:3
#21 0x77eb40a31b in __pthread_start(void*) bionic/libc/bionic/pthread_create.cpp:214:18
#22 0x77eb3c1dff in __start_thread bionic/libc/bionic/clone.cpp:47:16
002(bluetooth) btu message loo identical 2 lines
Address 0x0077c8c0c066 is located in stack of thread T38 (btu message loo)
at offset 646 in frame
#0 0x77ca114293 in bta_gattc_process_indicate(unsigned short, unsigned char, tGATT_CL_COMPLETE*) system/bt/bta/gatt/bta_gattc_act.cc:1538:0
002(bluetooth) btu message loo identical 1 line
This frame has 4 object(s):
[32, 646) 'notify' (line 1543)
[784, 790) 'remote_bda' (line 1544) <== Memory access at offset 646 partially underflows this variable
[816, 817) 'gatt_if' (line 1545) <== Memory access at offset 646 partially underflows this variable
[832, 833) 'transport' (line 1546) <== Memory access at offset 646 partially underflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
(longjmp and C++ exceptions *are* supported)
Thread T38 (btu message loo) created by T37 (bt_workqueue) here:
#0 0x77e50fd46f in __interceptor_pthread_create _asan_rtl_:3
#1 0x77ca529727 in thread_new_sized(char const*, unsigned long) system/bt/osi/src/thread.cc:87:3
#2 0x77ca3e9a73 in btu_task_start_up(void*) system/bt/stack/btu/btu_task.cc:127:26
#3 0x77ca52ad3b in work_queue_read_cb(void*) system/bt/osi/src/thread.cc:251:3
#4 0x77ca52489b in run_reactor(reactor_t*, int) system/bt/osi/src/reactor.cc:282:11
#5 0x77ca524413 in reactor_start(reactor_t*) system/bt/osi/src/reactor.cc:125:10
#6 0x77ca529c6f in run_thread(void*) system/bt/osi/src/thread.cc:221:3
#7 0x77eb40a31b in __pthread_start(void*) bionic/libc/bionic/pthread_create.cpp:214:18
#8 0x77eb3c1dff in __start_thread bionic/libc/bionic/clone.cpp:47:16
002(bluetooth) btu message loo identical 1 line
Thread T37 (bt_workqueue) created by T20 (stack_manager) here:
#0 0x77e50fd46f in __interceptor_pthread_create _asan_rtl_:3
#1 0x77ca529727 in thread_new_sized(char const*, unsigned long) system/bt/osi/src/thread.cc:87:3
#2 0x77ca3e936f in BTU_StartUp() system/bt/stack/btu/btu_init.cc:129:25
#3 0x77ca2a513b in event_start_up_stack(void*) system/bt/btif/src/stack_manager.cc:146:3
#4 0x77ca52ad3b in work_queue_read_cb(void*) system/bt/osi/src/thread.cc:251:3
#5 0x77ca52489b in run_reactor(reactor_t*, int) system/bt/osi/src/reactor.cc:282:11
#6 0x77ca524413 in reactor_start(reactor_t*) system/bt/osi/src/reactor.cc:125:10
#7 0x77ca529c6f in run_thread(void*) system/bt/osi/src/thread.cc:221:3
#8 0x77eb40a31b in __pthread_start(void*) bionic/libc/bionic/pthread_create.cpp:214:18
#9 0x77eb3c1dff in __start_thread bionic/libc/bionic/clone.cpp:47:16
002(bluetooth) btu message loo identical 1 line
Thread T20 (stack_manager) created by T0 (droid.bluetooth) here:
#0 0x77e50fd46f in __interceptor_pthread_create _asan_rtl_:3
#1 0x77ca529727 in thread_new_sized(char const*, unsigned long) system/bt/osi/src/thread.cc:87:3
#2 0x77ca2a4e7f in ensure_manager_initialized() system/bt/btif/src/stack_manager.cc:238:23
#3 0x77ca2a4e7f in stack_manager_get_interface() system/bt/btif/src/stack_manager.cc:251:0
#4 0x77ca1b7927 in init(bt_callbacks_t*) system/bt/btif/src/bluetooth.cc:144:3
#5 0x77ca9899fb in android::initNative(_JNIEnv*, _jobject*) packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp:663:13
#6 0x77e1c87703 in art_quick_generic_jni_trampoline /proc/self/cwd/art/runtime/arch/arm64/quick_entrypoints_arm64.S:2329:0
#6 0x37ab0579318381f (<unknown module>)
002(bluetooth) btu message loo identical 1 line
SUMMARY: AddressSanitizer: stack-buffer-overflow (/system/lib64/libclang_rt.asan-aarch64-android.so+0x31adf)
Shadow bytes around the buggy address:
0x001ef91817b0: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
0x001ef91817c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x001ef91817d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x001ef91817e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x001ef91817f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x001ef9181800: 00 00 00 00 00 00 00 00 00 00 00 00[06]f2 f2 f2
0x001ef9181810: f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 06 f2
0x001ef9181820: f2 f2 01 f2 01 f3 f3 f3 00 00 00 00 00 00 00 00
0x001ef9181830: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x001ef9181840: f1 f1 f1 f1 00 00 00 00 00 00 00 00 00 00 00 00
0x001ef9181850: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==1410==ABORTING
Bug:
65381426
Change-Id: Ie632f131b622cc323ce68ec7be152caef23c95ec
Treehugger Robot [Wed, 6 Sep 2017 17:03:37 +0000 (17:03 +0000)]
Merge "Extended Scan HCI definations as per BT 5.0 SIG "
Jakub Pawlowski [Wed, 6 Sep 2017 15:41:46 +0000 (08:41 -0700)]
Fix GATT log spam
Bug:
65255942
Test: manual
Change-Id: I212bc93149dc514517f409edc36f74e1c2895d96
Pavlin Radoslavov [Sun, 19 Mar 2017 02:35:06 +0000 (19:35 -0700)]
Store a name string in property without violating string boundaries
Don't copy data beyond end of string when storing it as BT_PROPERTY_BDNAME
in property.
Also, update an unit test to create a string by considering the property
name length.
Test: Running unit tests with ASAN enabled
Change-Id: Iaa586b4a0942f99ba469d1ed963729e7ad721503
Sagayajayasheelan Thomas [Mon, 17 Jul 2017 09:50:01 +0000 (15:20 +0530)]
Extended Scan HCI definations as per BT 5.0 SIG
Added Ext Scan HCI defination for periodic scan.
Change-Id: Ic7dce5fb5207a22e4b193d84033d84126d780be5
Signed-off-by: Sagayajayasheelan Thomas <sagayajayasheelan.thomas@intel.com>
Srinu Jella [Thu, 17 Nov 2016 09:32:20 +0000 (15:02 +0530)]
Clear IB_CFG_DONE on receiving peer config request when channel open
Root Cause: Configure request fails in CST_OPEN state
after a configure request IB_CFG_DONE and OB_CFG_DONE both are
cleared. Some IOT devices try to configure again in the CST_OPEN
state which fails if OB_CFG_DONE is cleared.
Fix: Clear IB_CFG_DONE and keep OB_CFG_DONE unchanged on receiving
Peer config request when channel open.
Test: Tested with Geely Carkit.
Bug:
35082459
Change-Id: I8deca0c8ff73faafc3da94dcd9ea55e06bd8a31d
Martin Brabham [Wed, 3 May 2017 23:05:47 +0000 (16:05 -0700)]
Avoid lookup on NULL address
Test: Manually watch some debug logs during pairing and auth processes
Change-Id: I6410b8bc00587196392ae787a6aa1d85c0c71967
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
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
Treehugger Robot [Thu, 31 Aug 2017 03:25:30 +0000 (03:25 +0000)]
Merge "BTIF: Add meaningful logging to btif_profile_queue"
Treehugger Robot [Thu, 31 Aug 2017 02:09:22 +0000 (02:09 +0000)]
Merge "Limit 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
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
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
Pavlin Radoslavov [Wed, 30 Aug 2017 18:02:27 +0000 (11:02 -0700)]
Inline comparison operators for RawAddress
Test: Code compilation
Bug:
64975965
Change-Id: I5a7ab7e0cd270c2769a3a471a506fc78a0a94533
Pavlin Radoslavov [Tue, 29 Aug 2017 22:02:44 +0000 (15:02 -0700)]
Add missing comparison operators for RawAddress
Test: Unit tests added
Bug:
64975965
Change-Id: Id27f1ef7ec99f0761d6e2fb40bf38212ab8312a1
Myles Watson [Thu, 4 May 2017 18:13:10 +0000 (11:13 -0700)]
btm: Finish renaming SMP_AUTH_<GEN_>BOND
Test: build, grep for SMP_AUTH_GEN_BOND
Change-Id: Ic9e1950282a60e1d644d79291d9c0822ac6c973e
Jakub Pawlowski [Tue, 22 Aug 2017 10:10:46 +0000 (03:10 -0700)]
Fix crashes in btm_consolidate_dev
It is not safe to do list_next after list_remove.
Test: sl4a BleStressTest:test_le_pairing
Bug:
31442085
Change-Id: Ib4cb02154684b39ebc652d20559e1b07eee2c357
Jakub Pawlowski [Fri, 18 Aug 2017 13:03:55 +0000 (13:03 +0000)]
Fix connection handle data type
am:
73af403370
Change-Id: Ic08764d124def613fcbb52fca68a487ded52390f
Jakub Pawlowski [Fri, 18 Aug 2017 11:14:22 +0000 (04:14 -0700)]
Fix connection handle data type
conn_handle should be uint16_t, not uint8_t.
Test: compilation test
Bug:
64232952
Change-Id: Ibce88e2cf2f74f402ea26f7471e5ac35aef6229b
Jakub Pawlowski [Thu, 17 Aug 2017 23:53:48 +0000 (23:53 +0000)]
Cleanup RawAddress usage
am:
2e05f0dd4f
Change-Id: I76258df03bef16cf4a71f3dab2412b89750e0ab7
Jakub Pawlowski [Wed, 16 Aug 2017 13:41:02 +0000 (06:41 -0700)]
Cleanup RawAddress usage
Use RawAddress::kLength instead of sizeof(RawAddress). When copying
value using memcpy, use "->address" instead of direct instance address.
Bug:
64726342
Change-Id: Iac7e5674f7e32b53162ab734c2251e65e9d4554c
Chih-Hung Hsieh [Thu, 17 Aug 2017 00:09:12 +0000 (00:09 +0000)]
Fix misc-macro-parentheses warnings in system/bt.
am:
fc25b19606
Change-Id: I7ef5175514d7f1483743c20c916854f1e4cce687
Chih-Hung Hsieh [Tue, 1 Aug 2017 22:04:23 +0000 (15:04 -0700)]
Fix misc-macro-parentheses warnings in system/bt.
* Use NOLINT to suppress missing parentheses warnings around bitmask.
Bug:
28705665
Test: make with WITH_TIDY=1 WITH_TIDY_CHECKS=-*,misc-macro-* \
WITH_TIDY_FLAGS=-header-filter=system/bt/.*
Change-Id: I4f095898d49eafdea9eb72f9ffc9eac87f68a4c8
Jack He [Wed, 16 Aug 2017 00:23:04 +0000 (00:23 +0000)]
Fix errors in handling RawAddresses
am:
882aec320e
Change-Id: If23c7e9bf4231ec3398d0de21c0656a240935209
Jack He [Tue, 15 Aug 2017 06:02:16 +0000 (23:02 -0700)]
Fix errors in handling RawAddresses
* In change I8d1bd6914aec55bb53495b1d0d5e3d37b86865e6
memcmp(a, b, LEN) != 0 should be translated to
A != B
* memcpy should not be applied to RawAddress objects.
Assignment operator should be used instead.
* memset should not be applied to RawAddress objects.
Assignment to RawAddress::kEmpty should be used.
* Fixed a crash in GATT
Bug:
64316340
Test: Unit test, pair with device and transmit
Change-Id: Iceefab821c1d45a88194d87a43a192afa5f263fd
johnshamoon [Fri, 11 Aug 2017 05:54:20 +0000 (05:54 +0000)]
Merge "test_vendor: Add function to extract bytes from iterators"
am:
9a7f50c041
Change-Id: I588d3a7fd6dce5c2eaf1aea9944e4d45663e3dd0
Treehugger Robot [Fri, 11 Aug 2017 05:46:08 +0000 (05:46 +0000)]
Merge "test_vendor: Add function to extract bytes from iterators"
johnshamoon [Wed, 9 Aug 2017 03:38:28 +0000 (20:38 -0700)]
test_vendor: Add function to extract bytes from iterators
The extract function extracts a number of bytes from the type that the
iterator is pointing to. The iterator will be incremented to the value
after the last byte after extract is called.
Fixed the bounds of the for loop in the preIncrementTest so that it
does not try to dereference the sentinel after the last value.
Test: Passes unit tests in test/iterator_test.cc
Change-Id: I07944641b829c820bbe40d612d7f065e514516b3
Ting-Yuan Huang [Thu, 10 Aug 2017 18:13:18 +0000 (18:13 +0000)]
osi: Suppress length warning in config parsing
am:
8b7968085b
Change-Id: I338ec794dcc5db22ee4615ef139500c44eb1cf2b
Ting-Yuan Huang [Tue, 9 May 2017 23:35:46 +0000 (16:35 -0700)]
osi: Suppress length warning in config parsing
Bug:
38178471
Test: Built without seeing the warning at the line
Change-Id: I1f8a5fc58313456921891700a3039cad1715b4d0
Jakub Pawlowski [Wed, 9 Aug 2017 07:44:01 +0000 (00:44 -0700)]
resolve merge conflicts of
0a5d9ebb0b15976b47eaff77bb66a257b8b114bb to stage-aosp-master
Test: this fixes merge conflict that I skipped
Change-Id: Ie829182b01d01e5ae648165f30cfad7647a97db6
Merged-In: Ie829182b01d01e5ae648165f30cfad7647a97db5
Jakub Pawlowski [Wed, 9 Aug 2017 07:13:47 +0000 (07:13 +0000)]
Bluetooth: move AIDL files related to Bluetooth into system/bt (2/3)
am:
0a5d9ebb0b
Change-Id: I6a921b05aa32dbb9bf196635c17118de5d39d2b0
Jakub Pawlowski [Tue, 8 Aug 2017 11:00:13 +0000 (04:00 -0700)]
Bluetooth: move AIDL files related to Bluetooth into system/bt (2/3)
This patch moves *.aidl files from
frameworks/base/core/java/android/bluetooth into system/bt/binder. This
is in preparation to convert the Bluetooth deamon into native
implementation piece by piece.
In order to do that, one must have C++ header files, and paths to them
with AIDL files, and */java/* folder didn't seem as proper place for
that. Additionally, keeping AIDL files out of framework/base will not
require creating dependency on this huge project, which should help
keeping the compilation fast.
Test: compilation test
Change-Id: I4c992e6ee16eea3173a49b1d37e961af3d3c9ac6
Merged-In: I4c992e6ee16eea3173a49b1d37e961af3d3c9ac6
(cherry picked from commit
8a12de49177a341a118c95435177fba4f12fe412)
Bailey Forrest [Mon, 7 Aug 2017 22:58:14 +0000 (22:58 +0000)]
Merge "Call bta_dm_sp_cback if BTM_LOCAL_IO_CAPS == BTM_IO_CAP_NONE"
am:
9d098408ce
Change-Id: I0988507f1ed8bd3a9138ecb80171d7cfd18a4031
Treehugger Robot [Mon, 7 Aug 2017 22:49:25 +0000 (22:49 +0000)]
Merge "Call bta_dm_sp_cback if BTM_LOCAL_IO_CAPS == BTM_IO_CAP_NONE"
Pavlin Radoslavov [Mon, 7 Aug 2017 18:09:44 +0000 (18:09 +0000)]
Use a mutex to protect the scheduling of tBTA_PM_TIMER
am:
9e702a6aef
Change-Id: I4f41eee8b9e5dd129b3aeffb287a6e8b9c7269c4
Pavlin Radoslavov [Sun, 6 Aug 2017 06:47:50 +0000 (23:47 -0700)]
Use a mutex to protect the scheduling of tBTA_PM_TIMER
Bug:
63689331
Test: Code compilation
Change-Id: If062f7b3e2c17cb5a1ac2c8ef0813a2fe5c5a5f5
johnshamoon [Mon, 7 Aug 2017 17:55:20 +0000 (17:55 +0000)]
Merge "test_vendor: Add Iterator tests"
am:
c427c0bd30
Change-Id: I81d51453b88f707463b140861dfd0b6e0dcefb50
Treehugger Robot [Mon, 7 Aug 2017 17:42:41 +0000 (17:42 +0000)]
Merge "test_vendor: Add Iterator tests"
johnshamoon [Fri, 4 Aug 2017 21:56:01 +0000 (21:56 +0000)]
test_vendor: Use Custom Iterators in L2CAP Classes
am:
6f1401153f
Change-Id: Ie5fcdbe89d35ab391fd756f675b264d1dd2233ed
johnshamoon [Wed, 26 Jul 2017 17:28:07 +0000 (10:28 -0700)]
test_vendor: Use Custom Iterators in L2CAP Classes
Use custom bounded iterators instead of vector iterators in L2capPacket and
L2capSdu.
Test: Passes unit tests in test/l2cap_test.cc
Change-Id: I892083ec6155b18c4b222f3c38d17d2d9fef686c
johnshamoon [Tue, 25 Jul 2017 16:50:04 +0000 (09:50 -0700)]
test_vendor: Add Iterator tests
Add Iterator tests to check that the overloaded operators and bounded iterators
are implemented correctly.
Test: Run the unit tests:
out/host/linux-x86/nativetest64/test-vendor_test_host/\
test-vendor_test_host --gtest_filter=IteratorTest.*
Change-Id: I6402cc36fe6818fa972524ac20aed526128a8553
johnshamoon [Fri, 4 Aug 2017 20:14:51 +0000 (20:14 +0000)]
Merge "test_vendor: Add HciPacket and Iterator classes"
am:
3e1a3d0ddc
Change-Id: Ide1490901c49ae9e38e69ba6315c69df92c7bb27
Pavlin Radoslavov [Fri, 4 Aug 2017 20:14:24 +0000 (20:14 +0000)]
Protect the btif config state with a lock during cleanup
am:
a4febd6d04
Change-Id: I47a3b5efc680954afc11e58f16c440284ba016a9
Treehugger Robot [Fri, 4 Aug 2017 20:13:17 +0000 (20:13 +0000)]
Merge "test_vendor: Add HciPacket and Iterator classes"
Pavlin Radoslavov [Fri, 4 Aug 2017 18:26:21 +0000 (11:26 -0700)]
Protect the btif config state with a lock during cleanup
Bug:
64186300
Test: Code compilation, enable/disable Bluetooth
Change-Id: Ic2397a128d59c9cc69cbd8252734b69eb7c02501
Jakub Pawlowski [Fri, 4 Aug 2017 17:55:13 +0000 (17:55 +0000)]
Advertisement parsing fix for zero padding
am:
35a9ea352d
Change-Id: I59bf8524b2c95c5f8c7f4261166057078dd25b7c
Jakub Pawlowski [Fri, 4 Aug 2017 15:56:53 +0000 (08:56 -0700)]
Advertisement parsing fix for zero padding
When AD data is zero padded, and Scan Response is appended at end, data
becomes invalid. Instead, zero paddning must be removed first.
Test: AdvertiseDataParserTest.RemoveTrailingZeros
Bug:
38489707
Change-Id: I229ca3db6c92bc06bc1429e72412417010721063
Pavlin Radoslavov [Fri, 4 Aug 2017 06:02:00 +0000 (06:02 +0000)]
Added another entry to the INTEROP_2MBPS_LINK_ONLY interoperability database
am:
427da91563
Change-Id: I7412713b0c0104309b8e5fcffa7df2fde1eaa7f2
Pavlin Radoslavov [Fri, 4 Aug 2017 00:34:07 +0000 (17:34 -0700)]
Added another entry to the INTEROP_2MBPS_LINK_ONLY interoperability database
Bug:
64357126
Test: Audio streaming to the affected carkit
Change-Id: I160eb3775c77fe400798f038d2aae7dd7825aacb
(cherry picked from commit
a5f0a7717d129ca8164a0712e63f41cc4b60dd72)
johnshamoon [Wed, 19 Jul 2017 19:06:54 +0000 (12:06 -0700)]
test_vendor: Add HciPacket and Iterator classes
HciPacket is the abstract base class for all packet types.
Iterator is the custom iterator class that all packet types will use
to iterate through. The iterators in this class are bounded from
[start_of_packet, length_of_packet]. This prevents incrementing the iterator
passed the end sentinel.
Test: Passes all of the tests in test/iterator_test.cc
Change-Id: If9fec9ae32d9a23575ad3e9219b8249d164bc0d5
Pavlin Radoslavov [Thu, 3 Aug 2017 10:40:13 +0000 (10:40 +0000)]
Don't reuse AVDTP internal state for different purposes
am:
8da87bea5e
Change-Id: I1b35a8e6ba0f3d109731a1128c4ccb6363a9404c
Pavlin Radoslavov [Thu, 3 Aug 2017 10:40:09 +0000 (10:40 +0000)]
Add A2DP_DumpCodecInfo() API
am:
219b85f136
Change-Id: I1bc85fcf214ab75e130954245d585e3015b08bec
Pavlin Radoslavov [Wed, 2 Aug 2017 20:52:14 +0000 (13:52 -0700)]
Don't reuse AVDTP internal state for different purposes
A number of issues were exposed by carkits that proactively try
to discover the codecs supported by the Phone and explicitly select
the A2DP codec.
* Don't reuse p_scb->p_cap for storing the most recent fetched capability
and for storing the result configuration while reconfiguring the stream.
Instead, use p_scb->cfg for storing the result configuration.
* Don't try to reconfigure the audio stream before all peer's capabilities
have been retrieved.
* Don't reset p_scb->sep_info_idx after fetching all capabilities inside
bta_av_save_caps(), otherwise the stream reconfiguration logic is
confused. Apparently, p_scb->sep_info_idx is overused for both:
(a) Pointing where to store the next capability while fetching the
capabilities.
(b) Storing the selected the SEP after the codec selection is completed.
Resetting p_scb->sep_info_idx to 0 creates logical confusion when the
actual selected SEP index is 0.
* Add extra debug log messages
Test: Connecting to and streaming with various carkits
Bug:
64128712
Change-Id: I5f57e9069d5402bcbb17613470ac0d29c8e45069
(cherry picked from commit
c64dc1d28496b5e917d0f82317d40d3c60e6495d)
Pavlin Radoslavov [Wed, 2 Aug 2017 20:43:44 +0000 (13:43 -0700)]
Add A2DP_DumpCodecInfo() API
The API can be used to display A2DP codec info when using |LOG_DEBUG|.
Test: Code compilation
Bug:
64128712
Change-Id: I04379b45f24adb7008365d38ccc8aa7f49ed4b73
(cherry picked from commit
81c2234305d4c84eb38f0d5a92605e3b42366f84)
Jakub Pawlowski [Wed, 2 Aug 2017 22:02:51 +0000 (22:02 +0000)]
Workaround for Traxxas
am:
02d1ec171f
Change-Id: If547b412aabc0cf86194116c9a0641e700209336
Jakub Pawlowski [Tue, 1 Aug 2017 22:12:04 +0000 (15:12 -0700)]
Workaround for Traxxas
Bug:
64252588
Test: net_test_stack_ad_parser
Change-Id: I1471e9e5f0f36ec931f8d86c927abbc1137e2b94
Joseph Pirozzo [Wed, 2 Aug 2017 19:47:11 +0000 (19:47 +0000)]
Merge "AVRCP Controller request metadata on playback."
am:
39b6c45264
Change-Id: Ia5000440315c0f8a1bc75142e4463606e9fc931c
Joseph Pirozzo [Wed, 2 Aug 2017 19:33:05 +0000 (19:33 +0000)]
Merge "AVRCP Controller request metadata on playback."
Sunny Kapdi [Wed, 2 Aug 2017 17:13:59 +0000 (17:13 +0000)]
Merge "AE: Set secondary adv max skip to zero"
am:
b92d9f3530
Change-Id: I54710829a6ba81d69bbee4571c00492d4a612e32
Treehugger Robot [Wed, 2 Aug 2017 17:08:20 +0000 (17:08 +0000)]
Merge "AE: Set secondary adv max skip to zero"
Joseph Pirozzo [Tue, 1 Aug 2017 21:58:03 +0000 (14:58 -0700)]
AVRCP Controller request metadata on playback.
Track metadata is only provided when requested, and the current
implementation only requested it when there was a track change
notification. Add a request for metadata whenever there is an
update to indicate that the play status is playing.
Bug:
63998350
Test: Start playing media, make a phone call, end a phonecall observe
metadata is correct.
Change-Id: Iea5cdacfe95c1a98cdaf73836ee6359a923f481b
jruthe [Wed, 2 Aug 2017 02:14:34 +0000 (02:14 +0000)]
test_vendor: Rename discoverable devices.
am:
974b1f9a91
Change-Id: I2252dd34fa376c4aa3e6da49b0f5f75f59d05837
jruthe [Tue, 1 Aug 2017 23:44:15 +0000 (16:44 -0700)]
test_vendor: Rename discoverable devices.
Test: compiles
Change-Id: I1fc1f6845995e9e816556679622db6f6d447b7b3
Sunny Kapdi [Tue, 13 Jun 2017 19:20:04 +0000 (12:20 -0700)]
AE: Set secondary adv max skip to zero
Setting secondary adv max skip to zero to guarantee
when the AUX Tx happens. This way the App can use the
primary advertising interval to dictate the AUX Tx
interval.
Bug:
62552121
Change-Id: Id66222e4f8a583c42acafb6532f81a817504e606
Subramanian Srinivasan [Tue, 1 Aug 2017 06:06:15 +0000 (06:06 +0000)]
Merge "Fix processing of Inquiry results data"
am:
67da9a5e19
Change-Id: If6b7523e9096c114263baf7a065f023186818c82
Treehugger Robot [Tue, 1 Aug 2017 05:59:41 +0000 (05:59 +0000)]
Merge "Fix processing of Inquiry results data"
Satish Kodishala [Tue, 1 Aug 2017 03:25:34 +0000 (03:25 +0000)]
Use the correct AVDTP version-specific features
am:
9cd9ef4c38
Change-Id: I85e816084a49a0a3438c8cc88fe2ab0ef32097f2
Satish Kodishala [Fri, 24 Feb 2017 09:39:01 +0000 (15:09 +0530)]
Use the correct AVDTP version-specific features
Failure:
A2DP is not reconnected after power cycling DUT BT.
Root cause:
AVDTP v1.3 feature request (AVDT_GetAllCapReq) sent by DUT
as remote supports the same, but this 1.3 feature is not
completely supported by DUT which leads to erroneous behavior.
Fix:
Use AVDT_GetAllCapReq request only when both host and remote
AVDTP version are 1.3 and above.
Test: 1.Pair to CarKit; 2.Connect to CarKit; 3.Do BT power cycle @ DUT
Bug:
35657623
Change-Id: I66c2d7d8fe8506b74282bcca93595e1cbf5c2565
Subramanian Srinivasan [Fri, 26 May 2017 00:05:11 +0000 (17:05 -0700)]
Fix processing of Inquiry results data
Process inquiry results data based on the data
length sent from the lower stack layers and not
by using HCI_EXT_INQ_RESPONSE_LEN.
Bug:
62589724
Change-Id: Iee4a2c8f0dfb459404b28ba21061f7ced9f8455c
Pavlin Radoslavov [Mon, 31 Jul 2017 18:08:21 +0000 (18:08 +0000)]
Fix the MAC address for INTEROP_2MBPS_LINK_ONLY entry
am:
b60955f9c7
Change-Id: I06a99e795b0ddfd6978fca2ccca09f20de3d299f
Pavlin Radoslavov [Mon, 31 Jul 2017 03:18:57 +0000 (20:18 -0700)]
Fix the MAC address for INTEROP_2MBPS_LINK_ONLY entry
Bug:
62394764
Test: Code compilation
Change-Id: I3e6d8bb8258d6cc56ce05d7f17dda445859f011a
Pavlin Radoslavov [Fri, 28 Jul 2017 19:29:43 +0000 (19:29 +0000)]
Add interoperability mechanism to restrict the AVDTP MTU for AAC codec
am:
b866da0bc1
Change-Id: I79d73807f18ca5f21050f72b16c0e6f6f972f0fb
Pavlin Radoslavov [Fri, 28 Jul 2017 02:19:32 +0000 (19:19 -0700)]
Add interoperability mechanism to restrict the AVDTP MTU for AAC codec
Also, add an interoperability entry for devices that are known
to have AAC-related issues.
Test: A2DP streaming to Headsets
Bug:
63725151
Change-Id: Ic9b6640da44ebc28bfa63a19a87f0543d69bc576
Matadeen Mishra [Thu, 27 Jul 2017 02:29:36 +0000 (02:29 +0000)]
Retry authentication in key-missing or pairing collision use case
am:
a95a6a3608
Change-Id: Iad1f7b2b5cc32fe6bb7e7237a4652ba7b2ed4e78
Matadeen Mishra [Fri, 17 Feb 2017 07:10:53 +0000 (12:40 +0530)]
Retry authentication in key-missing or pairing collision use case
Problem:
A2DP connection failing with connection timeout
Steps:
1. Pair and connect car kit from DUT
2. Disconnect the car kit from DUT
3 Unpair DUT from car kit menu and initiate pairing from car kit.
Pairing and A2DP connection should be successful.
Failure:
Paring and A2DP connections fail
Root Cause:
As the stack posting authentication failure to upper layers
when SOC gives key missing error code remote removed from
DUT paired list, but same time lower layers keep retrying
for missing key and leading to connection failure.
Fix:
Don't post authentication complete to upper layers when stack
re trying for security in key missing or transaction collision cases
Test: manual
Bug:
35448920
Change-Id: I970c8679bf27801fe46f8dd757d6435ed500f77f
(cherry picked from commit
35752e32fb5d859c012f6d06f2c22fa6b1f84174)
Eric Laurent [Wed, 26 Jul 2017 20:19:29 +0000 (20:19 +0000)]
Merge "Revert "bt: Update libchrome APIS to r456626.""
am:
6241dd5522
Change-Id: I2ab440ec5601a01717428b0ad8faf135437af971
Eric Laurent [Wed, 26 Jul 2017 20:02:18 +0000 (20:02 +0000)]
Merge "Revert "bt: Update libchrome APIS to r456626.""
Pavlin Radoslavov [Wed, 26 Jul 2017 19:56:48 +0000 (19:56 +0000)]
Merge "Use a mutex to protect the consistency of the tBTA_PM_TIMER state"
am:
02ce3f8f52
Change-Id: I61dbfa463046af52f30385bb2593709b0f8e7730
Treehugger Robot [Wed, 26 Jul 2017 19:48:05 +0000 (19:48 +0000)]
Merge "Use a mutex to protect the consistency of the tBTA_PM_TIMER state"
Joseph Pirozzo [Wed, 26 Jul 2017 18:35:19 +0000 (18:35 +0000)]
Merge "HFP Client connect Audio"
am:
d568679105
Change-Id: Ie8b2a8b3b0d54d10fb99017d6f34649004033a5c
Treehugger Robot [Wed, 26 Jul 2017 18:30:08 +0000 (18:30 +0000)]
Merge "HFP Client connect Audio"
Stanley Tng [Wed, 26 Jul 2017 18:04:58 +0000 (18:04 +0000)]
Merge "Remove unwanted space characters from dialing number"
am:
ac3faef9da
Change-Id: I1209591467468e7b5b5cc77b04c759b02b3b7b67
Treehugger Robot [Wed, 26 Jul 2017 17:50:46 +0000 (17:50 +0000)]
Merge "Remove unwanted space characters from dialing number"
Luis Hector Chavez [Wed, 26 Jul 2017 17:36:20 +0000 (17:36 +0000)]
Revert "bt: Update libchrome APIS to r456626."
This reverts commit
014890b74878022db7d23be47db179ba06e01856.
Reason for revert: Broke the mac_sdk
Exempt-From-Owner-Approval: Fixing mac_sdk
Change-Id: I11652839faf8430a7ee6ad64af0a7bd6985478e8
Pavlin Radoslavov [Wed, 26 Jul 2017 06:55:04 +0000 (23:55 -0700)]
Use a mutex to protect the consistency of the tBTA_PM_TIMER state
Bug:
63689331
Test: Code compilation
Change-Id: Id8ab78473e1f766d5a76b967024b7ff4af499667
Bailey Forrest [Wed, 26 Jul 2017 02:50:39 +0000 (19:50 -0700)]
Call bta_dm_sp_cback if BTM_LOCAL_IO_CAPS == BTM_IO_CAP_NONE
Without bta_dm_sp_cback, bluetooth.h platform API does not function
correctly when BTM_IO_CAP_NONE is set.
- bond_state_changed_callback is never called
- get_remote_device_properties returns nothing
This reverts
eb1ad1d47b84767d9af180243cb14ac409331a0d
Bug:
63603696
Test: Test on device. bond_state_changed_callback called
Change-Id: If8d537355eb12c84ecbf5eb2d07fb27b178d9c66
Jay Civelli [Wed, 26 Jul 2017 01:53:56 +0000 (01:53 +0000)]
bt: Update libchrome APIS to r456626.
am:
014890b748
Change-Id: Iaba9b51fa55e72df01bcdb46c10dcf46d11a6856
Joseph Pirozzo [Thu, 29 Jun 2017 21:23:01 +0000 (14:23 -0700)]
HFP Client connect Audio
Listen for incomming SCO connections any time the Hands Free Profile is
connected to a phone. Additionally allow eSCO connections on devices
that only support the standard SBC audio codec.
Bug:
62086689
Test: pair and connect a phone via HFP then start a phonecall and
enable and disable audio routing through BT observe that the connection
is established everytime.
Change-Id: I11319a4a85f8c9d36114a6fc09da0f0b8da16672
Stanley Tng [Tue, 25 Jul 2017 17:07:05 +0000 (10:07 -0700)]
Remove unwanted space characters from dialing number
Certain car kits might send an AT command with space characters in
the dialing number. This commit adds a workaround to trim these unwanted
space characters.
Bug:
6340999
Test: Manual test with a car kit but purposely added numbers with spaces.
Change-Id: I9c238bc625fff8503c45cbbfaeb8bdd15b8a7d9a
Jay Civelli [Mon, 27 Mar 2017 16:53:18 +0000 (09:53 -0700)]
bt: Update libchrome APIS to r456626.
The new libchrome has been ported from Chromium and some APIs
have changed. Make necessary changes at call sites.
Change-Id: If5ea3659905f485fd0513c75e9d4f7c99b390c16
Myles Watson [Sat, 22 Jul 2017 03:46:50 +0000 (03:46 +0000)]
Merge "test_vendor: Add base implementation"
am:
f246f94a5b
Change-Id: I94550ef296e9d70739d16711c5f4601e6541df3a
Treehugger Robot [Sat, 22 Jul 2017 03:42:59 +0000 (03:42 +0000)]
Merge "test_vendor: Add base implementation"
Colin Cross [Fri, 21 Jul 2017 23:02:59 +0000 (23:02 +0000)]
Merge "Remove static library from required modules list"
am:
01e400f210
Change-Id: Idfb829105260ecefb777c0172ca8572e603a51b8
Treehugger Robot [Fri, 21 Jul 2017 22:57:44 +0000 (22:57 +0000)]
Merge "Remove static library from required modules list"