mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-04 10:23:06 +02:00
Address comments.
This commit is contained in:
@@ -891,7 +891,7 @@ public class MyTracks extends TabActivity implements OnTouchListener,
|
||||
* Inserts a waypoint marker.
|
||||
*
|
||||
* @return Id of the inserted statistics marker.
|
||||
* @throws RemoteException
|
||||
* @throws RemoteException If the call on the service failed.
|
||||
*/
|
||||
public long insertWaypoint(WaypointCreationRequest request) throws RemoteException {
|
||||
if (trackRecordingService == null) {
|
||||
|
||||
@@ -42,7 +42,7 @@ import android.widget.ImageView;
|
||||
public class MyTracksWaypointDetails extends Activity
|
||||
implements OnClickListener {
|
||||
|
||||
public static final String WAYPOINT_ID_EXTRA = "waypointid";
|
||||
public static final String WAYPOINT_ID_EXTRA = "com.google.android.apps.mytracks.WAYPOINT_ID";
|
||||
|
||||
/**
|
||||
* The id of the way point being edited (taken from bundle, "waypointid")
|
||||
|
||||
@@ -189,11 +189,13 @@ public class MyTracksWaypointsList extends ListActivity
|
||||
Log.e(MyTracksConstants.TAG, "Cannot insert marker.", e);
|
||||
return;
|
||||
}
|
||||
if (id >= 0) {
|
||||
Intent intent = new Intent(this, MyTracksWaypointDetails.class);
|
||||
intent.putExtra(MyTracksWaypointDetails.WAYPOINT_ID_EXTRA, id);
|
||||
startActivity(intent);
|
||||
if (id < 0) {
|
||||
Log.e(MyTracksConstants.TAG, "Failed to insert marker.");
|
||||
return;
|
||||
}
|
||||
Intent intent = new Intent(this, MyTracksWaypointDetails.class);
|
||||
intent.putExtra(MyTracksWaypointDetails.WAYPOINT_ID_EXTRA, id);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
private void setListAdapter() {
|
||||
|
||||
@@ -889,10 +889,10 @@ public class TrackRecordingService extends Service implements LocationListener {
|
||||
|
||||
private void buildMarker(Waypoint wpt, WaypointCreationRequest request) {
|
||||
wpt.setType(Waypoint.TYPE_WAYPOINT);
|
||||
if (request.getIcon() == null) {
|
||||
if (request.getIconUrl() == null) {
|
||||
wpt.setIcon(getString(R.string.waypoint_icon_url));
|
||||
} else {
|
||||
wpt.setIcon(request.getIcon());
|
||||
wpt.setIcon(request.getIconUrl());
|
||||
}
|
||||
if (request.getName() == null) {
|
||||
wpt.setName(getString(R.string.waypoint));
|
||||
|
||||
Reference in New Issue
Block a user