diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/btclassic/BtClassicIoThread.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/btclassic/BtClassicIoThread.java index 8ff15e519..6c91b54c3 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/btclassic/BtClassicIoThread.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/btclassic/BtClassicIoThread.java @@ -168,6 +168,13 @@ public abstract class BtClassicIoThread extends GBDeviceIoThread { mOutStream = null; mBtSocket = null; return false; + } catch (SecurityException e) { + LOG.error("Could not connect to device.", e); + setUpdateState(originalState); + mInStream = null; + mOutStream = null; + mBtSocket = null; + return false; } initialize();