tapping on "my location" while recording does not result in a crash anymore
This commit is contained in:
parent
83f674e590
commit
20cfc9067e
4 changed files with 7 additions and 7 deletions
|
@ -8,8 +8,8 @@ android {
|
|||
applicationId "org.y20k.trackbook"
|
||||
minSdkVersion 22
|
||||
targetSdkVersion 24
|
||||
versionCode 5
|
||||
versionName "0.9.4 (The Great Gig in the Sky)"
|
||||
versionCode 6
|
||||
versionName "0.9.5 (The Great Gig in the Sky)"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
buildTypes {
|
||||
|
|
|
@ -300,7 +300,7 @@ public class MainActivityMapFragment extends Fragment implements TrackbookKeys {
|
|||
|
||||
if (mTrackerServiceRunning) {
|
||||
// get current Location from tracker service
|
||||
mCurrentBestLocation = mTrack.getWayPointLocation(mTrack.getSize());
|
||||
mCurrentBestLocation = mTrack.getWayPointLocation(mTrack.getSize() - 1);
|
||||
} else if (mCurrentBestLocation == null) {
|
||||
// app does not have any location fix
|
||||
mCurrentBestLocation = LocationHelper.determineLastKnownLocation(mLocationManager);
|
||||
|
@ -394,8 +394,8 @@ public class MainActivityMapFragment extends Fragment implements TrackbookKeys {
|
|||
}
|
||||
|
||||
// save track object
|
||||
SaveTrackAsyncHelper saveTrackAsyncHelper = new SaveTrackAsyncHelper();
|
||||
saveTrackAsyncHelper.execute();
|
||||
// SaveTrackAsyncHelper saveTrackAsyncHelper = new SaveTrackAsyncHelper();
|
||||
// saveTrackAsyncHelper.execute();
|
||||
// TODO add toast indicating track save
|
||||
}
|
||||
|
||||
|
|
|
@ -165,7 +165,7 @@ public final class LocationHelper implements TrackbookKeys {
|
|||
}
|
||||
|
||||
// DEFAULT network: distance is bigger than 30 meters and time difference bigger than 12 seconds
|
||||
return distance > 30 && timeDifference >= 12 * ONE_NANOSECOND;
|
||||
return distance > 30 && timeDifference >= 12 * ONE_NANOSECOND; // TODO add minimal accuracy
|
||||
|
||||
} else {
|
||||
// DEFAULT GPS: distance is bigger than 10 meters and time difference bigger than 12 seconds
|
||||
|
|
|
@ -26,7 +26,7 @@ import android.util.Log;
|
|||
*/
|
||||
public final class LogHelper {
|
||||
|
||||
private final static boolean mTesting = true;
|
||||
private final static boolean mTesting = false;
|
||||
|
||||
public static void d(final String tag, String message) {
|
||||
// include logging only in debug versions
|
||||
|
|
Loading…
Reference in a new issue