Skip to content

Commit

Permalink
Merge pull request #3 from tarekFerdous/dhruv-KMLTrackExporter
Browse files Browse the repository at this point in the history
Changed the redundant string to variable.
  • Loading branch information
beingtranquil authored Feb 14, 2024
2 parents f3f9ad2 + b794dee commit 448fafb
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public class KMLTrackExporter implements TrackExporter {
public static final String EXTENDED_DATA_TYPE_ACCURACY_HORIZONTAL = "accuracy_horizontal";
public static final String EXTENDED_DATA_TYPE_ACCURACY_VERTICAL = "accuracy_vertical";

public static final String constant_variable= "<open>1</open>";
private static final NumberFormat SENSOR_DATA_FORMAT = NumberFormat.getInstance(Locale.US);

static {
Expand Down Expand Up @@ -238,7 +239,7 @@ private void writeHeader(List<Track> tracks) {
http://opentracksapp.com/xmlschemas/v1 http://opentracksapp.com/xmlschemas/OpenTracks_v1.xsd">
"""); //TODO ADD xsi:schemaLocation for atom
printWriter.println("<Document>");
printWriter.println("<open>1</open>");
printWriter.println("constant_variable");
printWriter.println("<visibility>1</visibility>");

Track track = tracks.get(0);
Expand All @@ -265,7 +266,7 @@ private void writeFooter() {
private void writeBeginMarkers(Track track) {
printWriter.println("<Folder>");
printWriter.println("<name>" + StringUtils.formatCData(context.getString(R.string.track_markers, track.getName())) + "</name>");
printWriter.println("<open>1</open>");
printWriter.println("constant_variable");
}

private void writeMarker(Marker marker, ZoneOffset zoneOffset) {
Expand All @@ -285,7 +286,7 @@ private void writeEndMarkers() {
private void writeMultiTrackBegin() {
printWriter.println("<Folder id=\"tracks\">");
printWriter.println("<name>" + context.getString(R.string.generic_tracks) + "</name>");
printWriter.println("<open>1</open>");
printWriter.println("constant_variable");
}

private void writeMultiTrackEnd() {
Expand Down

0 comments on commit 448fafb

Please sign in to comment.