OSDN Git Service

btm_get_dev_class: Create empty record if not found
authorHansong Zhang <hsz@google.com>
Mon, 9 Nov 2020 19:38:02 +0000 (11:38 -0800)
committerHansong Zhang <hsz@google.com>
Mon, 9 Nov 2020 19:39:38 +0000 (11:39 -0800)
commit3cd2f403fa72449d9cd6316bcc950ad0bd6526c0
tree8fc7a397d803b23ab189b90fba600ba7aa00c03f
parent17568c91e98bc652474a22ccbae8214d69e51b78
btm_get_dev_class: Create empty record if not found

We may not have a device record at that time, so create one if needed.
This fixes the diff introduces in https://android-review.googlesource.com/c/platform/system/bt/+/1480894/9/stack/acl/btm_acl.cc#b2183

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Test: pair to a speaker
Change-Id: I0149ecb7a11ed33f6cb6344f74c08746d948c513
stack/btm/btm_sec.cc
stack/btm/btm_sec.h