mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-02 09:33:06 +02:00
Assume GPS provides always time (removed workaround).
This commit is contained in:
@@ -1062,14 +1062,7 @@ public class ContentProviderUtils {
|
||||
values.put(TrackPointsColumns.LONGITUDE, (int) (location.getLongitude() * 1E6));
|
||||
values.put(TrackPointsColumns.LATITUDE, (int) (location.getLatitude() * 1E6));
|
||||
|
||||
long time = location.getTime();
|
||||
// TODO: Check if this is really necessary!
|
||||
// Hack for Samsung phones that don't properly populate the time field
|
||||
if (time == 0) {
|
||||
Log.w(TAG, "location has no timestamp; setting current time");
|
||||
time = System.currentTimeMillis();
|
||||
}
|
||||
values.put(TrackPointsColumns.TIME, time);
|
||||
values.put(TrackPointsColumns.TIME, location.getTime());
|
||||
if (location.hasAltitude()) {
|
||||
values.put(TrackPointsColumns.ALTITUDE, location.getAltitude());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user