mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-29 20:15:50 +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
|
HeartRateCapability.MeasurementInterval.HOUR_1
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean supportsNavigation(GBDevice gbDevice) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -480,4 +480,6 @@ public interface DeviceCoordinator {
|
|||||||
PasswordCapabilityImpl.Mode getPasswordCapability();
|
PasswordCapabilityImpl.Mode getPasswordCapability();
|
||||||
|
|
||||||
List<HeartRateCapability.MeasurementInterval> getHeartRateMeasurementIntervals();
|
List<HeartRateCapability.MeasurementInterval> getHeartRateMeasurementIntervals();
|
||||||
|
|
||||||
|
boolean supportsNavigation(GBDevice mGBDevice);
|
||||||
}
|
}
|
||||||
|
@ -149,6 +149,10 @@ public class PineTimeJFCoordinator extends AbstractBLEDeviceCoordinator {
|
|||||||
return 8;
|
return 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean supportsNavigation(GBDevice gbDevice) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void deleteDevice(@NonNull GBDevice gbDevice, @NonNull Device device, @NonNull DaoSession session) {
|
protected void deleteDevice(@NonNull GBDevice gbDevice, @NonNull Device device, @NonNull DaoSession session) {
|
||||||
// nothing to delete, yet
|
// nothing to delete, yet
|
||||||
|
@ -1238,7 +1238,7 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
|
|||||||
registerReceiver(mAlarmClockReceiver, filter);
|
registerReceiver(mAlarmClockReceiver, filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mOsmandAidlHelper == null) {
|
if (mOsmandAidlHelper == null && coordinator != null && coordinator.supportsNavigation(mGBDevice)) {
|
||||||
mOsmandAidlHelper = new OsmandEventReceiver(this.getApplication());
|
mOsmandAidlHelper = new OsmandEventReceiver(this.getApplication());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user