From b475fd2dc7d411588ccef3f792a9bf9060ae566f Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Mon, 1 May 2017 17:33:34 +0200 Subject: [PATCH] Just disconnect if bluetooth gets turned off, do not quit all activities. --- .../externalevents/BluetoothStateChangeReceiver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/BluetoothStateChangeReceiver.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/BluetoothStateChangeReceiver.java index 106bee53..53e6fd73 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/BluetoothStateChangeReceiver.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/BluetoothStateChangeReceiver.java @@ -50,7 +50,7 @@ public class BluetoothStateChangeReceiver extends BroadcastReceiver { LOG.info("Bluetooth turned on => connecting..."); GBApplication.deviceService().connect(); } else if (intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1) == BluetoothAdapter.STATE_OFF) { - GBApplication.quit(); + GBApplication.deviceService().disconnect(); } } }