diff --git a/.idea/migrations.xml b/.idea/migrations.xml new file mode 100644 index 000000000..f8051a6f9 --- /dev/null +++ b/.idea/migrations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/src/main/java/de/dennisguse/opentracks/chart/ChartView.java b/src/main/java/de/dennisguse/opentracks/chart/ChartView.java index f32bb29ad..9f1ba37d4 100644 --- a/src/main/java/de/dennisguse/opentracks/chart/ChartView.java +++ b/src/main/java/de/dennisguse/opentracks/chart/ChartView.java @@ -879,7 +879,7 @@ private void drawPointer(Canvas canvas) { break; } } - if (firstChartValueSeries != null && chartPoints.size() > 0) { + if (firstChartValueSeries != null && !chartPoints.isEmpty()) { int dx = getX(maxX) - pointer.getIntrinsicWidth() / 2; double value = firstChartValueSeries.extractDataFromChartPoint(last); int dy = getY(firstChartValueSeries, value) - pointer.getIntrinsicHeight(); diff --git a/src/main/java/de/dennisguse/opentracks/data/CustomContentProvider.java b/src/main/java/de/dennisguse/opentracks/data/CustomContentProvider.java index e0922f538..08e63db2a 100644 --- a/src/main/java/de/dennisguse/opentracks/data/CustomContentProvider.java +++ b/src/main/java/de/dennisguse/opentracks/data/CustomContentProvider.java @@ -65,7 +65,7 @@ public class CustomContentProvider extends ContentProvider { * It computes the average for heart rate, cadence and power (duration-based average) and the maximum for heart rate, cadence and power. * Finally, it ignores manual pause (SEGMENT_START_MANUAL). */ - private final String SENSOR_STATS_QUERY = + private final static String SENSOR_STATS_QUERY = "WITH time_select as " + "(SELECT t1." + TrackPointsColumns.TIME + " * (t1." + TrackPointsColumns.TYPE + " NOT IN (" + TrackPoint.Type.SEGMENT_START_MANUAL.type_db + ")) time_value " + "FROM " + TrackPointsColumns.TABLE_NAME + " t1 " +