Addressing review suggestions.

This commit is contained in:
Rodrigo Damazio
2011-06-29 18:07:00 -03:00
parent abd8a230b4
commit 66fe8e694f
4 changed files with 8 additions and 6 deletions
@@ -218,11 +218,12 @@ public class ChartActivity extends Activity implements TrackDataListener {
settingsDialog.setOnClickListener(new OnClickListener() {
@Override
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++) {
boolean seriesEnabled = settingsDialog.isSeriesEnabled(i);
chartView.getChartValueSeries(i).setEnabled(seriesEnabled);
chartView.getChartValueSeries(i).setEnabled(settingsDialog.isSeriesEnabled(i));
}
setMode(settingsDialog.getMode());
chartView.postInvalidate();
@@ -456,7 +456,6 @@ public class SendToMyMaps implements Runnable {
(totalLocationsRead + totalLocationsPrepared + totalLocationsUploaded) * 100
/ (totalLocations * 3);
totalPercentage = Math.min(99, totalPercentage);
Log.d(TAG, "Percentage: read=" + totalLocationsRead + "; prep=" + totalLocationsPrepared + "; up=" + totalLocationsUploaded + "; total=" + totalLocations + "; percentage=" + 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_FILE_FORMAT = "file_format";
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 long trackId;
@@ -68,7 +68,8 @@ public class SendActivity extends Activity implements ProgressIndicator {
private static final int SEND_DIALOG = 1;
private static final int PROGRESS_DIALOG = 2;
/* @VisibleForTesting */ static final int DONE_DIALOG = 3;
/* @VisibleForTesting */
static final int DONE_DIALOG = 3;
// Services
private MyTracksProviderUtils providerUtils;