mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-29 13:26:50 +01:00
fix build after rebase
This commit is contained in:
parent
56e1efaa3d
commit
55e7f6595b
@ -46,7 +46,6 @@ import nodomain.freeyourgadget.gadgetbridge.capabilities.HeartRateCapability;
|
||||
import nodomain.freeyourgadget.gadgetbridge.capabilities.password.PasswordCapabilityImpl;
|
||||
import nodomain.freeyourgadget.gadgetbridge.database.DBHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.database.DBHelper;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiActivitySummaryParser;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandConst;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.AlarmDao;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.BatteryLevelDao;
|
||||
@ -387,7 +386,7 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
);
|
||||
}
|
||||
|
||||
public boolean supportsNavigation(GBDevice gbDevice) {
|
||||
public boolean supportsNavigation() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -18,12 +18,10 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.bluetooth.le.ScanFilter;
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@ -481,5 +479,5 @@ public interface DeviceCoordinator {
|
||||
|
||||
List<HeartRateCapability.MeasurementInterval> getHeartRateMeasurementIntervals();
|
||||
|
||||
boolean supportsNavigation(GBDevice mGBDevice);
|
||||
boolean supportsNavigation();
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ public class PineTimeJFCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
return 8;
|
||||
}
|
||||
|
||||
public boolean supportsNavigation(GBDevice gbDevice) {
|
||||
public boolean supportsNavigation() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -549,7 +549,6 @@ public abstract class AbstractDeviceSupport implements DeviceSupport {
|
||||
return inputString;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
// Empty functions following, leaving optional implementation up to child classes
|
||||
|
||||
|
@ -245,6 +245,7 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
|
||||
private boolean supportsActivityDataFetching = false;
|
||||
private boolean supportsCalendarEvents = false;
|
||||
private boolean supportsMusicInfo = false;
|
||||
private boolean supportsNavigation = false;
|
||||
|
||||
public boolean supportsWeather() {
|
||||
return supportsWeather;
|
||||
@ -278,6 +279,14 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
|
||||
this.supportsMusicInfo = supportsMusicInfo;
|
||||
}
|
||||
|
||||
public boolean supportsNavigation() {
|
||||
return supportsNavigation;
|
||||
}
|
||||
|
||||
public void setSupportsNavigation(boolean supportsNavigation) {
|
||||
this.supportsNavigation = supportsNavigation;
|
||||
}
|
||||
|
||||
public void logicalOr(DeviceCoordinator operand){
|
||||
if(operand.supportsCalendarEvents()){
|
||||
setSupportsCalendarEvents(true);
|
||||
@ -291,6 +300,9 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
|
||||
if(operand.supportsMusicInfo()){
|
||||
setSupportsMusicInfo(true);
|
||||
}
|
||||
if(operand.supportsNavigation()){
|
||||
setSupportsNavigation(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -878,7 +890,7 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
|
||||
navigationInfoSpec.instruction = intent.getStringExtra(EXTRA_NAVIGATION_INSTRUCTION);
|
||||
navigationInfoSpec.nextAction = intent.getIntExtra(EXTRA_NAVIGATION_NEXT_ACTION,0);
|
||||
navigationInfoSpec.distanceToTurn = intent.getIntExtra(EXTRA_NAVIGATION_DISTANCE_TO_TURN,0);
|
||||
mDeviceSupport.onSetNavigationInfo(navigationInfoSpec);
|
||||
deviceSupport.onSetNavigationInfo(navigationInfoSpec);
|
||||
break;
|
||||
case ACTION_REQUEST_APPINFO:
|
||||
deviceSupport.onAppInfoReq();
|
||||
@ -1238,7 +1250,7 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
|
||||
registerReceiver(mAlarmClockReceiver, filter);
|
||||
}
|
||||
|
||||
if (mOsmandAidlHelper == null && coordinator != null && coordinator.supportsNavigation(mGBDevice)) {
|
||||
if (mOsmandAidlHelper == null && features.supportsNavigation()) {
|
||||
mOsmandAidlHelper = new OsmandEventReceiver(this.getApplication());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user