OSDN Git Service
(root)
/
android-x86
/
system-bt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23f0199
)
bt: Fix acl_ble_is_role_central() removal
author
Dmitry Shmidt
<dimitrysh@google.com>
Thu, 21 Jan 2021 19:38:47 +0000
(11:38 -0800)
committer
Dmitry Shmidt
<dimitrysh@google.com>
Thu, 21 Jan 2021 19:41:16 +0000
(11:41 -0800)
Bug:
178097755
Test: make -j24
Change-Id: I3d77c23fc90d5e12f2d909bba930813cb5d47026
stack/gatt/gatt_db.cc
patch
|
blob
|
history
diff --git
a/stack/gatt/gatt_db.cc
b/stack/gatt/gatt_db.cc
index
2f3fdbb
..
5d5e3e5
100644
(file)
--- a/
stack/gatt/gatt_db.cc
+++ b/
stack/gatt/gatt_db.cc
@@
-318,7
+318,9
@@
tGATT_STATUS gatts_db_read_attr_value_by_type(
(type.As16Bit() == GATT_UUID_GAP_DEVICE_NAME)) {
if ((flag & (BTM_SEC_LINK_KEY_KNOWN | BTM_SEC_FLAG_ENCRYPTED)) ==
BTM_SEC_LINK_KEY_KNOWN) {
- if (acl_ble_is_role_central(tcb.peer_bda)) {
+ uint8_t role = HCI_ROLE_UNKNOWN;
+ BTM_GetRole(tcb.peer_bda, &role);
+ if (role == HCI_ROLE_CENTRAL) {
btm_ble_set_encryption(tcb.peer_bda, BTM_BLE_SEC_ENCRYPT,
HCI_ROLE_CENTRAL);
}