mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-23 17:17:46 +01:00
Sony Wena 3: Enable body energy
This commit is contained in:
parent
3a778a9f2a
commit
ef7bf1dda4
@ -1239,8 +1239,8 @@ public class GBDaoGenerator {
|
||||
|
||||
private static Entity addWena3EnergySample(Schema schema, Entity user, Entity device) {
|
||||
Entity activitySample = addEntity(schema, "Wena3EnergySample");
|
||||
addCommonTimeSampleProperties("AbstractTimeSample", activitySample, user, device);
|
||||
activitySample.addIntProperty("energy").notNull();
|
||||
addCommonTimeSampleProperties("AbstractBodyEnergySample", activitySample, user, device);
|
||||
activitySample.addIntProperty("energy").notNull().codeBeforeGetter(OVERRIDE);
|
||||
return activitySample;
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,6 @@ import android.content.Context;
|
||||
import android.net.Uri;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@ -45,10 +44,9 @@ import nodomain.freeyourgadget.gadgetbridge.entities.Wena3HeartRateSampleDao;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.Wena3StressSampleDao;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.Wena3Vo2SampleDao;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.AbstractNotificationPattern;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.BodyEnergySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.HeartRateSample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.StressSample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
@ -58,22 +56,11 @@ import nodomain.freeyourgadget.gadgetbridge.service.devices.sony.wena3.protocol.
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.sony.wena3.protocol.packets.notification.defines.VibrationKind;
|
||||
|
||||
public class SonyWena3Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
@Nullable
|
||||
@Override
|
||||
public Class<? extends Activity> getPairingActivity() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getManufacturer() {
|
||||
return "Sony";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsAppsManagement(GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends Activity> getAppsManagementActivity() {
|
||||
return null;
|
||||
@ -140,11 +127,6 @@ public class SonyWena3Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsRealtimeData() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActivityDataFetching() {
|
||||
return true;
|
||||
@ -155,12 +137,6 @@ public class SonyWena3Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean supportsAppReordering() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsStressMeasurement() {
|
||||
return true;
|
||||
@ -171,11 +147,6 @@ public class SonyWena3Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
return new SonyWena3StressSampleProvider(device, session);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsSpo2(GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsHeartRateMeasurement(GBDevice device) {
|
||||
return true;
|
||||
@ -186,6 +157,11 @@ public class SonyWena3Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsBodyEnergy() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SampleProvider<? extends ActivitySample> getSampleProvider(GBDevice device, DaoSession session) {
|
||||
return new SonyWena3ActivitySampleProvider(device, session);
|
||||
@ -196,17 +172,16 @@ public class SonyWena3Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
return new SonyWena3HeartRateSampleProvider(device, session);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TimeSampleProvider<? extends BodyEnergySample> getBodyEnergySampleProvider(GBDevice device, DaoSession session) {
|
||||
return new SonyWena3EnergySampleProvider(device, session);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InstallHandler findInstallHandler(Uri uri, Context context) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsScreenshots(final GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAlarmSlotCount(GBDevice device) {
|
||||
return SonyWena3Constants.ALARM_SLOTS;
|
||||
@ -222,21 +197,11 @@ public class SonyWena3Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFindDevice() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsWeather() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isExperimental() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getSupportedLanguageSettings(GBDevice device) {
|
||||
return new String[]{
|
||||
@ -259,7 +224,6 @@ public class SonyWena3Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
public boolean supportsNotificationVibrationPatterns() {
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user