From d0f8eccd751d3e4ad2e105ebb894d3a2b8811e36 Mon Sep 17 00:00:00 2001 From: Daniel Dakhno Date: Sat, 24 Feb 2024 00:53:39 +0100 Subject: [PATCH] Device connection: removed references to ACTION_START --- .../gadgetbridge/activities/ControlCenterv2.java | 2 -- .../gadgetbridge/externalevents/AutoStartReceiver.java | 2 -- .../freeyourgadget/gadgetbridge/impl/GBDeviceService.java | 6 ------ .../freeyourgadget/gadgetbridge/model/DeviceService.java | 3 --- 4 files changed, 13 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ControlCenterv2.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ControlCenterv2.java index ebd57ab3b..756539e56 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ControlCenterv2.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ControlCenterv2.java @@ -374,8 +374,6 @@ public class ControlCenterv2 extends AppCompatActivity } } - GBApplication.deviceService().start(); - if (GB.isBluetoothEnabled() && deviceList.isEmpty() && Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { launchDiscoveryActivity(); } else { diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/AutoStartReceiver.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/AutoStartReceiver.java index 54ab6d24e..9acc468c8 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/AutoStartReceiver.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/AutoStartReceiver.java @@ -39,8 +39,6 @@ public class AutoStartReceiver extends BroadcastReceiver { if (GBApplication.getPrefs().getBoolean("general_autoconnectonbluetooth", false)) { Log.i(TAG, "Autoconnect is enabled, attempting to connect"); GBApplication.deviceService().connect(); - } else { - GBApplication.deviceService().start(); } Log.i(TAG, "Going to enable periodic exporter"); PeriodicExporter.enablePeriodicExport(context); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/impl/GBDeviceService.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/impl/GBDeviceService.java index 463efe909..db86cfb45 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/impl/GBDeviceService.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/impl/GBDeviceService.java @@ -126,12 +126,6 @@ public class GBDeviceService implements DeviceService { mContext.stopService(intent); } - @Override - public void start() { - Intent intent = createIntent().setAction(ACTION_START); - invokeService(intent); - } - @Override public void connect() { connect(false); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceService.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceService.java index 87ca68fca..758f0e441 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceService.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceService.java @@ -30,7 +30,6 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceCommunicationService; public interface DeviceService extends EventHandler { String PREFIX = "nodomain.freeyourgadget.gadgetbridge.devices"; - String ACTION_START = PREFIX + ".action.start"; String ACTION_CONNECT = PREFIX + ".action.connect"; String ACTION_NOTIFICATION = PREFIX + ".action.notification"; String ACTION_DELETE_NOTIFICATION = PREFIX + ".action.delete_notification"; @@ -166,8 +165,6 @@ public interface DeviceService extends EventHandler { String EXTRA_CALENDAREVENT_CALNAME = "calendarevent_calname"; String EXTRA_CALENDAREVENT_COLOR = "calendarevent_color"; - void start(); - void connect(); void connect(boolean firstTime);