mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-12 10:55:49 +01:00
remove unused getPrimaryActivity() from coodinators, mark Mi Band HRX as non-heartrate
This commit is contained in:
parent
67f4ab53fa
commit
495ba81edc
@ -123,15 +123,6 @@ public interface DeviceCoordinator {
|
||||
@Nullable
|
||||
Class<? extends Activity> getPairingActivity();
|
||||
|
||||
/**
|
||||
* Returns the Activity class that will be used as the primary activity
|
||||
* for the given device.
|
||||
*
|
||||
* @return the primary activity class, or null if none
|
||||
*/
|
||||
@Nullable
|
||||
Class<? extends Activity> getPrimaryActivity();
|
||||
|
||||
/**
|
||||
* Returns true if activity data fetching is supported by the device
|
||||
* (with this coordinator).
|
||||
|
@ -112,11 +112,6 @@ public class UnknownDeviceCoordinator extends AbstractDeviceCoordinator {
|
||||
return ControlCenterv2.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends Activity> getPrimaryActivity() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SampleProvider<?> getSampleProvider(GBDevice device, DaoSession session) {
|
||||
return new UnknownSampleProvider();
|
||||
|
@ -108,11 +108,6 @@ public class HPlusCoordinator extends AbstractDeviceCoordinator {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends Activity> getPrimaryActivity() {
|
||||
return ChartsActivity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InstallHandler findInstallHandler(Uri uri, Context context) {
|
||||
return null;
|
||||
|
@ -25,6 +25,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
|
||||
@ -50,4 +51,10 @@ public class MiBand2HRXCoordinator extends MiBand2Coordinator {
|
||||
public InstallHandler findInstallHandler(Uri uri, Context context) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsHeartRateMeasurement(GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -94,11 +94,6 @@ public class TeclastH30Coordinator extends AbstractDeviceCoordinator {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends Activity> getPrimaryActivity() {
|
||||
return ChartsActivity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InstallHandler findInstallHandler(Uri uri, Context context) {
|
||||
return null;
|
||||
|
@ -54,11 +54,6 @@ public class LiveviewCoordinator extends AbstractDeviceCoordinator {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends Activity> getPrimaryActivity() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InstallHandler findInstallHandler(Uri uri, Context context) {
|
||||
return null;
|
||||
|
@ -110,11 +110,6 @@ public class MiBandCoordinator extends AbstractDeviceCoordinator {
|
||||
return MiBandPairingActivity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends Activity> getPrimaryActivity() {
|
||||
return ChartsActivity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SampleProvider<? extends AbstractActivitySample> getSampleProvider(GBDevice device, DaoSession session) {
|
||||
return new MiBandSampleProvider(device, session);
|
||||
|
@ -82,12 +82,6 @@ public class No1F1Coordinator extends AbstractDeviceCoordinator {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Class<? extends Activity> getPrimaryActivity() {
|
||||
return ChartsActivity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActivityDataFetching() {
|
||||
return true;
|
||||
|
@ -66,11 +66,6 @@ public class PebbleCoordinator extends AbstractDeviceCoordinator {
|
||||
return PebblePairingActivity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends Activity> getPrimaryActivity() {
|
||||
return AppManagerActivity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void deleteDevice(@NonNull GBDevice gbDevice, @NonNull Device device, @NonNull DaoSession session) throws GBException {
|
||||
Long deviceId = device.getId();
|
||||
|
@ -55,11 +55,6 @@ public class VibratissimoCoordinator extends AbstractDeviceCoordinator {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends Activity> getPrimaryActivity() {
|
||||
return VibrationActivity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InstallHandler findInstallHandler(Uri uri, Context context) {
|
||||
return null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user