47616530ceea2ea6432ffb35cd8a3fc0a56365b5 |
|
08-Sep-2017 |
Jakub Pawlowski <jpawlowski@google.com> |
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)
/system/bt/btif/src/btif_hl.cc
|
9e030fde05352ec4385d7baf6cc2af89e95e039c |
|
25-Jun-2017 |
Jakub Pawlowski <jpawlowski@google.com> |
Rename bt_bdaddr_t into RawAddress (3/3) Test: compilation test Change-Id: I4571721a0c6165a66450ee157a53d8d15bfc45d0
/system/bt/btif/src/btif_hl.cc
|
50cf52cf6b097ecb57922d69c22d559097a205b0 |
|
15-Jun-2017 |
Jakub Pawlowski <jpawlowski@google.com> |
Replace BD_ADDR with bt_bdaddr_t in HL related code Test: compilation test Change-Id: Ife04e0839a4a6f61b77a60f49bf44ab5bdacc874
/system/bt/btif/src/btif_hl.cc
|
f28952970ede50958f65ab88943977f9ca871b84 |
|
17-Feb-2017 |
Andre Eisenbach <eisenbach@google.com> |
Fix HDP select thread id type Recent changes in libbionic cause pthread_join to SIGABRT if called with an invalid thread id. The select_thread_id variable in the HDP sub-system was truncated from long->int causing pthread_join to not find the correct thread and triggering the error. Using the correct type for select_thread_id fixes this problem. Change-Id: Id332fa86cf7f30abd211588d32899d41e157b462 Fixes: 35432169 Test: manual; boot device, turn BT off; ensure it stays off
/system/bt/btif/src/btif_hl.cc
|
c338fe868cc78fca87d3827b568b0a997f575642 |
|
01-Feb-2017 |
Marie Janssen <jamuraa@google.com> |
btif: remove logspam at higher debug levels Some CHECK macros had logs that printed the function name, which duplicated the logs in the functions outside the checks, producing too many logs. Remove some unused macros. Changes: 02-01 09:34:11.757 1259 1755 D bt_btif : get_folder_items_list_rsp 02-01 09:34:11.757 1259 1755 D bt_btif : get_folder_items_list_rsp: item_cnt: 0 len: 0 to 02-01 09:34:11.757 1259 1755 D bt_btif : get_folder_items_list_rsp: item_cnt: 0 len: 0 and similar. Test: run logcat, check that we have less duplicated logs Change-Id: Id6e57f38b34d176ed8be0c3baedfbcf55e61a9a4
/system/bt/btif/src/btif_hl.cc
|
f2af1c42ccb2f642b241c2261b42d0be61d45438 |
|
13-Dec-2016 |
Jack He <siyuanh@google.com> |
Replace assert with CHECK from base/logging.h * Replace assert with CHECK * Remove all NDEBUG definitions * Remove hacks for BT_LIBCHROME_NDEBUG * Removed some removed directories from Makefile such as hcis, brcm, rpc Coccinelle-assisted: @@ @@ - #include "base/logging.h" + #include <base/logging.h> @ assert_included @ @@ @ base_logging_included @ @@ @ depends on (assert_included && !(base_logging_included)) @ @@ - #include <assert.h> + #include <base/logging.h> @ depends on (assert_included && base_logging_included) @ @@ - #include <assert.h> @@ expression E; @@ - assert(E); + CHECK(E); And a bash script: for file in $(find . -name "*.cc"); do spatch --sp-file replace_assert_with_CHECK.cocci --in-place $file done The following files are maually edited: btif/src/btif_config.cc btif/src/btif_avrcp_audio_track.cc btif/src/btif_gatt_client.cc osi/src/data_dispatcher.cc osi/src/reactor.cc osi/src/thread.cc osi/src/fixed_queue.cc osi/src/list.cc osi/src/allocation_tracker.cc osi/src/alarm.cc osi/test/wakelock_test.cc Bug: 31781465 Test: Code compilation, Unit Tests, BtStressTest, BtFunhausMetricsTest Change-Id: I21dc10a45be31665e41441b75b0515ed87523988
/system/bt/btif/src/btif_hl.cc
|
911d1ae03efec2d54c3b1b605589d790d1745488 |
|
29-Nov-2016 |
Myles Watson <mylesgw@google.com> |
Apply clang-format to the rest of the tree find * | grep "\.[ch]" | xargs clang-format --style=file -i Test: mma -j32 Change-Id: I6fcc9862bb7bc07c2a367ca58fef2b3cd27a6f05
/system/bt/btif/src/btif_hl.cc
|
ee96a3c60fca590d38025925c072d264e06493c4 |
|
23-Nov-2016 |
Myles Watson <mylesgw@google.com> |
Fix asterisks in block quotes Remove double asterisks from block quotes. git grep -lP '^[*][*]' | xargs sed 's/^[*][*]/ \*/' -i Fix asterisk line lengths git grep -l '^[ /][*]\{79,\}[*/]' | \ xargs sed -i s,"^\([ /]\)[*]\([*]\{78\}\)[*]*\([*/]\)","\1\2\3", Test: mma -j32 Change-Id: Ie3fd375ac2f804cb0f53bf1314a005e85973b3d7
/system/bt/btif/src/btif_hl.cc
|
f33b6f434f086b20fabe5913016bc423ac975057 |
|
23-Nov-2016 |
Marie Janssen <jamuraa@google.com> |
readability fix: No assigns in if conditionals Coccinelle-assisted: @@ variable i; expression E; statement S1, S2; @@ + i = E; if ( ( - (i = E) + i != ... | - (i = E) + i == ... | - (i = E) + i < ... | - (i = E) + i > ... | - (i = E) + i <= ... | - (i = E) + i >= ... | - (i = E) + i ) ) S1 else S2 for file in $(find . -name "*.cc"); do spatch --sp no-if-assigns.cocci --in-place $file done clang-format --style=file -i bta/**/*.cc Test: mma -j37 and basic sanity testing on angler, sailfish Change-Id: I41a2964afac347c24e13869b6c172e321e646091
/system/bt/btif/src/btif_hl.cc
|
9008888d24407541aa383aa4bd363a40abbf954b |
|
16-Nov-2016 |
Myles Watson <mylesgw@google.com> |
Fix formatting after removing defines clang-format -i --style=file bta/*/* btif/*/* include/* Test: mma -j32 Change-Id: I9ebb32f0cc5bd24a7cb2ae25699999aab5036b13
/system/bt/btif/src/btif_hl.cc
|
f098d057753b1637ab3cb99a2b829aa2406fbc6c |
|
03-Feb-2016 |
Matadeen Mishra <matade@codeaurora.org> |
Move HDP reg_counter updates to BTIF thread Use case: register/unregister HDP from third party APK Test Steps: 1.Install Any Test APK which internally registers/unregister the HDP. 2.Run Test APK. 3.Do initialization of Test APK which internally registers the HDP. 4.Force stop the Test APK. 5.And rerun the APK by going back test APK menu. 6.Now it never perform the re-register the HDP as part of initialization. Root Cause: HDP registration related counter write operations are done in JNI main thread, and it's been referenced in BTIF thread.Sometimes, if the context switch to BTIF thread doesn't happen immediately after counter increment/decrement, it may not un-register the app if the counter becomes 0. Fix: Fixed it by making all operations related to counter in BTIF thread, so that de-registration happens for all HDP APPs. Test: code compilation. Change-Id: I71ace68a5f3d39d81b646f5f40c02ce56b9e93f0
/system/bt/btif/src/btif_hl.cc
|
d7ffd64accbd50a27289a388856e56244ccbb5da |
|
27-Oct-2016 |
Myles Watson <mylesgw@google.com> |
Remove deprecated UNUSED macro (5/5) Include osi.h for UNUSED_ATTR. Test: mma -j32 Change-Id: I43260669dc1f54639e46cc9620093d727ee86276
/system/bt/btif/src/btif_hl.cc
|
d35a648d39710bbc5ac59f8add85166455af5af7 |
|
27-Oct-2016 |
Myles Watson <mylesgw@google.com> |
Remove deprecated UNUSED macro (1/5) Generated automatically with coccinelle /* This rule matches functions with arguments * that have an UNUSED(arg) in the body. */ @r1@ identifier arg; identifier fn; type t; parameter list[n] P; @@ fn(P, const t arg) { ... UNUSED(arg); ... } /* This rule removes the UNUSED line, and adds * UNUSED_ATTR to the parameter list. */ @depends on r1@ identifier r1.arg; identifier r1.fn; type r1.t; parameter list[r1.n] r1.P; typedef UNUSED_ATTR; @@ fn(P, - const t arg + UNUSED_ATTR GETRIDOFTHISCOMMA, const t arg ) { ... -UNUSED(arg); ... } Test: mma -j32 Change-Id: Idcaadd688d669d484e557becd050e69454508f3c
/system/bt/btif/src/btif_hl.cc
|
40cde56d28ab9751ba76bded0b7ac5974c750a97 |
|
21-Oct-2016 |
Myles Watson <mylesgw@google.com> |
btif: Add do-while blocks to macros Test: mma -j32 Change-Id: Ie82465b8cef6c4f527fad13892abb365e15dad7c
/system/bt/btif/src/btif_hl.cc
|
f45481678af0694902b5200ba69ced4cb61d73f0 |
|
19-Oct-2016 |
Myles Watson <mylesgw@google.com> |
btif: Fixup clang-format In src/btif_sock_l2cap.cc: Move a comment before the define and run clang-format again. Fix formatting in comments that were more than 80-characters wide. Test: mma -j32 Change-Id: I17465a1425d1de9a28f0675fe65c8529359a87af
/system/bt/btif/src/btif_hl.cc
|
6bd442f543972b072ef2cbbcf2f7c91202de1045 |
|
19-Oct-2016 |
Myles Watson <mylesgw@google.com> |
btif: Apply clang-format clang-format doesn't understand block quotes of this form: /* This is not handled well ** because there are two asterisks **/ cd btif/ # Replace '**' at the beginning of the line with ' *' sed 's/^[*][*]/ \*/' -i include/* src/* test/* co/* clang-format --style=file -i src/* include/* test/* co/* Test: mma -j32 Change-Id: I2477eae5480602d5b2fee5ec89c9ed7888022341
/system/bt/btif/src/btif_hl.cc
|
696996c1159ce0b963bf7996720d4e638f30763c |
|
27-Jun-2016 |
Greg Kaiser <gkaiser@google.com> |
btif: Fix logic bug within register_application We were checking for the SINK bit twice in the same condition, and would incorrectly report a SINK only mask as a DUAL device, and would never hit the logic path to report a device as SINK. Bug: 29763285 Change-Id: Ibc39db6396c09ddcd63896302dabf72841304cf2
/system/bt/btif/src/btif_hl.cc
|
b7f64bc45dec7f7fec74ceb04874f322b9434bbf |
|
22-Jun-2016 |
Marie Janssen <jamuraa@google.com> |
btif: standardize types, #ifs Use standard types everywhere. Use standard style for #if statements: - #if (VAR_NAME == TRUE) - #if (VAR_NAME1 == TRUE && VAR_NAME2 == TRUE) Use __func__ instead of __FUNCTION__ Change-Id: Ic29d1d0b32c3ca9953752a4e5da6c28f45ec8895
/system/bt/btif/src/btif_hl.cc
|
8cbc291080730cd7d04990a8fc0e11249b06aa08 |
|
17-Jun-2016 |
Pavlin Radoslavov <pavlin@google.com> |
Add missing NULL pointers assignments Each pointer that was freed by one of the following functions should be reset to NULL: - config_free() - data_dispatcher_free() - fixed_queue_free() - list_free() Bug: 29421693 Change-Id: Ie55a04ed986393994564edcf872d7413b0767a85
/system/bt/btif/src/btif_hl.cc
|
63b0519c3f0d1c0cc523e0e9553c60fc68651acc |
|
20-May-2016 |
Chih-Hung Hsieh <chh@google.com> |
Fix misc-macro-parentheses warnings When compiled with WITH_TIDY=1, clang-tidy warns about missing parameters around macro parameters. Bug: 28705665 Change-Id: I89c23cfe6eaefae5ef3c648a7c123c0501662c13
/system/bt/btif/src/btif_hl.cc
|
d6121a37c579731b89348e618a823c53b938449a |
|
12-May-2016 |
Pavlin Radoslavov <pavlin@google.com> |
Restart failed system calls interrupted with errno of EINTR In number of places we don't handle properly system calls failures when the errno is EINTR (i.e., the system call was interrupted by a signal). In all our use cases, the system calls should be restarted. The handling of the following system calls (as used in the code) has been updated/fixed: poll, send, recv, sendmsg, nanosleep, epoll_wait read - mostly (e.g., socket-like fds) write - mostly (e.g., socket-like fds) select, accept, connect Bug: 28471477 Bug: 28658141 Change-Id: I03e6f0f67e33876780fb6d02c33eb84547ba8f95
/system/bt/btif/src/btif_hl.cc
|
713993d1784ab7c23aee1fa3cf1ab8676cc0aa69 |
|
21-Apr-2016 |
Jakub Pawlowski <jpawlowski@google.com> |
Convert BTIF code from C to C++ Modifications required: * added proper casting * moved variable definitions before goto statements * added 'extern "C"' markers where needed * renamed 'operator' to 'operator_name' Bug: 28485365 Change-Id: I903357967387207e678866c02e008f047f8263f6
/system/bt/btif/src/btif_hl.cc
|