History log of /system/bt/bta/include/utl.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ad1e23d50e431fb82ff1b8d3ce02f64ca0c5a940 10-Dec-2016 Jack He <siyuanh@google.com> Remove extern "C" from header files

Since change 290046, most files in system/bt is compiled as C++ source.
Therefore, there is no longer a need for the extern "C" wrapper around
includes that export symbols from those sources.

The following python script is applied to each file in the directory:

front = '#ifdef\s+__cplusplus\s+extern\s+"C"\s+{\s+#endif\s+'
back = '#ifdef\s+__cplusplus\s+}\s+#endif'
with open(sys.argv[1], "r") as f:
data = f.read()
data = re.sub(front, "", data)
data = re.sub(back, "", data)
print data

through a shell script:

for file in $(find . -name "*.h"); do
python remove_cpp_extern_c.py $file > tmp
cat tmp > $file
rm tmp
done

with following files not edited:
* stack/include/a2dp_*
* include/bt_trace.h
* embdrv/sbc/*

Bug: 33492510
Test: Code compilation, BtFunhausMetricsTest, BtStressTest
Change-Id: Iac21cdfb1924b50478dd0b82326e092602cbc9d4
/system/bt/bta/include/utl.h
1baaae3f34a667058e7f0c5f778357d98320cf38 09-Nov-2016 Myles Watson <mylesgw@google.com> bta: Fix comment formatting after clang-format

Test: mma -j32
Change-Id: Ic945ac421b1918527105c59674eda89afd3d4126
/system/bt/bta/include/utl.h
cd1fd07f1306e08fe048682dd5918987e579f937 09-Nov-2016 Myles Watson <mylesgw@google.com> bta: Apply clang-format

clang-format -i --style=file bta/*/*

(twice)

Test: mma -j32
Change-Id: Ib118b1dfb6a34f9a5bfe153d65841e9041165264
/system/bt/bta/include/utl.h
8af480e24549ba51a3f6858d9d9af504715e0bea 09-Nov-2016 Myles Watson <mylesgw@google.com> bta: Remove double asterisks in comments

