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); }