forked from upstream-mirrors/OpenTracks
@@ -34,7 +34,7 @@ public class IntentDashboardUtils {
|
||||
|
||||
private static final int TRACK_URI_INDEX = 0;
|
||||
private static final int TRACKPOINTS_URI_INDEX = 1;
|
||||
private static final int WAYPOINTS_URI_INDEX = 2;
|
||||
private static final int MARKERS_URI_INDEX = 2;
|
||||
|
||||
private IntentDashboardUtils() {
|
||||
}
|
||||
@@ -55,7 +55,7 @@ public class IntentDashboardUtils {
|
||||
ArrayList<Uri> uris = new ArrayList<>();
|
||||
uris.add(TRACK_URI_INDEX, Uri.withAppendedPath(TracksColumns.CONTENT_URI, trackIdList));
|
||||
uris.add(TRACKPOINTS_URI_INDEX, Uri.withAppendedPath(TrackPointsColumns.CONTENT_URI_BY_TRACKID, trackIdList));
|
||||
uris.add(WAYPOINTS_URI_INDEX, Uri.withAppendedPath(MarkerColumns.CONTENT_URI_BY_TRACKID, trackIdList));
|
||||
uris.add(MARKERS_URI_INDEX, Uri.withAppendedPath(MarkerColumns.CONTENT_URI_BY_TRACKID, trackIdList));
|
||||
|
||||
Intent intent = new Intent(ACTION_DASHBOARD);
|
||||
intent.putParcelableArrayListExtra(ACTION_DASHBOARD_PAYLOAD, uris);
|
||||
@@ -70,7 +70,7 @@ public class IntentDashboardUtils {
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
ClipData clipData = ClipData.newRawUri(null, uris.get(TRACK_URI_INDEX));
|
||||
clipData.addItem(new ClipData.Item(uris.get(TRACKPOINTS_URI_INDEX)));
|
||||
clipData.addItem(new ClipData.Item(uris.get(WAYPOINTS_URI_INDEX)));
|
||||
clipData.addItem(new ClipData.Item(uris.get(MARKERS_URI_INDEX)));
|
||||
intent.setClipData(clipData);
|
||||
|
||||
context.startActivity(intent);
|
||||
|
||||
@@ -105,7 +105,7 @@ public class IntentUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an intent to share a waypoint image with an app.
|
||||
* Creates an intent to share an image with an app.
|
||||
*
|
||||
* @param context the context.
|
||||
* @param uri uri with the image to share.
|
||||
@@ -128,8 +128,8 @@ public class IntentUtils {
|
||||
.putExtra(Intent.EXTRA_TEXT, context.getString(R.string.share_image_body));
|
||||
}
|
||||
|
||||
public static void showCoordinateOnMap(Context context, Marker waypoint) {
|
||||
showCoordinateOnMap(context, waypoint.getLocation().getLatitude(), waypoint.getLocation().getLongitude(), waypoint.getName());
|
||||
public static void showCoordinateOnMap(Context context, Marker marker) {
|
||||
showCoordinateOnMap(context, marker.getLocation().getLatitude(), marker.getLocation().getLongitude(), marker.getName());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user