Double asterisks at the beginning of the line
sed -i s,"^[*][*]"," *", bta/*/*

Double asterisks after a space
sed -i s,"^ [*][*]\([^*]\)"," *\1", bta/*/*
sed -i s,"^ [*][*]$"," *", bta/*/*

Test: mma -j32
Change-Id: Ib83b802c7000176683b4e7f24d1255b3c2c6c01c
/system/bt/bta/include/utl.h
c75a71d9b6012c46743099b53d172ad46e6f41d2 22-Jun-2016 Satish Kodishala <skodisha@codeaurora.org> AG: CLCC response can contain non-ATD characters

Test case:
1. Connect Plantronics backbeat PRO headset.
2. Initiate outgoing call from phone.
3. Accept the call from remote side and terminate call.
4. Try to redial from headset and observe

Failure:
AG is sending error for redial request from BT headset.

Root cause:
Sometimes, the number in CLCC response has "-".
Repeated from the headset, the ATD string has "-"
which is not allowed in the dial string for ATD and
errors.

Fix:
* Sanitize CLCC response to only include valid ATD characters.
* Accept "-" in ATD because it works for us.

Change-Id: I854165c7da295f428852c829543eb4fc18455d91
/system/bt/bta/include/utl.h
e9e58ced195ec2c983c7723c9cbdabd45eb0f2fd 17-Jun-2016 Marie Janssen <jamuraa@google.com> bta: use standard types

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__
Fix some debug statements to use __func__

Change-Id: Ib86de4de9f14529ecaa4f71597260e3b5785360b
/system/bt/bta/include/utl.h
3d6accfcc0bdc5c7a8713320c9bb069cbf253348 11-May-2016 Bryce Lee <brycelee@google.com> Move extern "C" to top of headers and remove tBTA_HF_CLIENT_HDR.

Previously, extern "C" was placed in various locations within the header
files, sometimes below actual struct declarations. Doing so would lead to
alignment issues between C and C++ code.

tBTA_HF_CLIENT_HDR was removed from bta_hf_client_api since it was
extraneous and empty - leading to alignment issues.

Change-Id: Icdd338f1affe4c3a70c7bbd716249be6a16443d2
/system/bt/bta/include/utl.h
20524d393e8b3bea4c573f7980cd843500b0e6a4 03-Feb-2016 Pavlin Radoslavov <pavlin@google.com> Refactor usage of osi_free() and osi_freebuf()

* Allow to call osi_freebuf(ptr) on NULL pointers. This simplifies
the code: a notable number of "if (foo != NULL)" checks are removed.
* Add new function osi_free_and_reset(p_ptr) that frees the buffer,
and explicitly resets the pointer to NULL.
This prevents unintended usage of free memory.
* Add corresponding function osi_freebuf_and_reset(p_ptr)
* Minor cleanup around usages of osi_free() and osi_freebuf()

Also:
* Removed unused function btif_gattc_cleanup()
* Replaced usage of the following functions with osi_freebuf_and_reset()
- mca_free_buf()
- utl_freebuf()
- btif_hl_free_buf()
* Replaced usage of rc_supported_event_free() with osi_freebuf()
* Replaced usage of btif_hl_get_buf() with osi_getbuf()
* Eliminate some of the osi_get_buf_size() calls

Bug: 22948224
Change-Id: Ife860658b26274da6f228d7353cb0f1531587337
/system/bt/bta/include/utl.h
258c2538e3b62a8cdb403f2730c45d721e5292b4 28-Sep-2015 Pavlin Radoslavov <pavlin@google.com> GKI cleanup - moved GKI buffer allocation wrappers to OSI

* Moved the following GKI buffer allocation functions to OSI:
- GKI_getbuf() -> osi_getbuf()
- GKI_freebuf() -> osi_freebuf()
- GKI_get_buf_size() -> osi_get_buf_size()

For now we need the osi_getbuf() / osi_freebuf() allocation wrapper,
because we need to be able to call osi_get_buf_size() on the allocated
buffer.
In the future those should be replaced with osi_malloc() / osi_free().
Currently, the osi_malloc() buffer size internal allocation tracker
does not always track the size, hence we need the osi_getbuf() wrapper.

* Replaced GKI_MAX_BUF_SIZE with BT_DEFAULT_BUFFER_SIZE

* Added new file include/bt_common.h that can be usee to include
few files that should be included alost everywhere (e.g. bt_target.h"
NOTE: This file might be removed in the future and we should include
everywhere the right set of header files.

* Removed some of the GKI-related references

* Removed file include/gki_target.h

Change-Id: Ie87830e73143de200746d54235aa99f228a95024
/system/bt/bta/include/utl.h
83e2c342e8b40009f3509425722d309c0b8189b9 30-Sep-2014 Chris Manton <cmanton@google.com> Remove data_types.h
/system/bt/bta/include/utl.h
60126e439e01a30d6121a55aaf6d3a5d6d400507 01-Feb-2014 Mike J. Chen <mjchen@google.com> Add macro UNUSED() to bt_utils.h

Also include bt_utils.h in some other header files commonly
included by some subsystems.

Change-Id: I1e6be2abae503c4303c92d97eeeb29981beacd10
Signed-off-by: Mike J. Chen <mjchen@google.com>
/system/bt/bta/include/utl.h
5738f83aeb59361a0a2eda2460113f6dc9194271 13-Dec-2012 The Android Open Source Project <initial-contribution@android.com> Snapshot cdeccf6fdd8c2d494ea2867cb37a025bf8879baf

Change-Id: Ia2de32ccb97a9641462c72363b0a8c4288f4f36d
/system/bt/bta/include/utl.h