Merge from head

This commit is contained in:
Rodrigo Damazio
2010-12-24 05:27:56 -02:00
25 changed files with 1544 additions and 307 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="src" path="MyTracksLib_src"/>
<classpathentry exported="true" kind="lib" path="/MyTracksLib/libs/protobuf-java-2.3.0-lite.jar"/>
<classpathentry kind="src" path="MyTracksLib_src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
@@ -17,7 +17,10 @@ package com.google.android.apps.mytracks.signalstrength;
import static com.google.android.apps.mytracks.signalstrength.SignalStrengthConstants.*;
import com.google.android.apps.mytracks.content.MyTracksProviderUtils;
import com.google.android.apps.mytracks.content.MyTracksProviderUtilsImpl;
import com.google.android.apps.mytracks.content.Waypoint;
import com.google.android.apps.mytracks.content.WaypointCreationRequest;
import com.google.android.apps.mytracks.services.ITrackRecordingService;
import com.google.android.apps.mytracks.signalstrength.SignalStrengthListener.SignalStrengthCallback;
@@ -53,6 +56,7 @@ public class SignalStrengthService extends Service
private ITrackRecordingService mytracksService;
private long lastSamplingTime;
private long samplingPeriod;
private MyTracksProviderUtils utils;
@Override
public void onCreate() {
@@ -63,6 +67,7 @@ public class SignalStrengthService extends Service
getString(R.string.mytracks_service_class));
preferences = PreferenceManager.getDefaultSharedPreferences(this);
signalListenerFactory = new SignalStrengthListenerFactory();
utils = new MyTracksProviderUtilsImpl(this.getContentResolver());
}
@Override
@@ -154,13 +159,6 @@ public class SignalStrengthService extends Service
return;
}
// We don't set location or track id - My Tracks can fill those
Waypoint wpt = new Waypoint();
wpt.setName("Signal Strength");
wpt.setType(Waypoint.TYPE_WAYPOINT);
wpt.setIcon(icon);
wpt.setDescription(description);
try {
long waypointId;
synchronized (this) {
@@ -169,7 +167,11 @@ public class SignalStrengthService extends Service
return;
}
waypointId = mytracksService.insertWaypointMarker(wpt);
// Create a waypoint.
WaypointCreationRequest request =
new WaypointCreationRequest(WaypointCreationRequest.WaypointType.MARKER,
"Signal Strength", icon, description);
waypointId = mytracksService.insertWaypoint(request);
}
if (waypointId >= 0) {