mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
DeviceCoordinator: add missing device argument and @NonNull annotation for all supports[...] methods (#5214)
This commit is contained in:
@@ -36,7 +36,6 @@ import nodomain.freeyourgadget.gadgetbridge.devices.DeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.Alarm;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.AlarmUtils;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.DeviceHelper;
|
||||
|
||||
public class AlarmDetails extends AbstractGBActivity {
|
||||
|
||||
@@ -177,7 +176,7 @@ public class AlarmDetails extends AbstractGBActivity {
|
||||
});
|
||||
|
||||
cbSnooze.setChecked(alarm.getSnooze());
|
||||
int snoozeVisibility = supportsSnoozing() ? View.VISIBLE : View.GONE;
|
||||
int snoozeVisibility = supportsSnoozing(device) ? View.VISIBLE : View.GONE;
|
||||
cbSnooze.setVisibility(snoozeVisibility);
|
||||
|
||||
title.setVisibility(supportsTitle() ? View.VISIBLE : View.GONE);
|
||||
@@ -251,10 +250,10 @@ public class AlarmDetails extends AbstractGBActivity {
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean supportsSnoozing() {
|
||||
private boolean supportsSnoozing(GBDevice device) {
|
||||
if (device != null) {
|
||||
DeviceCoordinator coordinator = device.getDeviceCoordinator();
|
||||
return coordinator.supportsAlarmSnoozing();
|
||||
return coordinator.supportsAlarmSnoozing(device);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -279,7 +278,7 @@ public class AlarmDetails extends AbstractGBActivity {
|
||||
alarm.setSmartWakeup(supportsSmartWakeup(alarm.getPosition()) && cbSmartWakeup.isChecked());
|
||||
String interval = smartWakeupInterval.getText().toString();
|
||||
alarm.setSmartWakeupInterval(interval.equals("") ? null : Integer.parseInt(interval));
|
||||
alarm.setSnooze(supportsSnoozing() && cbSnooze.isChecked());
|
||||
alarm.setSnooze(supportsSnoozing(device) && cbSnooze.isChecked());
|
||||
int repetitionMask = AlarmUtils.createRepetitionMask(cbMonday.isChecked(), cbTuesday.isChecked(), cbWednesday.isChecked(), cbThursday.isChecked(), cbFriday.isChecked(), cbSaturday.isChecked(), cbSunday.isChecked());
|
||||
alarm.setRepetition(repetitionMask);
|
||||
alarm.setHour(timePicker.getCurrentHour());
|
||||
|
||||
+1
-1
@@ -155,7 +155,7 @@ public class ControlCenterv2 extends AppCompatActivity
|
||||
boolean activityTrackerAvailable = false;
|
||||
List<GBDevice> devices = GBApplication.app().getDeviceManager().getDevices();
|
||||
for (GBDevice dev : devices) {
|
||||
if (dev.getDeviceCoordinator().supportsActivityTracking()) {
|
||||
if (dev.getDeviceCoordinator().supportsActivityTracking(dev)) {
|
||||
activityTrackerAvailable = true;
|
||||
break;
|
||||
}
|
||||
|
||||
+1
-1
@@ -264,7 +264,7 @@ public class DevicesFragment extends Fragment {
|
||||
private void updateDevice(final DBHandler db, final GBDevice gbDevice) {
|
||||
final DeviceCoordinator coordinator = gbDevice.getDeviceCoordinator();
|
||||
final boolean showActivityCard = GBApplication.getDevicePrefs(gbDevice).getBoolean(DeviceSettingsPreferenceConst.PREFS_ACTIVITY_IN_DEVICE_CARD, true);
|
||||
if ((coordinator.supportsStepCounter() || coordinator.supportsSleepMeasurement()) && showActivityCard) {
|
||||
if ((coordinator.supportsStepCounter(gbDevice) || coordinator.supportsSleepMeasurement(gbDevice)) && showActivityCard) {
|
||||
final DailyTotals stepsAndSleepData = getSteps(gbDevice, db);
|
||||
deviceActivityHashMap.put(gbDevice.getAddress(), stepsAndSleepData);
|
||||
}
|
||||
|
||||
+17
-2
@@ -1,7 +1,22 @@
|
||||
/* Copyright (C) 2024-2025 Marcel Alexandru Nitan, José Rebelo, Thomas Kuehne
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.activities;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -119,7 +134,7 @@ public class SleepAsAndroidPreferencesActivity extends AbstractSettingsActivityV
|
||||
List<String> deviceMACs = new ArrayList<>();
|
||||
List<String> deviceNames = new ArrayList<>();
|
||||
for (GBDevice dev : devices) {
|
||||
if (dev.getDeviceCoordinator().supportsSleepAsAndroid()) {
|
||||
if (dev.getDeviceCoordinator().supportsSleepAsAndroid(dev)) {
|
||||
deviceMACs.add(dev.getAddress());
|
||||
deviceNames.add(dev.getAliasOrName());
|
||||
}
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ public class WidgetConfigurationActivity extends Activity implements GBActivity
|
||||
allDevices = GBApplication.app().getDeviceManager().getDevices().stream()
|
||||
.filter(device -> {
|
||||
final DeviceCoordinator coordinator = device.getDeviceCoordinator();
|
||||
return coordinator.supportsActivityDataFetching(device) || coordinator.supportsActivityTracking();
|
||||
return coordinator.supportsActivityDataFetching(device) || coordinator.supportsActivityTracking(device);
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
List<String> list = new ArrayList<>();
|
||||
|
||||
+1
-1
@@ -101,7 +101,7 @@ public class WorldClockDetails extends AbstractGBActivity {
|
||||
}
|
||||
});
|
||||
|
||||
if (coordinator.supportsDisabledWorldClocks()) {
|
||||
if (coordinator.supportsDisabledWorldClocks(device)) {
|
||||
worldClockEnabled.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
worldClock.setEnabled(isChecked);
|
||||
});
|
||||
|
||||
+4
-4
@@ -79,7 +79,7 @@ public class AppSpecificNotificationSettingsDetailActivity extends AbstractGBAct
|
||||
for(AbstractNotificationPattern p: mCoordinator.getNotificationVibrationRepetitionPatterns())
|
||||
mVibrationCountValues.add(p.getValue());
|
||||
|
||||
if(!mCoordinator.supportsNotificationLedPatterns()) {
|
||||
if(!mCoordinator.supportsNotificationLedPatterns(mDevice)) {
|
||||
mTextViewLedColorTitle.setVisibility(View.GONE);
|
||||
mSpinnerLedPattern.setVisibility(View.GONE);
|
||||
} else {
|
||||
@@ -88,7 +88,7 @@ public class AppSpecificNotificationSettingsDetailActivity extends AbstractGBAct
|
||||
);
|
||||
}
|
||||
|
||||
if (!mCoordinator.supportsNotificationVibrationPatterns()) {
|
||||
if (!mCoordinator.supportsNotificationVibrationPatterns(mDevice)) {
|
||||
mSpinnerVibrationPattern.setVisibility(View.GONE);
|
||||
} else {
|
||||
mSpinnerVibrationPattern.setAdapter(
|
||||
@@ -96,7 +96,7 @@ public class AppSpecificNotificationSettingsDetailActivity extends AbstractGBAct
|
||||
);
|
||||
}
|
||||
|
||||
if (!mCoordinator.supportsNotificationVibrationRepetitionPatterns()) {
|
||||
if (!mCoordinator.supportsNotificationVibrationRepetitionPatterns(mDevice)) {
|
||||
mSpinnerVibrationCount.setVisibility(View.GONE);
|
||||
} else {
|
||||
mSpinnerVibrationCount.setAdapter(
|
||||
@@ -104,7 +104,7 @@ public class AppSpecificNotificationSettingsDetailActivity extends AbstractGBAct
|
||||
);
|
||||
}
|
||||
|
||||
if (!mCoordinator.supportsNotificationVibrationPatterns() && !mCoordinator.supportsNotificationVibrationRepetitionPatterns()) {
|
||||
if (!mCoordinator.supportsNotificationVibrationPatterns(mDevice) && !mCoordinator.supportsNotificationVibrationRepetitionPatterns(mDevice)) {
|
||||
mTextViewVibration.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -438,7 +438,7 @@ public abstract class AbstractAppManagerFragment extends Fragment {
|
||||
appListFab.hide();
|
||||
appListFabNew.hide();
|
||||
} else if (dy < 0) {
|
||||
if (mCoordinator.supportsFlashing()) {
|
||||
if (mCoordinator.supportsFlashing(mGBDevice)) {
|
||||
appListFab.show();
|
||||
}
|
||||
if (watchfaceDesignerActivity != null) {
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ public class AppManagerActivity extends AbstractGBFragmentActivity {
|
||||
}
|
||||
|
||||
FloatingActionButton fab = findViewById(R.id.fab);
|
||||
if (coordinator.supportsFlashing()) {
|
||||
if (coordinator.supportsFlashing(mGBDevice)) {
|
||||
fab.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
|
||||
+2
-2
@@ -60,12 +60,12 @@ public abstract class AbstractActivityChartFragment<D extends ChartsData> extend
|
||||
|
||||
public boolean supportsRemSleep(GBDevice device) {
|
||||
DeviceCoordinator coordinator = device.getDeviceCoordinator();
|
||||
return coordinator.supportsRemSleep();
|
||||
return coordinator.supportsRemSleep(device);
|
||||
}
|
||||
|
||||
public boolean supportsAwakeSleep(GBDevice device) {
|
||||
DeviceCoordinator coordinator = device.getDeviceCoordinator();
|
||||
return coordinator.supportsAwakeSleep();
|
||||
return coordinator.supportsAwakeSleep(device);
|
||||
}
|
||||
|
||||
protected static final class ActivityConfig {
|
||||
|
||||
+14
-14
@@ -87,38 +87,38 @@ public class ActivityChartsActivity extends AbstractChartsActivity {
|
||||
tabList = new ArrayList<>(Arrays.asList(myTabs.split(",")));
|
||||
}
|
||||
final DeviceCoordinator coordinator = device.getDeviceCoordinator();
|
||||
if (!coordinator.supportsActivityTabs()) {
|
||||
if (!coordinator.supportsActivityTabs(device)) {
|
||||
tabList.remove("activity");
|
||||
tabList.remove("activitylist");
|
||||
}
|
||||
if (!coordinator.supportsSleepMeasurement()) {
|
||||
if (!coordinator.supportsSleepMeasurement(device)) {
|
||||
tabList.remove("sleep");
|
||||
}
|
||||
if (!coordinator.supportsStressMeasurement()) {
|
||||
if (!coordinator.supportsStressMeasurement(device)) {
|
||||
tabList.remove("stress");
|
||||
}
|
||||
if (!coordinator.supportsPai()) {
|
||||
if (!coordinator.supportsPai(device)) {
|
||||
tabList.remove("pai");
|
||||
}
|
||||
if (!coordinator.supportsSpo2(device)) {
|
||||
tabList.remove("spo2");
|
||||
}
|
||||
if (!coordinator.supportsStepCounter()) {
|
||||
if (!coordinator.supportsStepCounter(device)) {
|
||||
tabList.remove("stepsweek");
|
||||
}
|
||||
if (!coordinator.supportsSpeedzones()) {
|
||||
if (!coordinator.supportsSpeedzones(device)) {
|
||||
tabList.remove("speedzones");
|
||||
}
|
||||
if (!coordinator.supportsRealtimeData()) {
|
||||
if (!coordinator.supportsRealtimeData(device)) {
|
||||
tabList.remove("livestats");
|
||||
}
|
||||
if (!coordinator.supportsTemperatureMeasurement(device)) {
|
||||
tabList.remove("temperature");
|
||||
}
|
||||
if (!coordinator.supportsCyclingData()) {
|
||||
if (!coordinator.supportsCyclingData(device)) {
|
||||
tabList.remove("cycling");
|
||||
}
|
||||
if (!coordinator.supportsWeightMeasurement()) {
|
||||
if (!coordinator.supportsWeightMeasurement(device)) {
|
||||
tabList.remove("weight");
|
||||
}
|
||||
if (!coordinator.supportsHrvMeasurement(device)) {
|
||||
@@ -127,19 +127,19 @@ public class ActivityChartsActivity extends AbstractChartsActivity {
|
||||
if (!coordinator.supportsHeartRateMeasurement(device)) {
|
||||
tabList.remove("heartrate");
|
||||
}
|
||||
if (!coordinator.supportsBodyEnergy()) {
|
||||
if (!coordinator.supportsBodyEnergy(device)) {
|
||||
tabList.remove("bodyenergy");
|
||||
}
|
||||
if (!coordinator.supportsVO2Max()) {
|
||||
if (!coordinator.supportsVO2Max(device)) {
|
||||
tabList.remove("vo2max");
|
||||
}
|
||||
if (!coordinator.supportsWorkoutLoad()) {
|
||||
if (!coordinator.supportsWorkoutLoad(device)) {
|
||||
tabList.remove("load");
|
||||
}
|
||||
if (!coordinator.supportsActiveCalories()) {
|
||||
if (!coordinator.supportsActiveCalories(device)) {
|
||||
tabList.remove("calories");
|
||||
}
|
||||
if (!coordinator.supportsRespiratoryRate()) {
|
||||
if (!coordinator.supportsRespiratoryRate(device)) {
|
||||
tabList.remove("respiratoryrate");
|
||||
}
|
||||
return tabList;
|
||||
|
||||
+17
-1
@@ -1,3 +1,19 @@
|
||||
/* Copyright (C) 2024-2025 a0z, José Rebelo, Martin.JM, Thomas Kuehne
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.activities.charts;
|
||||
|
||||
import android.os.Build;
|
||||
@@ -111,7 +127,7 @@ public class CaloriesDailyFragment extends AbstractChartFragment<CaloriesDailyFr
|
||||
|
||||
public boolean supportsActiveCalories() {
|
||||
final GBDevice device = getChartsHost().getDevice();
|
||||
return device.getDeviceCoordinator().supportsActiveCalories();
|
||||
return device.getDeviceCoordinator().supportsActiveCalories(device);
|
||||
}
|
||||
|
||||
protected RestingMetabolicRateSample getRestingMetabolicRate(DBHandler db, GBDevice device) {
|
||||
|
||||
+17
-1
@@ -1,3 +1,19 @@
|
||||
/* Copyright (C) 2025 a0z, Thomas Kuehne
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.activities.charts;
|
||||
|
||||
import android.content.Context;
|
||||
@@ -111,7 +127,7 @@ public class LoadFragment extends AbstractChartFragment<LoadFragment.LoadsData>
|
||||
|
||||
public boolean supportsTrainingLoad() {
|
||||
final GBDevice device = getChartsHost().getDevice();
|
||||
return device.getDeviceCoordinator().supportsTrainingLoad();
|
||||
return device.getDeviceCoordinator().supportsTrainingLoad(device);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-3
@@ -31,7 +31,6 @@ import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.github.mikephil.charting.charts.BarChart;
|
||||
import com.github.mikephil.charting.charts.Chart;
|
||||
import com.github.mikephil.charting.charts.PieChart;
|
||||
import com.github.mikephil.charting.components.Legend;
|
||||
import com.github.mikephil.charting.components.LegendEntry;
|
||||
import com.github.mikephil.charting.components.XAxis;
|
||||
@@ -131,13 +130,13 @@ public class PaiChartFragment extends AbstractChartFragment<PaiChartFragment.Pai
|
||||
mTileModerate = rootView.findViewById(R.id.pai_tile_moderate);
|
||||
mTileHigh = rootView.findViewById(R.id.pai_tile_high);
|
||||
|
||||
if (!getChartsHost().getDevice().getDeviceCoordinator().supportsPaiTime()) {
|
||||
if (!getChartsHost().getDevice().getDeviceCoordinator().supportsPaiTime(getChartsHost().getDevice())) {
|
||||
mLineLowTime.setVisibility(View.GONE);
|
||||
mLineModerateTime.setVisibility(View.GONE);
|
||||
mLineHighTime.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (!getChartsHost().getDevice().getDeviceCoordinator().supportsPaiLow()) {
|
||||
if (!getChartsHost().getDevice().getDeviceCoordinator().supportsPaiLow(getChartsHost().getDevice())) {
|
||||
mTileLow.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
|
||||
+17
-1
@@ -1,3 +1,19 @@
|
||||
/* Copyright (C) 2024-2025 a0z, José Rebelo, Thomas Kuehne
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.activities.charts;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
@@ -46,7 +62,7 @@ abstract class RespiratoryRateFragment<T extends ChartsData> extends AbstractCha
|
||||
day = (Calendar) day.clone(); // do not modify the caller's argument
|
||||
day.add(Calendar.DATE, -TOTAL_DAYS + 1);
|
||||
|
||||
final boolean supportsDayRespiratoryRate = device.getDeviceCoordinator().supportsDayRespiratoryRate();
|
||||
final boolean supportsDayRespiratoryRate = device.getDeviceCoordinator().supportsDayRespiratoryRate(device);
|
||||
|
||||
List<RespiratoryRateDay> daysData = new ArrayList<>();;
|
||||
for (int counter = 0; counter < TOTAL_DAYS; counter++) {
|
||||
|
||||
+18
-3
@@ -1,3 +1,19 @@
|
||||
/* Copyright (C) 2024-2025 a0z, José Rebelo, Thomas Kuehne
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.activities.charts;
|
||||
|
||||
import android.os.Bundle;
|
||||
@@ -10,7 +26,6 @@ import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.github.mikephil.charting.charts.Chart;
|
||||
import com.github.mikephil.charting.charts.LineChart;
|
||||
@@ -96,12 +111,12 @@ public class VO2MaxFragment extends AbstractChartFragment<VO2MaxFragment.VO2MaxD
|
||||
|
||||
public boolean supportsVO2MaxCycling(GBDevice device) {
|
||||
DeviceCoordinator coordinator = device.getDeviceCoordinator();
|
||||
return coordinator != null && coordinator.supportsVO2MaxCycling();
|
||||
return coordinator != null && coordinator.supportsVO2MaxCycling(device);
|
||||
}
|
||||
|
||||
public boolean supportsVO2MaxRunning(GBDevice device) {
|
||||
DeviceCoordinator coordinator = device.getDeviceCoordinator();
|
||||
return coordinator != null && coordinator.supportsVO2MaxRunning();
|
||||
return coordinator != null && coordinator.supportsVO2MaxRunning(device);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ public abstract class AbstractDashboardWidget extends Fragment {
|
||||
protected abstract void fillData();
|
||||
|
||||
protected boolean isSupportedBy(final GBDevice device) {
|
||||
return device.getDeviceCoordinator().supportsActivityTracking();
|
||||
return device.getDeviceCoordinator().supportsActivityTracking(device);
|
||||
}
|
||||
|
||||
protected List<GBDevice> getSupportedDevices(final DashboardFragment.DashboardData dashboardData) {
|
||||
|
||||
+2
-2
@@ -55,7 +55,7 @@ public class DashboardBodyEnergyWidget extends AbstractGaugeWidget {
|
||||
|
||||
@Override
|
||||
protected boolean isSupportedBy(final GBDevice device) {
|
||||
return device.getDeviceCoordinator().supportsBodyEnergy();
|
||||
return device.getDeviceCoordinator().supportsBodyEnergy(device);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -92,7 +92,7 @@ public class DashboardBodyEnergyWidget extends AbstractGaugeWidget {
|
||||
// Gain / loss for the period
|
||||
try (DBHandler dbHandler = GBApplication.acquireDB()) {
|
||||
for (GBDevice dev : devices) {
|
||||
if ((dashboardData.showAllDevices || dashboardData.showDeviceList.contains(dev.getAddress())) && dev.getDeviceCoordinator().supportsBodyEnergy()) {
|
||||
if ((dashboardData.showAllDevices || dashboardData.showDeviceList.contains(dev.getAddress())) && dev.getDeviceCoordinator().supportsBodyEnergy(dev)) {
|
||||
final List<? extends BodyEnergySample> samples = dev.getDeviceCoordinator()
|
||||
.getBodyEnergySampleProvider(dev, dbHandler.getDaoSession())
|
||||
.getAllSamples(dashboardData.timeFrom * 1000L, dashboardData.timeTo * 1000L);
|
||||
|
||||
+17
-1
@@ -1,3 +1,19 @@
|
||||
/* Copyright (C) 2024-2025 a0z, Thomas Kuehne
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.activities.dashboard;
|
||||
|
||||
import android.os.Bundle;
|
||||
@@ -37,7 +53,7 @@ public class DashboardCaloriesActiveGoalWidget extends AbstractGaugeWidget {
|
||||
|
||||
@Override
|
||||
protected boolean isSupportedBy(final GBDevice device) {
|
||||
return device.getDeviceCoordinator().supportsActiveCalories();
|
||||
return device.getDeviceCoordinator().supportsActiveCalories(device);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+17
-1
@@ -1,3 +1,19 @@
|
||||
/* Copyright (C) 2024-2025 a0z, José Rebelo, Thomas Kuehne
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.activities.dashboard;
|
||||
|
||||
import android.graphics.Color;
|
||||
@@ -38,7 +54,7 @@ public class DashboardCaloriesTotalSegmentedWidget extends AbstractGaugeWidget {
|
||||
|
||||
@Override
|
||||
protected boolean isSupportedBy(final GBDevice device) {
|
||||
return device.getDeviceCoordinator().supportsActiveCalories();
|
||||
return device.getDeviceCoordinator().supportsActiveCalories(device);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ public class DashboardSleepWidget extends AbstractGaugeWidget {
|
||||
|
||||
@Override
|
||||
protected boolean isSupportedBy(final GBDevice device) {
|
||||
return device.getDeviceCoordinator().supportsSleepMeasurement();
|
||||
return device.getDeviceCoordinator().supportsSleepMeasurement(device);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ public class DashboardStressBreakdownWidget extends AbstractGaugeWidget {
|
||||
|
||||
@Override
|
||||
protected boolean isSupportedBy(final GBDevice device) {
|
||||
return device.getDeviceCoordinator().supportsStressMeasurement();
|
||||
return device.getDeviceCoordinator().supportsStressMeasurement(device);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ public class DashboardStressSegmentedWidget extends AbstractGaugeWidget {
|
||||
|
||||
@Override
|
||||
protected boolean isSupportedBy(final GBDevice device) {
|
||||
return device.getDeviceCoordinator().supportsStressMeasurement();
|
||||
return device.getDeviceCoordinator().supportsStressMeasurement(device);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class DashboardStressSimpleWidget extends AbstractGaugeWidget {
|
||||
|
||||
@Override
|
||||
protected boolean isSupportedBy(final GBDevice device) {
|
||||
return device.getDeviceCoordinator().supportsStressMeasurement();
|
||||
return device.getDeviceCoordinator().supportsStressMeasurement(device);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-3
@@ -44,8 +44,6 @@ import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeMap;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||
@@ -544,7 +542,7 @@ public class DashboardTodayWidget extends AbstractDashboardWidget {
|
||||
List<BaseActivitySummary> activitySummaries = null;
|
||||
try (DBHandler dbHandler = GBApplication.acquireDB()) {
|
||||
for (GBDevice dev : devices) {
|
||||
if ((dashboardData.showAllDevices || dashboardData.showDeviceList.contains(dev.getAddress())) && dev.getDeviceCoordinator().supportsActivityTracking()) {
|
||||
if ((dashboardData.showAllDevices || dashboardData.showDeviceList.contains(dev.getAddress())) && dev.getDeviceCoordinator().supportsActivityTracking(dev)) {
|
||||
List<? extends ActivitySample> activitySamples = DashboardUtils.getAllSamples(dbHandler, dev, dashboardData);
|
||||
allActivitySamples.addAll(activitySamples);
|
||||
StepAnalysis stepAnalysis = new StepAnalysis();
|
||||
|
||||
+17
-1
@@ -1,3 +1,19 @@
|
||||
/* Copyright (C) 2024-2025 a0z, José Rebelo, Thomas Kuehne
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.activities.dashboard;
|
||||
|
||||
import android.os.Bundle;
|
||||
@@ -31,6 +47,6 @@ public class DashboardVO2MaxAnyWidget extends AbstractDashboardVO2MaxWidget {
|
||||
|
||||
@Override
|
||||
protected boolean isSupportedBy(final GBDevice device) {
|
||||
return device.getDeviceCoordinator().supportsVO2Max();
|
||||
return device.getDeviceCoordinator().supportsVO2Max(device);
|
||||
}
|
||||
}
|
||||
|
||||
+17
-1
@@ -1,3 +1,19 @@
|
||||
/* Copyright (C) 2024-2025 a0z, Thomas Kuehne
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.activities.dashboard;
|
||||
|
||||
import android.os.Bundle;
|
||||
@@ -31,6 +47,6 @@ public class DashboardVO2MaxCyclingWidget extends AbstractDashboardVO2MaxWidget
|
||||
|
||||
@Override
|
||||
protected boolean isSupportedBy(final GBDevice device) {
|
||||
return device.getDeviceCoordinator().supportsVO2MaxCycling();
|
||||
return device.getDeviceCoordinator().supportsVO2MaxCycling(device);
|
||||
}
|
||||
}
|
||||
|
||||
+17
-1
@@ -1,3 +1,19 @@
|
||||
/* Copyright (C) 2024-2025 a0z, Thomas Kuehne
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.activities.dashboard;
|
||||
|
||||
import android.os.Bundle;
|
||||
@@ -31,6 +47,6 @@ public class DashboardVO2MaxRunningWidget extends AbstractDashboardVO2MaxWidget
|
||||
|
||||
@Override
|
||||
protected boolean isSupportedBy(final GBDevice device) {
|
||||
return device.getDeviceCoordinator().supportsVO2MaxRunning();
|
||||
return device.getDeviceCoordinator().supportsVO2MaxRunning(device);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ public class DashboardStressData implements Serializable {
|
||||
|
||||
try (DBHandler dbHandler = GBApplication.acquireDB()) {
|
||||
for (GBDevice dev : devices) {
|
||||
if ((dashboardData.showAllDevices || dashboardData.showDeviceList.contains(dev.getAddress())) && dev.getDeviceCoordinator().supportsStressMeasurement()) {
|
||||
if ((dashboardData.showAllDevices || dashboardData.showDeviceList.contains(dev.getAddress())) && dev.getDeviceCoordinator().supportsStressMeasurement(dev)) {
|
||||
final List<? extends StressSample> samples = dev.getDeviceCoordinator()
|
||||
.getStressSampleProvider(dev, dbHandler.getDaoSession())
|
||||
.getAllSamples(dashboardData.timeFrom * 1000L, dashboardData.timeTo * 1000L);
|
||||
|
||||
+1
-1
@@ -1539,7 +1539,7 @@ public class DeviceSpecificSettingsFragment extends AbstractPreferenceFragment i
|
||||
);
|
||||
}
|
||||
|
||||
if (coordinator.supportsActivityTracking()) {
|
||||
if (coordinator.supportsActivityTracking(device)) {
|
||||
deviceSpecificSettings.addRootScreen(
|
||||
DeviceSpecificSettingsScreen.ACTIVITY_INFO,
|
||||
R.xml.devicesettings_chartstabs,
|
||||
|
||||
+9
-9
@@ -432,7 +432,7 @@ public class GBDeviceAdapterv2 extends ListAdapter<GBDevice, GBDeviceAdapterv2.V
|
||||
batteryStatusLabels[batteryIndex].setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
holder.heartRateStatusBox.setVisibility((device.isInitialized() && coordinator.supportsRealtimeData() && coordinator.supportsManualHeartRateMeasurement(device)) ? View.VISIBLE : View.GONE);
|
||||
holder.heartRateStatusBox.setVisibility((device.isInitialized() && coordinator.supportsRealtimeData(device) && coordinator.supportsManualHeartRateMeasurement(device)) ? View.VISIBLE : View.GONE);
|
||||
if (parent.getContext() instanceof ControlCenterv2) {
|
||||
ActivitySample sample = ((ControlCenterv2) parent.getContext()).getCurrentHRSample(device);
|
||||
if (sample != null) {
|
||||
@@ -551,7 +551,7 @@ public class GBDeviceAdapterv2 extends ListAdapter<GBDevice, GBDeviceAdapterv2.V
|
||||
);
|
||||
|
||||
//show graphs
|
||||
holder.showActivityGraphs.setVisibility(coordinator.supportsActivityTracking() ? View.VISIBLE : View.GONE);
|
||||
holder.showActivityGraphs.setVisibility(coordinator.supportsActivityTracking(device) ? View.VISIBLE : View.GONE);
|
||||
holder.showActivityGraphs.setOnClickListener(new View.OnClickListener()
|
||||
|
||||
{
|
||||
@@ -599,7 +599,7 @@ public class GBDeviceAdapterv2 extends ListAdapter<GBDevice, GBDeviceAdapterv2.V
|
||||
}
|
||||
});
|
||||
|
||||
holder.findDevice.setVisibility(device.isInitialized() && coordinator.supportsFindDevice() ? View.VISIBLE : View.GONE);
|
||||
holder.findDevice.setVisibility(device.isInitialized() && coordinator.supportsFindDevice(device) ? View.VISIBLE : View.GONE);
|
||||
holder.findDevice.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -796,7 +796,7 @@ public class GBDeviceAdapterv2 extends ListAdapter<GBDevice, GBDeviceAdapterv2.V
|
||||
});
|
||||
|
||||
holder.ledColor.setVisibility(View.GONE);
|
||||
if (device.isInitialized() && device.getExtraInfo("led_color") != null && coordinator.supportsLedColor()) {
|
||||
if (device.isInitialized() && device.getExtraInfo("led_color") != null && coordinator.supportsLedColor(device)) {
|
||||
holder.ledColor.setVisibility(View.VISIBLE);
|
||||
final GradientDrawable ledColor = (GradientDrawable) holder.ledColor.getDrawable().mutate();
|
||||
ledColor.setColor((int) device.getExtraInfo("led_color"));
|
||||
@@ -811,7 +811,7 @@ public class GBDeviceAdapterv2 extends ListAdapter<GBDevice, GBDeviceAdapterv2.V
|
||||
builder.setColor((int) device.getExtraInfo("led_color"));
|
||||
builder.setShowAlphaSlider(false);
|
||||
builder.setShowColorShades(false);
|
||||
if (coordinator.supportsRgbLedColor()) {
|
||||
if (coordinator.supportsRgbLedColor(device)) {
|
||||
builder.setAllowCustom(true);
|
||||
if (presets.length == 0) {
|
||||
builder.setDialogType(ColorPickerDialog.TYPE_CUSTOM);
|
||||
@@ -865,8 +865,8 @@ public class GBDeviceAdapterv2 extends ListAdapter<GBDevice, GBDeviceAdapterv2.V
|
||||
});
|
||||
}
|
||||
|
||||
holder.cardViewActivityCardLayout.setVisibility(coordinator.supportsActivityTracking() ? View.VISIBLE : View.GONE);
|
||||
holder.cardViewActivityCardLayout.setMinimumWidth(coordinator.supportsActivityTracking() ? View.VISIBLE : View.GONE);
|
||||
holder.cardViewActivityCardLayout.setVisibility(coordinator.supportsActivityTracking(device) ? View.VISIBLE : View.GONE);
|
||||
holder.cardViewActivityCardLayout.setMinimumWidth(coordinator.supportsActivityTracking(device) ? View.VISIBLE : View.GONE);
|
||||
|
||||
// custom actions
|
||||
final List<DeviceCardAction> customActions = coordinator.getCustomActions();
|
||||
@@ -897,14 +897,14 @@ public class GBDeviceAdapterv2 extends ListAdapter<GBDevice, GBDeviceAdapterv2.V
|
||||
holder.customActions[i].layout.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (coordinator.supportsActivityTracking()) {
|
||||
if (coordinator.supportsActivityTracking(device)) {
|
||||
setActivityCard(holder, device, dailyTotals);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean showInstallerItem(GBDevice device) {
|
||||
final DeviceCoordinator coordinator = device.getDeviceCoordinator();
|
||||
return coordinator.supportsAppsManagement(device) || coordinator.supportsFlashing();
|
||||
return coordinator.supportsAppsManagement(device) || coordinator.supportsFlashing(device);
|
||||
}
|
||||
|
||||
private void showDeviceSubmenu(final View v, final GBDevice device) {
|
||||
|
||||
+76
-74
@@ -115,7 +115,7 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supports(GBDeviceCandidate candidate) {
|
||||
public boolean supports(@NonNull GBDeviceCandidate candidate) {
|
||||
if (supportedDeviceName == null) {
|
||||
supportedDeviceName = getSupportedDeviceName();
|
||||
}
|
||||
@@ -455,12 +455,12 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsAppListFetching(final GBDevice device) {
|
||||
public boolean supportsAppListFetching(@NonNull final GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFlashing() {
|
||||
public boolean supportsFlashing(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -471,7 +471,7 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsScreenshots(final GBDevice device) {
|
||||
public boolean supportsScreenshots(@NonNull final GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -481,12 +481,12 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsSmartWakeup(GBDevice device, int alarmPosition) {
|
||||
public boolean supportsSmartWakeup(@NonNull GBDevice device, int alarmPosition) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsSmartWakeupInterval(GBDevice device, int alarmPosition) {
|
||||
public boolean supportsSmartWakeupInterval(@NonNull GBDevice device, int alarmPosition) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -496,17 +496,17 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsAppReordering(final GBDevice device) {
|
||||
public boolean supportsAppReordering(@NonNull final GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsAppsManagement(final GBDevice device) {
|
||||
public boolean supportsAppsManagement(@NonNull final GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsCachedAppManagement(final GBDevice device) {
|
||||
public boolean supportsCachedAppManagement(@NonNull final GBDevice device) {
|
||||
try {
|
||||
return supportsAppsManagement(device) && getAppCacheDir() != null;
|
||||
} catch (final Exception e) {
|
||||
@@ -517,12 +517,12 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsInstalledAppManagement(final GBDevice device) {
|
||||
public boolean supportsInstalledAppManagement(@NonNull final GBDevice device) {
|
||||
return supportsAppsManagement(device);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsWatchfaceManagement(final GBDevice device) {
|
||||
public boolean supportsWatchfaceManagement(@NonNull final GBDevice device) {
|
||||
return supportsAppsManagement(device);
|
||||
}
|
||||
|
||||
@@ -554,114 +554,114 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsCalendarEvents(final GBDevice device) {
|
||||
public boolean supportsCalendarEvents(@NonNull final GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsDebugLogs() {
|
||||
public boolean supportsDebugLogs(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActivityDataFetching(final GBDevice device) {
|
||||
public boolean supportsActivityDataFetching(@NonNull final GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActivityTracking() {
|
||||
public boolean supportsActivityTracking(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActivityTracks(final GBDevice device) {
|
||||
public boolean supportsActivityTracks(@NonNull final GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsStressMeasurement() {
|
||||
public boolean supportsStressMeasurement(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsBodyEnergy() {
|
||||
public boolean supportsBodyEnergy(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsHrvMeasurement(final GBDevice device) {
|
||||
public boolean supportsHrvMeasurement(@NonNull final GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsVO2Max() {
|
||||
public boolean supportsVO2Max(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsVO2MaxCycling() {
|
||||
public boolean supportsVO2MaxCycling(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsVO2MaxRunning() {
|
||||
public boolean supportsVO2MaxRunning(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActiveCalories() {
|
||||
public boolean supportsActiveCalories(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsWorkoutLoad() {
|
||||
public boolean supportsWorkoutLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActivityTabs() {
|
||||
return supportsActivityTracking();
|
||||
public boolean supportsActivityTabs(@NonNull GBDevice device) {
|
||||
return supportsActivityTracking(device);
|
||||
}
|
||||
@Override
|
||||
public boolean supportsSleepMeasurement() {
|
||||
return supportsActivityTracking();
|
||||
public boolean supportsSleepMeasurement(@NonNull GBDevice device) {
|
||||
return supportsActivityTracking(device);
|
||||
}
|
||||
@Override
|
||||
public boolean supportsStepCounter() {
|
||||
return supportsActivityTracking();
|
||||
public boolean supportsStepCounter(@NonNull GBDevice device) {
|
||||
return supportsActivityTracking(device);
|
||||
}
|
||||
@Override
|
||||
public boolean supportsSpeedzones() {
|
||||
return supportsActivityTracking();
|
||||
public boolean supportsSpeedzones(@NonNull GBDevice device) {
|
||||
return supportsActivityTracking(device);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTemperatureMeasurement(final GBDevice device) {
|
||||
public boolean supportsTemperatureMeasurement(@NonNull final GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsContinuousTemperature(final GBDevice device) {
|
||||
public boolean supportsContinuousTemperature(@NonNull final GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsSpo2(final GBDevice device) {
|
||||
public boolean supportsSpo2(@NonNull final GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsHeartRateStats() {
|
||||
public boolean supportsHeartRateStats(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsPai() {
|
||||
public boolean supportsPai(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -671,13 +671,13 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsPaiTime() {
|
||||
return supportsPai();
|
||||
public boolean supportsPaiTime(@NonNull GBDevice device) {
|
||||
return supportsPai(device);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsPaiLow() {
|
||||
return supportsPai();
|
||||
public boolean supportsPaiLow(@NonNull GBDevice device) {
|
||||
return supportsPai(device);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -686,32 +686,32 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsRespiratoryRate() {
|
||||
public boolean supportsRespiratoryRate(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsDayRespiratoryRate() {
|
||||
public boolean supportsDayRespiratoryRate(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsSleepRespiratoryRate() {
|
||||
return supportsRespiratoryRate();
|
||||
public boolean supportsSleepRespiratoryRate(@NonNull GBDevice device) {
|
||||
return supportsRespiratoryRate(device);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsWeightMeasurement() {
|
||||
public boolean supportsWeightMeasurement(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsAlarmSnoozing() {
|
||||
public boolean supportsAlarmSnoozing(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsAlarmTitle(GBDevice device) {
|
||||
public boolean supportsAlarmTitle(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -721,17 +721,17 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsAlarmDescription(GBDevice device) {
|
||||
public boolean supportsAlarmDescription(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsLedColor() {
|
||||
public boolean supportsLedColor(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -771,12 +771,12 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsDisabledWorldClocks() {
|
||||
public boolean supportsDisabledWorldClocks(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsAudioRecordings(final GBDevice device) {
|
||||
public boolean supportsAudioRecordings(@NonNull final GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -786,7 +786,7 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsRgbLedColor() {
|
||||
public boolean supportsRgbLedColor(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -797,62 +797,62 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsHeartRateMeasurement(final GBDevice device) {
|
||||
public boolean supportsHeartRateMeasurement(@NonNull final GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsHeartRateRestingMeasurement(final GBDevice device) {
|
||||
public boolean supportsHeartRateRestingMeasurement(@NonNull final GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsManualHeartRateMeasurement(final GBDevice device) {
|
||||
public boolean supportsManualHeartRateMeasurement(@NonNull final GBDevice device) {
|
||||
return supportsHeartRateMeasurement(device);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsRealtimeData() {
|
||||
public boolean supportsRealtimeData(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsCyclingData() {
|
||||
public boolean supportsCyclingData(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsRemSleep() {
|
||||
public boolean supportsRemSleep(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsAwakeSleep() {
|
||||
public boolean supportsAwakeSleep(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsSleepScore(final GBDevice device) {
|
||||
public boolean supportsSleepScore(@NonNull final GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsWeather(final GBDevice device) {
|
||||
public boolean supportsWeather(@NonNull final GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFindDevice() {
|
||||
public boolean supportsFindDevice(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsUnicodeEmojis() {
|
||||
public boolean supportsUnicodeEmojis(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsSleepAsAndroid() {
|
||||
public boolean supportsSleepAsAndroid(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -933,7 +933,8 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
return batteryConfigs;
|
||||
}
|
||||
|
||||
public boolean supportsOSBatteryLevel() {
|
||||
@Override
|
||||
public boolean supportsOSBatteryLevel(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -943,7 +944,7 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsPowerOff(final GBDevice device) {
|
||||
public boolean supportsPowerOff(@NonNull final GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -965,7 +966,7 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsWidgets(final GBDevice device) {
|
||||
public boolean supportsWidgets(@NonNull final GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -975,7 +976,8 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean supportsNavigation(final GBDevice device) {
|
||||
@Override
|
||||
public boolean supportsNavigation(@NonNull final GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -996,17 +998,17 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsNotificationVibrationPatterns() {
|
||||
public boolean supportsNotificationVibrationPatterns(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsNotificationVibrationRepetitionPatterns() {
|
||||
public boolean supportsNotificationVibrationRepetitionPatterns(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsNotificationLedPatterns() {
|
||||
public boolean supportsNotificationLedPatterns(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+69
-69
@@ -1,7 +1,7 @@
|
||||
/* Copyright (C) 2015-2024 akasaka / Genjitsu Labs, Alicia Hormann, Andreas
|
||||
/* Copyright (C) 2015-2025 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
|
||||
Matthieu Baerts, Nephiel, Petr Vaněk, Uwe Hermann, Johannes Krude, Thomas Kuehne
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
@@ -152,7 +152,7 @@ public interface DeviceCoordinator {
|
||||
* @param candidate
|
||||
* @return true if this coordinator handles the given candidate.
|
||||
*/
|
||||
boolean supports(GBDeviceCandidate candidate);
|
||||
boolean supports(@NonNull GBDeviceCandidate candidate);
|
||||
|
||||
/**
|
||||
* Returns a list of scan filters that shall be used to discover devices supported
|
||||
@@ -206,7 +206,7 @@ public interface DeviceCoordinator {
|
||||
/**
|
||||
* Whether the device supports fetching debug logs.
|
||||
*/
|
||||
boolean supportsDebugLogs();
|
||||
boolean supportsDebugLogs(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if activity data fetching is supported by the device
|
||||
@@ -216,7 +216,7 @@ public interface DeviceCoordinator {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean supportsActivityDataFetching(final GBDevice device);
|
||||
boolean supportsActivityDataFetching(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if activity tracking is supported by the device
|
||||
@@ -225,7 +225,7 @@ public interface DeviceCoordinator {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean supportsActivityTracking();
|
||||
boolean supportsActivityTracking(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if cycling data is supported by the device
|
||||
@@ -234,7 +234,7 @@ public interface DeviceCoordinator {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean supportsCyclingData();
|
||||
boolean supportsCyclingData(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports recording dedicated activity tracks, like
|
||||
@@ -242,56 +242,56 @@ public interface DeviceCoordinator {
|
||||
* data. This is different from the constant activity tracking since the tracks are
|
||||
* usually recorded with additional features, like e.g. GPS.
|
||||
*/
|
||||
boolean supportsActivityTracks(GBDevice device);
|
||||
boolean supportsActivityTracks(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if stress measurement and fetching is supported by the device
|
||||
* (with this coordinator).
|
||||
*/
|
||||
boolean supportsStressMeasurement();
|
||||
boolean supportsStressMeasurement(@NonNull GBDevice device);
|
||||
|
||||
boolean supportsBodyEnergy();
|
||||
boolean supportsHrvMeasurement(GBDevice device);
|
||||
boolean supportsVO2Max();
|
||||
boolean supportsVO2MaxCycling();
|
||||
boolean supportsVO2MaxRunning();
|
||||
boolean supportsSleepMeasurement();
|
||||
boolean supportsStepCounter();
|
||||
boolean supportsSpeedzones();
|
||||
boolean supportsActivityTabs();
|
||||
boolean supportsActiveCalories();
|
||||
boolean supportsTrainingLoad();
|
||||
boolean supportsWorkoutLoad();
|
||||
boolean supportsBodyEnergy(@NonNull GBDevice device);
|
||||
boolean supportsHrvMeasurement(@NonNull GBDevice device);
|
||||
boolean supportsVO2Max(@NonNull GBDevice device);
|
||||
boolean supportsVO2MaxCycling(@NonNull GBDevice device);
|
||||
boolean supportsVO2MaxRunning(@NonNull GBDevice device);
|
||||
boolean supportsSleepMeasurement(@NonNull GBDevice device);
|
||||
boolean supportsStepCounter(@NonNull GBDevice device);
|
||||
boolean supportsSpeedzones(@NonNull GBDevice device);
|
||||
boolean supportsActivityTabs(@NonNull GBDevice device);
|
||||
boolean supportsActiveCalories(@NonNull GBDevice device);
|
||||
boolean supportsTrainingLoad(@NonNull GBDevice device);
|
||||
boolean supportsWorkoutLoad(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if measurement and fetching of body temperature is supported by the device
|
||||
* (with this coordinator).
|
||||
*/
|
||||
boolean supportsTemperatureMeasurement(GBDevice device);
|
||||
boolean supportsTemperatureMeasurement(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if continuous temperature measurement used in device
|
||||
* (with this coordinator).
|
||||
*/
|
||||
boolean supportsContinuousTemperature(GBDevice device);
|
||||
boolean supportsContinuousTemperature(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if SpO2 measurement and fetching is supported by the device
|
||||
* (with this coordinator).
|
||||
*/
|
||||
boolean supportsSpo2(GBDevice device);
|
||||
boolean supportsSpo2(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if heart rate stats (max, resting, manual) measurement and fetching is supported
|
||||
* by the device (with this coordinator).
|
||||
*/
|
||||
boolean supportsHeartRateStats();
|
||||
boolean supportsHeartRateStats(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if PAI (Personal Activity Intelligence) measurement and fetching is supported by
|
||||
* the device (with this coordinator).
|
||||
*/
|
||||
boolean supportsPai();
|
||||
boolean supportsPai(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the device-specific name for PAI (eg. Vitality Score).
|
||||
@@ -303,12 +303,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();
|
||||
boolean supportsPaiTime(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if the device is capable of providing the time contribution for light PAI type.
|
||||
*/
|
||||
boolean supportsPaiLow();
|
||||
boolean supportsPaiLow(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the PAI target - usually 100.
|
||||
@@ -318,25 +318,25 @@ public interface DeviceCoordinator {
|
||||
/**
|
||||
* Indicates whether the device supports respiratory rate tracking.
|
||||
*/
|
||||
boolean supportsRespiratoryRate();
|
||||
boolean supportsRespiratoryRate(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device tracks respiratory rate during the day, will be false
|
||||
* if only during the night.
|
||||
*/
|
||||
boolean supportsDayRespiratoryRate();
|
||||
boolean supportsDayRespiratoryRate(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if sleep respiratory rate measurement and fetching is supported by
|
||||
* the device (with this coordinator).
|
||||
*/
|
||||
boolean supportsSleepRespiratoryRate();
|
||||
boolean supportsSleepRespiratoryRate(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if measurement and fetching of body weight is supported by the device
|
||||
* (with this coordinator).
|
||||
*/
|
||||
boolean supportsWeightMeasurement();
|
||||
boolean supportsWeightMeasurement(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if activity data fetching is supported AND possible at this
|
||||
@@ -473,7 +473,7 @@ public interface DeviceCoordinator {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean supportsFlashing();
|
||||
boolean supportsFlashing(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Finds an install handler for the given uri that can install the given
|
||||
@@ -490,7 +490,7 @@ public interface DeviceCoordinator {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean supportsScreenshots(GBDevice device);
|
||||
boolean supportsScreenshots(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the number of alarms this device/coordinator supports
|
||||
@@ -505,13 +505,13 @@ public interface DeviceCoordinator {
|
||||
* Returns true if this device/coordinator supports an alarm with smart wakeup for the current position
|
||||
* @param alarmPosition Position of the alarm
|
||||
*/
|
||||
boolean supportsSmartWakeup(GBDevice device, int alarmPosition);
|
||||
boolean supportsSmartWakeup(@NonNull 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(GBDevice device, int alarmPosition);
|
||||
boolean supportsSmartWakeupInterval(@NonNull GBDevice device, int alarmPosition);
|
||||
|
||||
/**
|
||||
* Returns true if the alarm at the specified position *must* be a smart alarm for this device/coordinator
|
||||
@@ -524,13 +524,13 @@ public interface DeviceCoordinator {
|
||||
* Returns true if this device/coordinator supports alarm snoozing
|
||||
* @return
|
||||
*/
|
||||
boolean supportsAlarmSnoozing();
|
||||
boolean supportsAlarmSnoozing(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if this device/coordinator supports alarm titles
|
||||
* @return
|
||||
*/
|
||||
boolean supportsAlarmTitle(GBDevice device);
|
||||
boolean supportsAlarmTitle(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the character limit for the alarm title, negative if no limit.
|
||||
@@ -542,23 +542,23 @@ public interface DeviceCoordinator {
|
||||
* Returns true if this device/coordinator supports alarm descriptions
|
||||
* @return
|
||||
*/
|
||||
boolean supportsAlarmDescription(GBDevice device);
|
||||
boolean supportsAlarmDescription(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if the given device supports heart rate measurements.
|
||||
* @return
|
||||
*/
|
||||
boolean supportsHeartRateMeasurement(GBDevice device);
|
||||
boolean supportsHeartRateMeasurement(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if the given device supports resting heart rate measurements.
|
||||
*/
|
||||
boolean supportsHeartRateRestingMeasurement(GBDevice device);
|
||||
boolean supportsHeartRateRestingMeasurement(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns true if the device supports triggering manual one-shot heart rate measurements.
|
||||
*/
|
||||
boolean supportsManualHeartRateMeasurement(GBDevice device);
|
||||
boolean supportsManualHeartRateMeasurement(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the readable name of the manufacturer.
|
||||
@@ -570,11 +570,11 @@ public interface DeviceCoordinator {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean supportsAppsManagement(GBDevice device);
|
||||
boolean supportsAppsManagement(@NonNull GBDevice device);
|
||||
|
||||
boolean supportsCachedAppManagement(GBDevice device);
|
||||
boolean supportsInstalledAppManagement(GBDevice device);
|
||||
boolean supportsWatchfaceManagement(GBDevice device);
|
||||
boolean supportsCachedAppManagement(@NonNull GBDevice device);
|
||||
boolean supportsInstalledAppManagement(@NonNull GBDevice device);
|
||||
boolean supportsWatchfaceManagement(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the Activity class that will be used to manage device apps.
|
||||
@@ -613,12 +613,12 @@ public interface DeviceCoordinator {
|
||||
/**
|
||||
* Indicated whether the device supports fetching a list of its apps.
|
||||
*/
|
||||
boolean supportsAppListFetching(GBDevice device);
|
||||
boolean supportsAppListFetching(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports reordering of apps.
|
||||
*/
|
||||
boolean supportsAppReordering(GBDevice device);
|
||||
boolean supportsAppReordering(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns how/if the given device should be bonded before connecting to it.
|
||||
@@ -640,51 +640,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(GBDevice device);
|
||||
boolean supportsCalendarEvents(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports getting a stream of live data.
|
||||
* This can be live HR, steps etc.
|
||||
*/
|
||||
boolean supportsRealtimeData();
|
||||
boolean supportsRealtimeData(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports REM sleep tracking.
|
||||
*/
|
||||
boolean supportsRemSleep();
|
||||
boolean supportsRemSleep(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports Awake sleep tracking.
|
||||
*/
|
||||
boolean supportsAwakeSleep();
|
||||
boolean supportsAwakeSleep(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports determining a sleep score in a 0-100 range.
|
||||
*/
|
||||
boolean supportsSleepScore(GBDevice device);
|
||||
boolean supportsSleepScore(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports current weather and/or weather
|
||||
* forecast display.
|
||||
*/
|
||||
boolean supportsWeather(GBDevice device);
|
||||
boolean supportsWeather(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports being found by vibrating,
|
||||
* making some sound or lighting up
|
||||
*/
|
||||
boolean supportsFindDevice();
|
||||
boolean supportsFindDevice(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports displaying music information
|
||||
* like artist, title, album, play state etc.
|
||||
*/
|
||||
boolean supportsMusicInfo();
|
||||
boolean supportsMusicInfo(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports features required by Sleep As Android
|
||||
*/
|
||||
boolean supportsSleepAsAndroid();
|
||||
boolean supportsSleepAsAndroid(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates the maximum reminder message length.
|
||||
@@ -725,12 +725,12 @@ public interface DeviceCoordinator {
|
||||
* Indicates whether the device supports disabled world clocks that can be enabled through
|
||||
* a menu on the device.
|
||||
*/
|
||||
boolean supportsDisabledWorldClocks();
|
||||
boolean supportsDisabledWorldClocks(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports recording and syncing audio recordings.
|
||||
*/
|
||||
boolean supportsAudioRecordings(GBDevice device);
|
||||
boolean supportsAudioRecordings(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates the maximum number of slots available for contacts in the device.
|
||||
@@ -740,13 +740,13 @@ public interface DeviceCoordinator {
|
||||
/**
|
||||
* Indicates whether the device has an led which supports custom colors
|
||||
*/
|
||||
boolean supportsLedColor();
|
||||
boolean supportsLedColor(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device's led supports any RGB color,
|
||||
* or only preset colors
|
||||
*/
|
||||
boolean supportsRgbLedColor();
|
||||
boolean supportsRgbLedColor(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the preset colors supported by the device, if any, in ARGB, with alpha = 255
|
||||
@@ -757,7 +757,7 @@ public interface DeviceCoordinator {
|
||||
/**
|
||||
* Indicates whether the device supports unicode emojis.
|
||||
*/
|
||||
boolean supportsUnicodeEmojis();
|
||||
boolean supportsUnicodeEmojis(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Returns the set of supported sleep as Android features
|
||||
@@ -816,12 +816,12 @@ public interface DeviceCoordinator {
|
||||
/**
|
||||
* Returns true if the device battery level is reported by the OS (usually for headsets)
|
||||
*/
|
||||
boolean supportsOSBatteryLevel();
|
||||
boolean supportsOSBatteryLevel(@NonNull GBDevice device);
|
||||
|
||||
|
||||
boolean addBatteryPollingSettings();
|
||||
|
||||
boolean supportsPowerOff(GBDevice device);
|
||||
boolean supportsPowerOff(@NonNull GBDevice device);
|
||||
|
||||
PasswordCapabilityImpl.Mode getPasswordCapability();
|
||||
|
||||
@@ -830,7 +830,7 @@ public interface DeviceCoordinator {
|
||||
/**
|
||||
* Whether the device supports screens with configurable widgets.
|
||||
*/
|
||||
boolean supportsWidgets(GBDevice device);
|
||||
boolean supportsWidgets(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Gets the {@link WidgetManager} for this device. Must not be null if supportsWidgets is true.
|
||||
@@ -838,7 +838,7 @@ public interface DeviceCoordinator {
|
||||
@Nullable
|
||||
WidgetManager getWidgetManager(GBDevice device);
|
||||
|
||||
boolean supportsNavigation(GBDevice device);
|
||||
boolean supportsNavigation(@NonNull GBDevice device);
|
||||
|
||||
int getOrderPriority();
|
||||
|
||||
@@ -856,16 +856,16 @@ public interface DeviceCoordinator {
|
||||
/**
|
||||
* Whether the device supports a variety of vibration patterns for notifications.
|
||||
*/
|
||||
boolean supportsNotificationVibrationPatterns();
|
||||
boolean supportsNotificationVibrationPatterns(@NonNull GBDevice device);
|
||||
/**
|
||||
* Whether the device supports a variety of vibration pattern repetitions for notifications.
|
||||
*/
|
||||
boolean supportsNotificationVibrationRepetitionPatterns();
|
||||
boolean supportsNotificationVibrationRepetitionPatterns(@NonNull GBDevice device);
|
||||
|
||||
/**
|
||||
* Whether the device supports a variety of LED patterns for notifications.
|
||||
*/
|
||||
boolean supportsNotificationLedPatterns();
|
||||
boolean supportsNotificationLedPatterns(@NonNull GBDevice device);
|
||||
/**
|
||||
* What vibration pattern repetitions for notifications are supported by the device.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -113,7 +113,7 @@ public class UnknownDeviceCoordinator extends AbstractDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supports(GBDeviceCandidate candidate) {
|
||||
public boolean supports(@NonNull GBDeviceCandidate candidate) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+5
-4
@@ -116,7 +116,7 @@ public class WorkoutVo2MaxSampleProvider implements Vo2MaxSampleProvider<Vo2MaxS
|
||||
final DeviceCoordinator coordinator = device.getDeviceCoordinator();
|
||||
final QueryBuilder<BaseActivitySummary> qb = summaryDao.queryBuilder();
|
||||
|
||||
addWhereFilter(coordinator, qb, type);
|
||||
addWhereFilter(coordinator, qb, type, device);
|
||||
|
||||
if (until != 0) {
|
||||
qb.where(BaseActivitySummaryDao.Properties.StartTime.le(new Date(until)));
|
||||
@@ -135,10 +135,11 @@ public class WorkoutVo2MaxSampleProvider implements Vo2MaxSampleProvider<Vo2MaxS
|
||||
|
||||
private static void addWhereFilter(final DeviceCoordinator coordinator,
|
||||
final QueryBuilder<BaseActivitySummary> qb,
|
||||
final Vo2MaxSample.Type type) {
|
||||
final Vo2MaxSample.Type type,
|
||||
final GBDevice device) {
|
||||
final List<Integer> codes = new ArrayList<>();
|
||||
|
||||
if (coordinator.supportsVO2MaxRunning()) {
|
||||
if (coordinator.supportsVO2MaxRunning(device)) {
|
||||
if (type == Vo2MaxSample.Type.ANY || type == Vo2MaxSample.Type.RUNNING) {
|
||||
codes.addAll(Arrays.asList(
|
||||
ActivityKind.INDOOR_RUNNING.getCode(),
|
||||
@@ -148,7 +149,7 @@ public class WorkoutVo2MaxSampleProvider implements Vo2MaxSampleProvider<Vo2MaxS
|
||||
));
|
||||
}
|
||||
}
|
||||
if (coordinator.supportsVO2MaxCycling()) {
|
||||
if (coordinator.supportsVO2MaxCycling(device)) {
|
||||
if (type == Vo2MaxSample.Type.ANY || type == Vo2MaxSample.Type.CYCLING) {
|
||||
codes.addAll(Arrays.asList(
|
||||
ActivityKind.CYCLING.getCode(),
|
||||
|
||||
+2
-2
@@ -68,12 +68,12 @@ public class AsteroidOSDeviceCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFindDevice() {
|
||||
public boolean supportsFindDevice(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -95,7 +95,7 @@ public class BangleJSCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsSleepAsAndroid() {
|
||||
public boolean supportsSleepAsAndroid(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ public class BangleJSCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsRealtimeData() {
|
||||
public boolean supportsRealtimeData(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ public class BangleJSCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFindDevice() {
|
||||
public boolean supportsFindDevice(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ public class BangleJSCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActivityTracking() {
|
||||
public boolean supportsActivityTracking(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ public class BangleJSCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsUnicodeEmojis() {
|
||||
public boolean supportsUnicodeEmojis(@NonNull GBDevice device) {
|
||||
/* we say yes here (because we can't get a handle to our device's prefs to check)
|
||||
and then in 'renderUnicodeAsImage' we call EmojiConverter.convertUnicodeEmojiToAscii
|
||||
just like DeviceCommunicationService.sanitizeNotifText would have done if we'd
|
||||
@@ -258,7 +258,7 @@ public class BangleJSCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ public class CasioGB6900DeviceCoordinator extends CasioDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFindDevice() {
|
||||
public boolean supportsFindDevice(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -80,7 +80,7 @@ public class CasioGBX100DeviceCoordinator extends Casio2C2DDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsAlarmSnoozing() {
|
||||
public boolean supportsAlarmSnoozing(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ public class CasioGBX100DeviceCoordinator extends Casio2C2DDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActivityTracking() {
|
||||
public boolean supportsActivityTracking(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -197,7 +197,7 @@ public class CmfWatchProCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFlashing() {
|
||||
public boolean supportsFlashing(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ public class CmfWatchProCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActivityTracking() {
|
||||
public boolean supportsActivityTracking(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ public class CmfWatchProCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsStressMeasurement() {
|
||||
public boolean supportsStressMeasurement(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ public class CmfWatchProCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -292,7 +292,7 @@ public class CmfWatchProCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsRemSleep() {
|
||||
public boolean supportsRemSleep(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ public class CmfWatchProCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFindDevice() {
|
||||
public boolean supportsFindDevice(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -47,23 +47,23 @@ abstract class CoospoHeartRateCoordinator: AbstractBLEDeviceCoordinator() {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun supportsActivityTracking(): Boolean {
|
||||
override fun supportsActivityTracking(device: GBDevice): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun supportsActivityTabs(): Boolean {
|
||||
override fun supportsActivityTabs(device: GBDevice): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun supportsSleepMeasurement(): Boolean {
|
||||
override fun supportsSleepMeasurement(device: GBDevice): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun supportsStepCounter(): Boolean {
|
||||
override fun supportsStepCounter(device: GBDevice): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun supportsSpeedzones(): Boolean {
|
||||
override fun supportsSpeedzones(device: GBDevice): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -35,12 +35,12 @@ public class CyclingSensorCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsCyclingData() {
|
||||
public boolean supportsCyclingData(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActivityTracking() {
|
||||
public boolean supportsActivityTracking(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -50,19 +50,19 @@ public class CyclingSensorCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsSleepMeasurement() {
|
||||
public boolean supportsSleepMeasurement(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean supportsStepCounter() {
|
||||
public boolean supportsStepCounter(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean supportsSpeedzones() {
|
||||
public boolean supportsSpeedzones(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean supportsActivityTabs() {
|
||||
public boolean supportsActivityTabs(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public class CyclingSensorCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsRealtimeData() {
|
||||
public boolean supportsRealtimeData(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ public class PixooCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFlashing() {
|
||||
public boolean supportsFlashing(@NonNull GBDevice device) {
|
||||
// To install bitmaps
|
||||
return true;
|
||||
}
|
||||
|
||||
+1
-3
@@ -23,8 +23,6 @@ import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.AbstractBLEDeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.Device;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.ServiceDeviceSupport;
|
||||
@@ -42,7 +40,7 @@ public class DomyosT540Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFindDevice() {
|
||||
public boolean supportsFindDevice(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -90,25 +90,25 @@ public class FemometerVinca2DeviceCoordinator extends AbstractBLEDeviceCoordinat
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActivityTracking() {
|
||||
public boolean supportsActivityTracking(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsSleepMeasurement() {
|
||||
public boolean supportsSleepMeasurement(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsStepCounter() {
|
||||
public boolean supportsStepCounter(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean supportsSpeedzones() {
|
||||
public boolean supportsSpeedzones(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean supportsActivityTabs() {
|
||||
public boolean supportsActivityTabs(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -78,7 +78,7 @@ public class FitProDeviceCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActivityTracking() {
|
||||
public boolean supportsActivityTracking(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ public class FitProDeviceCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsRealtimeData() {
|
||||
public boolean supportsRealtimeData(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ public class FitProDeviceCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFindDevice() {
|
||||
public boolean supportsFindDevice(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+1
-4
@@ -19,11 +19,8 @@ package nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBException;
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.AbstractBLClassicDeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.Device;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.galaxy_buds.GalaxyBudsDeviceSupport;
|
||||
@@ -40,7 +37,7 @@ public abstract class GalaxyBudsGenericCoordinator extends AbstractBLClassicDevi
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFindDevice() {
|
||||
public boolean supportsFindDevice(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -255,7 +255,7 @@ public abstract class GarminCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsUnicodeEmojis() {
|
||||
public boolean supportsUnicodeEmojis(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ public abstract class GarminCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFlashing() {
|
||||
public boolean supportsFlashing(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+12
-10
@@ -1,5 +1,7 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.bike;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.GarminCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
@@ -10,42 +12,42 @@ public abstract class GarminBikeComputerCoordinator extends GarminCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActivityTracking() {
|
||||
public boolean supportsActivityTracking(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActivityTabs() {
|
||||
public boolean supportsActivityTabs(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsSleepMeasurement() {
|
||||
public boolean supportsSleepMeasurement(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsStepCounter() {
|
||||
public boolean supportsStepCounter(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsSpeedzones() {
|
||||
public boolean supportsSpeedzones(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActiveCalories() {
|
||||
public boolean supportsActiveCalories(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsVO2Max() {
|
||||
public boolean supportsVO2Max(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsVO2MaxCycling() {
|
||||
public boolean supportsVO2MaxCycling(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -70,12 +72,12 @@ public abstract class GarminBikeComputerCoordinator extends GarminCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFindDevice() {
|
||||
public boolean supportsFindDevice(GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(GBDevice device) {
|
||||
// eg. Edge 840, Edge Explore 2, but not all
|
||||
return true;
|
||||
}
|
||||
|
||||
+4
-2
@@ -1,5 +1,7 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.bike;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
@@ -22,12 +24,12 @@ public class GarminEdge130PlusCoordinator extends GarminBikeComputerCoordinator
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFindDevice() {
|
||||
public boolean supportsFindDevice(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -47,23 +47,23 @@ abstract class GarminHrmCoordinator: AbstractBLEDeviceCoordinator() {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun supportsActivityTracking(): Boolean {
|
||||
override fun supportsActivityTracking(device: GBDevice): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun supportsActivityTabs(): Boolean {
|
||||
override fun supportsActivityTabs(device: GBDevice): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun supportsSleepMeasurement(): Boolean {
|
||||
override fun supportsSleepMeasurement(device: GBDevice): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun supportsStepCounter(): Boolean {
|
||||
override fun supportsStepCounter(device: GBDevice): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun supportsSpeedzones(): Boolean {
|
||||
override fun supportsSpeedzones(device: GBDevice): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
+21
-19
@@ -1,5 +1,7 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.GarminCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
@@ -21,7 +23,7 @@ public abstract class GarminWatchCoordinator extends GarminCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActivityTracking() {
|
||||
public boolean supportsActivityTracking(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -31,12 +33,12 @@ public abstract class GarminWatchCoordinator extends GarminCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsStressMeasurement() {
|
||||
public boolean supportsStressMeasurement(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsBodyEnergy() {
|
||||
public boolean supportsBodyEnergy(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -46,22 +48,22 @@ public abstract class GarminWatchCoordinator extends GarminCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsVO2Max() {
|
||||
public boolean supportsVO2Max(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsVO2MaxCycling() {
|
||||
public boolean supportsVO2MaxCycling(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsVO2MaxRunning() {
|
||||
public boolean supportsVO2MaxRunning(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActiveCalories() {
|
||||
public boolean supportsActiveCalories(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -85,7 +87,7 @@ public abstract class GarminWatchCoordinator extends GarminCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsRealtimeData() {
|
||||
public boolean supportsRealtimeData(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -95,12 +97,12 @@ public abstract class GarminWatchCoordinator extends GarminCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsRemSleep() {
|
||||
public boolean supportsRemSleep(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsAwakeSleep() {
|
||||
public boolean supportsAwakeSleep(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -110,17 +112,17 @@ public abstract class GarminWatchCoordinator extends GarminCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsRespiratoryRate() {
|
||||
public boolean supportsRespiratoryRate(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsDayRespiratoryRate() {
|
||||
public boolean supportsDayRespiratoryRate(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsPai() {
|
||||
public boolean supportsPai(@NonNull GBDevice device) {
|
||||
// Intensity Minutes
|
||||
return true;
|
||||
}
|
||||
@@ -131,12 +133,12 @@ public abstract class GarminWatchCoordinator extends GarminCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsPaiTime() {
|
||||
public boolean supportsPaiTime(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsPaiLow() {
|
||||
public boolean supportsPaiLow(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -146,18 +148,18 @@ public abstract class GarminWatchCoordinator extends GarminCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
// Not all devices support it
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsWorkoutLoad() {
|
||||
public boolean supportsWorkoutLoad(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFindDevice() {
|
||||
public boolean supportsFindDevice(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -167,7 +169,7 @@ public abstract class GarminWatchCoordinator extends GarminCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
+5
-2
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.fenix;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminFenix3Coordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -23,12 +26,12 @@ public class GarminFenix3Coordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsWorkoutLoad() {
|
||||
public boolean supportsWorkoutLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+5
-2
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.fenix;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminFenix3HrCoordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -23,12 +26,12 @@ public class GarminFenix3HrCoordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsWorkoutLoad() {
|
||||
public boolean supportsWorkoutLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -16,10 +16,13 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.forerunner;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminForerunner45Coordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -33,7 +36,7 @@ public class GarminForerunner45Coordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.lily;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminLily2ActiveCoordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminLily2ActiveCoordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.swim;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminSwim2Coordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminSwim2Coordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.venu;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminVenu2Coordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminVenu2Coordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.venu;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminVenu2PlusCoordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminVenu2PlusCoordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.venu;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminVenu2SCoordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminVenu2SCoordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.venu;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminVenu3Coordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminVenu3Coordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.venu;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminVenu3SCoordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminVenu3SCoordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.venu;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminVenuCoordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminVenuCoordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.venu;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminVenuSq2Coordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminVenuSq2Coordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.venu;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminVenuSqCoordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminVenuSqCoordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.vivoactive;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminVivoActive3Coordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -19,7 +22,7 @@ public class GarminVivoActive3Coordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.vivoactive;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminVivoActive4Coordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminVivoActive4Coordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.vivoactive;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminVivoActive4SCoordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminVivoActive4SCoordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.vivoactive;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminVivoActive5Coordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminVivoActive5Coordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.vivoactive;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminVivoActiveHrCoordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminVivoActiveHrCoordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.vivomove;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminVivomoveHrCoordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminVivomoveHrCoordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.vivomove;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminVivomoveSportCoordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminVivomoveSportCoordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.vivomove;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminVivomoveStyleCoordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminVivomoveStyleCoordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.vivomove;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminVivomoveTrendCoordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminVivomoveTrendCoordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.vivosmart;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminVivosmart3Coordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminVivosmart3Coordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.vivosmart;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminVivosmart4Coordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminVivosmart4Coordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.vivosmart;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminVivosmart5Coordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminVivosmart5Coordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.vivosport;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.GarminWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminVivosportCoordinator extends GarminWatchCoordinator {
|
||||
@Override
|
||||
@@ -17,7 +20,7 @@ public class GarminVivosportCoordinator extends GarminWatchCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTrainingLoad() {
|
||||
public boolean supportsTrainingLoad(@NonNull GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -85,7 +85,7 @@ public class GenericHeadphonesCoordinator extends AbstractDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsOSBatteryLevel() {
|
||||
public boolean supportsOSBatteryLevel(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -57,23 +57,23 @@ class GenericHeartRateCoordinator : AbstractBLEDeviceCoordinator() {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun supportsActivityTracking(): Boolean {
|
||||
override fun supportsActivityTracking(device: GBDevice): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun supportsActivityTabs(): Boolean {
|
||||
override fun supportsActivityTabs(device: GBDevice): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun supportsSleepMeasurement(): Boolean {
|
||||
override fun supportsSleepMeasurement(device: GBDevice): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun supportsStepCounter(): Boolean {
|
||||
override fun supportsStepCounter(device: GBDevice): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun supportsSpeedzones(): Boolean {
|
||||
override fun supportsSpeedzones(device: GBDevice): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
+12
-12
@@ -76,8 +76,8 @@ abstract class GloryFitCoordinator : AbstractBLEDeviceCoordinator() {
|
||||
|
||||
override fun getSpo2SampleProvider(
|
||||
device: GBDevice,
|
||||
session: DaoSession?
|
||||
): TimeSampleProvider<out Spo2Sample?>? {
|
||||
session: DaoSession
|
||||
): TimeSampleProvider<out Spo2Sample>? {
|
||||
return GenericSpo2SampleProvider(device, session)
|
||||
}
|
||||
|
||||
@@ -93,11 +93,11 @@ abstract class GloryFitCoordinator : AbstractBLEDeviceCoordinator() {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun supportsActivityTracking(): Boolean {
|
||||
override fun supportsActivityTracking(device: GBDevice): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun supportsActiveCalories(): Boolean {
|
||||
override fun supportsActiveCalories(device: GBDevice): Boolean {
|
||||
// TODO it does not, but we could try and match their formula in the samples
|
||||
return false
|
||||
}
|
||||
@@ -106,7 +106,7 @@ abstract class GloryFitCoordinator : AbstractBLEDeviceCoordinator() {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun supportsMusicInfo(): Boolean {
|
||||
override fun supportsMusicInfo(device: GBDevice): Boolean {
|
||||
// Not info, but supports music control
|
||||
return true
|
||||
}
|
||||
@@ -127,16 +127,16 @@ abstract class GloryFitCoordinator : AbstractBLEDeviceCoordinator() {
|
||||
return false // TODO supportsManualHeartRateMeasurement
|
||||
}
|
||||
|
||||
override fun supportsRealtimeData(): Boolean {
|
||||
override fun supportsRealtimeData(device: GBDevice): Boolean {
|
||||
// TODO it does
|
||||
return false
|
||||
}
|
||||
|
||||
override fun supportsRemSleep(): Boolean {
|
||||
override fun supportsRemSleep(device: GBDevice): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun supportsAwakeSleep(): Boolean {
|
||||
override fun supportsAwakeSleep(device: GBDevice): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -145,11 +145,11 @@ abstract class GloryFitCoordinator : AbstractBLEDeviceCoordinator() {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun supportsFindDevice(): Boolean {
|
||||
override fun supportsFindDevice(device: GBDevice): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun supportsUnicodeEmojis(): Boolean {
|
||||
override fun supportsUnicodeEmojis(device: GBDevice): Boolean {
|
||||
// Official app seems to just remove them outright
|
||||
return false
|
||||
}
|
||||
@@ -159,11 +159,11 @@ abstract class GloryFitCoordinator : AbstractBLEDeviceCoordinator() {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun supportsNotificationVibrationPatterns(): Boolean {
|
||||
override fun supportsNotificationVibrationPatterns(device: GBDevice): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun supportsNotificationVibrationRepetitionPatterns(): Boolean {
|
||||
override fun supportsNotificationVibrationRepetitionPatterns(device: GBDevice): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ public final class HamaFit6900DeviceCoordinator extends AbstractBLEDeviceCoordin
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFindDevice() {
|
||||
public boolean supportsFindDevice(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -75,12 +75,12 @@ public class HPlusCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsRealtimeData() {
|
||||
public boolean supportsRealtimeData(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFindDevice() {
|
||||
public boolean supportsFindDevice(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ public class HPlusCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActivityTracking() {
|
||||
public boolean supportsActivityTracking(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -140,12 +140,12 @@ public abstract class HuamiCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFlashing() {
|
||||
public boolean supportsFlashing(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsRealtimeData() {
|
||||
public boolean supportsRealtimeData(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ public abstract class HuamiCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActivityTracking() {
|
||||
public boolean supportsActivityTracking(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -575,12 +575,12 @@ public abstract class HuamiCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFindDevice() {
|
||||
public boolean supportsFindDevice(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsAlarmSnoozing() {
|
||||
public boolean supportsAlarmSnoozing(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -605,7 +605,7 @@ public abstract class HuamiCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsDebugLogs() {
|
||||
public boolean supportsDebugLogs(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -69,12 +69,12 @@ public class AmazfitBand5Coordinator extends HuamiCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsStressMeasurement() {
|
||||
public boolean supportsStressMeasurement(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -72,7 +72,7 @@ public class AmazfitBip3Coordinator extends HuamiCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -87,12 +87,12 @@ public class AmazfitBip3Coordinator extends HuamiCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsUnicodeEmojis() {
|
||||
public boolean supportsUnicodeEmojis(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsStressMeasurement() {
|
||||
public boolean supportsStressMeasurement(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ public class AmazfitBip3Coordinator extends HuamiCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsPai() {
|
||||
public boolean supportsPai(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -72,7 +72,7 @@ public class AmazfitBip3ProCoordinator extends HuamiCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -87,12 +87,12 @@ public class AmazfitBip3ProCoordinator extends HuamiCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsUnicodeEmojis() {
|
||||
public boolean supportsUnicodeEmojis(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsStressMeasurement() {
|
||||
public boolean supportsStressMeasurement(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ public class AmazfitBip3ProCoordinator extends HuamiCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsPai() {
|
||||
public boolean supportsPai(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ public class AmazfitBipSCoordinator extends HuamiCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -68,17 +68,17 @@ public class AmazfitBipUCoordinator extends HuamiCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsUnicodeEmojis() {
|
||||
public boolean supportsUnicodeEmojis(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsAlarmSnoozing() {
|
||||
public boolean supportsAlarmSnoozing(@NonNull GBDevice device) {
|
||||
// All alarms snooze by default, there doesn't seem to be a flag that disables it
|
||||
return false;
|
||||
}
|
||||
|
||||
+2
-2
@@ -68,12 +68,12 @@ public class AmazfitBipUProCoordinator extends HuamiCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsUnicodeEmojis() {
|
||||
public boolean supportsUnicodeEmojis(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -68,12 +68,12 @@ public class AmazfitCorCoordinator extends HuamiCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsUnicodeEmojis() {
|
||||
public boolean supportsUnicodeEmojis(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -68,12 +68,12 @@ public class AmazfitCor2Coordinator extends HuamiCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsUnicodeEmojis() {
|
||||
public boolean supportsUnicodeEmojis(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ public class AmazfitGTRCoordinator extends HuamiCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ public class AmazfitGTRLiteCoordinator extends HuamiCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -73,17 +73,17 @@ public class AmazfitGTR2Coordinator extends HuamiCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsUnicodeEmojis() {
|
||||
public boolean supportsUnicodeEmojis(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsPai() {
|
||||
public boolean supportsPai(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -73,17 +73,17 @@ public class AmazfitGTR2eCoordinator extends HuamiCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsUnicodeEmojis() {
|
||||
public boolean supportsUnicodeEmojis(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsPai() {
|
||||
public boolean supportsPai(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ public class AmazfitGTSCoordinator extends HuamiCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -73,12 +73,12 @@ public class AmazfitGTS2Coordinator extends HuamiCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsUnicodeEmojis() {
|
||||
public boolean supportsUnicodeEmojis(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -73,12 +73,12 @@ public class AmazfitGTS2eCoordinator extends HuamiCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsMusicInfo() {
|
||||
public boolean supportsMusicInfo(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsUnicodeEmojis() {
|
||||
public boolean supportsUnicodeEmojis(@NonNull GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ public class AmazfitNeoCoordinator extends HuamiCoordinator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsPai(){
|
||||
public boolean supportsPai(@NonNull GBDevice device){
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user