forked from upstream-mirrors/OpenTracks
Inline methods in PreferencesUtils.
Donot want to have a pair of getter and setting for each preference.
This commit is contained in:
@@ -270,7 +270,7 @@ public class SendDocsUtils {
|
||||
Track track, String spreadsheetId, String worksheetId, String authToken, Context context)
|
||||
throws IOException {
|
||||
String worksheetUri = String.format(GET_WORKSHEET_URI, spreadsheetId, worksheetId);
|
||||
boolean metricUnits = PreferencesUtils.isMetricUnits(context);
|
||||
boolean metricUnits = PreferencesUtils.getBoolean(context, R.string.metric_units_key, true);
|
||||
addRow(worksheetUri, getRowContent(track, metricUnits, context), authToken);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -205,7 +205,7 @@ public class SendFusionTablesAsyncTask extends AbstractSendAsyncTask {
|
||||
private boolean uploadAllTrackPoints(Track track) {
|
||||
Cursor locationsCursor = null;
|
||||
try {
|
||||
boolean metricUnits = PreferencesUtils.isMetricUnits(context);
|
||||
boolean metricUnits = PreferencesUtils.getBoolean(context, R.string.metric_units_key, true);
|
||||
|
||||
locationsCursor = myTracksProviderUtils.getLocationsCursor(trackId, 0, -1, false);
|
||||
if (locationsCursor == null) {
|
||||
|
||||
@@ -258,7 +258,7 @@ public class SendMapsAsyncTask extends AbstractSendAsyncTask {
|
||||
boolean uploadAllTrackPoints(Track track) {
|
||||
Cursor locationsCursor = null;
|
||||
try {
|
||||
boolean metricUnits = PreferencesUtils.isMetricUnits(context);
|
||||
boolean metricUnits = PreferencesUtils.getBoolean(context, R.string.metric_units_key, true);
|
||||
|
||||
locationsCursor = myTracksProviderUtils.getLocationsCursor(trackId, 0, -1, false);
|
||||
if (locationsCursor == null) {
|
||||
|
||||
Reference in New Issue
Block a user