From a026f6d399a1be4e5fc01a3c332a446f8b7dfd28 Mon Sep 17 00:00:00 2001 From: Aleksander Nowakowski Date: Wed, 5 Oct 2016 15:19:16 +0200 Subject: [PATCH] Comments --- .../no/nordicsemi/android/nrftoolbox/profile/BleManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/no/nordicsemi/android/nrftoolbox/profile/BleManager.java b/app/src/main/java/no/nordicsemi/android/nrftoolbox/profile/BleManager.java index be4d7b80..f6370486 100644 --- a/app/src/main/java/no/nordicsemi/android/nrftoolbox/profile/BleManager.java +++ b/app/src/main/java/no/nordicsemi/android/nrftoolbox/profile/BleManager.java @@ -791,6 +791,7 @@ public abstract class BleManager { } } else if (status == BluetoothGatt.GATT_INSUFFICIENT_AUTHENTICATION) { if (gatt.getDevice().getBondState() != BluetoothDevice.BOND_NONE) { + // This should never happen but it used to: http://stackoverflow.com/a/20093695/2115352 DebugLogger.w(TAG, ERROR_AUTH_ERROR_WHILE_BONDED); mCallbacks.onError(gatt.getDevice(), ERROR_AUTH_ERROR_WHILE_BONDED, status); } @@ -809,6 +810,7 @@ public abstract class BleManager { nextRequest(); } else if (status == BluetoothGatt.GATT_INSUFFICIENT_AUTHENTICATION) { if (gatt.getDevice().getBondState() != BluetoothDevice.BOND_NONE) { + // This should never happen but it used to: http://stackoverflow.com/a/20093695/2115352 DebugLogger.w(TAG, ERROR_AUTH_ERROR_WHILE_BONDED); mCallbacks.onError(gatt.getDevice(), ERROR_AUTH_ERROR_WHILE_BONDED, status); } @@ -839,6 +841,7 @@ public abstract class BleManager { } } else if (status == BluetoothGatt.GATT_INSUFFICIENT_AUTHENTICATION) { if (gatt.getDevice().getBondState() != BluetoothDevice.BOND_NONE) { + // This should never happen but it used to: http://stackoverflow.com/a/20093695/2115352 DebugLogger.w(TAG, ERROR_AUTH_ERROR_WHILE_BONDED); mCallbacks.onError(gatt.getDevice(), ERROR_AUTH_ERROR_WHILE_BONDED, status); }