mendhak / gpslogger

:satellite: Lightweight GPS Logging Application For Android.
https://gpslogger.app
Other
2k stars 609 forks source link

Notification show negative duration #1027

Closed JanHellwig closed 1 year ago

JanHellwig commented 2 years ago

If the app is running for a long time, the duration that shows up in the persistent notifaction starts showing negative numbers. My guess would be that it's caused by some integer overflowing. It seems to only have a visual impact, logging still works without problems.

negative_time

scmyxp commented 1 year ago

I have the same problem.

image

mendhak commented 1 year ago

I found the issue, it's because I was converting a large long to an int, losing precision. I've now made the method that converts it to a descriptive string, take a long and added a test for it too.

mendhak commented 1 year ago

v125 is now in F-Droid and release.