mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
DeviceCoordinator: explicitly specify @NonNull for arguments
This commit is contained in:
+122
-122
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2015-2025 akasaka / Genjitsu Labs, Alicia Hormann, Andreas
|
||||
/* Copyright (C) 2015-2026 akasaka / Genjitsu Labs, Alicia Hormann, Andreas
|
||||
Böhler, Andreas Shimokawa, Arjan Schrijver, Carsten Pfeiffer, Damien Gaignon,
|
||||
Daniel Dakhno, Daniele Gobbetti, Dmitry Markin, JohnnySun, José Rebelo,
|
||||
Matthieu Baerts, Nephiel, Petr Vaněk, Uwe Hermann, Johannes Krude, Thomas Kuehne
|
||||
@@ -181,7 +181,7 @@ public interface DeviceCoordinator {
|
||||
* @param candidate
|
||||
* @return true if this coordinator handles the given candidate.
|
||||
*/
|
||||
boolean supports(@NonNull GBDeviceCandidate candidate);
|
||||
boolean supports(@NonNull final GBDeviceCandidate candidate);
|
||||
|
||||
/**
|
||||
* Returns a list of scan filters that shall be used to discover devices supported
|
||||
@@ -199,7 +199,7 @@ public interface DeviceCoordinator {
|
||||
* @param type - The type of the device.
|
||||
* @return - The constructed GBDevice.
|
||||
*/
|
||||
GBDevice createDevice(GBDeviceCandidate candidate, DeviceType type);
|
||||
GBDevice createDevice(@NonNull final GBDeviceCandidate candidate, @NonNull final DeviceType type);
|
||||
|
||||
/**
|
||||
* Creates a GBDevice from a database device. This is used to deserialize the device from the
|
||||
@@ -209,14 +209,14 @@ public interface DeviceCoordinator {
|
||||
* @param type - The type of the device.
|
||||
* @return - The constructed GBDevice.
|
||||
*/
|
||||
GBDevice createDevice(Device dbDevice, DeviceType type);
|
||||
GBDevice createDevice(@NonNull final Device dbDevice, @NonNull final DeviceType type);
|
||||
|
||||
/**
|
||||
* Deletes all information, including all related database content about the
|
||||
* given device.
|
||||
* @throws GBException
|
||||
*/
|
||||
void deleteDevice(GBDevice device, boolean deleteFiles) throws GBException;
|
||||
void deleteDevice(@NonNull final GBDevice device, boolean deleteFiles) throws GBException;
|
||||
|
||||
/**
|
||||
* Returns the Activity class to be started in order to perform a pairing of a
|
||||
@@ -235,7 +235,7 @@ public interface DeviceCoordinator {
|
||||
/**
|
||||
* Whether the device supports fetching debug logs.
|
||||
*/
|
||||
boolean supportsDebugLogs(@NonNull GBDevice device);
|
||||
boolean supportsDebugLogs(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if data fetching (activity or otherwise) is supported by the device
|
||||
@@ -245,7 +245,7 @@ public interface DeviceCoordinator {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean supportsDataFetching(@NonNull GBDevice device);
|
||||
boolean supportsDataFetching(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if activity tracking is supported by the device
|
||||
@@ -254,7 +254,7 @@ public interface DeviceCoordinator {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean supportsActivityTracking(@NonNull GBDevice device);
|
||||
boolean supportsActivityTracking(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if cycling data is supported by the device
|
||||
@@ -263,7 +263,7 @@ public interface DeviceCoordinator {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean supportsCyclingData(@NonNull GBDevice device);
|
||||
boolean supportsCyclingData(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports recording dedicated activities, like
|
||||
@@ -271,30 +271,30 @@ public interface DeviceCoordinator {
|
||||
* data. This is different from the constant activity tracking since the tracks are
|
||||
* usually recorded with higher precision and additional features, like e.g. GPS.
|
||||
*/
|
||||
boolean supportsRecordedActivities(@NonNull GBDevice device);
|
||||
boolean supportsRecordedActivities(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if stress measurement and fetching is supported by the device
|
||||
* (with this coordinator).
|
||||
*/
|
||||
boolean supportsStressMeasurement(@NonNull GBDevice device);
|
||||
boolean supportsStressMeasurement(@NonNull final GBDevice device);
|
||||
|
||||
boolean supportsBodyEnergy(@NonNull GBDevice device);
|
||||
boolean supportsHrvMeasurement(@NonNull GBDevice device);
|
||||
boolean supportsVO2Max(@NonNull GBDevice device);
|
||||
boolean supportsBodyEnergy(@NonNull final GBDevice device);
|
||||
boolean supportsHrvMeasurement(@NonNull final GBDevice device);
|
||||
boolean supportsVO2Max(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if this device supports distinguishing VO2 max per sport (running / cycling).
|
||||
*/
|
||||
boolean supportsVO2MultiSport(@NonNull GBDevice device);
|
||||
boolean supportsSleepMeasurement(@NonNull GBDevice device);
|
||||
boolean supportsStepCounter(@NonNull GBDevice device);
|
||||
boolean supportsSpeedzones(@NonNull GBDevice device);
|
||||
boolean supportsCharts(@NonNull GBDevice device);
|
||||
boolean supportsActiveCalories(@NonNull GBDevice device);
|
||||
boolean supportsActivityDistance(@NonNull GBDevice device);
|
||||
boolean supportsTrainingLoad(@NonNull GBDevice device);
|
||||
boolean supportsGlucoseMeasurement(@NonNull GBDevice device);
|
||||
boolean supportsVO2MultiSport(@NonNull final GBDevice device);
|
||||
boolean supportsSleepMeasurement(@NonNull final GBDevice device);
|
||||
boolean supportsStepCounter(@NonNull final GBDevice device);
|
||||
boolean supportsSpeedzones(@NonNull final GBDevice device);
|
||||
boolean supportsCharts(@NonNull final GBDevice device);
|
||||
boolean supportsActiveCalories(@NonNull final GBDevice device);
|
||||
boolean supportsActivityDistance(@NonNull final GBDevice device);
|
||||
boolean supportsTrainingLoad(@NonNull final GBDevice device);
|
||||
boolean supportsGlucoseMeasurement(@NonNull final GBDevice device);
|
||||
|
||||
DeviceChartsProvider getChartsProvider();
|
||||
|
||||
@@ -302,37 +302,37 @@ public interface DeviceCoordinator {
|
||||
* Returns true if measurement and fetching of body temperature is supported by the device
|
||||
* (with this coordinator).
|
||||
*/
|
||||
boolean supportsTemperatureMeasurement(@NonNull GBDevice device);
|
||||
boolean supportsTemperatureMeasurement(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if continuous temperature measurement used in device
|
||||
* (with this coordinator).
|
||||
*/
|
||||
boolean supportsContinuousTemperature(@NonNull GBDevice device);
|
||||
boolean supportsContinuousTemperature(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if SpO2 measurement and fetching is supported by the device
|
||||
* (with this coordinator).
|
||||
*/
|
||||
boolean supportsSpo2(@NonNull GBDevice device);
|
||||
boolean supportsSpo2(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if heart rate stats (max, resting, manual) measurement and fetching is supported
|
||||
* by the device (with this coordinator).
|
||||
*/
|
||||
boolean supportsHeartRateStats(@NonNull GBDevice device);
|
||||
boolean supportsHeartRateStats(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if blood pressure measurement (systolic, diastolic, pulse) measurement and
|
||||
* fetching is supported by the device (with this coordinator).
|
||||
*/
|
||||
boolean supportsBloodPressureMeasurement(@NonNull GBDevice device);
|
||||
boolean supportsBloodPressureMeasurement(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if PAI (Personal Activity Intelligence) measurement and fetching is supported by
|
||||
* the device (with this coordinator).
|
||||
*/
|
||||
boolean supportsPai(@NonNull GBDevice device);
|
||||
boolean supportsPai(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the device-specific name for PAI (eg. Vitality Score).
|
||||
@@ -344,12 +344,12 @@ public interface DeviceCoordinator {
|
||||
* Returns true if the device is capable of providing the time contribution for each PAI type
|
||||
* (light, moderate, high).
|
||||
*/
|
||||
boolean supportsPaiTime(@NonNull GBDevice device);
|
||||
boolean supportsPaiTime(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if the device is capable of providing the time contribution for light PAI type.
|
||||
*/
|
||||
boolean supportsPaiLow(@NonNull GBDevice device);
|
||||
boolean supportsPaiLow(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the PAI target - usually 100.
|
||||
@@ -359,72 +359,72 @@ public interface DeviceCoordinator {
|
||||
/**
|
||||
* Indicates whether the device supports respiratory rate tracking.
|
||||
*/
|
||||
boolean supportsRespiratoryRate(@NonNull GBDevice device);
|
||||
boolean supportsRespiratoryRate(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device tracks respiratory rate during the day, will be false
|
||||
* if only during the night.
|
||||
*/
|
||||
boolean supportsDayRespiratoryRate(@NonNull GBDevice device);
|
||||
boolean supportsDayRespiratoryRate(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if sleep respiratory rate measurement and fetching is supported by
|
||||
* the device (with this coordinator).
|
||||
*/
|
||||
boolean supportsSleepRespiratoryRate(@NonNull GBDevice device);
|
||||
boolean supportsSleepRespiratoryRate(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if measurement and fetching of body weight is supported by the device
|
||||
* (with this coordinator).
|
||||
*/
|
||||
boolean supportsWeightMeasurement(@NonNull GBDevice device);
|
||||
boolean supportsWeightMeasurement(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the sample provider for the device being supported.
|
||||
*/
|
||||
SampleProvider<? extends ActivitySample> getSampleProvider(GBDevice device, DaoSession session);
|
||||
SampleProvider<? extends ActivitySample> getSampleProvider(@NonNull final GBDevice device, @NonNull final DaoSession session);
|
||||
|
||||
/**
|
||||
* Returns the sample provider for stress data, for the device being supported.
|
||||
*/
|
||||
TimeSampleProvider<? extends StressSample> getStressSampleProvider(GBDevice device, DaoSession session);
|
||||
TimeSampleProvider<? extends StressSample> getStressSampleProvider(@NonNull final GBDevice device, @NonNull final DaoSession session);
|
||||
|
||||
/**
|
||||
* Returns the sample provider for body energy data, for the device being supported.
|
||||
*/
|
||||
TimeSampleProvider<? extends BodyEnergySample> getBodyEnergySampleProvider(GBDevice device, DaoSession session);
|
||||
TimeSampleProvider<? extends BodyEnergySample> getBodyEnergySampleProvider(@NonNull final GBDevice device, @NonNull final DaoSession session);
|
||||
|
||||
/**
|
||||
* Returns the sample provider for HRV summary, for the device being supported.
|
||||
*/
|
||||
TimeSampleProvider<? extends HrvSummarySample> getHrvSummarySampleProvider(GBDevice device, DaoSession session);
|
||||
TimeSampleProvider<? extends HrvSummarySample> getHrvSummarySampleProvider(@NonNull final GBDevice device, @NonNull final DaoSession session);
|
||||
|
||||
/**
|
||||
* Returns the sample provider for HRV values, for the device being supported.
|
||||
*/
|
||||
TimeSampleProvider<? extends HrvValueSample> getHrvValueSampleProvider(GBDevice device, DaoSession session);
|
||||
TimeSampleProvider<? extends HrvValueSample> getHrvValueSampleProvider(@NonNull final GBDevice device, @NonNull final DaoSession session);
|
||||
|
||||
/**
|
||||
* Returns the sample provider for Workout load values, for the device being supported.
|
||||
*/
|
||||
TimeSampleProvider<? extends WorkoutLoadSample> getWorkoutLoadSampleProvider(GBDevice device, DaoSession session);
|
||||
TimeSampleProvider<? extends WorkoutLoadSample> getWorkoutLoadSampleProvider(@NonNull final GBDevice device, @NonNull final DaoSession session);
|
||||
|
||||
/**
|
||||
* Returns the sample provider for training acute load values, for the device being supported.
|
||||
*/
|
||||
TimeSampleProvider<? extends GenericTrainingLoadAcuteSample> getTrainingAcuteLoadSampleProvider(GBDevice device, DaoSession session);
|
||||
TimeSampleProvider<? extends GenericTrainingLoadAcuteSample> getTrainingAcuteLoadSampleProvider(@NonNull final GBDevice device, @NonNull final DaoSession session);
|
||||
|
||||
|
||||
/**
|
||||
* Returns the sample provider for training chronic load values, for the device being supported.
|
||||
*/
|
||||
TimeSampleProvider<? extends GenericTrainingLoadChronicSample> getTrainingChronicLoadSampleProvider(GBDevice device, DaoSession session);
|
||||
TimeSampleProvider<? extends GenericTrainingLoadChronicSample> getTrainingChronicLoadSampleProvider(@NonNull final GBDevice device, @NonNull final DaoSession session);
|
||||
|
||||
|
||||
/**
|
||||
* Returns the sample provider for VO2 max values, for the device being supported.
|
||||
*/
|
||||
TimeSampleProvider<? extends Vo2MaxSample> getVo2MaxSampleProvider(GBDevice device, DaoSession session);
|
||||
TimeSampleProvider<? extends Vo2MaxSample> getVo2MaxSampleProvider(@NonNull final GBDevice device, @NonNull final DaoSession session);
|
||||
|
||||
/**
|
||||
* Returns the stress ranges (relaxed, mild, moderate, high), so that stress can be categorized.
|
||||
@@ -443,63 +443,63 @@ public interface DeviceCoordinator {
|
||||
/**
|
||||
* Returns the sample provider for temperature data, for the device being supported.
|
||||
*/
|
||||
TimeSampleProvider<? extends TemperatureSample> getTemperatureSampleProvider(GBDevice device, DaoSession session);
|
||||
TimeSampleProvider<? extends TemperatureSample> getTemperatureSampleProvider(@NonNull final GBDevice device, @NonNull final DaoSession session);
|
||||
|
||||
/**
|
||||
* Returns the sample provider for SpO2 data, for the device being supported.
|
||||
*/
|
||||
TimeSampleProvider<? extends Spo2Sample> getSpo2SampleProvider(GBDevice device, DaoSession session);
|
||||
TimeSampleProvider<? extends Spo2Sample> getSpo2SampleProvider(@NonNull final GBDevice device, @NonNull final DaoSession session);
|
||||
|
||||
/**
|
||||
* Returns the sample provider for Cycling data, for the device being supported.
|
||||
*/
|
||||
TimeSampleProvider<CyclingSample> getCyclingSampleProvider(GBDevice device, DaoSession session);
|
||||
TimeSampleProvider<CyclingSample> getCyclingSampleProvider(@NonNull final GBDevice device, @NonNull final DaoSession session);
|
||||
|
||||
/**
|
||||
* Returns the sample provider for max HR data, for the device being supported.
|
||||
*/
|
||||
TimeSampleProvider<? extends HeartRateSample> getHeartRateMaxSampleProvider(GBDevice device, DaoSession session);
|
||||
TimeSampleProvider<? extends HeartRateSample> getHeartRateMaxSampleProvider(@NonNull final GBDevice device, @NonNull final DaoSession session);
|
||||
|
||||
/**
|
||||
* Returns the sample provider for resting HR data, for the device being supported.
|
||||
*/
|
||||
TimeSampleProvider<? extends HeartRateSample> getHeartRateRestingSampleProvider(GBDevice device, DaoSession session);
|
||||
TimeSampleProvider<? extends HeartRateSample> getHeartRateRestingSampleProvider(@NonNull final GBDevice device, @NonNull final DaoSession session);
|
||||
|
||||
/**
|
||||
* Returns the sample provider for manual HR data, for the device being supported.
|
||||
*/
|
||||
TimeSampleProvider<? extends HeartRateSample> getHeartRateManualSampleProvider(GBDevice device, DaoSession session);
|
||||
TimeSampleProvider<? extends HeartRateSample> getHeartRateManualSampleProvider(@NonNull final GBDevice device, @NonNull final DaoSession session);
|
||||
|
||||
/**
|
||||
* Returns the sample provider for PAI data, for the device being supported.
|
||||
*/
|
||||
TimeSampleProvider<? extends PaiSample> getPaiSampleProvider(GBDevice device, DaoSession session);
|
||||
TimeSampleProvider<? extends PaiSample> getPaiSampleProvider(@NonNull final GBDevice device, @NonNull final DaoSession session);
|
||||
|
||||
/**
|
||||
* Returns the sample provider for sleep respiratory rate data, for the device being supported.
|
||||
*/
|
||||
TimeSampleProvider<? extends RespiratoryRateSample> getRespiratoryRateSampleProvider(GBDevice device, DaoSession session);
|
||||
TimeSampleProvider<? extends RespiratoryRateSample> getRespiratoryRateSampleProvider(@NonNull final GBDevice device, @NonNull final DaoSession session);
|
||||
|
||||
/**
|
||||
* Returns the sample provider for weight data, for the device being supported.
|
||||
*/
|
||||
TimeSampleProvider<? extends WeightSample> getWeightSampleProvider(@NonNull GBDevice device, @NonNull DaoSession session);
|
||||
TimeSampleProvider<? extends WeightSample> getWeightSampleProvider(@NonNull final GBDevice device, @NonNull final DaoSession session);
|
||||
|
||||
TimeSampleProvider<? extends RestingMetabolicRateSample> getRestingMetabolicRateProvider(GBDevice device, DaoSession session);
|
||||
TimeSampleProvider<? extends RestingMetabolicRateSample> getRestingMetabolicRateProvider(@NonNull final GBDevice device, @NonNull final DaoSession session);
|
||||
|
||||
TimeSampleProvider<? extends SleepScoreSample> getSleepScoreProvider(GBDevice device, DaoSession session);
|
||||
TimeSampleProvider<? extends SleepScoreSample> getSleepScoreProvider(@NonNull final GBDevice device, @NonNull final DaoSession session);
|
||||
|
||||
/**
|
||||
* Returns the sample provider for blood pressure data, for the device being supported.
|
||||
*/
|
||||
TimeSampleProvider<? extends BloodPressureSample> getBloodPressureSampleProvider(GBDevice device, DaoSession session);
|
||||
TimeSampleProvider<? extends BloodPressureSample> getBloodPressureSampleProvider(@NonNull final GBDevice device, @NonNull final DaoSession session);
|
||||
|
||||
/**
|
||||
* Returns the {@link ActivitySummaryParser} for the device being supported.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
ActivitySummaryParser getActivitySummaryParser(final GBDevice device, final Context context);
|
||||
ActivitySummaryParser getActivitySummaryParser(@NonNull final GBDevice device, @NonNull final Context context);
|
||||
|
||||
/**
|
||||
* Returns the {@link ActivityTrackProvider} for the device being supported.
|
||||
@@ -512,7 +512,7 @@ public interface DeviceCoordinator {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean supportsFlashing(@NonNull GBDevice device);
|
||||
boolean supportsFlashing(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Finds an {@link InstallHandler} for the given {@link Uri} that can install the given
|
||||
@@ -521,14 +521,14 @@ public interface DeviceCoordinator {
|
||||
* on the device
|
||||
*/
|
||||
@Nullable
|
||||
InstallHandler findInstallHandler(Uri uri, Bundle options, Context context);
|
||||
InstallHandler findInstallHandler(Uri uri, @NonNull final Bundle options, @NonNull final Context context);
|
||||
|
||||
/**
|
||||
* Returns true if this device/coordinator supports taking screenshots.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean supportsScreenshots(@NonNull GBDevice device);
|
||||
boolean supportsScreenshots(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the number of alarms this device/coordinator supports
|
||||
@@ -537,71 +537,71 @@ public interface DeviceCoordinator {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int getAlarmSlotCount(GBDevice device);
|
||||
int getAlarmSlotCount(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if this device/coordinator supports an alarm with smart wakeup for the current position
|
||||
* @param alarmPosition Position of the alarm
|
||||
*/
|
||||
boolean supportsSmartWakeup(@NonNull GBDevice device, int alarmPosition);
|
||||
boolean supportsSmartWakeup(@NonNull final GBDevice device, int alarmPosition);
|
||||
|
||||
/**
|
||||
* Returns true if the smart alarm at the specified position supports setting an interval for this device/coordinator
|
||||
* @param alarmPosition Position of the alarm
|
||||
*/
|
||||
boolean supportsSmartWakeupInterval(@NonNull GBDevice device, int alarmPosition);
|
||||
boolean supportsSmartWakeupInterval(@NonNull final GBDevice device, int alarmPosition);
|
||||
|
||||
/**
|
||||
* Returns true if the alarm at the specified position *must* be a smart alarm for this device/coordinator
|
||||
* @param alarmPosition Position of the alarm
|
||||
* @return True if it must be a smart alarm, false otherwise
|
||||
*/
|
||||
boolean forcedSmartWakeup(GBDevice device, int alarmPosition);
|
||||
boolean forcedSmartWakeup(@NonNull final GBDevice device, int alarmPosition);
|
||||
|
||||
/**
|
||||
* Returns true if this device/coordinator supports alarm snoozing
|
||||
* @return
|
||||
*/
|
||||
boolean supportsAlarmSnoozing(@NonNull GBDevice device);
|
||||
boolean supportsAlarmSnoozing(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if this device/coordinator supports alarm titles
|
||||
* @return
|
||||
*/
|
||||
boolean supportsAlarmTitle(@NonNull GBDevice device);
|
||||
boolean supportsAlarmTitle(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the character limit for the alarm title, negative if no limit.
|
||||
* @return
|
||||
*/
|
||||
int getAlarmTitleLimit(GBDevice device);
|
||||
int getAlarmTitleLimit(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if this device/coordinator supports alarm descriptions
|
||||
* @return
|
||||
*/
|
||||
boolean supportsAlarmDescription(@NonNull GBDevice device);
|
||||
boolean supportsAlarmDescription(@NonNull final GBDevice device);
|
||||
|
||||
boolean supportsAlarmSounds(@NonNull GBDevice device);
|
||||
boolean supportsAlarmBacklight(@NonNull GBDevice device);
|
||||
boolean supportsAlarmTitlePresets(@NonNull GBDevice device);
|
||||
List<Alarm.ALARM_LABEL> getAlarmTitlePresets(@NonNull GBDevice device);
|
||||
boolean supportsAlarmSounds(@NonNull final GBDevice device);
|
||||
boolean supportsAlarmBacklight(@NonNull final GBDevice device);
|
||||
boolean supportsAlarmTitlePresets(@NonNull final GBDevice device);
|
||||
List<Alarm.ALARM_LABEL> getAlarmTitlePresets(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if the given device supports heart rate measurements.
|
||||
* @return
|
||||
*/
|
||||
boolean supportsHeartRateMeasurement(@NonNull GBDevice device);
|
||||
boolean supportsHeartRateMeasurement(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if the given device supports resting heart rate measurements.
|
||||
*/
|
||||
boolean supportsHeartRateRestingMeasurement(@NonNull GBDevice device);
|
||||
boolean supportsHeartRateRestingMeasurement(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if the device supports triggering manual one-shot heart rate measurements.
|
||||
*/
|
||||
boolean supportsManualHeartRateMeasurement(@NonNull GBDevice device);
|
||||
boolean supportsManualHeartRateMeasurement(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the readable name of the manufacturer.
|
||||
@@ -613,37 +613,37 @@ public interface DeviceCoordinator {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean supportsAppsManagement(@NonNull GBDevice device);
|
||||
boolean supportsAppsManagement(@NonNull final GBDevice device);
|
||||
|
||||
boolean supportsCachedAppManagement(@NonNull GBDevice device);
|
||||
boolean supportsInstalledAppManagement(@NonNull GBDevice device);
|
||||
boolean supportsWatchfaceManagement(@NonNull GBDevice device);
|
||||
boolean supportsCachedAppManagement(@NonNull final GBDevice device);
|
||||
boolean supportsInstalledAppManagement(@NonNull final GBDevice device);
|
||||
boolean supportsWatchfaceManagement(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the Activity class that will be used to manage device apps.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Class<? extends Activity> getAppsManagementActivity(GBDevice device);
|
||||
Class<? extends Activity> getAppsManagementActivity(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the Activity class that will be used to design watchfaces.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Class<? extends Activity> getWatchfaceDesignerActivity(GBDevice device);
|
||||
Class<? extends Activity> getWatchfaceDesignerActivity(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the Activity class that will be used to download apps/watchfaces.
|
||||
*/
|
||||
@Nullable
|
||||
Class<? extends Activity> getAppStoreActivity(GBDevice device);
|
||||
Class<? extends Activity> getAppStoreActivity(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the Activity class that will be used to configure apps.
|
||||
*/
|
||||
@Nullable
|
||||
Class<? extends Activity> getAppConfigurationActivity(GBDevice device);
|
||||
Class<? extends Activity> getAppConfigurationActivity(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the device app cache directory.
|
||||
@@ -653,7 +653,7 @@ public interface DeviceCoordinator {
|
||||
/**
|
||||
* Returns the dedicated writable export directory for this device.
|
||||
*/
|
||||
File getWritableExportDirectory(GBDevice device, boolean createIfRequired) throws IOException;
|
||||
File getWritableExportDirectory(@NonNull final GBDevice device, boolean createIfRequired) throws IOException;
|
||||
|
||||
/**
|
||||
* Returns a String containing the device app sort order filename.
|
||||
@@ -668,12 +668,12 @@ public interface DeviceCoordinator {
|
||||
/**
|
||||
* Indicated whether the device supports fetching a list of its apps.
|
||||
*/
|
||||
boolean supportsAppListFetching(@NonNull GBDevice device);
|
||||
boolean supportsAppListFetching(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports reordering of apps.
|
||||
*/
|
||||
boolean supportsAppReordering(@NonNull GBDevice device);
|
||||
boolean supportsAppReordering(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns how/if the given device should be bonded before connecting to it.
|
||||
@@ -695,51 +695,51 @@ public interface DeviceCoordinator {
|
||||
* Indicates whether the device has some kind of calender we can sync to.
|
||||
* Also used for generated sunrise/sunset events
|
||||
*/
|
||||
boolean supportsCalendarEvents(@NonNull GBDevice device);
|
||||
boolean supportsCalendarEvents(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports getting a stream of live data.
|
||||
* This can be live HR, steps etc.
|
||||
*/
|
||||
boolean supportsRealtimeData(@NonNull GBDevice device);
|
||||
boolean supportsRealtimeData(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports REM sleep tracking.
|
||||
*/
|
||||
boolean supportsRemSleep(@NonNull GBDevice device);
|
||||
boolean supportsRemSleep(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports Awake sleep tracking.
|
||||
*/
|
||||
boolean supportsAwakeSleep(@NonNull GBDevice device);
|
||||
boolean supportsAwakeSleep(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports determining a sleep score in a 0-100 range.
|
||||
*/
|
||||
boolean supportsSleepScore(@NonNull GBDevice device);
|
||||
boolean supportsSleepScore(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports current weather and/or weather
|
||||
* forecast display.
|
||||
*/
|
||||
boolean supportsWeather(@NonNull GBDevice device);
|
||||
boolean supportsWeather(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports being found by vibrating,
|
||||
* making some sound or lighting up
|
||||
*/
|
||||
boolean supportsFindDevice(@NonNull GBDevice device);
|
||||
boolean supportsFindDevice(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports displaying music information
|
||||
* like artist, title, album, play state etc.
|
||||
*/
|
||||
boolean supportsMusicInfo(@NonNull GBDevice device);
|
||||
boolean supportsMusicInfo(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports features required by Sleep As Android
|
||||
*/
|
||||
boolean supportsSleepAsAndroid(@NonNull GBDevice device);
|
||||
boolean supportsSleepAsAndroid(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates the maximum reminder message length.
|
||||
@@ -749,7 +749,7 @@ public interface DeviceCoordinator {
|
||||
/**
|
||||
* Indicates the maximum number of reminder slots available in the device.
|
||||
*/
|
||||
int getReminderSlotCount(GBDevice device);
|
||||
int getReminderSlotCount(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether reminders have a time of day.
|
||||
@@ -764,7 +764,7 @@ public interface DeviceCoordinator {
|
||||
/**
|
||||
* Indicates the maximum number of canned replies available in the device.
|
||||
*/
|
||||
int getCannedRepliesSlotCount(GBDevice device);
|
||||
int getCannedRepliesSlotCount(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates the maximum number of slots available for world clocks in the device.
|
||||
@@ -780,28 +780,28 @@ public interface DeviceCoordinator {
|
||||
* Indicates whether the device supports disabled world clocks that can be enabled through
|
||||
* a menu on the device.
|
||||
*/
|
||||
boolean supportsDisabledWorldClocks(@NonNull GBDevice device);
|
||||
boolean supportsDisabledWorldClocks(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports recording and syncing audio recordings.
|
||||
*/
|
||||
boolean supportsAudioRecordings(@NonNull GBDevice device);
|
||||
boolean supportsAudioRecordings(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates the maximum number of slots available for contacts in the device.
|
||||
*/
|
||||
int getContactsSlotCount(GBDevice device);
|
||||
int getContactsSlotCount(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device has an led which supports custom colors
|
||||
*/
|
||||
boolean supportsLedColor(@NonNull GBDevice device);
|
||||
boolean supportsLedColor(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device's led supports any RGB color,
|
||||
* or only preset colors
|
||||
*/
|
||||
boolean supportsRgbLedColor(@NonNull GBDevice device);
|
||||
boolean supportsRgbLedColor(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the preset colors supported by the device, if any, in ARGB, with alpha = 255
|
||||
@@ -812,7 +812,7 @@ public interface DeviceCoordinator {
|
||||
/**
|
||||
* Indicates whether the device supports unicode emojis.
|
||||
*/
|
||||
boolean supportsUnicodeEmojis(@NonNull GBDevice device);
|
||||
boolean supportsUnicodeEmojis(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the set of supported sleep as Android features
|
||||
@@ -837,13 +837,13 @@ public interface DeviceCoordinator {
|
||||
* Returns device specific debug settings. This section is only shown in debug builds, and all behavior-altering
|
||||
* preferences should be gate-kept by the BuildConfig.DEBUG flag.
|
||||
*/
|
||||
int[] getSupportedDebugSettings(final GBDevice device);
|
||||
int[] getSupportedDebugSettings(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns device specific experimental settings. This screen is only shown when the global experimental settings
|
||||
* is enabled.
|
||||
*/
|
||||
int[] getSupportedDeviceSpecificExperimentalSettings(final GBDevice device);
|
||||
int[] getSupportedDeviceSpecificExperimentalSettings(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates which device specific settings the device supports (not per device type or family, but unique per device).
|
||||
@@ -851,24 +851,24 @@ public interface DeviceCoordinator {
|
||||
* @deprecated use getDeviceSpecificSettings
|
||||
*/
|
||||
@Deprecated
|
||||
int[] getSupportedDeviceSpecificSettings(GBDevice device);
|
||||
int[] getSupportedDeviceSpecificSettings(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the device-specific settings supported by this specific device. See
|
||||
* {@link DeviceSpecificSettings} for more information
|
||||
*/
|
||||
@Nullable
|
||||
DeviceSpecificSettings getDeviceSpecificSettings(GBDevice device);
|
||||
DeviceSpecificSettings getDeviceSpecificSettings(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the {@link DeviceSpecificSettingsCustomizer}, allowing for the customization of the devices specific settings screen.
|
||||
*/
|
||||
DeviceSpecificSettingsCustomizer getDeviceSpecificSettingsCustomizer(GBDevice device);
|
||||
DeviceSpecificSettingsCustomizer getDeviceSpecificSettingsCustomizer(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates which device specific language the device supports
|
||||
*/
|
||||
String[] getSupportedLanguageSettings(GBDevice device);
|
||||
String[] getSupportedLanguageSettings(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -876,19 +876,19 @@ public interface DeviceCoordinator {
|
||||
* 1 is default, 3 is maximum at the moment (as per UI layout)
|
||||
* 0 will disable the battery from the UI
|
||||
*/
|
||||
int getBatteryCount(GBDevice device);
|
||||
int getBatteryCount(@NonNull final GBDevice device);
|
||||
|
||||
BatteryConfig[] getBatteryConfig(GBDevice device);
|
||||
BatteryConfig[] getBatteryConfig(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if the device battery level is reported by the OS (usually for headsets)
|
||||
*/
|
||||
boolean supportsOSBatteryLevel(@NonNull GBDevice device);
|
||||
boolean supportsOSBatteryLevel(@NonNull final GBDevice device);
|
||||
|
||||
|
||||
boolean addBatteryPollingSettings();
|
||||
|
||||
boolean supportsPowerOff(@NonNull GBDevice device);
|
||||
boolean supportsPowerOff(@NonNull final GBDevice device);
|
||||
|
||||
PasswordCapabilityImpl.Mode getPasswordCapability();
|
||||
|
||||
@@ -897,20 +897,20 @@ public interface DeviceCoordinator {
|
||||
/**
|
||||
* Whether the device supports screens with configurable widgets.
|
||||
*/
|
||||
boolean supportsWidgets(@NonNull GBDevice device);
|
||||
boolean supportsWidgets(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Gets the {@link WidgetManager} for this device. Must not be null if supportsWidgets is true.
|
||||
*/
|
||||
@Nullable
|
||||
WidgetManager getWidgetManager(GBDevice device);
|
||||
WidgetManager getWidgetManager(@NonNull final GBDevice device);
|
||||
|
||||
boolean supportsNavigation(@NonNull GBDevice device);
|
||||
boolean supportsNavigation(@NonNull final GBDevice device);
|
||||
|
||||
int getOrderPriority();
|
||||
|
||||
@NonNull
|
||||
Class<? extends DeviceSupport> getDeviceSupportClass(final GBDevice device);
|
||||
Class<? extends DeviceSupport> getDeviceSupportClass(@NonNull final GBDevice device);
|
||||
|
||||
EnumSet<ServiceDeviceSupport.Flags> getInitialFlags();
|
||||
|
||||
@@ -923,16 +923,16 @@ public interface DeviceCoordinator {
|
||||
/**
|
||||
* Whether the device supports a variety of vibration patterns for notifications.
|
||||
*/
|
||||
boolean supportsNotificationVibrationPatterns(@NonNull GBDevice device);
|
||||
boolean supportsNotificationVibrationPatterns(@NonNull final GBDevice device);
|
||||
/**
|
||||
* Whether the device supports a variety of vibration pattern repetitions for notifications.
|
||||
*/
|
||||
boolean supportsNotificationVibrationRepetitionPatterns(@NonNull GBDevice device);
|
||||
boolean supportsNotificationVibrationRepetitionPatterns(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Whether the device supports a variety of LED patterns for notifications.
|
||||
*/
|
||||
boolean supportsNotificationLedPatterns(@NonNull GBDevice device);
|
||||
boolean supportsNotificationLedPatterns(@NonNull final GBDevice device);
|
||||
/**
|
||||
* What vibration pattern repetitions for notifications are supported by the device.
|
||||
*/
|
||||
@@ -955,9 +955,9 @@ public interface DeviceCoordinator {
|
||||
|
||||
List<DeviceCardAction> getCustomActions();
|
||||
|
||||
DeviceKind getDeviceKind(@NonNull GBDevice device);
|
||||
DeviceKind getDeviceKind(@NonNull final GBDevice device);
|
||||
|
||||
HeartRateZonesSpec getHeartRateZonesSpec(@NonNull GBDevice device);
|
||||
HeartRateZonesSpec getHeartRateZonesSpec(@NonNull final GBDevice device);
|
||||
|
||||
Set<BarcodeFormat> getSupportedBarcodeFormats(@NonNull final GBDevice device);
|
||||
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ abstract class CoospoHeartRateCoordinator: AbstractBLEDeviceCoordinator() {
|
||||
return "Coospo"
|
||||
}
|
||||
|
||||
override fun getDeviceSupportClass(device: GBDevice?): Class<out DeviceSupport> {
|
||||
override fun getDeviceSupportClass(device: GBDevice): Class<out DeviceSupport> {
|
||||
return GenericHeartRateSupport::class.java
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ abstract class GarminHrmCoordinator: AbstractBLEDeviceCoordinator() {
|
||||
return "Garmin"
|
||||
}
|
||||
|
||||
override fun getDeviceSupportClass(device: GBDevice?): Class<out DeviceSupport> {
|
||||
override fun getDeviceSupportClass(device: GBDevice): Class<out DeviceSupport> {
|
||||
return GenericHeartRateSupport::class.java
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ class GenericHeartRateCoordinator : AbstractBLEDeviceCoordinator() {
|
||||
return "Generic"
|
||||
}
|
||||
|
||||
override fun getDeviceSupportClass(device: GBDevice?): Class<out DeviceSupport> {
|
||||
override fun getDeviceSupportClass(device: GBDevice): Class<out DeviceSupport> {
|
||||
return GenericHeartRateSupport::class.java
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ class GenericWeightScaleCoordinator : AbstractBLEDeviceCoordinator() {
|
||||
return "Generic"
|
||||
}
|
||||
|
||||
override fun getDeviceSupportClass(device: GBDevice?): Class<out DeviceSupport?> {
|
||||
override fun getDeviceSupportClass(device: GBDevice): Class<out DeviceSupport?> {
|
||||
return GenericWeightScaleSupport::class.java
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user