Address comments.

This commit is contained in:
Sandor Dornbush
2010-12-17 06:59:43 -08:00
parent 0da0280156
commit 878a87278d
7 changed files with 43 additions and 32 deletions
@@ -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));