1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-21 04:20:27 +02:00
Gadgetbridge/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/galaxy_buds/GalaxyBudsDeviceSupport.java
Arjan Schrijver b1d03e9f7a Clean up duplicated unimplemented methods from device support classes
Moved to AbstractDeviceSupport so each device support class can override them if required. This change helps to keep the code base clean by not requiring every (Device)Support class to implement these methods even when they don't need them.
2023-01-05 22:11:32 +01:00

56 lines
1.6 KiB
Java

package nodomain.freeyourgadget.gadgetbridge.service.devices.galaxy_buds;
import android.net.Uri;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.UUID;
import nodomain.freeyourgadget.gadgetbridge.model.Alarm;
import nodomain.freeyourgadget.gadgetbridge.service.serial.AbstractSerialDeviceSupport;
import nodomain.freeyourgadget.gadgetbridge.service.serial.GBDeviceIoThread;
import nodomain.freeyourgadget.gadgetbridge.service.serial.GBDeviceProtocol;
public class GalaxyBudsDeviceSupport extends AbstractSerialDeviceSupport {
private static final Logger LOG = LoggerFactory.getLogger(GalaxyBudsDeviceSupport.class);
@Override
public void onSendConfiguration(String config) {
super.onSendConfiguration(config);
}
@Override
public void onTestNewFunction() {
super.onTestNewFunction();
}
@Override
public boolean connect() {
getDeviceIOThread().start();
return true;
}
@Override
public synchronized GalaxyBudsIOThread getDeviceIOThread() {
return (GalaxyBudsIOThread) super.getDeviceIOThread();
}
@Override
public boolean useAutoConnect() {
return false;
}
protected GBDeviceProtocol createDeviceProtocol() {
return new GalaxyBudsProtocol(getDevice());
}
@Override
protected GBDeviceIoThread createDeviceIOThread() {
return new GalaxyBudsIOThread(getDevice(), getContext(), (GalaxyBudsProtocol) getDeviceProtocol(),
GalaxyBudsDeviceSupport.this, getBluetoothAdapter());
}
}