mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-06-05 21:49:48 +02:00
add supportNavigation() to cooridinator
This commit is contained in:
@@ -386,4 +386,8 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
HeartRateCapability.MeasurementInterval.HOUR_1
|
||||
);
|
||||
}
|
||||
|
||||
public boolean supportsNavigation(GBDevice gbDevice) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@@ -480,4 +480,6 @@ public interface DeviceCoordinator {
|
||||
PasswordCapabilityImpl.Mode getPasswordCapability();
|
||||
|
||||
List<HeartRateCapability.MeasurementInterval> getHeartRateMeasurementIntervals();
|
||||
|
||||
boolean supportsNavigation(GBDevice mGBDevice);
|
||||
}
|
||||
|
@@ -149,6 +149,10 @@ public class PineTimeJFCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
return 8;
|
||||
}
|
||||
|
||||
public boolean supportsNavigation(GBDevice gbDevice) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void deleteDevice(@NonNull GBDevice gbDevice, @NonNull Device device, @NonNull DaoSession session) {
|
||||
// nothing to delete, yet
|
||||
|
@@ -1238,7 +1238,7 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
|
||||
registerReceiver(mAlarmClockReceiver, filter);
|
||||
}
|
||||
|
||||
if (mOsmandAidlHelper == null) {
|
||||
if (mOsmandAidlHelper == null && coordinator != null && coordinator.supportsNavigation(mGBDevice)) {
|
||||
mOsmandAidlHelper = new OsmandEventReceiver(this.getApplication());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user