Provide option to reset Remember my choice for trip recording

This commit is contained in:
Victor Shcherb 2014-08-28 00:25:11 +02:00
parent 710505aff3
commit 8170036dae
3 changed files with 8 additions and 9 deletions

View file

@ -9,7 +9,7 @@
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
-->
<string name="confirm_every_run">Confirm every run</string>
<string name="confirm_every_run">Ask every run</string>
<string name="save_global_track_interval_descr">Choose logging interval for track recording enabled by selecting widget on the map.</string>
<string name="save_global_track_interval">Default Global Logging interval </string>
<string name="background_service_int">GPS Wake-up interval</string>

View file

@ -272,18 +272,18 @@ public abstract class SettingsBaseActivity extends SherlockPreferenceActivity im
int summary) {
int minutesLength = minutes == null ? 0 : minutes.length;
int secondsLength = seconds == null ? 0 : seconds.length;
Integer[] ints = new Integer[secondsLength + minutesLength + (disable == null ? 0 : 1)];
Integer[] ints = new Integer[secondsLength + minutesLength];
String[] intDescriptions = new String[ints.length];
int k = 0;
for (int i = 0; i < secondsLength; i++) {
k++;
ints[k] = seconds[i] * coeff;
intDescriptions[k] = seconds[i] + " " + getString(R.string.int_seconds); //$NON-NLS-1$
k++;
}
for (int i = 0; i < minutesLength; i++) {
k++;
ints[k] = (minutes[i] * 60) * coeff;
intDescriptions[k] = minutes[i] + " " + getString(R.string.int_min); //$NON-NLS-1$
k++;
}
ListPreference lp = createListPreference(b, intDescriptions, ints, title, summary);
registerDisablePreference(b, getString(R.string.confirm_every_run), disable);

View file

@ -352,10 +352,9 @@ public class OsmandMonitoringPlugin extends OsmandPlugin implements MonitoringIn
app.startNavigationService(NavigationService.USED_BY_GPX);
}
};
//Comment this out for now as we have no way to reverse the REMEMBER flag?!
//if(choice.value) {
// runnable.run();
//} else {
if(choice.value) {
runnable.run();
} else {
showIntervalChooseDialog(map, app.getString(R.string.save_track_interval_globally) + " : %s",
app.getString(R.string.save_track_to_gpx_globally), SECONDS, MINUTES, choice, vs,
new OnClickListener() {
@ -364,7 +363,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin implements MonitoringIn
runnable.run();
}
});
//}
}
}