Fixing leftover from another commit - commenting out testing method.

This commit is contained in:
Rodrigo Damazio
2010-09-27 16:11:17 -03:00
parent dc07bcf0fa
commit cd9c17f9b3
@@ -819,33 +819,33 @@ public class MyTracks extends TabActivity implements OnTouchListener,
* This is for debugging and testing only. Useful if there is no GPS signal * This is for debugging and testing only. Useful if there is no GPS signal
* available. * available.
*/ */
public void recordRandomLocation() { // public void recordRandomLocation() {
if (trackRecordingService != null) { // if (trackRecordingService != null) {
Location loc = new Location("gps"); // Location loc = new Location("gps");
double latitude = 37.5 + random.nextDouble() / 1000; // double latitude = 37.5 + random.nextDouble() / 1000;
double longitude = -120.0 + random.nextDouble() / 1000; // double longitude = -120.0 + random.nextDouble() / 1000;
loc.setLatitude(latitude); // loc.setLatitude(latitude);
loc.setLongitude(longitude); // loc.setLongitude(longitude);
loc.setAltitude(random.nextDouble() * 100); // loc.setAltitude(random.nextDouble() * 100);
loc.setTime(System.currentTimeMillis()); // loc.setTime(System.currentTimeMillis());
loc.setSpeed(random.nextFloat()); // loc.setSpeed(random.nextFloat());
MyTracksMap map = // MyTracksMap map =
(MyTracksMap) getLocalActivityManager().getActivity("tab1"); // (MyTracksMap) getLocalActivityManager().getActivity("tab1");
if (map != null) { // if (map != null) {
map.onLocationChanged(loc); // map.onLocationChanged(loc);
} // }
StatsActivity stats = // StatsActivity stats =
(StatsActivity) getLocalActivityManager().getActivity("tab2"); // (StatsActivity) getLocalActivityManager().getActivity("tab2");
if (stats != null) { // if (stats != null) {
stats.onLocationChanged(loc); // stats.onLocationChanged(loc);
} // }
try { // try {
trackRecordingService.recordLocation(loc); // trackRecordingService.recordLocation(loc);
} catch (RemoteException e) { // } catch (RemoteException e) {
Log.e(MyTracksConstants.TAG, "MyTracks", e); // Log.e(MyTracksConstants.TAG, "MyTracks", e);
} // }
} // }
} // }
/** /**
* Resets status information for sending to MyMaps/Docs. * Resets status information for sending to MyMaps/Docs.