OSDN Git Service

Revert "Don't start the authentication when peer device already started it"
authorJakub Pawlowski <jpawlowski@google.com>
Sat, 2 Jun 2018 06:34:40 +0000 (06:34 +0000)
committerJakub Pawlowski <jpawlowski@google.com>
Wed, 6 Jun 2018 19:36:30 +0000 (19:36 +0000)
This reverts commit e75bd3aa3588a5616dfad6fe9f253cb58e65e3ed.

Reason for revert: It breaks pairing of Classic HID devices with Phones

Change-Id: I5dd703934c56387d279d350a36c135245a669b29
Test: Pair with Bluetooth Classic HID keyboard
Bug: 79941483

stack/btm/btm_sec.cc

index a81b30a..8cb3668 100644 (file)
@@ -4039,8 +4039,6 @@ void btm_sec_encrypt_change(uint16_t handle, uint8_t status,
                       __func__, p_dev_rec, p_dev_rec->p_callback);
       p_dev_rec->p_callback = NULL;
       l2cu_resubmit_pending_sec_req(&p_dev_rec->bd_addr);
-    } else if (p_dev_rec->sec_state == BTM_SEC_STATE_AUTHENTICATING) {
-      p_dev_rec->sec_state = BTM_SEC_STATE_IDLE;
     }
     return;
   }
@@ -4697,7 +4695,6 @@ void btm_sec_link_key_request(const RawAddress& bda) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_or_alloc_dev(bda);
 
   VLOG(2) << __func__ << " bda: " << bda;
-  p_dev_rec->sec_state = BTM_SEC_STATE_AUTHENTICATING;
 
   if ((btm_cb.pairing_state == BTM_PAIR_STATE_WAIT_PIN_REQ) &&
       (btm_cb.collision_start_time != 0) &&