Search in sources :

Example 1 with AbstractActivitySample

use of nodomain.freeyourgadget.gadgetbridge.entities.AbstractActivitySample in project Gadgetbridge by Freeyourgadget.

the class AbstractChartFragment method createTrailingActivitySample.

private ActivitySample createTrailingActivitySample(ActivitySample referenceSample, int timestamp) {
    TrailingActivitySample sample = new TrailingActivitySample();
    if (referenceSample instanceof AbstractActivitySample) {
        AbstractActivitySample reference = (AbstractActivitySample) referenceSample;
        sample.setUserId(reference.getUserId());
        sample.setDeviceId(reference.getDeviceId());
        sample.setProvider(reference.getProvider());
    }
    sample.setTimestamp(timestamp);
    return sample;
}
Also used : AbstractActivitySample(nodomain.freeyourgadget.gadgetbridge.entities.AbstractActivitySample)

Aggregations

AbstractActivitySample (nodomain.freeyourgadget.gadgetbridge.entities.AbstractActivitySample)1