Skip to content

fix inverted accuracy check in getOptimalLocation()#637

Open
thomasbuilds wants to merge 1 commit intoGrapheneOS:mainfrom
thomasbuilds:main
Open

fix inverted accuracy check in getOptimalLocation()#637
thomasbuilds wants to merge 1 commit intoGrapheneOS:mainfrom
thomasbuilds:main

Conversation

@thomasbuilds
Copy link
Copy Markdown

Location.getAccuracy() is a radius in meters, smaller is better but getOptimalLocation() used > in its accuracy tiebreaker, so when two fixes arrived within STALE_LOCATION_THRESHOLD (11 s) the less accurate one replaced the more accurate one.

The selected Location is attached as EXIF GPS data on captured photos and as video metadata when "Save location" is enabled, so the bug silently degrades geotag quality (e.g. a ~500 m network fix overwriting a ~5 m GNSS fix).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant