History log of /system/bt/stack/gatt/gatt_main.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2490cbd40789e6686c5f403626ec5c383172f746 09-May-2018 Stanley Tng <stng@google.com> Fix PTS: TC_GATT_SR_UNS_BI_01_C sends unsupported opcode

In this PTS test, add code to send back an unsupported error response
when an unsupported OpCode is received.

Bug: 79347869
Test: Rerun and pass PTS test
Change-Id: Ibf95dbc18dabbe201850da675c7a1b2739624de9
(cherry picked from commit 12fbcb60c60540a7fb968466ccb90e9cdf08861f)
/system/bt/stack/gatt/gatt_main.cc
1f9447886254d1207aa3283b2106170089c5c5e5 21-Jan-2018 Jakub Pawlowski <jpawlowski@google.com> Report credit count change, when credits are received for LE CoC

Test: manual with HA
Bug: 69623109
Change-Id: I1c6f240eaf08d876bb285f3ffa737365f392925e
/system/bt/stack/gatt/gatt_main.cc
5b790feeeb211c42bf78ca3ae9c26aa30e516765 18-Sep-2017 Jakub Pawlowski <jpawlowski@google.com> Make copyright headers consistent with Google template; remove "(C)"

Test: Comment changes only; still compiles...
Change-Id: Id699a8170112f06e4a2c9f2e0f0834d1817ace4e
/system/bt/stack/gatt/gatt_main.cc
b749ebde2c6a55569e4e480abda3a4ee3afe2d72 07-Oct-2017 Myles Watson <mylesgw@google.com> Use unary operator instead of == bool

Automatically generated with coccinelle:

@@
expression e1;
@@

-e1 == false
+!e1

@@
expression e1;
@@

-false == e1
+!e1

@@
expression e1;
@@

-e1 == true
+e1

@@
expression e1;
@@

-true == e1
+e1

Test: build
Change-Id: Ic7df0dc43b550594855e457466b6bccd8f3443a3
/system/bt/stack/gatt/gatt_main.cc
d08d44e09b680195c253cb24971428e3fb2c77bb 15-Sep-2017 Jakub Pawlowski <jpawlowski@google.com> SetPreferredPhy/ReadPhy callback fix

Bug: 65746728
Test: manual
Change-Id: Ifdd8e7051c953aa1c006abecd62d1af196619d98
/system/bt/stack/gatt/gatt_main.cc
a484a888196ddf8bcbf1ad3226d6451bc735a94b 25-Jun-2017 Jakub Pawlowski <jpawlowski@google.com> Rename bt_bdaddr_t into RawAddress (3/3)

Test: compilation test
Change-Id: I4571721a0c6165a66450ee157a53d8d15bfc45d0
/system/bt/stack/gatt/gatt_main.cc
e91297a4d1a77ae0c367fbe756090b7357e9893a 19-Jun-2017 Pavlin Radoslavov <pavlin@google.com> Add a mechanism to avoid using AVDTP RECONFIGURE for blacklisted devices

Some carkits report SUCCESS for AVDTP RECONFIGURE commands when
changing A2DP codec configuration. However, there is no audio coming
from the carkit.

Bug: 37625892
Test: Manual - A2DP Codec reconfiguration while streaming audio
Change-Id: I01f37a2514e490986a20e96ace78c92463403396
/system/bt/stack/gatt/gatt_main.cc
c2276b06572ab6fc1f900fbb1f41087e77d47e2a 10-Jun-2017 Jakub Pawlowski <jpawlowski@google.com> Use bt_bdaddr_t instead of BD_ADDR

Test: compilation test, sl4a GattReadTest
Change-Id: I8d1bd6914aec55bb53495b1d0d5e3d37b86865e6
/system/bt/stack/gatt/gatt_main.cc
d8be0e590aa1efe1c33a8acfea0d7e14fd1a8030 09-Jun-2017 Jakub Pawlowski <jpawlowski@google.com> Get rid of GATT_TRACE_* logs in favour of base/logging.h

