Bumping DashboardAPI to version 3.

Fixes #2255.
This commit is contained in:
Dennis Guse
2026-01-31 17:59:49 +01:00
committed by Dennis Guse
parent 547c1c5c65
commit 315788308b
2 changed files with 4 additions and 2 deletions
@@ -278,7 +278,7 @@ public class CustomContentProvider extends ContentProvider {
queryBuilder.appendWhere(MarkerColumns._ID + "=" + ContentUris.parseId(url));
}
case MARKERS_BY_TRACKID -> {
queryBuilder.setTables(MarkerColumns.TABLE_NAME + " LEFT OUTER JOIN (SELECT 'unused' AS ICON)"); //TODO Workaround: Column icon was removed in v4.24.0, but is still required for OSM Dashboard v6.4.1.
queryBuilder.setTables(MarkerColumns.TABLE_NAME);
queryBuilder.appendWhere(MarkerColumns.TRACKID + " IN (" + TextUtils.join(SQL_LIST_DELIMITER, ContentProviderUtils.parseTrackIdsFromUri(url)) + ")");
}
default -> throw new IllegalArgumentException("Unknown url " + url);
@@ -24,6 +24,7 @@ import de.dennisguse.opentracks.settings.PreferencesUtils;
* Create an {@link Intent} to request showing tracks on a Map or a Dashboard.
* The receiving {@link android.app.Activity} gets temporary access to the {@link TracksColumns} and the {@link TrackPointsColumns} (incl. update).
*/
//TODO Add a test for the table structure exposed via the DashboardAPI.
public class IntentDashboardUtils {
private static final String TAG = IntentDashboardUtils.class.getSimpleName();
@@ -40,8 +41,9 @@ public class IntentDashboardUtils {
/**
* version 1: the initial version.
* version 2: replaced pause/resume trackpoints for track segmentation (lat=100 / lat=200) by TrackPoint.Type.
* version 3: renamed track database columns.
*/
private static final int CURRENT_VERSION = 2;
private static final int CURRENT_VERSION = 3;
private static final String EXTRAS_OPENTRACKS_IS_RECORDING_THIS_TRACK = "EXTRAS_OPENTRACKS_IS_RECORDING_THIS_TRACK";
private static final String EXTRAS_SHOULD_KEEP_SCREEN_ON = "EXTRAS_SHOULD_KEEP_SCREEN_ON";