In KalmanLocationService.onSensorChanged current milliseconds is calculated like this:
long now = android.os.SystemClock.elapsedRealtimeNanos();
long nowMs = Utils.nano2milli(now);
Instead of elapsedRealtimeNanos and converting it to milliseconds you can directly use SystemClock.elapsedRealtime.
I wonder if using long nowMs = SystemClock.elapsedRealtime() had any issue which you avoid?
In
KalmanLocationService.onSensorChanged
current milliseconds is calculated like this:Instead of
elapsedRealtimeNanos
and converting it to milliseconds you can directly useSystemClock.elapsedRealtime
. I wonder if usinglong nowMs = SystemClock.elapsedRealtime()
had any issue which you avoid?