From fbfb6fc23fc17c59a4b7382962a0d5246932b410 Mon Sep 17 00:00:00 2001 From: Aleksander Nowakowski Date: Tue, 18 Oct 2016 16:41:17 +0200 Subject: [PATCH] Bug fixed: restoring calling onDeviceDisconnect() --- .../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 c285478f..61205a2a 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 @@ -892,6 +892,8 @@ public abstract class BleManager implements ILogg /** * This method should nullify all services and characteristics of the device. + * It's called when the device is no longer connected, either due to user action + * or a link loss. */ protected abstract void onDeviceDisconnected(); @@ -1034,6 +1036,7 @@ public abstract class BleManager implements ILogg // We are not closing the connection here as the device should try to reconnect automatically. // This may be only called when the shouldAutoConnect() method returned true. } + onDeviceDisconnected(); return; }