OSDN Git Service

Assign pairing code to bta_dm_cb before device name resolution
authorJack He <siyuanh@google.com>
Tue, 1 Nov 2016 18:30:51 +0000 (11:30 -0700)
committerJack He <siyuanh@google.com>
Wed, 2 Nov 2016 00:21:58 +0000 (17:21 -0700)
commite6433719c5137bef4b176eed6b6e37d262dd1bb3
tree390dc24060e9b2bdc6b430df1c4bbf1d011cbd5f
parent90aff7a5d49dbe372500dcc0729df1f0ecee3141
Assign pairing code to bta_dm_cb before device name resolution

Device name resolution, BTM_ReadRemoteDeviceName(), will cause
bta_dm_sp_cback() to exit early and bta_dm_pinname_cback() callback
will be invoked after the resolution, which continues the pairing
with pairing code from bta_dm_cb.num_val. Hence, bta_dm_cb.num_val
needs to be assigned before BTM_ReadRemoteDeviceName() is called.

Test: manual
Bug: 31381715
Change-Id: I61f06a9d878dd72154d6621eb094dcea5f701cbc
(cherry picked from commit db76fa4d26d73402a3f03b288a0999f8694dbea8)
bta/dm/bta_dm_act.c