|
Ran
|
Jobs
1
|
Files
79
|
Run time
1min
|
Badge
README BADGES
|
github
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.
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
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 115 |
10.79
|
1.67% | net/osmtracker/db/DataHelper.java |
| 88 |
0.0
|
0.0% | net/osmtracker/activity/DisplayTrackMap.java |
| 82 |
0.0
|
0.0% | net/osmtracker/service/gps/GPSLogger.java |
| 72 |
0.0
|
0.0% | net/osmtracker/activity/GitHubUpload.java |
| 69 |
0.0
|
0.0% | net/osmtracker/view/VoiceRecDialog.java |
| 67 |
0.0
|
0.0% | net/osmtracker/activity/TrackLogger.java |
| 49 |
0.0
|
0.0% | net/osmtracker/activity/GitHubPullRequest.java |
| 35 |
47.33
|
9.33% | net/osmtracker/db/model/Track.java |
| 35 |
0.0
|
-22.34% | net/osmtracker/osm/UploadToOpenStreetMapNotesTask.java |
| 30 |
0.0
|
0.0% | net/osmtracker/activity/GitHubNewRepo.java |
| 28 |
0.0
|
0.0% | net/osmtracker/activity/GitHubNewFork.java |
| 28 |
50.12
|
35.95% | net/osmtracker/gpx/ExportTrackTask.java |
| 24 |
68.49
|
49.48% | net/osmtracker/db/TrackContentProvider.java |
| 21 |
0.0
|
0.0% | net/osmtracker/activity/GitHubConfig.java |
| 18 |
25.71
|
-20.0% | net/osmtracker/activity/OpenStreetMapNotesUpload.java |
| 10 |
56.6
|
39.08% | net/osmtracker/db/DatabaseHelper.java |
| 1 |
0.0
|
-16.67% | net/osmtracker/receiver/MediaButtonReceiver.java |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 41243831532.1 | 79 |
17.91
|
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|