Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a28c33b2 authored by Andre Eisenbach's avatar Andre Eisenbach Committed by Android Git Automerger
Browse files

am b15f5ecf: HOGP: Do not remove device from whitelist on encryption failure

* commit 'b15f5ecf':
  HOGP: Do not remove device from whitelist on encryption failure
parents 25d36ec2 b15f5ecf
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1791,8 +1791,11 @@ static void bta_gattc_conn_cback(tGATT_IF gattc_if, BD_ADDR bda, UINT16 conn_id,
{
    tBTA_GATTC_DATA *p_buf;

    APPL_TRACE_DEBUG("bta_gattc_conn_cback: cif = %d connected = %d conn_id = %d reaosn = 0x%04x",
                      gattc_if, connected, conn_id, reason);
    if (reason != 0)
    {
        APPL_TRACE_WARNING("%s() - cif=%d connected=%d conn_id=%d reason=0x%04x",
                      __FUNCTION__, gattc_if, connected, conn_id, reason);
    }

    if ((p_buf = (tBTA_GATTC_DATA *) GKI_getbuf(sizeof(tBTA_GATTC_DATA))) != NULL)
    {
+1 −0
Original line number Diff line number Diff line
@@ -266,6 +266,7 @@ typedef struct

    UINT8               disc_active;
    tBTA_HH_STATUS      status;
    tBTA_GATT_REASON    reason;
    BOOLEAN             is_le_device;
    tBTA_HH_LE_HID_SRVC hid_srvc[BTA_HH_LE_HID_SRVC_MAX];
    UINT16              conn_id;
+7 −2
Original line number Diff line number Diff line
@@ -1265,6 +1265,7 @@ void bta_hh_le_encrypt_cback(BD_ADDR bd_addr, tBTA_GATT_TRANSPORT transport,
        return;
    }
    p_dev_cb->status = (result == BTM_SUCCESS) ? BTA_HH_OK : BTA_HH_ERR_SEC;
    p_dev_cb->reason = result;

    bta_hh_sm_execute(p_dev_cb, BTA_HH_ENC_CMPL_EVT, NULL);
}
@@ -1314,8 +1315,12 @@ void bta_hh_security_cmpl(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_buf)
        }
    }
    else
    {
        APPL_TRACE_ERROR("%s() - encryption failed; status=0x%04x, reason=0x%04x",
                __FUNCTION__, p_cb->status, p_cb->reason);
        if (!(p_cb->status == BTA_HH_ERR_SEC && p_cb->reason == BTM_ERR_PROCESSING))
            bta_hh_le_api_disc_act(p_cb);

    }
}

/*******************************************************************************