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

Commit a7075e73 authored by Priti Aghera's avatar Priti Aghera
Browse files

Send correct status for SMP AUTH failure

Send correct corresponding status for SMP AUTH failure to JAVA layer.
This will enable BluetoothEventManager to display correct error message
for bond state changed callback.
Bug 15677623

Change-Id: I6a8742926bac862f960890417b5d68c23b33e010
parent b6227c97
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2513,6 +2513,14 @@ static void btif_dm_ble_auth_cmpl_evt (tBTA_DM_AUTH_CMPL *p_auth_cmpl)
        /*Map the HCI fail reason  to  bt status  */
        switch (p_auth_cmpl->fail_reason)
        {
            case BTA_DM_AUTH_SMP_PAIR_AUTH_FAIL:
            case BTA_DM_AUTH_SMP_CONFIRM_VALUE_FAIL:
                btif_dm_remove_ble_bonding_keys();
                status = BT_STATUS_AUTH_FAILURE;
                break;
            case BTA_DM_AUTH_SMP_PAIR_NOT_SUPPORT:
                status = BT_STATUS_AUTH_REJECTED;
                break;
            default:
                btif_dm_remove_ble_bonding_keys();
                status =  BT_STATUS_FAIL;