Change-Id: Id77d313c5bff5e611441599da351a766d0ce5916
/system/bt/stack/gatt/gatt_main.cc
3dda89880b66b0f04f684d138e7c3dc9a0e61597 06-Jun-2017 Jakub Pawlowski <jpawlowski@google.com> Use std::unordered_set for keeping app_hold_link

Change-Id: Ia8a0c9a2264979c1ff89faa5ddf17a83fcb7c7ce
/system/bt/stack/gatt/gatt_main.cc
7cfd8391f6db2d387ea556ca2b7be0a7e4791e5d 06-Jun-2017 Jakub Pawlowski <jpawlowski@google.com> Refactor tGATT_BG_CONN_DEV

* Use list for keeping the devices instead of fixes array, get rid of
the in_use field.
* Use unordered_set instead of array to keep gatt_if of apps interested
in specific device.
* the in_use flag was never cleared before, this had the potential to
fill the whole array when multiple devices were addred/removed to the
whitelist. This issue is fixed now.

Test: compilation test
Change-Id: Id87c2ae9c5b0ce0887a4fa9be50e34d646d22a13
/system/bt/stack/gatt/gatt_main.cc
f4c0292c63085cd4d0f5c001974b6503aeaf8ed3 30-May-2017 Jakub Pawlowski <jpawlowski@google.com> Pass GATT cb's by reference and other style fixes

Test: compilation test
Change-Id: I410d0d0a0bf49b9f3ca5e034c66fe8e82661cee7
/system/bt/stack/gatt/gatt_main.cc
eb3ab848f8361d54faa3a997fbecfe48af9de731 30-May-2017 Jakub Pawlowski <jpawlowski@google.com> Use std::queue for pending_enc_clcb

Test: 62188929
Change-Id: Ide07f15c5e5b6bc8b93ac350081b7bef7c7b3938
/system/bt/stack/gatt/gatt_main.cc
44a1c7eafb2db9012c26dd622726655f19fbc0b7 31-May-2017 Avish Shah <avish.shah@broadcom.com> GATT: Fixed typo while notifying connection update

Current conditions checks whether the app registered for
PHY_UPDATE instead it should check for CONN_UPDATE.

Bug: 62206018
Test: Manual
Change-Id: Ie9d068a24d13ea0b186b0ca874531aa4ffd1121f
/system/bt/stack/gatt/gatt_main.cc
43c7f9f4775e589d8fd0604ef4717996696a0321 26-May-2017 Myles Watson <mylesgw@google.com> GATT: Interop fix for service changed indications

The Pixel C Keyboard disconnects if it receives an indication
for which it hasn't registered.

Test: Add a GATT service with Pixel C connected
Bug: 34352677
Change-Id: I1f717db40b2ba9ec21feac5fd9e339c09f140d51
/system/bt/stack/gatt/gatt_main.cc
6395f1547ed6179dcdeed392bd9909d18772fb25 09-May-2017 Jakub Pawlowski <jpawlowski@google.com> Improve GATT Server database handling.

- use references instead of pointers where possible. Thanks to it we can
remove some reduntant null checks and simplify the code.
- use directly allocated memory instead of own buffers. Thanks to it the
stack uses around 12kb less of memory after startup.
- use list and vector from std library, instead of some hand-written
implementations.

This patch is a prerequisite for further server refactoring, that will
further reduce the space used, make unit-testing possible, and enable
proper handling of PTS GATT tests.

Test: sl4a GattReadTest
Bug: 38225928
Change-Id: I1620be682259ccb8f0c02754806e355e3f1ad0c1
/system/bt/stack/gatt/gatt_main.cc
96fb273d92a31204edcf43ab2594a19876d14056 25-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Add option to specify initial LE connection PHY (1/3)

For whitelist connections we always use all possible PHYs, for direct
connection use PHY specified by client.

Test: manual
Bug: 30622771
Change-Id: I720f134e2800dc3d282135bb7ffbe3882117c680
/system/bt/stack/gatt/gatt_main.cc
b5ba4fdbc433544de3806f8e82976898e444b491 24-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Expose connection update callback (1/3)

