Dashboard API: send protocol version v2.
@@ -27,6 +27,17 @@ public class IntentDashboardUtils {
private static final String ACTION_DASHBOARD_PAYLOAD = ACTION_DASHBOARD + ".Payload";
+ /**
+ * Assume "v1" if not present.
+ */
+ private static final String EXTRAS_PROTOCOL_VERSION = "PROTOCOL_VERSION";
+
+ /**
+ * version 1: the initial version.
+ * version 2: replaced pause/resume trackpoints for track segmentation (lat=100 / lat=200) by TrackPoint.Type.
+ */
+ private static final int CURRENT_VERSION = 2;
+
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";
private static final String EXTRAS_SHOW_WHEN_LOCKED = "EXTRAS_SHOULD_KEEP_SCREEN_ON";
@@ -58,6 +69,8 @@ public class IntentDashboardUtils {
uris.add(MARKERS_URI_INDEX, Uri.withAppendedPath(MarkerColumns.CONTENT_URI_BY_TRACKID, trackIdList));
Intent intent = new Intent(ACTION_DASHBOARD);
+ intent.putExtra(EXTRAS_PROTOCOL_VERSION, CURRENT_VERSION);
+
intent.putParcelableArrayListExtra(ACTION_DASHBOARD_PAYLOAD, uris);
intent.putExtra(EXTRAS_SHOULD_KEEP_SCREEN_ON, PreferencesUtils.shouldKeepScreenOn(context));
