From 156c52bb003a14147db99d8a151edc08f591bd34 Mon Sep 17 00:00:00 2001 From: Priti Aghera Date: Wed, 9 Jul 2014 14:58:19 -0700 Subject: [PATCH] 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 --- btif/src/btif_dm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c index 6b0daa89f..d2f4a6f2d 100644 --- a/btif/src/btif_dm.c +++ b/btif/src/btif_dm.c @@ -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; -- 2.11.0