[android-auto] Fix RouteSimulationProvider

Signed-off-by: Andrei Shkrob <andrei@shkrob.dev>
This commit is contained in:
Andrei Shkrob
2025-06-13 19:59:52 +02:00
committed by Konstantin Pastbin
parent 0c4694a2cf
commit 8badd445db

View File

@@ -2,6 +2,7 @@ package app.organicmaps.location;
import android.content.Context;
import android.location.Location;
import android.os.SystemClock;
import androidx.annotation.NonNull;
@@ -57,6 +58,7 @@ class RouteSimulationProvider extends BaseLocationProvider
location.setLatitude(mPoints[mCurrentPoint].mLat);
location.setLongitude(mPoints[mCurrentPoint].mLon);
location.setAccuracy(1.0f);
location.setElapsedRealtimeNanos(SystemClock.elapsedRealtimeNanos());
mListener.onLocationChanged(location);
mCurrentPoint += 1;
UiThread.runLater(this::nextPoint, INTERVAL_MS);