forked from upstream-mirrors/OpenTracks
Addressing review suggestions.
This commit is contained in:
@@ -218,11 +218,12 @@ public class ChartActivity extends Activity implements TrackDataListener {
|
|||||||
settingsDialog.setOnClickListener(new OnClickListener() {
|
settingsDialog.setOnClickListener(new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface arg0, int which) {
|
public void onClick(DialogInterface arg0, int which) {
|
||||||
if (which != DialogInterface.BUTTON_POSITIVE) return;
|
if (which != DialogInterface.BUTTON_POSITIVE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < ChartView.NUM_SERIES; i++) {
|
for (int i = 0; i < ChartView.NUM_SERIES; i++) {
|
||||||
boolean seriesEnabled = settingsDialog.isSeriesEnabled(i);
|
chartView.getChartValueSeries(i).setEnabled(settingsDialog.isSeriesEnabled(i));
|
||||||
chartView.getChartValueSeries(i).setEnabled(seriesEnabled);
|
|
||||||
}
|
}
|
||||||
setMode(settingsDialog.getMode());
|
setMode(settingsDialog.getMode());
|
||||||
chartView.postInvalidate();
|
chartView.postInvalidate();
|
||||||
|
|||||||
@@ -456,7 +456,6 @@ public class SendToMyMaps implements Runnable {
|
|||||||
(totalLocationsRead + totalLocationsPrepared + totalLocationsUploaded) * 100
|
(totalLocationsRead + totalLocationsPrepared + totalLocationsUploaded) * 100
|
||||||
/ (totalLocations * 3);
|
/ (totalLocations * 3);
|
||||||
totalPercentage = Math.min(99, totalPercentage);
|
totalPercentage = Math.min(99, totalPercentage);
|
||||||
Log.d(TAG, "Percentage: read=" + totalLocationsRead + "; prep=" + totalLocationsPrepared + "; up=" + totalLocationsUploaded + "; total=" + totalLocations + "; percentage=" + totalPercentage);
|
|
||||||
progressIndicator.setProgressValue(totalPercentage);
|
progressIndicator.setProgressValue(totalPercentage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ public class SaveActivity extends Activity {
|
|||||||
public static final String EXTRA_SHARE_FILE = "share_file";
|
public static final String EXTRA_SHARE_FILE = "share_file";
|
||||||
public static final String EXTRA_FILE_FORMAT = "file_format";
|
public static final String EXTRA_FILE_FORMAT = "file_format";
|
||||||
private static final int RESULT_DIALOG = 1;
|
private static final int RESULT_DIALOG = 1;
|
||||||
/* VisibleForTesting */ static final int PROGRESS_DIALOG = 2;
|
/* VisibleForTesting */
|
||||||
|
static final int PROGRESS_DIALOG = 2;
|
||||||
|
|
||||||
private MyTracksProviderUtils providerUtils;
|
private MyTracksProviderUtils providerUtils;
|
||||||
private long trackId;
|
private long trackId;
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ public class SendActivity extends Activity implements ProgressIndicator {
|
|||||||
|
|
||||||
private static final int SEND_DIALOG = 1;
|
private static final int SEND_DIALOG = 1;
|
||||||
private static final int PROGRESS_DIALOG = 2;
|
private static final int PROGRESS_DIALOG = 2;
|
||||||
/* @VisibleForTesting */ static final int DONE_DIALOG = 3;
|
/* @VisibleForTesting */
|
||||||
|
static final int DONE_DIALOG = 3;
|
||||||
|
|
||||||
// Services
|
// Services
|
||||||
private MyTracksProviderUtils providerUtils;
|
private MyTracksProviderUtils providerUtils;
|
||||||
|
|||||||
Reference in New Issue
Block a user