Miscellaneous.logEvent("i","Speed","About to delete oldest position record until only 2 left. Currently have "+String.valueOf(locationList.size())+" records.",4);
Miscellaneous.logEvent("i","Speed","Not using 2 most recent locations for speed calculation because at least one does not have a satisfactory accuracy: "+locationList.get(i).toString(),4);
breakspeedCalculation;
}
}
Miscellaneous.logEvent("i","Speed","Trying to calculate speed based on the last locations.",4);
doublecurrentSpeed;
@ -184,14 +209,6 @@ public class LocationProvider
}
else
Miscellaneous.logEvent("i","Speed","Last two locations are too far apart in terms of time. Cannot use them for speed calculation.",4);
while(locationList.size()>2)
{
// Remove all entries except for the last 2
Miscellaneous.logEvent("i","Speed","About to delete oldest position record until only 2 left. Currently have "+String.valueOf(locationList.size())+" records.",4);
locationList.remove(0);
}
}
else
{
@ -489,18 +506,10 @@ public class LocationProvider
{
// time is up, no cell location updates since x minutes, start accelerometer
Stringtext="Timer triggered. Based on the last location and speed we may be at a POI. Forcing location update in case CellLocationChangedReceiver didn\'t fire.";