• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

labexp / osmtracker-android / 41243831532

31 Oct 2026 09:29PM UTC coverage: 17.91% (+6.4%) from 11.488%
41243831532

Pull #719

github

jamescr
Fix(#721): keep waypoint track id when restoring text note dialog

Add a text note, then let Android recreate the tracking screen
twice without opening the text note dialog in between, e.g. rotate
to landscape and back: notes added after that are saved, but their
waypoints are missing from the track and from the GPX export, because
they're created with a track id of 0.

It seems this went wrong in commit
3f86c52a2 (Feature: Use Text Note
preferences to save the note, 2026-01-18), the direct problem is that
TextNoteDialog.onSaveInstanceState() only saves the waypoint track id if
saveAsWayPoint is true, but that flag is only set in onStart(), once the
dialog is shown. The first recreation restores the dialog without
showing it, so the second recreation saves no track id at all, and then
onRestoreInstanceState() turns the missing key into 0. Notes are not
affected, since noteTrackId is never restored.

Fix the problem by always saving the waypoint track id. Also fall
back to the track id from the constructor in onRestoreInstanceState(),
in case the saved state has no track id.
Pull Request #719: Preparing version 2026.11

274 of 1661 branches covered (16.5%)

Branch coverage included in aggregate %.

991 of 5402 relevant lines covered (18.35%)

0.98 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/net/osmtracker/osm/UploadToOpenStreetMapNotesTask.java


Source Not Available

The file "net/osmtracker/osm/UploadToOpenStreetMapNotesTask.java" isn't available on github. Either it's been removed, or the repo root directory needs to be updated.

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc