mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-28 11:35:48 +01:00
add supportNavigation() to cooridinator
This commit is contained in:
parent
e7c048551f
commit
9ccd898d42
@ -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());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user