File tree Expand file tree Collapse file tree
java/com/mendhak/gpslogger Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ android {
4545
4646 targetSdkVersion 35
4747 compileSdk 35
48- versionCode 136
49- versionName " 136 "
48+ versionCode 137
49+ versionName " 137 "
5050
5151 // Used by AppAuth-Android
5252 manifestPlaceholders = [
Original file line number Diff line number Diff line change @@ -163,6 +163,7 @@ protected void onCreate(Bundle savedInstanceState) {
163163 setUpNavigationDrawer (savedInstanceState );
164164
165165 loadDefaultFragmentView ();
166+ handleVersionChanges ();
166167
167168
168169 if (!Systems .hasUserGrantedAllNecessaryPermissions (this )){
@@ -189,6 +190,21 @@ protected void onCreate(Bundle savedInstanceState) {
189190 }
190191 }
191192 }
193+ private void handleVersionChanges () {
194+ int currentVersion = BuildConfig .VERSION_CODE ;
195+ if (preferenceHelper .getLastVersionSeen () < currentVersion ) {
196+ String visibility = preferenceHelper .getSharedPreferences ().getString (PreferenceNames .OPENSTREETMAP_VISIBILITY , null );
197+ if (visibility != null && ("public" .equals (visibility ) || "private" .equals (visibility ))) {
198+ preferenceHelper .setOSMVisibility ("trackable" );
199+ SimpleDialog .build ()
200+ .msg (R .string .osm_visibility_migration_message )
201+ .pos (R .string .ok )
202+ .cancelable (false )
203+ .show (this );
204+ }
205+ preferenceHelper .setLastVersionSeen (currentVersion );
206+ }
207+ }
192208
193209 private final ActivityResultLauncher <String > backgroundPermissionLauncher =
194210 registerForActivityResult (new ActivityResultContracts .RequestPermission (),
Original file line number Diff line number Diff line change @@ -1082,13 +1082,16 @@ public void setOSMTags(String tags){
10821082 */
10831083 @ ProfilePreference (name = PreferenceNames .OPENSTREETMAP_VISIBILITY )
10841084 public String getOSMVisibility () {
1085- return prefs .getString (PreferenceNames .OPENSTREETMAP_VISIBILITY , "private " );
1085+ return prefs .getString (PreferenceNames .OPENSTREETMAP_VISIBILITY , "trackable " );
10861086 }
10871087
10881088 public void setOSMVisibility (String visibility ){
10891089 prefs .edit ().putString (PreferenceNames .OPENSTREETMAP_VISIBILITY , visibility ).apply ();
10901090 }
10911091
1092+ public SharedPreferences getSharedPreferences () {
1093+ return prefs ;
1094+ }
10921095
10931096 /**
10941097 * Whether to auto send to OpenStreetMap
Original file line number Diff line number Diff line change 3131
3232
3333 <string-array name =" osm_visibility_choices" >
34- <item >private</item >
35- <item >public</item >
3634 <item >trackable</item >
3735 <item >identifiable</item >
3836 </string-array >
Original file line number Diff line number Diff line change 225225
226226 <string name =" osm_description" >Description</string >
227227 <string name =" osm_description_summary" >The description to use when uploading a trace</string >
228+ <string name =" osm_visibility_migration_message" >OpenStreetMap is removing "public" and "private" GPS trace visibility options. Your setting has been updated to "trackable" to avoid errors.</string >
228229 <string name =" osm_tags" >Tags</string >
229230 <string name =" osm_tags_summary" >The tags to apply when uploading a trace</string >
230231
Original file line number Diff line number Diff line change 1414 app : iconSpaceReserved =" false" />
1515
1616 <Preference
17- android : defaultValue =" private "
17+ android : defaultValue =" trackable "
1818 android : entries =" @array/osm_visibility_choices"
1919 android : entryValues =" @array/osm_visibility_choices"
2020 android : key =" osm_visibility"
Original file line number Diff line number Diff line change @@ -11,3 +11,6 @@ android.nonTransitiveRClass=false
1111android.nonFinalResIds =false
1212org.gradle.unsafe.configuration-cache =true
1313org.gradle.configuration-cache =false
14+
15+ # Enabled parallel sync for Gradle 9.4+
16+ org.gradle.tooling.parallel =true
You can’t perform that action at this time.
0 commit comments