Test: manual
Bug: 30622771
Change-Id: I94d25f6f22b42fb1432a9288c97b82503d57db86
/system/bt/stack/gatt/gatt_main.cc
eafd45d08653bb1621c82a2f3cf922a43a0b1bc5 23-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Set preferred PHY and read PHY implementation (3/3)

Test: manual
Bug: 30622771
Change-Id: I4267238a0b5c7bc373ae1846ebd19a716881a4ec
/system/bt/stack/gatt/gatt_main.cc
c176ff364e12bc9fd9a09b83a4a4bed9bd818144 13-Jan-2017 IHLHO KIM <ih0923.kim@samsung.com> Fix the GATT server and HOGP disconnect

GATT server disconnect and HOGP disconnect are not working after the
following commit: a62adcab30929566b435891611232566bd69204a.

‘BTA_GATTS_CancelOpen’ makes ‘gatt_update_app_hold_link_status’
return FALSE value. As a result, ‘BTA_GATTS_Close’ cannot disconnect
the link. The sequence has to be changed like GATT client.

And the above mentioned fix removed ‘found’ checking routine in
‘gatt_update_app_hold_link_status’.

It makes two app hold links with same gatt_if when HOGP is connected and
background connection is added. But HOGP disconnect removes only one held
link. So HOGP is never disconnected.

The ‘found’ checking routine has to be rolled back.

Test: manual
Change-Id: Ibea825b5cc844195f0cf4a30cbcca831880c9088
/system/bt/stack/gatt/gatt_main.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/stack/gatt/gatt_main.cc
9ca07091a1f07ea201cee0504dab6a1d7073d429 29-Nov-2016 Myles Watson <mylesgw@google.com> Reformat long comments before clang-format

Test: mma -j32
Change-Id: I86a2a4af9dcd22d675ca1f764bb2c9623d63edcc
/system/bt/stack/gatt/gatt_main.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/stack/gatt/gatt_main.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/stack/gatt/gatt_main.cc
84baa7f16e830394408278dbb8c508dd9fa02887 14-Nov-2016 Myles Watson <mylesgw@google.com> Remove BLE_INCLUDED define

Test: Connect to a BLE Keyboard
Change-Id: I5f8f4017c90c3c404004632fd10e6c2b93bd7783
/system/bt/stack/gatt/gatt_main.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/stack/gatt/gatt_main.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/stack/gatt/gatt_main.cc
0e4989b58ff7011f75d0ad00e14c7abc90f57e25 22-Aug-2014 Subramanian Srinivasan <subrsrin@codeaurora.org> Dequeues direct connection request during cancel conn operation

When cancel connection request for a device is sent
from an app and if the current pending connection
request's BD address does not match with this device,
the entries of the connection request pending queue
are also checked. If BD address match occurs with an
entry in the connection request queue, the entry is
removed from the queue.

Change-Id: I1bf50a424d86ac53a5201fff742c822f4c8d1c0b
/system/bt/stack/gatt/gatt_main.cc
b2a292b5d8df2f359c38b0787bc01181225a9bc9 15-Oct-2016 Pavlin Radoslavov <pavlin@google.com> Renamed most C files to C++: *.c to *.cc

Also:
- Fixed C++ related compilation errors.
- Added missing 'extern "C"' guards in some of the header files.
- Added missing LOCAL_CPP_EXTENSION to Android.mk files.
- Added-back btif/src/btif_mce.cc and bta/mce/bta_mce_* to
btif/Android.mk and bta/Android.mk respectively.
- Fixed the alphabetical ordering of the *.cc files in some
of the Android.mk files.
- Added missing Copyright header to "osi/include/list.h"
- Updated "osi/src/wakelock.cc" to use C++ std::string
instead of dynamic allocation of C-style strings.

Test: code compilation, unit tests, and A2DP streaming
Change-Id: Ia2f7215ed9df32775c701b68fc86b09875b942c7
/system/bt/stack/gatt/gatt_main.cc